Class UnitSimulator
Stand-alone simulation of any ISimulatableModel model.
Inherited Members
Namespace: TimeSeriesAnalysis.Dynamic
Assembly: TimeSeriesAnalysis.dll
Syntax
public class UnitSimulator
Constructors
| Edit this page View SourceUnitSimulator(UnitModel)
Constructor
Declaration
public UnitSimulator(UnitModel model)
Parameters
Type | Name | Description |
---|---|---|
UnitModel | model |
Methods
| Edit this page View SourceCoSimulate(PidModel, ref UnitDataSet, bool, bool)
Co-simulate a process model and pid-controller(both Y_sim and U_sim)
Declaration
public bool CoSimulate(PidModel pid, ref UnitDataSet processDataSet, bool pidActsOnPastStep = true, bool writeResultToYmeasInsteadOfYsim = false)
Parameters
Type | Name | Description |
---|---|---|
PidModel | pid | the |
UnitDataSet | processDataSet | the process will read the |
bool | pidActsOnPastStep | pid-controller looks at e[k-1] if true, otherwise e[k] |
bool | writeResultToYmeasInsteadOfYsim | write data to |
Returns
Type | Description |
---|---|
bool | Returns true if able to simulate, otherwise false (simulation is written into processDataSet ) |
Simulate(ref UnitDataSet, bool, bool)
Simulates the output of the model based on the processDataSet.U provided, by default the output is
written back to processDataSet.Y_sim
or processDataSet.Y_meas
By default this method adds to Y_sim
o Y_meas
if they already contain values.
Declaration
public double[] Simulate(ref UnitDataSet processDataSet, bool writeResultToYmeasInsteadOfYsim = false, bool doOverwriteY = false)
Parameters
Type | Name | Description |
---|---|---|
UnitDataSet | processDataSet | dataset containing the inputs |
bool | writeResultToYmeasInsteadOfYsim | if |
bool | doOverwriteY | (default is false)if |
Returns
Type | Description |
---|---|
double[] | Returns the simulate y if able to simulate,otherwise null |