[ library(eplex) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

lp_add_constraints(+Handle, +Constraints, ++Integers)

Add new constraints to the demon solver Handle, possibly triggering it.
Handle
Handle to a solver state
Constraints
A (possibly empty) list of equality or inequality constraints
Integers
A (possibly empty) list of problem variables to be considered as integers

Description

Add new constraints (with possibly new variables) to a solver. NewIntegers is a list of variables that the external solver should consider as integers The new constraints will be taken into account the next time the solver is run: if the new_constraint option of lp_demon_setup was turned on, then the solver will be invoked after the adding of the constraints. The constraints will be removed on backtracking.

The constraints are normalised and simplified before being passed to the external solver. If any constraint is ground, they are tested for consistency.

Note that variables in NewIntegers can be any problem variables. In previous versions of ECLiPSe, there was a restriction that the variables be new problem variables; this restriction has been removed.

Fail Conditions

Any ground (no variable) or bound constraints (one variable) is self-inconsistent.

Resatisfiable

no

Exceptions

(4) instantiation fault
Handle, Constraints or Integers uninstantiated.
(5) type error
Some constraint in Constraints is non-linear.

See Also

lp_demon_setup / 5, lp_add / 3, lp_add_constraints / 4, $= / 2, $=< / 2, $>= / 2, =:= / 2, =< / 2, >= / 2