Jump to content

SAMPL

From Wikipedia, the free encyclopedia
SAMPL
Paradigmmulti-paradigm: declarative, imperative
Designed byGautam Mitra, Enza Messina, Valente Patrick
First appeared2001; 23 years ago (2001)
Stable release
20120523 / May 23, 2013; 11 years ago (2013-05-23)
OSCross-platform (multi-platform)
LicenseProprietary
Filename extensions.mod .dat .run .sampl
Websitewww.optirisk-systems.com
Influenced by
AMPL

SAMPL, which stands for "Stochastic AMPL", is an algebraic modeling language resulting by expanding the well-known language AMPL with extended syntax and keywords. It is designed specifically for representing stochastic programming problems[1] and, through recent extensions, problems with chance constraints, integrated chance constraints and robust optimization problems. It can generate the deterministic equivalent version of the instances, using all the solvers AMPL connects to,[2] or generate an SMPS representation and use specialized decomposition based solvers, like FortSP.

Language Features

[edit]

SAMPL shares all language features with AMPL, and adds some constructs specifically designed for expressing scenario based stochastic programming and robust optimization.

Stochastic programming features and constructs

[edit]

To express scenario-based SP problems, additional constructs describe the tree structure and group the decision variable into stages. Moreover, it is possible to specify which parameter stores the probabilities for each branch of the tree and which set represents the scenario set. Other constructs to easily define chance constraints and integrated chance constraint in an SP problem are available as well. Using these language constructs allows to retain the structure of the problem, hence making it available to the solvers, which might exploit it using specialized decomposition methods like Benders' decomposition to speed-up the solution.

Robust optimization constructs

[edit]

SAMPL supports constructs to describe three types of robust optimization formulations:

  • Soyster[3]
  • Bertsimas and Sim[4]
  • Ben-Tal and Nemirovski[5]

Availability

[edit]

SAMPL is currently available as a part of the software AMPLDev (distributed by www.optirisk-systems.com). It supports many popular 32- and 64-bit platforms including Windows, Linux and Mac OS X. A free evaluation version with limited functionality is available.[6]

A stochastic programming sample model

[edit]

The following is the SAMPL version of a simple problem (Dakota[7]), to show the SP related constructs. It does not include the data file, which follows the normal AMPL syntax (see the example provided in the AMPL Wikipedia page for further reference).

set Prod;
set Resource;

# Scenarios (future possible realizations)
scenarioset Scen;

# Definition of the problem as a two-stage problem
tree Tree := twostage;

# Demand for each product in each scenario
random param Demand{Prod, Scen};

# Probability of each scenario
probability P{Scen};	

# Cost of each unit of resource
param Cost{Resource};

# Requirement in terms of resources units to produce one unit of each product
param ProdReq{Resource,Prod};

# Selling price of each product
param Price{Prod};

# Initial budget
param Budget;

# Amount of resources to buy
var buy{r in Resource} >= 0, suffix stage 1;

# Amount of each product to produce
var amountprod{p in Prod, s in Scen} >= 0, suffix stage 2;

# Amount of each product to sell
var amountsell{p in Prod, s in Scen} >= 0, suffix stage 2;

# Total final wealth, as expected total income from sales minus costs for the resources
maximize wealth: sum{s in Scen} P[s] *
 (sum{p in Prod} Price[p] * amountsell[p,s] - sum{r in Resource} Cost[r] * buy[r]);

subject to
# Make sure you have enough resources to produce what we intend to
balance{r in Resource, s in Scen}:
 buy[r] >= sum{p in Prod} ProdReq[r,p] * amountprod[p, s];
# Make sure we do not sell what we did not produce
production{p in Prod, s in Scen}: amountsell[p,s] <= amountprod[p,s];
# Make sure we do not sell more than the market demand
sales{p in Prod, s in Scen}: amountsell[p,s] <= Demand[p,s];
# Respect initial budget
budgetres: sum{r in Resource} Cost[r] * buy[r] <= Budget;

Solvers connectivity

[edit]

SAMPL instance level format for SP problems is SMPS, and therefore the problem can be solved by any solver which supports that standard. One of such solvers (FortSP) is included in the standard SAMPL distribution. Regarding robust optimization problems, the needed solver depend on the specific formulation used, as Ben-Tal and Nemirovski formulation need a second-order cone capable solver.

See also

[edit]

References

[edit]
  1. ^ Christian Valente, Gautam Mitra, Mustapha Sadki and Robert Fourer (2009). "Extending algebraic modelling languages for stochastic programming". INFORMS Journal on Computing. 21 (1): 107–122. doi:10.1287/ijoc.1080.0282.{{cite journal}}: CS1 maint: multiple names: authors list (link)
  2. ^ "Solvers".
  3. ^ Allen L Soyster (1974). "Technical Note—Convex Programming with Set-Inclusive Constraints and Applications to Inexact Linear Programming". Operations Research. 21 (5): 1154–1157. doi:10.1287/opre.21.5.1154.
  4. ^ Bertsimas, Dimitris; Sim, Melvyn (2004). "The Price of Robustness". Operations Research. 52 (1): 35–53. doi:10.1287/opre.1030.0065. hdl:2268/253225. S2CID 8946639.
  5. ^ Aharon Ben-Tal & Arkadi Nemirovski (1998). "Robust convex optimization". Mathematics of Operations Research. 23 (4): 769–805. CiteSeerX 10.1.1.135.798. doi:10.1287/moor.23.4.769.
  6. ^ "Products: AMPLDev SP". optirisk-systems.com. Archived from the original on 2012-11-11.
  7. ^ Higle, Julia L, Wallace, Stein W (2003). "Sensitivity analysis and uncertainty in linear programming" (PDF). Interfaces. 33 (4): 53–60. doi:10.1287/inte.33.4.53.16370.{{cite journal}}: CS1 maint: multiple names: authors list (link)
[edit]