You can invoke the CLP solver from PROC OPTMODEL by using any of the predicates that are defined in the standard mode of PROC CLP. The standard mode gives you access to all-different, element, GCC, linear, pack, and reify constraints.
To replicate the FOREACH predicate that PROC CLP supports, you can use PROC OPTMODEL’s expressions and iteration machinery. For an example, see the Eight Queens example in the Getting Started: CLP Solver. For more information about the FOREACH predicate, see SAS/OR User's Guide: Constraint Programming.
In addition to the predicates that are defined in this chapter, PROC CLP provides several constraints and capabilities that simplify the modeling of scheduling-oriented CSPs. For more information about those statements, see the section Details: CLP Procedure in SAS/OR 13.2 User's Guide: Constraint Programming.
PROC OPTMODEL has different syntax and semantics for variable declarations:
Because all CLP variables are discrete, you must declare every variable that a CLP model uses as integer or binary.
The default variable bounds in PROC OPTMODEL are to . The default lower bound in PROC CLP is 0. Thus, to replicate the behavior of PROC CLP, you must explicitly add a lower bound of 0 to the variable declaration.