Class RoutineImplementationBase
Base implementation for simulation routines. This class parses routines of type CogniteSdk.Alpha.SimulatorRoutineRevision and calls the abstract methods that executes each step type.
public abstract class RoutineImplementationBase
- Inheritance
-
RoutineImplementationBase
- Inherited Members
Constructors
RoutineImplementationBase(SimulatorRoutineRevision, Dictionary<string, SimulatorValueItem>, ILogger)
Creates a new simulation routine with the given routine revision
public RoutineImplementationBase(SimulatorRoutineRevision routineRevision, Dictionary<string, SimulatorValueItem> inputData, ILogger logger)
Parameters
routineRevision
SimulatorRoutineRevisionRoutine revision object
inputData
Dictionary<string, SimulatorValueItem>Data to use as input
logger
ILogger
Methods
GetOutput(SimulatorRoutineRevisionOutput, Dictionary<string, string>)
Gets a numeric simulation result that should be saved as a time series
public abstract SimulatorValueItem GetOutput(SimulatorRoutineRevisionOutput outputConfig, Dictionary<string, string> arguments)
Parameters
outputConfig
SimulatorRoutineRevisionOutputOutput time series configuration
arguments
Dictionary<string, string>Extra arguments
Returns
- SimulatorValueItem
PerformSimulation()
Perform the simulation routine and collect the results
public virtual Dictionary<string, SimulatorValueItem> PerformSimulation()
Returns
- Dictionary<string, SimulatorValueItem>
Simulation results
Exceptions
- SimulationException
When the simulation configuration is invalid
- SimulationRoutineException
When the routine execution fails
RunCommand(Dictionary<string, string>)
Invoke the given command on the simulator using the provided arguments.
public abstract void RunCommand(Dictionary<string, string> arguments)
Parameters
arguments
Dictionary<string, string>Arguments
SetInput(SimulatorRoutineRevisionInput, SimulatorValueItem, Dictionary<string, string>)
Implements a step that sets the value of an input to a simulation
public abstract void SetInput(SimulatorRoutineRevisionInput inputConfig, SimulatorValueItem input, Dictionary<string, string> arguments)
Parameters
inputConfig
SimulatorRoutineRevisionInputInput configuration
input
SimulatorValueItemInput value
arguments
Dictionary<string, string>Extra arguments