21#ifndef SIMULATION_MODEL_H
22#define SIMULATION_MODEL_H
24#include "nlohmann/json.hpp"
37#define MODEL(MODEL_NAME) \
38class MODEL_NAME : public Model {\
40 MODEL_NAME(Model &pnt, const std::string &m_name=#MODEL_NAME);\
41 MODEL_NAME(SimulationExecutive &e, const std::string &m_name=#MODEL_NAME);\
42 MODEL_NAME(Model &pnt, int schedule_slot, const std::string &m_name=#MODEL_NAME);\
43 MODEL_NAME(SimulationExecutive &e, int schedule_slot, const std::string &m_name=#MODEL_NAME);\
44 virtual ~MODEL_NAME();\
46 virtual std::string classType() {return #MODEL_NAME;}
51#define MODEL_LOG(LEVEL, MESSAGE)\
53 std::string log_msg = MESSAGE;\
54 LOG(LEVEL, log_msg.c_str());\
58 class SimulationExecutive;
96 Model(
Model &pnt, int16 schedule_slot,
const std::string &m_name=
"Unnamed");
142 virtual nlohmann::json
asJson();
Base app class for derived implementation.
Definition App.h:55
virtual std::string classType()
Return the name of the class type.
Definition Model.h:154
int16 _schedule_slot
Internal variable to hold schedule slot for model.
Definition Model.h:160
int configureFromJson(const std::string &file_path)
Configure model from a json file with keys as params of the model.
Definition Model.cpp:62
std::string _default_configuration_name
Hold default configuration name model is defined from.
Definition Model.h:157
std::vector< std::string > listDefaultConfigs()
List all default options for the model type.
Definition Model.cpp:46
virtual nlohmann::json asJson()
Get model information as json.
Definition Model.cpp:100
Model(Model &pnt, int16 schedule_slot, const std::string &m_name="Unnamed")
Task-based constructor for the task. Auto-assigns executive.
Definition Model.cpp:26
SimulationExecutive & exc
Definition Model.h:150
int configureFromDefault(const std::string &default_name)
Configure model from a default configuration.
Definition Model.cpp:50
void dump()
Dump all information associated with the model.
Definition Model.cpp:151
virtual ~Model()
Desrtuctor. Doesn't really do anything.
Definition Model.h:107
Implementation of the executive class for simulation.
Definition SimulationExecutive.h:64
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22