Creating decision variables

A decision variable is a logic variable with a domain. The Boolean domain is treated as a special integer domain where 1 denotes true, and 0 denotes false. The CLP(FD) primitive X :: D can be used in order to declare integer-domain variables for SAT solvers, and for integer programming solvers.

The primitive lp_domain(Xs,L,U) is provided for declaring domain variables for linear programming (LP) solvers. After the call, the domain of each of the variables in Xs is restricted to the range L..U, where L ($\ge$ 0) and U are either integers or floats. If the domain of a variable is not declared, it is assumed to be in the range of $0..\infty$.

The primitive lp_integer(X) notifies the LP solver that the variable X is of an integer type, and the primitive lp_integers(Xs) forces the list of variables Xs to be of an integer type. If the domain of an integer variable is not declared, then it is assumed to be in the range of 0..268435455.

Neng-Fa Zhou 2013-01-25