AMPL offers superior support by our development and technical support teams.
Contact us for general queries, partnerships, and more.
We can help you find the license and offering that works best for your situation.
AMPL offers superior support by our development and technical support teams.
Contact us for general queries, partnerships, and more.
We can help you find the license and offering that works best for your situation.
Logic, Nonlinear & Constraint Programming Extensions
For combinatorial or discrete optimization, AMPL has always provided the option of including integer-valued variables in algebraic objectives and constraints. This is sufficient to make good use of mixed-integer programming solvers that use a classical branch-and-bound procedure.
Optimization systems for constraint programming (CP) also use a branching or tree search, but are able to work with a much broader variety of combinatorial expressions. In exchange for this advantage, CP solvers typically forego the ability to generate the bounds and cuts that are used to great advantage to limit the search in integer programming. The CP approach thus tends to be advantageous for problems that are “highly” combinatorial, in the sense that their formulation in terms of integer variables is artificial and hard to work with, or requires a very large number of variables or constraints, or fails to yield strong bounds.
Logic, Nonlinear & Constraint Programming Extensions
For combinatorial or discrete optimization, AMPL has always provided the option of including integer-valued variables in algebraic objectives and constraints. This is sufficient to make good use of mixed-integer programming solvers that use a classical branch-and-bound procedure.
Natively
Natively
Using the AMPL MP Library
Native or Redefined
To get started, see also our presentation slides from INFORMS Phoenix 2012, our collection of simple examples using some of the features described in this document.
AMPL has been extended in a variety of ways to take better advantage of the strengths of constraint programming. In this document we provide a syntax and usage summary of the extended operators that are recognized by AMPL’s drivers for the following CP solvers:
To obtain a driver for the ILOG Concert Technology C++ interface to the IBM ILOG CP constraint programming optimizer and also IBM CPLEX mixed-integer programming optimizer, there are several possibilities.
An AMPL-interfaced version of the Gecode constraint programming solver is freely available (under the MIT license) as source code and as binaries for 32-bit Linux, 64-bit Linux, Mac OS X, 32-bit Windows and 64-bit Windows.
To install binaries, download and unpack the gecode.exe (Windows) or gecode (Linux, MacOS) executable file and place it in your AMPL or solver directory. Then select the Gecode solver with the command.
An AMPL-interfaced version of the JaCoP constraint programming solver is freely available (under the GNU Affero General Public License) as source code and as binaries for 32-bit Linux, 64-bit Linux, Mac OS X, 32-bit Windows and 64-bit Windows.
To install binaries, download and unpack the zipfile corresponding to your platform, and copy all of the contained files
Several kinds of constraints useful for CP are naturally expressed by allowing variables in certain operands or arguments where only constant expressions are normally permitted. Other typical CP constraints have been made possible by adding operators to AMPL. Four classes of additions and extensions are covered specifically in this document:
Basic AMPL constraints consist of numerical-valued expressions connected by <=
, >=
or =
.
AMPL already provides an if-then-else
operator that returns a value that can be used in expressions:
AMPL’s count
operator returns the number of times that a certain constraint is satisfied.
Various assignment and related combinatorial problems require that a collection of entities be pairwise different or disjoint. New iterated operators for these conditions make them easier to state and help to make the resulting problems easier to solve.
Need more support? Contact us.
Check out all technical documentation here.
Join the conversation on the AMPL forum.