SIMULATIONS¶
Overall simulation management class.
Overview:
BasicSimulationThreadedSimulation
SIMULATIONS¶
-
class BasicSimulation¶
Master Simulation Controlling Class Links population with sweeps, and runs the sweeps to perform simulation Reporters can be attached to extract information about the simulation.
Public Functions
-
BasicSimulation(PopulationPtr population)¶
Construct a new Basic Simulation object.
- Parameters:
population – Population simulation should work on
-
~BasicSimulation()¶
Destroy the Basic Simulation:: Basic Simulation object.
-
void addSweep(SweepInterfacePtr sweep)¶
Add a sweep to the population Sweeps sholud be added in the order they will be run each iteration.
- Parameters:
sweep – Sweep to add
-
void addTimestepReporter(TimestepReporterInterfacePtr reporter)¶
Attach a reporter to the simulation Timestep Reporter to output information iteration steps.
- Parameters:
reporter – Timestep Reporter to add
-
void simulate(unsigned short timesteps)¶
Perform Simulation Run the configured simulation.
- Parameters:
timesteps – Number of timesteps ot run for
-
BasicSimulation(PopulationPtr population)¶
-
class ThreadedSimulation¶
Master Simulation Controlling Class with Multithreading Links population with sweeps, and runs the sweeps to perform simulation Reporters can be attached to extract information about the simulation.
Public Functions
-
ThreadedSimulation(PopulationPtr population, std::optional<size_t> nThreads)¶
Construct a new Threaded Simulation:: Threaded Simulation object.
- Parameters:
population – Population simulation should work on
nThreads – Number of threads to run simulation across
-
~ThreadedSimulation()¶
Destroy the Threaded Simulation:: Threaded Simulation object.
-
void addSweep(SweepInterfacePtr sweep, size_t group)¶
Add a sweep to the population Sweeps sholud be added in the order they will be run each iteration Sweeps are run in groups. Within a group the sweeps are distributed amongst the cells across threads and so order is not guaranteed. Sweep groups are guaranteed to run in order.
- Parameters:
sweep – Sweep to add
group – Sweep group number to add sweep to
-
void addTimestepReporter(TimestepReporterInterfacePtr reporter)¶
Attach a reporter to the simulation Timestep Reporter to output information iteration steps.
- Parameters:
reporter – Timestep Reporter to add
-
void simulate(unsigned short timesteps)¶
Perform Simulation Run the configured simulation.
- Parameters:
timesteps – Number of timesteps ot run for
-
ThreadedSimulation(PopulationPtr population, std::optional<size_t> nThreads)¶