Main.Variables History

Hide minor edits - Show changes to markup

September 25, 2008, at 02:10 PM by 158.35.225.230 -
Changed line 30 from:

Global variable name for variable v0 in model example and file test solved in a steady-state ss simulation.

to:

Global variable name for variable v0 in model example and file test.apm solved in a steady-state ss simulation.

September 25, 2008, at 02:10 PM by 158.35.225.230 -
Changed lines 30-31 from:
 Global variable name for variable v0 in model example and file test solved in a steady-state ss simulation.
to:

Global variable name for variable v0 in model example and file test solved in a steady-state ss simulation.

September 25, 2008, at 02:09 PM by 158.35.225.230 -
Added lines 11-14:

Global Name

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. These global names are used in configuration files to identify the variable.

Changed line 19 from:
 ! Example variable declarations
to:
 ! Example variable declarations in test.apm
Added lines 29-31:

(:cellnr:)

 Global variable name for variable v0 in model example and file test solved in a steady-state ss simulation.
  ss.test.example.v0 
September 25, 2008, at 01:15 PM by 158.35.225.230 -
Changed line 15 from:
 ! Example model that demonstrates parameter declarations
to:
 ! Example variable declarations
Changed lines 18-22 from:
     p0                 ! no initial value provided - default = 1
     p1 = 1.5           ! initializes to 1.5
     p2 = 2 * p1        ! initializes to 3.0
     p3 = exp(p2) * p1  ! initializes to exp(3.0) * 1.5
     my_parameter = 1   ! initializes to 1.0
to:
     v0                 ! no initial value provided - default = 1
     v1 = 1.5           ! initializes to 1.5
     v2 = 2 * p1        ! initializes to 3.0
     v3 = exp(p2) * p1  ! initializes to exp(3.0) * 1.5
     my_variable = 1   ! initializes to 1.0
September 25, 2008, at 01:15 PM by 158.35.225.230 -
Changed line 17 from:
   Parameters
to:
   Variables
Changed line 23 from:
   End Parameters
to:
   End Variables
September 25, 2008, at 10:40 AM by 158.35.225.230 -
Added lines 10-11:

Example

September 25, 2008, at 10:39 AM by 158.35.225.230 -
Changed lines 11-13 from:

(:table border=1 width=50% align=left bgcolor=#EEEEEE cellspacing=0 :)

to:

(:table border=1 width=50% align=left bgcolor=#EEEEEE cellspacing=0:)

Deleted lines 12-13:

(:table class='markup horiz' align='left':) (:cell class='markup1':)

Deleted line 23:
September 25, 2008, at 10:39 AM by 158.35.225.230 -
Deleted lines 28-43:

General Usage

(:table align='center':) (:cellnr class='markup1':) What to type (:cell class='markup2':) What it looks like (:tableend:)

Scope

(:markup class=horiz:) All variables have global scope. This facilitates the exchange of information between models but can also lead to name conflicts. Variables that are part of objects have the object name pre-pended. In order to use an object's variable in an equation, a connection must be made to a user-defined variable. (:markupend:)

September 25, 2008, at 10:38 AM by 158.35.225.230 -
Changed lines 9-28 from:

All variables have global scope. This facilitates the exchange of information between models but can also lead to name conflicts. Variables that are part of objects have the object name pre-pended. In order to use an object's variable in an equation, a connection must be made to a user-defined variable.

to:

All variables have global scope. This facilitates the exchange of information between models but can also lead to name conflicts. Object variables have the object name pre-pended. In order to use an object's variable in an equation, a connection must be made to a user-defined variable.

(:table border=1 width=50% align=left bgcolor=#EEEEEE cellspacing=0 :) (:cellnr:) (:table class='markup horiz' align='left':) (:cell class='markup1':)

 ! Example model that demonstrates parameter declarations
 Model example
   Parameters
     p0                 ! no initial value provided - default = 1
     p1 = 1.5           ! initializes to 1.5
     p2 = 2 * p1        ! initializes to 3.0
     p3 = exp(p2) * p1  ! initializes to exp(3.0) * 1.5
     my_parameter = 1   ! initializes to 1.0
   End Parameters
 End Model

(:tableend:)

September 25, 2008, at 10:34 AM by 158.35.225.230 -
Changed line 14 from:

(:table class='markup horiz' align='center':)

to:

(:table align='center':)

Deleted lines 19-40:

(:markup class=horiz:) An empty line

starts a new paragraph. (:markupend:)

(:markup class=horiz:) A single newline usually doesn't affect the layout. Use two backslashes
to break a line.
Use three backslashes

for two line breaks. (:markupend:)

(:markup class=horiz:) A single backslash joins the next line to the previous one. (:markupend:)

September 25, 2008, at 10:31 AM by 158.35.225.230 -
Changed line 43 from:

Lists

to:

Scope

Changed lines 45-48 from:
  • lists are created by using asterisks
    • more asterisks produce deeper lists
      • the list is terminated

by the first line that is not a list

to:

All variables have global scope. This facilitates the exchange of information between models but can also lead to name conflicts. Variables that are part of objects have the object name pre-pended. In order to use an object's variable in an equation, a connection must be made to a user-defined variable.

September 25, 2008, at 10:28 AM by 158.35.225.230 -
Deleted lines 51-75:

Example

(:table class='markup horiz' align='left':) (:cell class='markup1':)

! Example model that demonstrates parameter declarations
Model example
  Parameters
    p0                 ! no initial value provided - default = 1
    p1 = 1.5           ! initializes to 1.5
    p2 = 2 * p1        ! initializes to 3.0
    p3 = exp(p2) * p1  ! initializes to exp(3.0) * 1.5
    my_parameter = 1   ! initializes to 1.0
  End Parameters
End Model

(:tableend:)

Lists

(:markup class=horiz:)

  • lists are created by using asterisks
    • more asterisks produce deeper lists
      • the list is terminated

by the first line that is not a list (:markupend:)

September 25, 2008, at 10:28 AM by 158.35.225.230 -
Added lines 10-50:

General Usage

(:table class='markup horiz' align='center':) (:cellnr class='markup1':) What to type (:cell class='markup2':) What it looks like (:tableend:)

(:markup class=horiz:) An empty line

starts a new paragraph. (:markupend:)

(:markup class=horiz:) A single newline usually doesn't affect the layout. Use two backslashes
to break a line.
Use three backslashes

for two line breaks. (:markupend:)

(:markup class=horiz:) A single backslash joins the next line to the previous one. (:markupend:)

Lists

(:markup class=horiz:)

  • lists are created by using asterisks
    • more asterisks produce deeper lists
      • the list is terminated

by the first line that is not a list (:markupend:)

September 25, 2008, at 10:27 AM by 158.35.225.230 -
Added line 13:
Deleted line 15:
Added line 26:

(:tableend:)

Deleted line 27:

(:tableend:)

September 25, 2008, at 10:27 AM by 158.35.225.230 -
Changed lines 29-35 from:

next

to:

Lists

(:markup class=horiz:)

  • lists are created by using asterisks
    • more asterisks produce deeper lists
      • the list is terminated

by the first line that is not a list (:markupend:)

September 25, 2008, at 10:22 AM by 158.35.225.230 -
Changed line 29 from:

next

to:

next

September 25, 2008, at 10:21 AM by 158.35.225.230 -
Changed line 14 from:

(:cellr class='markup1':)

to:

(:cell class='markup1':)

Deleted line 26:

(:cell class='markup2':)

September 25, 2008, at 10:21 AM by 158.35.225.230 -
Changed line 14 from:

(:cellnr class='markup1':)

to:

(:cellr class='markup1':)

September 25, 2008, at 10:21 AM by 158.35.225.230 -
Changed line 14 from:

(:cell class='markup1':)

to:

(:cellnr class='markup1':)

Changed line 27 from:

(:markupend:)

to:

(:cell class='markup2':)

September 25, 2008, at 10:20 AM by 158.35.225.230 -
Changed line 14 from:

(:cell class='markup2':)

to:

(:cell class='markup1':)

Added line 27:

(:markupend:)

Deleted lines 28-31:

(:markupend:)

(:markup class=horiz:)

September 25, 2008, at 10:19 AM by 158.35.225.230 -
Added lines 28-33:

(:markupend:)

(:markup class=horiz:)

next

September 25, 2008, at 10:08 AM by 158.35.225.230 -
Changed lines 7-8 from:

Variable Scope

to:

Scope

Changed line 11 from:

Variable Example

to:

Example

September 25, 2008, at 10:07 AM by 158.35.225.230 -
Added lines 7-10:

Variable Scope

All variables have global scope. This facilitates the exchange of information between models but can also lead to name conflicts. Variables that are part of objects have the object name pre-pended. In order to use an object's variable in an equation, a connection must be made to a user-defined variable.

Deleted lines 27-31:

Variable Scope

All variables have global scope. This facilitates the exchange of information between models but can also lead to name conflicts. Variables that are part of objects have the object name pre-pended. In order to use an object's variable in an equation, a connection must be made to a user-defined variable.

September 25, 2008, at 10:07 AM by 158.35.225.230 -
Deleted line 22:
Added line 24:
September 25, 2008, at 10:06 AM by 158.35.225.230 -
Added line 23:
September 25, 2008, at 10:06 AM by 158.35.225.230 -
Changed line 10 from:

(:cell class='markup2':)

to:

(:cell class='markup2':)

September 25, 2008, at 10:05 AM by 158.35.225.230 -
Changed line 10 from:

(:cellnr class='markup1':)

to:

(:cell class='markup2':)

Deleted lines 23-26:

(:markup class=horiz:)

(:markupend:)

September 25, 2008, at 10:02 AM by 158.35.225.230 -
Added lines 25-27:

(:markup class=horiz:)

(:markupend:)

September 25, 2008, at 09:59 AM by 158.35.225.230 -
Changed line 10 from:

(:cell class='markup1':)

to:

(:cellnr class='markup1':)

September 25, 2008, at 09:59 AM by 158.35.225.230 -
Changed line 10 from:

(:cellr class='markup1':)

to:

(:cell class='markup1':)

September 25, 2008, at 09:59 AM by 158.35.225.230 -
Changed line 10 from:

(:cellnr class='markup1':)

to:

(:cellr class='markup1':)

Added line 24:
September 25, 2008, at 09:58 AM by 158.35.225.230 -
Added lines 7-8:

Variable Example

Added lines 24-27:

Variable Scope

All variables have global scope. This facilitates the exchange of information between models but can also lead to name conflicts. Variables that are part of objects have the object name pre-pended. In order to use an object's variable in an equation, a connection must be made to a user-defined variable.

September 25, 2008, at 09:51 AM by 158.35.225.230 -
Added lines 1-21:

Variables

Variables are calculated values that represent model states. Variables are modified by the solver as it searches for a solution. Each additional variable adds a degree of freedom to the problem.

Variables are declared in the Variables ... End Variables section of the model file. The variables may be defined in one section or in multiple declarations throughout the model. Variable initialization is performed sequentially, from top to bottom. If a variable does not have an initial value given, a default value of 1.0 is assigned. Variables may also be a function of other parameters or variable initial conditions. These initial conditions are processed once as the first step after the model parsing.

(:table class='markup horiz' align='left':) (:cellnr class='markup1':)

! Example model that demonstrates parameter declarations
Model example
  Parameters
    p0                 ! no initial value provided - default = 1
    p1 = 1.5           ! initializes to 1.5
    p2 = 2 * p1        ! initializes to 3.0
    p3 = exp(p2) * p1  ! initializes to exp(3.0) * 1.5
    my_parameter = 1   ! initializes to 1.0
  End Parameters
End Model

(:tableend:)