73 for (
int i = 0; i < nbSteps; i++)
99 }
else if (format ==
'h') {
101 }
else if (format ==
'm') {
103 }
else if (format ==
's') {
106 throw std::invalid_argument(
"received invalid format ['d': day, 'h': hours, 'm': minutes, 's': seconds]");
Defines the Scenario class for managing the simulation scenario.
size_t getNbUpdates() const
get the number of update since the creation of the world
Manages the simulation scenario.
World & getWorld()
Gets the world of the scenario.
void init(nlohmann::json config)
Initializes the scenario with a configuration.
void loop()
Runs the main loop of the scenario.
vector< PrimoCell< CellBody > * > * _getCells()
Gets the cells in the simulation.
Simu(string params, int seed)
int getCurrentStep()
Gets the current number of time steps.
CellPlugin< PrimoCell< CellBody > > * plugins
Cell plugins.
void update(int nbSteps)
Updates the simulation by multiple time steps.
double getTime(char format)
Gets the elapsed time in a given format.
void update()
Updates the simulation by one time step.
a class to store JSON values
static JSON_NODISCARD basic_json parse(detail::input_adapter &&i, const parser_callback_t cb=nullptr, const bool allow_exceptions=true)
deserialize from a compatible input
A simple vector class template.
Provides common mathematical functions and vector operations.
static random_engine_t & globalRand()
access to the static global random engine.This pseudo - random generator is* used in random 3D vector...