Main

## Main.VariableConstraints History

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

## Variable Constraints

Changed line 9 from:

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

to:

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

September 30, 2008, at 05:06 PM by 158.35.225.227 -
Changed line 7 from:

Variable constraints may lead to infeasible solutions. For square problems (nvar=neqn), the constraints are generally not needed but may help guide the solver to a feasible solution. Constraints are particularly advantageous to keep variable values away from strongly non-linear regions of the equation residuals. Good solvers correctly identify infeasible solutions and terminate.

to:

Variable constraints may lead to infeasible solutions. For square problems (nvar=neqn), the constraints are generally not needed but may help guide the solver to a feasible solution. Constraints are particularly advantageous to keep variable values away from strongly non-linear regions of the equation residuals. Good solvers correctly identify infeasible solutions and terminate with an appropriate message.

September 25, 2008, at 07:08 PM by 158.35.225.230 -

## Variable Constraints

Constraints serve to bound a parameter or variable with upper and lower limits. Variable constraints may be expressed as absolute numbers or functions of parameters or variable initial conditions. A variable constraint is included in the variable declarations section along with the initial condition. The constraints less than or equal (<=) or simply less than (<) are considered to be equivalent for numerical solutions. Likewise, greater than or equal (>=) and greater than (>) are equivalent.

### Infeasible Solution

Variable constraints may lead to infeasible solutions. For square problems (nvar=neqn), the constraints are generally not needed but may help guide the solver to a feasible solution. Constraints are particularly advantageous to keep variable values away from strongly non-linear regions of the equation residuals. Good solvers correctly identify infeasible solutions and terminate.

### Example

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

 ! Example model that demonstrates parameter declarations
Model example
Parameters
p1 = 1, >=0, < 2
p2 <= 5
End Parameters

Variables
v1 = 0, >-1, <1
v2 = 1, >=p1, <=p5*p1
End Variables

Equations
v1 * v2 = p2
v1 + v2 = p1
End Equations
End Model


(:tableend:)