Skip to main content

AVxcelerate Simulation Framework 2025 R2

simulation_framework::core::lifecycle::SimulationInstance Class Reference

Last update: 16.07.2025

class SimulationInstance More...

#include <simulation_instance.h>

Inheritance diagram for simulation_framework::core::lifecycle::SimulationInstance:
Collaboration diagram for simulation_framework::core::lifecycle::SimulationInstance:

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()

std::chrono::milliseconds simulation_framework::core::lifecycle::SimulationInstance::GetSimulationBaseCycleTime ( ) const
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()

std::chrono::milliseconds simulation_framework::core::lifecycle::SimulationInstance::GetSimulationDuration ( ) const
overridevirtual

return the duration of the simulation in milliseconds

Implements simulation_framework::core::lifecycle::ISimulationInstance.

◆ Init()

void simulation_framework::core::lifecycle::SimulationInstance::Init ( )
overridevirtual

Initialize based on user config and turn the instance to ready state.

Implements simulation_framework::core::lifecycle::ISimulationInstance.

◆ IsSimulationFinished()

bool simulation_framework::core::lifecycle::SimulationInstance::IsSimulationFinished ( )
overridevirtual

indicates whether this run if simulation reaches the end

Implements simulation_framework::core::lifecycle::ISimulationInstance.

◆ Reset()

void simulation_framework::core::lifecycle::SimulationInstance::Reset ( )
overridevirtual

provides the reset to SimRunner to let the simulation back to init state

Implements simulation_framework::core::lifecycle::ISimulationInstance.

◆ StepOnce()

void simulation_framework::core::lifecycle::SimulationInstance::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:

Connect with Ansys