Class RuntimeModelImpl
Inheritance
System.Object
RuntimeModelImpl
Assembly: Mars.Core.dll
Syntax
public sealed class RuntimeModelImpl : object, IRuntimeModel, IDisposable
Constructors
RuntimeModelImpl(IConfigLoader, IEntityMapping)
Declaration
public RuntimeModelImpl(IConfigLoader configLoader, IEntityMapping entityMapping)
Parameters
Type |
Name |
Description |
IConfigLoader |
configLoader |
The inputConfiguration root object keeping all required references |
IEntityMapping |
entityMapping |
The entity mapping component for in/output |
Properties
AllActiveLayers
The set of active layers that have a pre-tick and post-tick method.
Declaration
public ISet<ISteppedActiveLayer> AllActiveLayers { get; }
Property Value
Type |
Description |
ISet<ISteppedActiveLayer> |
|
AllLayers
All layer instances of the model.
Declaration
public ISet<ILayer> AllLayers { get; }
Property Value
Type |
Description |
ISet<ILayer> |
|
Context
Gets the current simulation context including execution related information's.
Declaration
public ISimulationContext Context { get; set; }
Property Value
Type |
Description |
ISimulationContext |
|
EntityMapping
Result adapter used to persist the simulation step results.
Declaration
public IEntityMapping EntityMapping { get; }
Property Value
ExecutionAgentTypeGroups
The set of all agent instances in this execution environment
grouped by the agent type description
Declaration
public IDictionary<AgentType, IDictionary<Guid, IAgent>> ExecutionAgentTypeGroups { get; }
Property Value
Type |
Description |
IDictionary<AgentType, IDictionary<Guid, IAgent>> |
|
ExecutionGroups
The set of all agent instances in this environment
separated by the the tick frequency.
Declaration
public IDictionary<int, ConcurrentSet<ITickClient>> ExecutionGroups { get; }
Property Value
Type |
Description |
IDictionary<System.Int32, ConcurrentSet<ITickClient>> |
|
Layers
The mapping of all layer instances with vice versa 1:1 mapping of their type description
Declaration
public TwoWayDictionary<LayerType, ILayer> Layers { get; }
Property Value
Type |
Description |
TwoWayDictionary<LayerType, ILayer> |
|
RegisterAgent
Gets the registration handle to load an at the runtime system to get be triggered by
them.
The runtime system uses the passed executionInterval to associated the object in a specific execution
group.
Otherwise the type mapping of this object will be used or 1 as default value (triggered in each tick).
Declaration
public RegisterAgent RegisterAgent { get; }
Property Value
Type |
Description |
RegisterAgent |
|
Repartitioning
Declaration
public bool Repartitioning { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
UnregisterAgent
Gets the de-registration handle to unload a from the runtime system associated to the
passed
The runtime system uses the executionInterval to deregister the tick object from the execution groups
Declaration
public UnregisterAgent UnregisterAgent { get; }
Property Value
Type |
Description |
UnregisterAgent |
|
Methods
AddActiveLayer(ISteppedActiveLayer, LayerType)
Declaration
public bool AddActiveLayer(ISteppedActiveLayer layer, LayerType type)
Parameters
Type |
Name |
Description |
ISteppedActiveLayer |
layer |
|
LayerType |
type |
|
Returns
Type |
Description |
System.Boolean |
|
AddLayer(ILayer, LayerType)
Declaration
public bool AddLayer(ILayer layer, LayerType type)
Parameters
Type |
Name |
Description |
ILayer |
layer |
|
LayerType |
type |
|
Returns
Type |
Description |
System.Boolean |
|
AddNewAndRemoveDeletedTickClients()
Declaration
public void AddNewAndRemoveDeletedTickClients()
AddNewTickClients()
Declaration
public void AddNewTickClients()
DeleteRemovedTickClients()
Declaration
public void DeleteRemovedTickClients()
Dispose()
Declaration
RegisterTickClient(ILayer, ITickClient)
Declaration
public void RegisterTickClient(ILayer layer, ITickClient tickClient)
Parameters
Type |
Name |
Description |
ILayer |
layer |
|
ITickClient |
tickClient |
|
UnregisterAll()
Removes all registered entities, agents or layers from this runtime environment.
Declaration
public void UnregisterAll()
UnregisterTickClient(ILayer, ITickClient)
Declaration
public void UnregisterTickClient(ILayer layer, ITickClient tickClient)
Parameters
Type |
Name |
Description |
ILayer |
layer |
|
ITickClient |
tickClient |
|
Implements
IDisposable