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
additiveInputIDstring
Clone(string)
Create a deep copy of itself
ISimulatableModel Clone(string ID)
Parameters
IDstring
Returns
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
GetLengthOfInputVector()
Get the length of the input vector.
int GetLengthOfInputVector()
Returns
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
GetOutputIdentID()
Get the ID of the "OutputIdent" signal.
string GetOutputIdentID()
Returns
GetOutputSignalType()
Get the type of the output signal.
SignalType GetOutputSignalType()
Returns
GetProcessModelType()
Returns the type of process model.
ModelType GetProcessModelType()
Returns
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
x0doublevalue of x for which to find matching u0
inputIdxintindex of input (only applicable if multiple inputs)
givenInputValuesdouble[]for multi-input systems, all values except one must be given to calculate the steady-state u0
Returns
GetSteadyStateOutput(double[], double)
Get the steady state value of the model output.
double? GetSteadyStateOutput(double[] u0, double badDataID = -9999)
Parameters
u0double[]vector of inputs for which the steady state is to be calculated
badDataIDdoubleis 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,
nullis returned.
IsModelSimulatable(out string)
Returns true if the parameters are specified .
bool IsModelSimulatable(out string explanationStr)
Parameters
explanationStrstring
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
inputsUdouble[]a 2d array of inputs, one row for each time step, or
nullif model is autonomoustimeBase_sdoublethe time in seconds between the data samples of the inputs
badDataIDdoubleis 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
Returns
SetOutputID(string)
Set the output ID.
void SetOutputID(string outputID)
Parameters
outputIDstring
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)