Interface ISimulation
The external service to start, control and stop simulation run. Use only this service to interact with
running simulation.
Assembly: Mars.Core.dll
Syntax
public interface ISimulation : ISimulationControl, IDisposable
Properties
WorkflowState
Gets or sets the current simulation state
with step and realtime progress
Declaration
SimulationWorkflowState WorkflowState { get; }
Property Value
Methods
PrepareInfrastructure(ModelDescription, SimulationConfig)
Prepare the simulation infrastructure in order to write the initial step and to perform the first
simulation step. This call will initialize all required entities and bring them into a state where
snapshot results can be written into target.
Declaration
SimulationWorkflowState PrepareInfrastructure(ModelDescription description, SimulationConfig config)
Parameters
Type |
Name |
Description |
ModelDescription |
description |
The static model description of the model to execute. |
SimulationConfig |
config |
The initialization inputConfiguration for simulation step zero. |
Returns
PrepareSimulation(ModelDescription, SimulationConfig)
Prepare the simulation execution with initialization data of the infrastructure, all initialization
data for each individual model type and the global inputConfiguration of the execution interval, step size
and result output.
Declaration
SimulationWorkflowState PrepareSimulation(ModelDescription description, SimulationConfig config)
Parameters
Type |
Name |
Description |
ModelDescription |
description |
The static model description of the model to execute. |
SimulationConfig |
config |
The initialization inputConfiguration for simulation step zero. |
Returns
StartSimulation()
Declaration
SimulationWorkflowState StartSimulation()
Returns
StartSimulation(ModelDescription, SimulationConfig)
Starts a simulation for the passed and all initialization data
in form of which includes all necessary configurations.
Declaration
SimulationWorkflowState StartSimulation(ModelDescription description, SimulationConfig config)
Parameters
Type |
Name |
Description |
ModelDescription |
description |
The static model description to create and simulate. |
SimulationConfig |
config |
The simulation config with input data references, mappings and global execution configurations. |
Returns
StartSimulation(ModelDescription, String)
Starts a simulation for the passed and all initialization data
in form of the input YAML or JSON file path, which includes all necessary
configurations.
Declaration
SimulationWorkflowState StartSimulation(ModelDescription description, in string configPath)
Parameters
Type |
Name |
Description |
ModelDescription |
description |
The static model description to create and simulate. |
System.String |
configPath |
The simulation config as YAML/JSON or the file path with input data and configurations. |
Returns