Class CoSolver
Last update: 09.03.2026Namespace: OpenTD.CoSolver
Assembly: OpenTD.CoSolver.dll
Base class for communicating with a Sinda run via an SF_Pipe.
public class CoSolver
Inheritance
Derived
Inherited Members
object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()
Fields
pipeID
protected string pipeID
Field Value
sf_pipe
protected SF_Pipe sf_pipe
Field Value
Properties
Converged
public bool Converged { set; }
Property Value
CouplingTimeStep
public double CouplingTimeStep { set; }
Property Value
InitializeTimeoutMs
Determines how long in milliseconds that Initialize() will try to connect to the Sinda run.
public int InitializeTimeoutMs { get; set; }
Property Value
Methods
Abort()
public void Abort()
CloseSF_Pipe()
protected void CloseSF_Pipe()
Continue()
Tells Sinda to proceed to the next step of the simulation. Return values: -1 - Sinda disconnected or error 0 - Sinda initial connection after call to OPENSF 99 - Sinda termination
11 - beginning of STEADY 12 - end of STEADY
1 - beginning of TRANSIENT 2 - at end of TRANSIENT time step 3 - at end of TRANSIENT
public int Continue()
Returns
CreateSF_Pipe()
protected void CreateSF_Pipe()
DoStep()
public int DoStep()
Returns
GetCondSequenceNumber(string, int)
public long GetCondSequenceNumber(string submodel, int Id)
Parameters
submodel string
Id int
Returns
GetLumpSequenceNumber(string, int)
public long GetLumpSequenceNumber(string submodel, int Id)
Parameters
submodel string
Id int
Returns
GetNodeSequenceNumber(string, int)
public long GetNodeSequenceNumber(string submodel, int Id)
Parameters
submodel string
Id int
Returns
GetPathSequenceNumber(string, int)
public long GetPathSequenceNumber(string submodel, int Id)
Parameters
submodel string
Id int
Returns
GetRegisterExpression(string)
public string GetRegisterExpression(string name)
Parameters
name string
Returns
GetRegisterValue(string)
public double GetRegisterValue(string name)
Parameters
name string
Returns
GetTieSequenceNumber(string, int)
public long GetTieSequenceNumber(string submodel, int Id)
Parameters
submodel string
Id int
Returns
GetValue(string, int, string)
public double GetValue(string submodel, int Id, string type)
Parameters
submodel string
Id int
type string
Returns
GetValue(int, string)
public double GetValue(int SequenceNumber, string type)
Parameters
SequenceNumber int
type string
Returns
GetValue(string)
public double GetValue(string name)
Parameters
name string
Returns
Initialize()
public virtual void Initialize()
SetRegisterExpression(string, double)
public void SetRegisterExpression(string name, double value)
Parameters
name string
value double
SetValue(string, int, string, double)
public void SetValue(string submodel, int Id, string type, double value)
Parameters
submodel string
Id int
type string
value double
SetValue(int, string, double)
public void SetValue(int SequenceNumber, string type, double value)
Parameters
SequenceNumber int
type string
value double
SetValue(string, double)
public void SetValue(string name, double value)
Parameters
name string
value double
Set_Q_UDFA(string, int, double)
public void Set_Q_UDFA(string name, int SequenceNumber, double value)
Parameters
name string
SequenceNumber int
value double
SetupExperiment()
public void SetupExperiment()