Interface ISimulatableModel
Generic interface that any process model needs to implement if it is to be simulated by PlantSimulator.
Namespace: TimeSeriesAnalysis.Dynamic
Assembly: TimeSeriesAnalysis.dll
Syntax
public interface ISimulatableModel
Methods
| Edit this page View SourceAddSignalToOutput(string)
Add an additive signal to the output.
Declaration
void AddSignalToOutput(string additiveInputID)
Parameters
Type | Name | Description |
---|---|---|
string | additiveInputID |
Clone(string)
Create a deep copy of itself
Declaration
ISimulatableModel Clone(string ID)
Parameters
Type | Name | Description |
---|---|---|
string | ID |
Returns
Type | Description |
---|---|
ISimulatableModel |
GetAdditiveInputIDs()
Get additive input IDs.
Declaration
string[] GetAdditiveInputIDs()
Returns
Type | Description |
---|---|
string[] |
GetBothKindsOfInputIDs()
Get both additive and model input IDs.
Declaration
string[] GetBothKindsOfInputIDs()
Returns
Type | Description |
---|---|
string[] |
GetID()
An unique name of the process model.
Declaration
string GetID()
Returns
Type | Description |
---|---|
string |
GetLengthOfInputVector()
Get the length of the input vector.
Declaration
int GetLengthOfInputVector()
Returns
Type | Description |
---|---|
int |
GetModelInputIDs()
Return the inputIDs that are "internal" i.e. related to the model and internal state x, but not "additive".
Declaration
string[] GetModelInputIDs()
Returns
Type | Description |
---|---|
string[] |
GetOutputID()
Get the output ID.
Declaration
string GetOutputID()
Returns
Type | Description |
---|---|
string |
GetOutputIdentID()
Get the ID of the "OutputIdent" signal.
Declaration
string GetOutputIdentID()
Returns
Type | Description |
---|---|
string |
GetOutputSignalType()
Get the type of the output signal.
Declaration
SignalType GetOutputSignalType()
Returns
Type | Description |
---|---|
SignalType |
GetProcessModelType()
Returns the type of process model.
Declaration
ModelType GetProcessModelType()
Returns
Type | Description |
---|---|
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!).
Declaration
double? GetSteadyStateInput(double x0, int inputIdx = 0, double[] givenInputValues = null)
Parameters
Type | Name | Description |
---|---|---|
double | x0 | value of x for which to find matching u0 |
int | inputIdx | index of input (only applicable if multiple inputs) |
double[] | givenInputValues | for multi-input systems, all values except one must be given to calculate the steady-state u0 |
Returns
Type | Description |
---|---|
double? |
GetSteadyStateOutput(double[], double)
Get the steady state value of the model output.
Declaration
double? GetSteadyStateOutput(double[] u0, double badDataID = -9999)
Parameters
Type | Name | Description |
---|---|---|
double[] | u0 | vector of inputs for which the steady state is to be calculated |
double | badDataID | is a special reserverd value of inputs U that is to be treated as NaN |
Returns
Type | Description |
---|---|
double? | the steady-state value, if it is not possible to calculate, |
IsModelSimulatable(out string)
Returns true if the parameters are specified .
Declaration
bool IsModelSimulatable(out string explanationStr)
Parameters
Type | Name | Description |
---|---|---|
string | explanationStr |
Returns
Type | Description |
---|---|
bool | string explaining why return is false, if applicable. |
Iterate(double[], double, double)
Iterate the process model one timestep forward.
Declaration
double[] Iterate(double[] inputsU, double timeBase_s, double badDataID = -9999)
Parameters
Type | Name | Description |
---|---|---|
double[] | inputsU | a 2d array of inputs, one row for each time step, or |
double | timeBase_s | the time in seconds between the data samples of the inputs |
double | badDataID | is a special reserverd value of inputs U that is to be treated as NaN |
Returns
Type | Description |
---|---|
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 |
SetInputIDs(string[], int?)
Set the input IDs.
Declaration
bool SetInputIDs(string[] manipulatedVariablesU_stringIDs, int? index = null)
Parameters
Type | Name | Description |
---|---|---|
string[] | manipulatedVariablesU_stringIDs | |
int? | index |
Returns
Type | Description |
---|---|
bool |
SetOutputID(string)
Set the output ID.
Declaration
void SetOutputID(string outputID)
Parameters
Type | Name | Description |
---|---|---|
string | outputID |
WarmStart(double[], double)
If possible, set the internal state of the model so that the given inputs give the given output.
Declaration
void WarmStart(double[] inputs, double output)
Parameters
Type | Name | Description |
---|---|---|
double[] | inputs | |
double | output |