contents.gifprev1.gifnext1.gif

Constraints

Constraints are relations such as A1 >= 0. A constraint is satisfied if the condition it specifies is true within a small tolerance. This is a little different from a logical formula such as +A1>=0 evaluating to 1 or 0 which you might enter in a cell. In this example, if A1 were -0.0000001, the logical formula would evaluate to 0, but with the default Solver Precision setting, the constraint would be satisfied. Because of the numerical methods used to find solutions to Solver models and the finite precision of computer arithmetic, it would be unrealistic to require that constraints like A1 >= 0 be satisfied exactly -- such solutions would rarely be found.

In the 1-2-3 97 Solver, constraints are specified by giving a cell reference such as A1 or A1..A10 (the "left hand side"), a relation (<=, = or >=), and an expression for the "right hand side." Although you can enter any numeric expression on the right hand side, we encourage you to use only constants, or references to cells which contain constant values on the right hand side. (A constant value to the Solver is any value which does not depend on any of the decision variables.) Using constant right hand sides in constraints will simplify your model, and allows the Solver to handle the constraints more efficiently.

Another type of constraint is of the form A1 = integer, where A1 is one of the decision variables. This specifies that the solution value for A1 must be an integer or whole number such as -1, 0 or 2 to within a small tolerance. A common special case, also supported by the Solver, is a constraint such as A1 = binary which specifies that A1 must be either 0 or 1 at the solution. The presence of even one such integer constraint in a Solver model makes the problem an integer programming problem (discussed below), which may be much more difficult to solve than the equivalent problem without the integer constraint.