Solver drivers#

‘Flat API’ and new expression-based solvers#

For solvers with traditional ‘flat’ (no expression trees) APIs, non-linear AMPL expressions need to be reformulated. For example, max(a, b) is translated into a constraint

new_var == max(a, b);

which is in turn reformulated for MIP or passed to the solver natively (e.g., Gurobi: GRBaddgenconstrMax).

A late-2024 extension to MP allows passing expression trees to solvers, see Reformulation settings.

The implemented drivers are listed in Modeling overview and implemented solvers.

Old-API expression-based solvers#

Some older drivers map directly from NL file’s model, without exploiting the automatic reformulation capabilites of MP. For example, AMPL expression exp() maps to IBM ILOG Concert’s IloExponent. The MP library has the following C++ drivers of this kind, all of which support AMPL extensions for logic and constraint programming:

Specialized drivers#

  • SOCP solver uses IBM ILOG CPLEX to solve problems convertable to SOCP form.

  • SSD solver is a solver for problems with second-order stochastic dominance constraints.

  • SMPSWriter, a converter from deterministic equivalent of a two-stage stochastic programming (SP) problem written in AMPL to an SP problem in SMPS format.