This is a preliminary set of examples to offer some starting points for experimenting with AMPL's "logic" and constraint programming interfaces. We welcome comments for improvements or other examples that would illustrative.|
|Integer program for assignment of people to groups so that each group is "balanced" by various criteria|
|Constraint program for balanced assignment of people to groups, using the numberof operator|
|mapColoring.mod||Model for map coloring using a not-equals constraint|
|nQueens0.mod||Integer program for the n queens problem: put n queens on an n-by-n chessboard so that no queen is attacking any other queen|
|nQueens.mod||Constraint program for the n queens problem, using the alldiff operator|
|Open-shop scheduling model using disjunctive constraints to avoid job and machine conflicts|
|Line up a group of people to maximize the number of adjacency preferences satisfied, modeling with alldiff, equivalence (<==>), and strict inequality (<)|
|Hoist scheduling model using disjunctive constraints|
|Model to solve instances of the 3 x 3 Sudoku problem, using the alldiff operator|
Return to the AMPL constraint programming page.
Return to the AMPL update page.
Return to the AMPL home page.