simulation_framework::core::lifecycle::SimulationInstance Class Reference
Last update: 16.07.2025class SimulationInstance More...
#include <simulation_instance.h>


Public Member Functions | |
| SimulationInstance (std::unique_ptr< IActivityFactory > activity_factory, std::shared_ptr< core::time::IClock > sim_clock, std::unique_ptr< time::ISimulationCompletionChecker > sim_state_checker, const core::StandaloneInitData &standalone_init_data, const core::SimulationParameters &core_parameters) | |
| void | Init () override |
| Initialize based on user config and turn the instance to ready state. | |
| void | StepOnce () override |
| Step the simulation based on base cycle time. | |
| void | Reset () override |
| provides the reset to SimRunner to let the simulation back to init state | |
| bool | IsSimulationFinished () override |
| indicates whether this run if simulation reaches the end | |
| std::chrono::milliseconds | GetSimulationDuration () const override |
| return the duration of the simulation in milliseconds | |
| std::chrono::milliseconds | GetSimulationBaseCycleTime () const override |
| return the base cycle time of the simulation in milliseconds, which usually is the greatest common divisor of all activity cycle times | |
Detailed Description
class SimulationInstance
SimulationInstance combines the basic interface of ISimulationInstance with the usage of an abstract ActivityFactory and Scheduler. It contains the activities defined in the scheduling config, if they are registered in the ActivityFactory.
Definition at line 33 of file simulation_instance.h.
Member Function Documentation
◆ GetSimulationBaseCycleTime()
|
overridevirtual |
return the base cycle time of the simulation in milliseconds, which usually is the greatest common divisor of all activity cycle times
Implements simulation_framework::core::lifecycle::ISimulationInstance.
◆ GetSimulationDuration()
|
overridevirtual |
return the duration of the simulation in milliseconds
Implements simulation_framework::core::lifecycle::ISimulationInstance.
◆ Init()
|
overridevirtual |
Initialize based on user config and turn the instance to ready state.
Implements simulation_framework::core::lifecycle::ISimulationInstance.
◆ IsSimulationFinished()
|
overridevirtual |
indicates whether this run if simulation reaches the end
Implements simulation_framework::core::lifecycle::ISimulationInstance.
◆ Reset()
|
overridevirtual |
provides the reset to SimRunner to let the simulation back to init state
Implements simulation_framework::core::lifecycle::ISimulationInstance.
◆ StepOnce()
|
overridevirtual |
Step the simulation based on base cycle time.
Implements simulation_framework::core::lifecycle::ISimulationInstance.
The documentation for this class was generated from the following file: