The CLP Procedure

Examples: CLP Procedure

This section contains several examples that illustrate the capabilities of the different logical constraints and showcase a variety of problems that the CLP procedure can solve. The following examples feature a standard constraint satisfaction problem (CSP):

  • Logic-Based Puzzles illustrates the capabilities of the alldifferent constraint in solving a popular logical puzzle, the sudoku. This example also contains a variant of sudoku that illustrates the capabilities of the GCC constraint and demonstrates the use of the EVALVARSEL= option.

  • Car Painting Problem involves limited sequencing of cars in an assembly process in order to minimize the number of paint purgings; it features the reified constraint.

  • Scene Allocation Problem illustrates how to schedule the shooting of different movie scenes in order to minimize production costs. This problem uses the GCC and linear constraints.

  • Car Sequencing Problem relates to sequencing the cars on an assembly line with workstations for installing specific options subject to the demand constraints for each set of options and the capacity constraints of each workstation.

  • Scheduling a Major Basketball Conference illustrates modeling the problem of scheduling a major basketball conference. The element constraint plays a key role in this particular example.

  • Balanced Incomplete Block Design illustrates how to use the lexicographic constraint to break symmetries in generating a balanced incomplete block design (BIBD), a standard combinatorial problem from design theory.

  • Progressive Party Problem illustrates how to use the pack constraint to solve the progressive party problem, a well-known constraint programming problem in which crews of various sizes must be assigned to boats of various capacities for several rounds of parties.

  • Radio Link Frequency Assignment Problem illustrates how to use the element and reified constraints to solve a radio link frequency assignment problem.

  • Resource-Constrained Project Scheduling Problem with Time Windows illustrates how to use the cumulative constraint to solve a resource-constrained project scheduling problem with time windows.

  • Resource-Constrained Scheduling Problem with Nonstandard Temporal Constraints illustrates how to use the cumulative constraint to solve a resource-constrained scheduling problem that has nonstandard temporal constraints.

Last updated: November 20, 2025