Table of Contents

Interface ISimulatableModel

Namespace
TimeSeriesAnalysis.Dynamic
Assembly
TimeSeriesAnalysis.dll

Generic interface that any process model needs to implement if it is to be simulated by PlantSimulator.

public interface ISimulatableModel

Methods

AddSignalToOutput(string)

Add an additive signal to the output.

void AddSignalToOutput(string additiveInputID)

Parameters

additiveInputID string

Clone(string)

Create a deep copy of itself

ISimulatableModel Clone(string ID)

Parameters

ID string

Returns

ISimulatableModel

GetAdditiveInputIDs()

Get additive input IDs.

string[] GetAdditiveInputIDs()

Returns

string[]

GetBothKindsOfInputIDs()

Get both additive and model input IDs.

string[] GetBothKindsOfInputIDs()

Returns

string[]

GetID()

An unique name of the process model.

string GetID()

Returns

string

GetLengthOfInputVector()

Get the length of the input vector.

int GetLengthOfInputVector()

Returns

int

GetModelInputIDs()

Return the inputIDs that are "internal" i.e. related to the model and internal state x, but not "additive".

string[] GetModelInputIDs()

Returns

string[]

GetOutputID()

Get the output ID.

string GetOutputID()

Returns

string

GetOutputIdentID()

Get the ID of the "OutputIdent" signal.

string GetOutputIdentID()

Returns

string

GetOutputSignalType()

Get the type of the output signal.

SignalType GetOutputSignalType()

Returns

SignalType

GetProcessModelType()

Returns the type of process model.

ModelType GetProcessModelType()

Returns

ModelType

GetSteadyStateInput(double, int, double[])

Calculates the value u0 of u that at steady-state will give the output value y0. This method is used when starting a method at steady-state (assumes that disturbance is zero!).

double? GetSteadyStateInput(double x0, int inputIdx = 0, double[] givenInputValues = null)

Parameters

x0 double

value of x for which to find matching u0

inputIdx int

index of input (only applicable if multiple inputs)

givenInputValues double[]

for multi-input systems, all values except one must be given to calculate the steady-state u0

Returns

double?

GetSteadyStateOutput(double[], double)

Get the steady state value of the model output.

double? GetSteadyStateOutput(double[] u0, double badDataID = -9999)

Parameters

u0 double[]

vector of inputs for which the steady state is to be calculated

badDataID double

is a special reserverd value of inputs U that is to be treated as NaN

Returns

double?

the steady-state value, if it is not possible to calculate, null is returned.

IsModelSimulatable(out string)

Returns true if the parameters are specified .

bool IsModelSimulatable(out string explanationStr)

Parameters

explanationStr string

Returns

bool

string explaining why return is false, if applicable.

Iterate(double[], double, double)

Iterate the process model one timestep forward.

double[] Iterate(double[] inputsU, double timeBase_s, double badDataID = -9999)

Parameters

inputsU double[]

a 2d array of inputs, one row for each time step, or null if model is autonomous

timeBase_s double

the time in seconds between the data samples of the inputs

badDataID double

is a special reserverd value of inputs U that is to be treated as NaN

Returns

double[]

First value: the value of the state x of the process model at the new time step (be aware that if a disturbance is defined, it needs to be added to the states to get y_sim), if the model has additive outputs, the second state is the "internal output" upstream of those.

SetInputIDs(string[], int?)

Set the input IDs.

bool SetInputIDs(string[] manipulatedVariablesU_stringIDs, int? index = null)

Parameters

manipulatedVariablesU_stringIDs string[]
index int?

Returns

bool

SetOutputID(string)

Set the output ID.

void SetOutputID(string outputID)

Parameters

outputID string

WarmStart(double[], double)

If possible, set the internal state of the model so that the given inputs give the given output.

void WarmStart(double[] inputs, double output)

Parameters

inputs double[]
output double