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.

Variable constraints may lead to infeasible solutions. For square problems (n_{var}=n_{eqn}), 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.

! 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 |

Retrieved from http://byu.apmonitor.com/wiki/index.php/Main/VariableConstraints

Page last modified on June 16, 2015, at 06:44 PM