Show / Hide Table of Contents

Class EvaluationArgs

Class respresenting the arguments passed to a WMProcessor instance when a DecisionModel is to be run with a specified set of arguments.

Inheritance
object
EvaluationArgs
Implements
IDocumentedEntity
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.Execution
Assembly: WMServer.dll
Syntax
public class EvaluationArgs : IDocumentedEntity

Constructors

EvaluationArgs()

Declaration
public EvaluationArgs()

EvaluationArgs(Dictionary<string, object>)

Create a new instance and initialize the Arguments collection.

Declaration
public EvaluationArgs(Dictionary<string, object> args)
Parameters
Type Name Description
Dictionary<string, object> args

Properties

Arguments

Dictionary of name = value pairs specifiying values to set for an execution run of the model.

Declaration
public Dictionary<string, object> Arguments { get; set; }
Property Value
Type Description
Dictionary<string, object>
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.

Documentation

If the saveAs arguments is not null, then this arguments 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 arguments.

Declaration
public string? Documentation { get; set; }
Property Value
Type Description
string

DocumentationMIMEType

If both the saveAs arguments and the documentation arguments are not null, then this arguments must be set to the string identifying the MIME type of text in the documentation arguments. If either SaveAs or Documentation are null, then this arguments 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 arguments specifies the name used to refer to the saved evaluation. If this arguments is null, then the evaluation will not be saved.

Declaration
public string? SaveAs { get; set; }
Property Value
Type Description
string

Summary

If the saveAs arguments is not null, then this arguments allows a short summary string to be included in the record of the saved evaluation. If SaveAs is null, then this arguments 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 the object returned to the caller by the Evaluate(string, EvaluationArgs) or Simulate(string, SimulationArgs) operations.

Declaration
public string? UserData { get; set; }
Property Value
Type Description
string
Remarks

If the caller needs to be able to associate returned 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.

Implements

IDocumentedEntity
In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE