Table of Contents

Class SimulationUtils

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

Collects utility methods used by the connector

public static class SimulationUtils
Inheritance
SimulationUtils
Inherited Members

Methods

LoadTimeseriesSimulationInput(Client, SimulatorRoutineRevisionInput, SimulatorRoutineRevisionConfiguration, SamplingConfiguration, CancellationToken)

Load the input time series data point for the given input configuration.

public static Task<SimulatorValueItem> LoadTimeseriesSimulationInput(this Client _cdf, SimulatorRoutineRevisionInput inputTs, SimulatorRoutineRevisionConfiguration routineConfiguration, SamplingConfiguration samplingConfiguration, CancellationToken token)

Parameters

_cdf Client
inputTs SimulatorRoutineRevisionInput
routineConfiguration SimulatorRoutineRevisionConfiguration
samplingConfiguration SamplingConfiguration
token CancellationToken

Returns

Task<SimulatorValueItem>

RunSteadyStateAndLogicalCheck(DataPointsResource, SimulatorRoutineRevisionConfiguration, DateTime, CancellationToken)

Run logical check and steady state detection based on a simulation configuration. Runs only if data sampling is enabled

public static Task<TimeRange> RunSteadyStateAndLogicalCheck(DataPointsResource dataPoints, SimulatorRoutineRevisionConfiguration config, DateTime validationEnd, CancellationToken token)

Parameters

dataPoints DataPointsResource

CDF data points resource

config SimulatorRoutineRevisionConfiguration

Simulation configuration

validationEnd DateTime

Time of the end of the validation check

token CancellationToken

Cancellation token

Returns

Task<TimeRange>

ToTimeSeriesData((long[] Timestamps, double[] Values), int, DataPointAggregate)

Convert data points sampled from CDF to time series data used by the Cognite.DataProcessing library

public static TimeSeriesData ToTimeSeriesData(this (long[] Timestamps, double[] Values) dataPoints, int granularity, DataPointAggregate aggreagate)

Parameters

dataPoints (long[] Timestamps, double[] Values)

Input data points

granularity int

Granularity in minutes

aggreagate DataPointAggregate

CDF aggregate type

Returns

TimeSeriesData

Time series data