Modeling overview

AMPL’s newly extended C++ solver interface library, MP, is publicly available in the ampl/mp repository. Solver interfaces built with MP are able to handle a significantly expanded range of model expressions. Currently available MP-based solvers include:

Binaries for these solvers can be downloaded, in distribution bundles and individually, through the AMPL Portal. Solver options and features are described at Features guide for MP-based AMPL solvers and, for concrete solvers, at AMPL Development.

The expanded MP solver interface library offers new support for the following categories of operators and expressions:

  • Conditional operators: if-then-else; ==>, <==, <==>

  • Logical operators: or, and, not; exists, forall

  • Piecewise linear functions: abs; min, max; <<breakpoints; slopes>>

  • Counting operators: count; atmost, atleast, exactly; numberof

  • Relational and comparison operators: >(=), <(=), (!)=; alldiff

  • Complementarity operator: complements

  • Nonlinear operators and functions: *, /, ^; exp, log; sin, cos, tan; sinh, cosh, tanh

  • Set membership operator: in

Modeling details and examples are given in the Expressions supported section below. Technical details and tools are in the Tools & details section. See also the individual solvers’ documentation at AMPL Development for more details of solver-specific features:

  • Choice between linearization in the interface and native solver support for some operations

  • Handling of AMPL suffixes on constraints that are transformed by the interface

The slides from our presentation on Advances in Model-Based Optimization provide overview of the MP interface library in the context of AMPL applications, including comments on implementation and efficiency issues.