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.
SUPPORT
AMPL is now on Discourse! 🎉
This is your NEW best place to talk about optimization problems, and get support for AMPL and AMPL Community Edition from our dev team and the community.
Join the conversation at discuss.ampl.com
SUPPORT
AMPL is now on Discourse! 🎉
This is your NEW best place to talk about optimization problems, and get support for AMPL and AMPL Community Edition from our dev team and the community.
Join the conversation at discuss.ampl.com
SOLVER UPDATES
All-new Gurobi 10 solver driver for AMPL!
Featuring a new network simplex algorithm, significant performance gains on MIPs, and more!
Our enhanced Gurobi driver (previously x-gurobi) is now the default gurobi driver.
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.
Example file from the AMPL book
model diet.mod;
data diet2.dat;
param N symbolic in NUTR;
param nstart > 0;
param nstep > 0;
read N, nstart, nstep <- ; # read data interactively
set N_MAX default {};
param N_obj {N_MAX};
param N_dual {N_MAX};
option solver_msg 0;
for {i in nstart .. 0 by -nstep} {
let n_max[N] := i;
solve;
if solve_result = "infeasible" then {
printf "--- infeasible at %d ---\n\n", i;
break;
}
let N_MAX := N_MAX union {i};
let N_obj[i] := Total_Cost;
let N_dual[i] := Diet[N].dual;
}
display N_obj, N_dual;