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
Plant
Inherited Members
Namespace: TimeSeriesAnalysis .Dynamic
Assembly: TimeSeriesAnalysis.dll
Syntax
public class ConnectionParser
Constructors
| Edit this page View SourceConnectionParser()
Constructor
Declaration
public ConnectionParser()
Fields
| Edit this page View Sourceconnections
List of connections
Declaration
[JsonInclude]
public List<(string, string)> connections
Field Value
Methods
| Edit this page View SourceFindComputationalLoops(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
Type | Name | Description |
---|---|---|
Dictionary<string, ISimulatable |
modelDict |
Returns
Type | Description |
---|---|
Dictionary<string, List<string>> | a dictionary with an ID and a list of all involved modelIDs |
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 SourceGetAllUpstreamModels(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 SourceGetUnitModelControlledByPID(string, Dictionary<string, ISimulatableModel>)
Get unit model controlled by PDI
Declaration
public string GetUnitModelControlledByPID(string pidModelID, Dictionary<string, ISimulatableModel> modelDict)
Parameters
Type | Name | Description |
---|---|---|
string | pidModelID | |
Dictionary<string, ISimulatable |
modelDict |
Returns
Type | Description |
---|---|
string | returns null if no model is found |
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
Type | Name | Description |
---|---|---|
string | modelID | |
Dictionary<string, ISimulatable |
modelDict |
Returns
Type | Description |
---|---|
string[] |
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
Type | Name | Description |
---|---|---|
string | modelID | |
Dictionary<string, ISimulatable |
modelDict |
Returns
Type | Description |
---|---|
bool |
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
Type | Name | Description |
---|---|---|
Dictionary<string, ISimulatable |
modelDict |