Table of Contents

Class RoutineRunnerBase<A, T, V>

Namespace
Cognite.Simulator.Utils
Assembly
Cognite.Simulator.Utils.dll

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
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 ConnectorConfig

Connector configuration

simulators IList<SimulatorConfig>

List of simulators

cdf CogniteDestination

CDF client

modelLibrary IModelProvider<A, T>

Model library

configLibrary IRoutineProvider<V>

Configuration library

simulatorClient ISimulatorClient<T, V>

Simulator client

logger ILogger

Logger

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 SimulationRunItem

Simulation run item

startTime DateTime

Simulation start time

modelState T

Model state

routineRevision V

Routine revision object

samplingConfiguration SamplingConfiguration

Input sampling samplingConfiguration

token CancellationToken

Cancellation token

Returns

Task

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