Variables

Main.Variables History

Show minor edits - Show changes to markup

Changed lines 23-24 from:
   v2 = 2 * p1        ! initializes to 3.0
   v3 = exp(p2) * p1  ! initializes to exp(3.0) * 1.5
to:
   v2 = 2 * v1        ! initializes to 3.0
   v3 = exp(v2) * v1  ! initializes to exp(3.0) * 1.5
Changed lines 25-26 from:
   x < 5              ! initializes to 1.0 (default) with upper bound 5
to:
   x < 5              ! initializes to 1.0 (default)
                      !   with upper bound 5
Changed lines 28-30 from:
   z = 1.8 < 2.3 >=0  ! initializes to 1.8 with upper and lower bounds
to:
   z = 1.8 < 2.3 >=0  ! initializes to 1.8
                      !   with upper bound 2.3
                      !   and lower bound 0
Changed lines 20-28 from:
 Model example
   Variables
     v0                 ! no initial value, 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
   End Variables
 End Model
to:
 Variables
   v0                 ! no initial value, 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
   x < 5              ! initializes to 1.0 (default) with upper bound 5
   y = 2              ! initializes to 2.0
   z = 1.8 < 2.3 >=0  ! initializes to 1.8 with upper and lower bounds
 End Variables
June 16, 2015, at 06:42 PM by 45.56.3.184 -
Deleted lines 28-31:

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

  ss.test.example.v0 
June 16, 2015, at 06:41 PM by 45.56.3.184 -
Changed line 17 from:

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

to:

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

June 16, 2015, at 06:40 PM by 45.56.3.184 -
Changed line 22 from:
     v0                 ! no initial value provided - default = 1
to:
     v0                 ! no initial value, default = 1
September 25, 2008, at 08: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 08: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 08: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 07: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 07: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 04:40 PM by 158.35.225.230 -
Added lines 10-11:

Example

September 25, 2008, at 04:39 PM 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 04:39 PM 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 04:38 PM 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 04:34 PM 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 04:31 PM 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 04:28 PM 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 04:28 PM 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 04:27 PM by 158.35.225.230 -
Added line 13:
Deleted line 15:
Added line 26:

(:tableend:)

Deleted line 27:

(:tableend:)

September 25, 2008, at 04:27 PM 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 04:22 PM by 158.35.225.230 -
Changed line 29 from:

next

to:

next

September 25, 2008, at 04:21 PM 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 04:21 PM by 158.35.225.230 -
Changed line 14 from:

(:cellnr class='markup1':)

to:

(:cellr class='markup1':)

September 25, 2008, at 04:21 PM 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 04:20 PM 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 04:19 PM by 158.35.225.230 -
Added lines 28-33:

(:markupend:)

(:markup class=horiz:)

next

September 25, 2008, at 04:08 PM 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 04:07 PM 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 04:07 PM by 158.35.225.230 -
Deleted line 22:
Added line 24:
September 25, 2008, at 04:06 PM by 158.35.225.230 -
Added line 23:
September 25, 2008, at 04:06 PM by 158.35.225.230 -
Changed line 10 from:

(:cell class='markup2':)

to:

(:cell class='markup2':)

September 25, 2008, at 04:05 PM 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 04:02 PM by 158.35.225.230 -
Added lines 25-27:

(:markup class=horiz:)

(:markupend:)

September 25, 2008, at 03:59 PM by 158.35.225.230 -
Changed line 10 from:

(:cell class='markup1':)

to:

(:cellnr class='markup1':)

September 25, 2008, at 03:59 PM by 158.35.225.230 -
Changed line 10 from:

(:cellr class='markup1':)

to:

(:cell class='markup1':)

September 25, 2008, at 03:59 PM by 158.35.225.230 -
Changed line 10 from:

(:cellnr class='markup1':)

to:

(:cellr class='markup1':)

Added line 24:
September 25, 2008, at 03:58 PM 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 03:51 PM 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:)