Interface ISimulationContext
Inherited Members
Namespace: Mars.Interfaces
Assembly: Mars.Interfaces.dll
Syntax
public interface ISimulationContext : ISimulationState, IDisposable
Properties
Active
Indicates the active or inactive state
of the simulation workflow loop
Declaration
bool Active { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EndTimePoint
Gets the ending realtime for the last executed simulation tick.
Declaration
DateTime? EndTimePoint { get; }
Property Value
Type | Description |
---|---|
System.Nullable<DateTime> |
InputWatch
Gets the stopwatch, used to measure the duration of the initialization phase,
for each agent, entity and layer together.
Declaration
Stopwatch InputWatch { get; }
Property Value
Type | Description |
---|---|
Stopwatch |
IsTimeReferenced
Determines whether the simulation is executed with a reference to time or not
Declaration
bool IsTimeReferenced { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MaxTicks
Gets or sets the maximum amount of ticks, when a simulation time-range is specified.
Declaration
long MaxTicks { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
OneTickTimeSpan
Gets the global accessible time delta interval for realtime scenarios.
Declaration
TimeSpan? OneTickTimeSpan { get; }
Property Value
Type | Description |
---|---|
System.Nullable<TimeSpan> |
OutputWatch
Gets the tick watch, used to perform tick-wise measure during the execution.
Declaration
Stopwatch OutputWatch { get; }
Property Value
Type | Description |
---|---|
Stopwatch |
RestartFlag
Indicates a restart of the simulation workflow,
the workflow itself is active furthermore
Declaration
bool RestartFlag { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ResumeFlag
Indicates that the simulation shall be resumed
from the last paused simulation step
Declaration
bool ResumeFlag { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
StartStep
Gets or sets the optional start step for step-based execution.
Declaration
long StartStep { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
StartTimePoint
Gets the initializing realtime for simulation tick 0.
Declaration
DateTime? StartTimePoint { get; }
Property Value
Type | Description |
---|---|
System.Nullable<DateTime> |
StepFlag
Indicates whether a simulation step shall be calculated
Declaration
bool StepFlag { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TickWatch
Gets the tick watch, used to perform tick-wise measure during the execution.
Declaration
Stopwatch TickWatch { get; }
Property Value
Type | Description |
---|---|
Stopwatch |
Methods
SetTick(Int32, Int32)
Sets the current step context to the specified one.
Declaration
void SetTick(int tick, int delta = 1)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tick | The ticks to set for. |
System.Int32 | delta | The delta timespan of the logical time. |
UpdateStep(Int32, Int32)
Updates the clock with the system execution tick by the specified amount of
steps
or 1
as default with step size deltaT
and the current realtime point
by OneTickTimeSpan by one simulation tick.
Declaration
void UpdateStep(int delta = 1, int steps = 1)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | delta | The logical delta step for move forward in time |
System.Int32 | steps | The amount of steps to update for. |