Connections
Main.Connections History
Show minor edits - Show changes to markup
Global and Local Names
Global variables are identified by the simulation mode, file name, model or object name, and variable name. These names are separated by a period to form a global name (e.g. ss.test.example.v0). Connections can be referenced by the global or local model name but without the simulation mode specification. These global names are used in configuration files to identify the variable.
! Example variable declarations in test.apm
! Example variable declarations and connections
test.example.var[3] = test.example.var[4]
example.var[3] = example.var[4]
Connections
(:table border=1 width=50% align=left bgcolor=#EEEEEE cellspacing=0:)
(:table border=1 width=100% align=left bgcolor=#EEEEEE cellspacing=0:)
Connections
Connections are processed after the objects and variables are parsed. Connections are the merging of two variables or objects with the same root names. The wildcard operator (*) instructs the parser to connect objects that have the same elements. Connections are a complete merging of two variables or objects. Once the variable is connected to another, the variable is only listed as an alias. Any other references to the connected value are referred to the principal variable. The principal variable that remains after a connection is the variable on the left side of the connection. The variable on the right side of the connection is referencable in other parts of the model, but will not appear in the solution files.
Connections are declared in the Connections ... End Connections section of the model file. The connections may be defined in one section or in multiple declarations throughout the model. The connections are processed after the parameter, variable, and object creation but before the initialization of the values.
Global and Local Names
Global variables are identified by the simulation mode, file name, model or object name, and variable name. These names are separated by a period to form a global name (e.g. ss.test.example.v0). Connections can be referenced by the global or local model name but without the simulation mode specification. These global names are used in configuration files to identify the variable.
Example
(:table border=1 width=50% align=left bgcolor=#EEEEEE cellspacing=0:) (:cellnr:)
! Example variable declarations in test.apm Model example Variables var[1] var[2] var[3] var[4] set.1 set.2 End Variables Connections var[1] = var[2] test.example.var[3] = test.example.var[4] var[1] = set.* ! connects set.1 and set.2 to var[1] End Connections End Model
(:tableend:)