Class ConnectionParser
Class that tracks which model is connected to which in a set of models.
This is important when traversing the models when simulating with the
PlantSimulator, as these models need to be
run in a specific order
Inheritance
ConnectionParser
Assembly: TimeSeriesAnalysis.dll
Syntax
public class ConnectionParser
Constructors
|
Edit this page
View Source
ConnectionParser()
Declaration
public ConnectionParser()
Fields
|
Edit this page
View Source
connections
Declaration
[JsonInclude]
public List<(string, string)> connections
Field Value
Methods
|
Edit this page
View Source
FindComputationalLoops(Dictionary<string, ISimulatableModel>)
Parses models and determines if there are co-dependent models
Declaration
public Dictionary<string, List<string>> FindComputationalLoops(Dictionary<string, ISimulatableModel> modelDict)
Parameters
Returns
|
Edit this page
View Source
GetAllDownstreamModelIDs(string)
Get all the models which are connected to a given model one level directly downstream of it
Declaration
public List<string> GetAllDownstreamModelIDs(string modelID)
Parameters
Type |
Name |
Description |
string |
modelID |
|
Returns
|
Edit this page
View Source
GetAllUpstreamModels(string)
Get all the models which are connected to a given model one level directly upstream of it
Declaration
public List<string> GetAllUpstreamModels(string modelID)
Parameters
Type |
Name |
Description |
string |
modelID |
|
Returns
|
Edit this page
View Source
GetUnitModelControlledByPID(string, Dictionary<string, ISimulatableModel>)
Get unit model controlled by PDI
Declaration
public string GetUnitModelControlledByPID(string pidModelID, Dictionary<string, ISimulatableModel> modelDict)
Parameters
Returns
Type |
Description |
string |
returns null if no model is found
|
|
Edit this page
View Source
GetUpstreamPIDIds(string, Dictionary<string, ISimulatableModel>)
Get the ID of the PID-controller that is upstream a given modelID
Declaration
public string[] GetUpstreamPIDIds(string modelID, Dictionary<string, ISimulatableModel> modelDict)
Parameters
Returns
|
Edit this page
View Source
HasUpstreamPID(string, Dictionary<string, ISimulatableModel>)
Query if the model has an upstream PID-model.
Declaration
public bool HasUpstreamPID(string modelID, Dictionary<string, ISimulatableModel> modelDict)
Parameters
Returns
|
Edit this page
View Source
InitAndDetermineCalculationOrderOfModels(Dictionary<string, ISimulatableModel>)
Determine the order in which the models must be solved
Declaration
public (List<string>, Dictionary<string, List<string>>) InitAndDetermineCalculationOrderOfModels(Dictionary<string, ISimulatableModel> modelDict)
Parameters
Returns
Type |
Description |
(List<string>, Dictionary<string, List<string>>) |
returns the string of sorted model IDs, the order in which modelDict models are to be run.
If the plant contains computational loops, the IDs of the computational loops are also in these lists instead of
the indivudal models.
|