Class RoutineRunnerBase<A, T, V>
Simulation runner for simulation routine revision of type CogniteSdk.Alpha.SimulatorRoutineRevision
public abstract class RoutineRunnerBase<A, T, V> : SimulationRunnerBase<A, T, V> where A : AutomationConfig where T : ModelStateBase where V : SimulatorRoutineRevision
Type Parameters
A
T
Type of model state objects
V
Type of simulation configuration objects
- Inheritance
-
SimulationRunnerBase<A, T, V>RoutineRunnerBase<A, T, V>
- Derived
- Inherited Members
Constructors
RoutineRunnerBase(ConnectorConfig, IList<SimulatorConfig>, CogniteDestination, IModelProvider<A, T>, IRoutineProvider<V>, ISimulatorClient<T, V>, ILogger)
Creates an instance of the runner with the provided parameters
protected RoutineRunnerBase(ConnectorConfig connectorConfig, IList<SimulatorConfig> simulators, CogniteDestination cdf, IModelProvider<A, T> modelLibrary, IRoutineProvider<V> configLibrary, ISimulatorClient<T, V> simulatorClient, ILogger logger)
Parameters
connectorConfig
ConnectorConfigConnector configuration
simulators
IList<SimulatorConfig>List of simulators
cdf
CogniteDestinationCDF client
modelLibrary
IModelProvider<A, T>Model library
configLibrary
IRoutineProvider<V>Configuration library
simulatorClient
ISimulatorClient<T, V>Simulator client
logger
ILoggerLogger
Properties
SimulatorClient
Client that implements the connector with a simulator
protected ISimulatorClient<T, V> SimulatorClient { get; }
Property Value
- ISimulatorClient<T, V>
Methods
RunRoutine(SimulationRunItem, DateTime, T, V, SamplingConfiguration, CancellationToken)
Run the given simulation run by parsing and executing the simulation routine associated with it
protected override Task RunRoutine(SimulationRunItem runItem, DateTime startTime, T modelState, V routineRevision, SamplingConfiguration samplingConfiguration, CancellationToken token)
Parameters
runItem
SimulationRunItemSimulation run item
startTime
DateTimeSimulation start time
modelState
TModel state
routineRevision
VRoutine revision object
samplingConfiguration
SamplingConfigurationInput sampling samplingConfiguration
token
CancellationTokenCancellation token
Returns
Exceptions
- ArgumentNullException
When one of the arguments is missing
- SimulationException
When it was not possible to sample data points
- ConnectorException
When it was not possible to save the results in CDF