AMPL

AMPL, short for " A Mathematical Programming Language ", is a mathematical modeling language that was developed by Robert Fourer, David Gay and Brian Kernighan at Bell Laboratories. It allows the formulation of mathematical models in an abstract, algebraic notation near form. With AMPL many optimization problems can be formulated.

Since AMPL does not solve these problems directly, but translated into a language that is understood, an optimization algorithm, AMPL requires appropriate optimizer to operate.

Plenty of difficult problems such as global optima, non-linear mixed- integer problems, etc. therefore need special solver.

Example

It is given the following mathematical model:

  • : Number of product 1
  • : Number of product 2
  • Maximize
  • (Range )
  • (Range )
  • ( Restriction on resource 1)
  • ( Restriction on resource 2)

An equivalent formulation in AMPL could look like this:

# Variables: var x1 integer; var x2 integer; # Objective function: maximize z: 400 * x1 50 * x2; # Constraints: subject to Bereich_x1: 0 <= x1 < = 70; subject to Bereich_x2: 0 <= x2 < = 500; subject to Resource1: 25 * x1 10 * x2 < = 5000; subject to Ressource2: 100 * x1 20 * x2 < = 8000; # if you want to solve this problem # all you need is solve; # of maximizers is with Select x1, x2; # displayed literature

  • Robert Fourer, David Gay and Brian Kernighan: AMPL: a modeling language for mathematical programming, Duxbury Resource Center, ISBN 0-534-38809-4
59048
de