MP2NL#
MP2NL translates MP-compatible syntax and features to any AMPL solver. While this might mostly benefit MINLP solvers, such as Knitro or Couenne, NLP solvers (such as Ipopt) could benefit from automatic reformulation of complementarity constraints or (convex) piecewise-linear expressions.
Invocation#
Some of the
nonlinear AMPL solvers
(currently Knitro,
Baron,
Conopt),
as well as the legacy solvers
gurobiasl,
cplexasl,
xpressasl
support option mp2nl=1:
ampl: option knitro_options 'soltype=1 mp2nl=1';
ampl: solve;
For any other AMPL solver, invoke mp2nl manually:
ampl.solve(solver='mp2nl',
ipopt_options='max_cpu_time 15',
mp2nl_options='solver=ipopt cvt:compl=2 cvt:compl:eps=1e-8')
Solver options#
Full list of solver options: