/*
** Copyright (C) 2018-2021 Alexander Lindemann, Max Luebke (University of
** Potsdam)
**
** Copyright (C) 2018-2023 Marco De Lucia, Max Luebke (GFZ Potsdam)
**
** Copyright (C) 2023-2024 Max Luebke (University of Potsdam)
**
** POET is free software; you can redistribute it and/or modify it under the
** terms of the GNU General Public License as published by the Free Software
** Foundation; either version 2 of the License, or (at your option) any later
** version.
**
** POET is distributed in the hope that it will be useful, but WITHOUT ANY
** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
** A PARTICULAR PURPOSE. See the GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License along with
** this program; if not, write to the Free Software Foundation, Inc., 51
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#pragma once

#include <cstdint>
#include <string>
#include <vector>

#include <Rcpp.h>

static const char *poet_version = "@POET_VERSION@";

// using the Raw string literal to avoid escaping the quotes
static const inline std::string kin_r_library = R"(@R_KIN_LIB@)";

static const inline std::string init_r_library = R"(@R_INIT_LIB@)";
static const inline std::string ai_surrogate_r_library =
    R"(@R_AI_SURROGATE_LIB@)";
static const inline std::string r_runtime_parameters = "mysetup";

struct RuntimeParameters {
  std::string out_dir;
  std::vector<double> timesteps;
  std::vector<double> species_epsilon;

  Rcpp::List init_params;

  // MDL added to accomodate for qs::qsave/qread
  bool as_rds = false;
  bool as_qs = false;
  std::string out_ext;

  bool print_progress = false;

  bool control_iteration_active = false;
  std::uint32_t control_iteration = 1;

  static constexpr std::uint32_t WORK_PACKAGE_SIZE_DEFAULT = 32;
  std::uint32_t work_package_size = WORK_PACKAGE_SIZE_DEFAULT;

  bool use_dht = false;
  static constexpr std::uint32_t DHT_SIZE_DEFAULT = 1.5E3;
  std::uint32_t dht_size = DHT_SIZE_DEFAULT;
  static constexpr std::uint8_t DHT_SNAPS_DEFAULT = 0;
  std::uint8_t dht_snaps = DHT_SNAPS_DEFAULT;

  bool use_interp = false;
  static constexpr std::uint32_t INTERP_SIZE_DEFAULT = 100;
  std::uint32_t interp_size = INTERP_SIZE_DEFAULT;
  static constexpr std::uint32_t INTERP_MIN_ENTRIES_DEFAULT = 5;
  std::uint32_t interp_min_entries = INTERP_MIN_ENTRIES_DEFAULT;
  static constexpr std::uint32_t INTERP_BUCKET_ENTRIES_DEFAULT = 20;
  std::uint32_t interp_bucket_entries = INTERP_BUCKET_ENTRIES_DEFAULT;

  bool use_ai_surrogate = false;
};
