|
| | RuntimeContext ()=delete |
| |
| | RuntimeContext (std::shared_ptr< const EventAggregator > bus, std::shared_ptr< const ModelInput > inputs, std::unique_ptr< Scenario > scenario) |
| | Initialises a new instance of the RuntimeContext class.
|
| |
| int | time_now () const noexcept |
| | Gets the current simulation time.
|
| |
| int | start_time () const noexcept |
| | Gets the experiment start time.
|
| |
| unsigned int | current_run () const noexcept |
| | Gets the experiment current run number.
|
| |
| int | sync_timeout_millis () const noexcept |
| | Gets the data synchronisation timeout in milliseconds.
|
| |
| Population & | population () noexcept |
| | Gets a reference to the virtual population container.
|
| |
| const Population & | population () const noexcept |
| | Gets a reference to the virtual population container.
|
| |
| RuntimeMetric & | metrics () noexcept |
| | Gets a reference to the runtime metrics container.
|
| |
| const ModelInput & | inputs () const noexcept |
| | Gets a reference to the model inputs definition.
|
| |
| Scenario & | scenario () const noexcept |
| | Gets a reference to the simulation scenario instance.
|
| |
| Random & | random () const noexcept |
| | Gets a reference to the engine random number generator.
|
| |
| const HierarchicalMapping & | mapping () const noexcept |
| | Gets a read-only reference to the hierarchical risk factors mapping.
|
| |
| const std::vector< core::DiseaseInfo > & | diseases () const noexcept |
| | Gets a read-only reference to the select diseases information.
|
| |
| const core::IntegerInterval & | age_range () const noexcept |
| | Gets a read-only reference to the population age range constraints.
|
| |
| const std::string & | identifier () const noexcept |
| | Gets the simulation identifier for outside world messages.
|
| |
| void | set_current_time (const int time_now) noexcept |
| | Sets the current simulation time value.
|
| |
| void | set_current_run (const unsigned int run_number) noexcept |
| | Sets the current simulation run number.
|
| |
| void | reset_population (std::size_t initial_pop_size) |
| | Resets the virtual population to an initial size, with only new individuals.
|
| |
| void | publish (std::unique_ptr< EventMessage > message) const noexcept |
| | Publishes a polymorphic new message to the outside world synchronously.
|
| |
| void | publish_async (std::unique_ptr< EventMessage > message) const noexcept |
| | Publishes a polymorphic new message to the outside world asynchronously.
|
| |
Defines the Simulation runtime context data type.
The context holds the simulation runtime information, including the virtual population, and expose to all modules via the API calls. Only one context instance exists per simulation instance for internal use only by the engine algorithm.