Main

## Main.Constants History

June 16, 2015, at 06:43 PM by 45.56.3.184 -
Deleted lines 0-1:

## Constants

Changed line 7 from:

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

to:

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

May 16, 2014, at 04:32 PM by 66.87.126.135 -
Changed line 19 from:
   End Parameters

to:
   End Constants

June 10, 2011, at 10:27 AM by 206.180.155.75 -
Changed line 5 from:

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

to:

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

June 10, 2011, at 10:26 AM by 206.180.155.75 -

## Constants

Constants are fixed values that represent model inputs, fixed constants, or any other value that does not change. Constants are not modified by the solver as it searches for a solution. As such, constants do not contribute to the number of degrees of freedom (DOF).

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

### Example

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

 ! Example model that demonstrates constant declarations
Model example
Constants
c0                 ! no initial value provided - default = 1
c1 = 1.5           ! initializes to 1.5
c2 = 2 * c1        ! initializes to 3.0
c3 = exp(c2) * c1  ! initializes to exp(3.0) * 1.5
my_constant = 5    ! initializes to 5.0
End Parameters

Variables
x[1:c2] = my_constant ! create a vector of 3 initialized to 5
End Variables

Equations
x[1:c2-1] = c3
x[c2] = c1 + c2 + x[1]
End Equations
End Model


(:tableend:)