2.2 AMPL

AMPL is one of the most powerful algebraic modeling language available today. It also supports dozens of solvers. It is similar to GAMS but has a more straightforward and more concise syntax. It can formulate large linear, integer and non-linear models and contains automatic differentiation for non-linear models. It also can add logical constraints that are treated by constraint programming solvers. AMPL generates the nl-file, which has become a standard input format for many solvers. Model data are strictly separated from the model structure which is purely declarative. In a small, separated script language one can read/write the data and call a solver or do some other model manipulation interactively. In the following, two small models show the syntax of AMPL.

   2.2.1 Transshipment Problem with fixed costs (multmip1)
   2.2.2 Anti-Assignment Problem (balAssign0)