Class SimulationConfig
Represents the model input scenario description, including each startup- and execution parameter.
Inheritance
System.Object
SimulationConfig
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Interfaces.Model
Assembly: Mars.Interfaces.dll
Syntax
public class SimulationConfig
Constructors
| Improve this Doc View SourceSimulationConfig()
Represents the model input scenario description, including each startup- and execution parameter.
Declaration
public SimulationConfig()
Properties
| Improve this Doc View SourceAgentMappings
The agent type mappings to create agent type instances
Declaration
[JsonProperty("agents")]
public List<AgentMapping> AgentMappings { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<AgentMapping> |
Description
Gets or sets an optional description used to distinguish this run in the output.
Declaration
[JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
EntityMappings
The entity type mappings to create entity instances
Declaration
[JsonProperty("entities")]
public List<EntityMapping> EntityMappings { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<EntityMapping> |
Execution
The settings for the local and distributed simulation execution
Declaration
[JsonProperty("execution")]
public Execution Execution { get; set; }
Property Value
Type | Description |
---|---|
Execution |
Globals
The global visible inputConfiguration for execution
Declaration
[JsonProperty("globals", Required = Required.Always)]
public Globals Globals { get; set; }
Property Value
Type | Description |
---|---|
Globals |
IsValid
Indicates whether this SimulationConfig is correct and
has already been passed the validation phase.
When a value is present the check was already been performed otherwise not.
Declaration
[JsonIgnore]
public bool? IsValid { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
LayerMappings
The layer type mappings to create layer type instances
Declaration
[JsonProperty("layers")]
public List<LayerMapping> LayerMappings { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<LayerMapping> |
ModelDescription
The associated model used with this inputConfiguration
Declaration
public ModelDescription ModelDescription { get; set; }
Property Value
Type | Description |
---|---|
ModelDescription |
SimulationIdentifier
Gets or sets the stable simulation id, valid for the whole lifecycle
and used to distinguish simulation results for different scenarios.
Declaration
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public string SimulationIdentifier { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
When no identifier was set, the name is inferred from the executing box/assembly
where the Main() entrypoint is defined.
|
Improve this Doc
View Source
SimulationRunIteration
Gets or sets the iteration of this scenario, in order
to distinguish multiple runs in the simulation result.
Declaration
[JsonIgnore]
public int? SimulationRunIteration { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
TypeMappings
All type mappings of this inputConfiguration
Declaration
[JsonIgnore]
public IEnumerable<TypeMapping> TypeMappings { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TypeMapping> |
Methods
| Improve this Doc View SourceDeserialize(String)
Deserialize the input inputConfiguration to a readable SimulationConfig
and performs some essential check on that
Declaration
public static SimulationConfig Deserialize(string config)
Parameters
Type | Name | Description |
---|---|---|
System.String | config | The input yaml, json document or as file path |
Returns
Type | Description |
---|---|
SimulationConfig |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The config is null or empty |
Serialize()
Serialize this instance of the SimulationConfig into a corresponding
JSON compressed string
Declaration
public string Serialize()
Returns
Type | Description |
---|---|
System.String | Returns the JSON-string format of this config instance. |