The Constraint Programming Solver

General Options

You can specify the following general options.

FINDALLSOLNS
ALLSOLNS
FINDALL

attempts to find all possible solutions to the CSP.

LOGLEVEL=0 | 1

controls the amount of information that the CLP solver prints in the log. If you specify LOGLEVEL=0, only warnings and errors are printed. If you specify LOGLEVEL=1, the solver prints messages when it starts, when it finds a new solution (if you specify the SHOWPROGRESS option), and when it determines the final solution status. By default, LOGLEVEL=1.

MAXSOLNS=number

specifies the number of solution attempts to be generated for the CSP. By default, MAXSOLNS=1.

MAXTIME=number

specifies the maximum time to spend calculating results. The type of time (either CPU time or real time) is determined by the value of the TIMETYPE= option. The value of number can be any positive number; the default value is the positive number that has the largest absolute value that can be represented in your operating environment.

NOPREPROCESS

suppresses any preprocessing that would usually be performed for the problem.

OBJTOL=number

specifies the tolerance of the objective value. By default, OBJTOL=1E–6.

PREPROCESS

permits any preprocessing that would usually be performed for the problem.

SHOWPROGRESS

prints a message to the log whenever a solution is found.

TIMETYPE=number | string

specifies whether to use CPU time or real time for the MAXTIME= option. Table 2 describes the valid values of the TIMETYPE= option.

Table 2: Values for TIMETYPE= Option

number string Description
0 CPU Specifies units of CPU time
1 REAL Specifies units of real time


By default, TIMETYPE=REAL.

VARASSIGN=string

specifies the variable assignment strategy. You can specify two value selection strategies:

  • MAX, which selects the maximum value from the domain of the selected variable

  • MIN, which selects the minimum value from the domain of the selected variable

By default, VARASSIGN=MIN.

VARSELECT=string

specifies the variable selection strategy. The strategy could be static, dynamic, or conflict-directed. Typically, static strategies exploit information about the initial state of the search, whereas dynamic strategies exploit information about the current state of the search process. Conflict-directed strategies exploit information from previous states of the search process as well as the current state (Boussemart et al. 2004). Table 3 describes the valid values of the VARSELECT= option.

Table 3: Values for VARSELECT= Option

string Description
Static Strategies
FIFO Uses the first-in, first-out ordering of the variables as encountered by the procedure after adjusting for the values in the .priority suffix
MAXCS Selects the variable that has the maximum number of constraints
Dynamic Strategies
DOMDDEG Selects the variable that has the smallest ratio of domain size to dynamic degree
DOMDEG Selects the variable that has the smallest ratio of domain size to degree
MAXC Selects the variable that has the largest number of active constraints
MINR Selects the variable that has the smallest range (that is, the minimum value of the upper bound minus the lower bound)
MINRMAXC Selects the variable that has the smallest range, breaking ties by selecting one that has the largest number of active constraints
Conflict-Directed Strategies
DOMWDEG Selects the variable that has the smallest ratio of domain size to weighted degree
WDEG Selects the variable that has the largest weighted degree


The dynamic strategies embody the "fail-first principle" (FFP) of Haralick and Elliott (1980), which suggests, "To succeed, try first where you are most likely to fail." By default, VARSELECT=MINR.

You can change the order in which the CLP solver selects variables after you have declared them by setting the .priority suffix for your variables. Variables with higher priority are selected first.

PROC OPTMODEL usually honors the variable declaration order when it invokes the CLP solver. However, when variables are indexed over dynamically computed sets, the variable order might be undefined. The value of .priority always overrides declaration order. To ensure that the CLP solver considers variables in the exact order that you want, set the .priority suffix for all variables. You can also experiment with the priorities by changing the suffixes without having to reorder the variable declarations in your code.

For more information, see the section Integer Variable Suffixes in Chapter 9, The OPTMODEL Procedure.

Last updated: September 09, 2026