Simulation Provider
This simulation provider will execute evaluation requests on the same model and collect the desired responses. This provider runs the model's replications locally and sequentially in the same execution thread as the requests.
Note that the model is reused. This may cause issues in a parallel execution environment or if the model is mutated externally. The secondary constructor will create a new model instance for use by the provider. Use the primary constructor if you are certain that there are no issues with sharing the model instance.
Parameters
a function that promises to create the model that will be executed. The model that is created is assumed to be configured to run.
if supplied the cache will be used to store executed simulation runs.
Indicates whether the provider should use cached simulation runs when responding to requests. The default is false. If the simulation runs are not cached, this option has no effect.
Constructors
Secondary constructor for the SimulationProvider class.
Properties
Functions
Indicates if the input names are valid. The input names are valid if they are empty. If they are not empty, then they must be a subset of the input names associated with the model.
Indicates if the response names are valid. The response names are valid if they are empty. If they are not empty, then they must be a subset of the response names associated with the model.
Indicates if the model identified by the modelIdentifier is valid. That is, this provider can perform simulation runs on the model.
Indicates if the request is valid. The request is valid if
Causes the execution counter to be reset to 0. Care must be taken if a database is used to collect simulation results. The names of the experiments are based on the value of the counter. An error will occur if multiple experiments have the same name in the database. You will likely want to export and clear the data from the database before running additional simulations.
Executes multiple simulations based on the provided list of request data and maps each request to a corresponding ResponseMap. Each request is processed individually, and the results of the simulations are stored as a key-value pair in the returned map. If the input list is empty, an exception is thrown. This default implementation runs all the requests sequentially based on the order of the supplied list.