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:
gurobi, an enhanced interface to the Gurobi solver
copt, an interface to Cardinal Optimizer
highs, an interface to the open-source HiGHS solver solver
cbc, an enhanced interface to the CBC solver
xpress, an interface to FICO Xpress
Binaries for these solvers can be downloaded, in distribution bundles and individually, through the AMPL Portal. More solvers will be added.
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
Details and examples are given in the Expressions supported section below. See also the individual solvers’ documentation for 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.