AMPL, aka A Mathematical Programming Language, is a programming language created in 1985 by Robert Fourer and David Gay and Brian Kernighan.
#137on PLDB  38Years Old  766Users 
8Books  2Papers  6kRepos 
A Mathematical Programming Language (AMPL) is an algebraic modeling language to describe and solve highcomplexity problems for largescale mathematical computing (i.e., largescale optimization and schedulingtype problems). It was developed by Robert Fourer, David Gay, and Brian Kernighan at Bell Laboratories. AMPL supports dozens of solvers, both open source and commercial software, including CBC, CPLEX, FortMP, Gurobi, MINOS, IPOPT, SNOPT, KNITRO, and LGO. Read more on Wikipedia...
set PROD; # products
param rate {PROD} > 0; # tons produced per hour
param avail >= 0; # hours available in week
param profit {PROD}; # profit per ton
param market {PROD} >= 0; # limit on tons sold in week
var Make {p in PROD} >= 0, <= market[p]; # tons produced
maximize Total_Profit: sum {p in PROD} profit[p] * Make[p];
# Objective: total profits from all products
subject to Time: sum {p in PROD} (1/rate[p]) * Make[p] <= avail;
# Constraint: total of hours used by all
# products may not exceed hours available
# A toy knapsack problem from the LocalSolver docs written in AMPL.
set I;
param Value{I};
param Weight{I};
param KnapsackBound;
var Take{I} binary;
maximize TotalValue: sum{i in I} Take[i] * Value[i];
s.t. WeightLimit: sum{i in I} Take[i] * Weight[i] <= KnapsackBound;
data;
param:
I: Weight Value :=
0 10 1
1 60 10
2 30 15
3 40 40
4 30 60
5 20 90
6 20 100
7 2 15;
param KnapsackBound := 102;
set Plants;
set Markets;
# Capacity of plant p in cases
param Capacity{p in Plants};
# Demand at market m in cases
param Demand{m in Markets};
# Distance in thousands of miles
param Distance{Plants, Markets};
# Freight in dollars per case per thousand miles
param Freight;
# Transport cost in thousands of dollars per case
param TransportCost{p in Plants, m in Markets} :=
Freight * Distance[p, m] / 1000;
# Shipment quantities in cases
var shipment{Plants, Markets} >= 0;
# Total transportation costs in thousands of dollars
minimize cost:
sum{p in Plants, m in Markets} TransportCost[p, m] * shipment[p, m];
# Observe supply limit at plant p
s.t. supply{p in Plants}: sum{m in Markets} shipment[p, m] <= Capacity[p];
# Satisfy demand at market m
s.t. demand{m in Markets}: sum{p in Plants} shipment[p, m] >= Demand[m];
data;
set Plants := seattle sandiego;
set Markets := newyork chicago topeka;
param Capacity :=
seattle 350
sandiego 600;
param Demand :=
newyork 325
chicago 300
topeka 275;
param Distance : newyork chicago topeka :=
seattle 2.5 1.7 1.8
sandiego 2.5 1.8 1.4;
param Freight := 90;
Feature  Supported  Token  Example 

MultiLine Comments  âœ“  
Integers  âœ“  # \d+([eE][+]?\d+)? 

Floats  âœ“  # (\d+\.(?!\.)\d*\.(?!.)\d+)([eE][+]?\d+)? 

Assignment  âœ“  :=  
Comments  âœ“  # A comment 

Line Comments  âœ“  #  # A comment 
Semantic Indentation  X 
title  author  year  reviews  ratings  rating 

Ampl: A Modeling Language for Mathematical Programming  Robert Fourer  1993  0  17  4.00 
AMPL: A modeling language for mathematical programming : with AMPL Plus student edition for Microsoft Windows  Robert Fourer  1997  0  0  0.0 
Ampl: A Modeling Language for Mathematical Programming: With Ampl Plus Student Edition for Microsoft Windows  Robert Fourer  1997  0  0  0.0 
Ampl: A Modeling Language for Math Programming Package (with User Guide)  Robert Fourer  1999  0  1  2.00 
Ampl: A Molding Language for Mathematical Programming/Book & IBM 5 1/4 Disk  Robert Fourer  1991  0  0  0.0 
Mathematical Optimization Software: Mathematica, General Algebraic Modeling System, Propt, Ioso, Mps, Ampl, Apmonitor, Tomsym, Worhp, Dido  Source Wikipedia  2011  0  0  0.0 
title  authors  year  publisher 

AMPL: A Modeling Language for Mathematical Programming (with AMPL Plus Student Edition for Microsoft Windows) (The Scientific Press Series)  Fourer, Robert and Gay, David M. and Kernighan, Brian W.  1997  Cengage Learning 
AMPL: A Modeling Language for Mathematical Programming (with AMPL Plus Student Edition for Microsoft Windows) (The Scientific Press Series)  Fourer, Robert and Gay, David M. and Kernighan, Brian W.  19970113T00:00:01Z  Cengage Learning 
title  authors  year  citations  influentialCitations 

DIY DEA: Implementing data envelopment analysis in the mathematical programming language AMPL  R. Green  1996  8  0 
Loslan implementation of the AMPL messagepassing system  J. Milewski  1984  2  0 