Skip to main content

AVxcelerate Simulation Framework 2025 R2

simulation_instance

Last update: 16.07.2025
1
5
6#pragma once
7
8#include "core/lifecycle/i_activity_factory/i_activity_factory.h"
9#include "core/lifecycle/i_simulation_instance/i_simulation_instance.h"
10#include "core/service/parameter/simulation_parameters.h"
11#include "core/service/standalone_activity_service/standalone_init_data/standalone_init_data.h"
12#include "core/time/i_clock/i_clock.h"
13#include "core/time/i_simulation_completion_checker/i_simulation_completion_checker.h"
14
20{
21namespace core
22{
23namespace lifecycle
24{
25
26class SimulationInstanceImpl;
27
29
34{
35
36 public:
37 SimulationInstance(std::unique_ptr<IActivityFactory> activity_factory,
38 std::shared_ptr<core::time::IClock> sim_clock,
39 std::unique_ptr<time::ISimulationCompletionChecker> sim_state_checker,
40 const core::StandaloneInitData& standalone_init_data,
42
44
45 void Init() override;
46 void StepOnce() override;
47 void Reset() override;
48 bool IsSimulationFinished() override;
49 std::chrono::milliseconds GetSimulationDuration() const override;
50 std::chrono::milliseconds GetSimulationBaseCycleTime() const override;
51
52 private:
53 std::unique_ptr<SimulationInstanceImpl> impl_;
54};
55
56} // namespace lifecycle
57} // namespace core
58} // namespace simulation_framework
This is the concrete Topic class that can be used for creation of a communication channel with given ...
Definition topic.h:38
std::chrono::milliseconds GetSimulationDuration() const override
return the duration of the simulation in milliseconds
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
void Init() override
Initialize based on user config and turn the instance to ready state.
bool IsSimulationFinished() override
indicates whether this run if simulation reaches the end
std::chrono::milliseconds GetSimulationBaseCycleTime() const override
return the base cycle time of the simulation in milliseconds, which usually is the greatest common di...
The namespace for all core functionalities under namespace simulation_framework.
The top namespace for simulation framework.
The SimulationParameters struct encapsulates parameters related to simfwk-core configuration.

Connect with Ansys