Class SimulationArgs
Class respresenting the arguments passed to a WMSimulator instance when a DecisionModel is to be simulated with a specified set of control arguments.
Implements
Inherited Members
Namespace: Quantellia.WMServer.Simulation
Assembly: WMServer.dll
Syntax
public class SimulationArgs : IDocumented
Constructors
SimulationArgs()
Declaration
public SimulationArgs()
Properties
Documentation
If the saveAs argument is not null, then this argument allows a longer documentation string to be included in the record of the saved evaluation. The MIME type of the string must be specified in the DocumentationMIMEType argument.
Declaration
public string? Documentation { get; set; }
Property Value
Type | Description |
---|---|
string |
DocumentationMIMEType
If both the saveAs argument and the documentation argument are not null, then this argument must be set to the string identifying the MIME type of text in the documentation argument. If either SaveAs or Documentation are null, then this argument is ignored.
Declaration
public string? DocumentationMIMEType { get; set; }
Property Value
Type | Description |
---|---|
string |
ProcessorID
ID of the processor that should process the request. If null, a new processor is created and its ID is returned to the caller in the object returned by the Evaluate(string, EvaluationArgs) or Simulate(string, SimulationArgs) operations.
Declaration
public string? ProcessorID { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
The first time a DecisionModel is run by a WMProcessor instance, World Modeler Server will create a new WMProcessor instance, assign it a unique ID, and pass this back to the caller in the return value of the invocation of either the Evaluate(string, EvaluationArgs) or the Simulate(string, SimulationArgs) operations.
Using the cached WMProcessor instance uses resources more efficiently as it prevents multiple WMProcessor instancesto be created for the same DecisionModel (although this is permissable if required), but more imporantly, allows the state of the DecisionModel being evaluated to be retained from one invocation to the next so that the model does not need to be initialized and re-run to achieve its previous state every time the processor is invoked with a change in the arguments.
ReturnElements
List of IDs of the DecisionModelElements whose values will be returned to the caller after evaluation of the DecisionModel. If null, all model elements will be returned. If an empty list, then no model elements will be returned.
Declaration
public List<string>? ReturnElements { get; set; }
Property Value
Type | Description |
---|---|
List<string> |
Remarks
Returning a smaller subset of model elements can improve efficiency by reducing the I/O processing load. ///
SaveAs
If the inputs and results of the evaluation are to be saved, then this argument specifies the name used to refer to the saved evaluation. If this argument is null, then the evaluation will not be saved.
Declaration
public string? SaveAs { get; set; }
Property Value
Type | Description |
---|---|
string |
SimulationParams
Dictionary of name = value pairs specifiying values to set for an execution run of the model.
Declaration
public SimulationParams SimulationParams { get; set; }
Property Value
Type | Description |
---|---|
SimulationParams |
Remarks
The name (key) specified for each entry can be:
- The short Name of each DecisionModelElement whose value is to be set. This requires that the Name is unique in the model.
- The FullyQualifiedName of the DecisionModelElementwhose value is to be set. This should be used in preference of the short Name if the short Name is not unique in the model.
The object may be either a native data type (int, double, string, DateTime
, etc.) or a subtype of ElementValue.
Summary
If the saveAs argument is not null, then this argument allows a short summary string to be included in the record of the saved evaluation. If SaveAs is null, then this argument is ignored.
Declaration
public string? Summary { get; set; }
Property Value
Type | Description |
---|---|
string |
UserData
An optional, user-definable string for associated data with this invocation. The data will also be available in object returned to the caller, and matching this invocation.
Declaration
public string? UserData { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
If the caller needs to be able to associate results to the invocations that generated them, then setting the UserData data to a unique value (e.g. a sequence number) is an effective way to do this. For example, when presenting results in the same order as requests in an asynchronous environment.