Title: Recent Changes to the Optimization Services Project
1Recent Changes to the Optimization Services
Project
- H.I. Gassmann, Faculty of ManagementJ. Ma,
Northwestern UniversityR.K. Martin, The
University of Chicago
CORS/INFORMS, June 2009
2Outline
- Overview of OS
- OSiL OS instance language
- OSoL OS option language
- OSrL OS result language
- Future plans
3Optimization Services (OS)
- A set of standards to facilitate communication
between modeling languages, solvers, problem
analyzers, simulation engines, and registry and
discovery services in a distributed computing
environment. - Programming language, operating system, and
hardware independent. - Open and available for everyone in the OR
community to use free of charge. - Optimization should be as easy as hooking up to
the network.
4Solvers
5Optimization Services
- Optimization services is needed because there
is/are - Numerous modeling languages each with their own
format for storing the underlying model. - Numerous solvers each with their own application
program interface (API). - Numerous operating system, hardware, and
programming language combinations. - No standard for representing problem instances,
especially nonlinear optimization instances. - No real standard for registry and discovery
services.
6Why a standard interface?
nm hook-ups
nm hook-ups
7What Is Optimization Services (OS)?
- A set of XML-based standards for representing
information relevant to the practice of
optimization, most importantly optimization
instances (OSiL), optimization results (OSrL),
and optimization solver options (OSoL). - Open source libraries that support and implement
many (eventually all) of the standards. - A robust API for both solver algorithms and
modeling systems. The API is for linear, integer,
general nonlinear and stochastic programs. - A command line executable OSSolverService for
reading problem instances (in OSiL format, AMPL
nl format, or MPS format) and calling a solver
either locally or on a remote server.
8What Is Optimization Services (OS)?
- Utilities that convert MPS files and AMPL nl
files into the OSiL XML-based format. - Standards that facilitate the communication
between clients and optimization solvers using
Web Services and libraries that support these
standards. - An executable program OSAmplClient that is
designed to work with the AMPL modeling language.
OSAmplClient appears as a "solver" to AMPL and,
based on options given in AMPL, contacts solvers
either remotely or locally to solve instances
created in AMPL. - Server software that works with Apache Tomcat and
Apache Axis. This software uses Web Services
technology and acts as middleware between the
client that creates the instance, and solver on
the server that optimizes the instance and
returns the result.
9How to get OS
- Download
- Binaries
- http//www.coin-or.org/download/binary/OS
- OS-1.0.0-win32-msvs-v8.zip
- OS-1.1.1-linux-x86_64-icc10.1.tgz
- Stable source
- http//www.coin-or.org/download/source/OS/
- OS-1.1.1.tgz
- OS-1.1.1.zip
- Development version (using svn)
- svn co https//projects.coin-or.org/svn/OS/release
s/1.1.1 COIN-OS
10Solver support
- All versions of OS download with COIN-OR solvers
- Clp
- Cbc
- Ipopt
- Bonmin
- Couenne
- Symphony
- Additional support
- Cplex
- GLPK
- Lindo
11Main components of OS
- OSiL and OSInstance
- OSoL and OSOption
- OSrL and OSResult
- OSpL
- OSSolverService
- OSAmplClient
12OSiL
- XML schema for mathematical programs
- Linear
- Integer
- Nonlinear
- Stochastic
- Multiobjective
13Why XML?
- Existing parsers to check syntax
- Easy to generate automatically
- Tree structure naturally mirrors expression trees
for nonlinear functions - Arbitrary precision and name space
- Automatic attribute checking (e.g.,
nonnegativity) - Querying capabilities via XQuery
- Encryption standards being developed
- Easy integration into broader IT infrastructure
14OSiL Schema Header information
15Header information Example
- lt?xmlversion"1.0" encoding"UTF8"?gt
- ltosil xmlns"os.optimizationservices.org"
- xmlnsxsi"htt//www.w3.org/2001/XMLSchema
instance" - xsischemaLocation"os.optimizationservice
s.org http//www.optimizationervices.org/
schemas/2.0/OSiL.xsd"gt - ltinstanceHeadergt
- ltnamegtFinPlanlt/namegt
- ltsourcegt
- Birge and Louveaux, Stochastic
Programming - lt/sourcegt
- ltdescriptiongt
- Three-stage stochastic investment
problem - lt/descriptiongt
- lt/instanceHeader gt
- ltinstanceDatagt
- ...
- lt/instanceDatagt
- lt/osilgt
16OSiL Schema Deterministic data
17Instance data Variables, objectives, constraints
- ltvariables numberOfVariables"8"gt
- ltvar name"invest01" type"C" lb"0.0"/gt
- ltvar name"invest02"/gt
- ltvar name"invest11"/gt
- ltvar name"invest12"/gt
- ltvar name"invest21"/gt
- ltvar name"invest22"/gt
- ltvar name"w"/gt
- ltvar name"u"/gt
- lt/variablesgt
- ltobjectives numberOfObjectives"1"gt
- ltobj maxOrMin"max" numberOfObjCoef "2"
lb"0.0"gt - ltcoef idx"6"/gt1.lt/coefgt
- ltcoef idx"7"/gt-4.lt/coefgt
- lt/objgt
- lt/objectivesgt
- ltconstraints numberOfConstraints"4"gt
- ltcon name"budget0" lb"55" ub"55"/gt
- ltcon name"budget1" lb"0" ub"0"/gt
18Instance data Core matrix (sparse
matrix form)
- ltlinearConstraintCoefficients
- numberOfValues14"gt
- ltstartgt
- ltelgt0lt/elgt
- ltelgt2lt/elgt
- ltelgt4lt/elgt
- ltelgt6lt/elgt
- ltelgt8lt/elgt
- ltelgt10lt/elgt
- ltelgt12lt/elgt
- ltelgt13lt/elgt
- ltelgt14lt/elgt
- lt/startgt
-
ltvaluegt ltelgt1lt/elgt ltelgt1.25lt/elgt
ltelgt1lt/elgt ltelgt1.14lt/elgt
ltelgt1lt/elgt ltelgt1.25lt/elgt ltelgt1lt/elgt
ltelgt1.14lt/elgt ltelgt1lt/elgt
ltelgt1.25lt/elgt ltelgt1lt/elgt
ltelgt1.14lt/elgt ltelgt1lt/elgt ltelgt-1lt/elgt
lt/valuegt
ltrowIdxgt ltelgt0lt/elgt ltelgt1lt/elgt
ltelgt0lt/elgt ltelgt1lt/elgt ltelgt1lt/elgt
ltelgt2lt/elgt ltelgt1lt/elgt ltelgt2lt/elgt
ltelgt2lt/elgt ltelgt3lt/elgt ltelgt2lt/elgt
ltelgt3lt/elgt ltelgt3lt/elgt ltelgt3lt/elgt lt/rowIdxgt
19Representation of uncertainty
- Explicit event trees
- Scenario formulation
- Only record data items that differ from parent
scenario - Implicit trees (distribution-based formulation)
- Continuous or discrete random variables
- Linked to problem coefficients via
transformations - Incomplete information
- Probabilistic constraints
- Simple chance constraints
- Joint chance constraints
- Robust formulations
20OSiL Schema Dynamic structure
21Dynamic information Example
- ltstages numberOfStages"4"gt
- ltstagegt
- ltvariables numberOfVariables"2"
startIdx"0/gt - ltconstraints numberOfConstraints"1"
startIdx"0"/gt - lt/stagegt
- ltstagegt
- ltvariables numberOfVariables"2"
startIdx"2"/gt - ltconstraints numberOfConstraints"1"
startIdx"1"/gt - lt/stagegt
- ltstagegt
- ltvariables numberOfVariables"2"
startIdx"4"/gt - ltconstraints numberOfConstraints"1"
startIdx"2"/gt - lt/stagegt
- ltstagegt
- ltvariables numberOfVariables"2"gt
- ltvar idx"6"gt ltvar idx"7"gt
- lt/variablesgt
- ltconstraints numberOfConstraints"1"
startIdx"3"/gt - lt/stagegt
22Explicit and implicit event trees
23Scenario trees
24Scenario tree Example
- ltstochasticInformation decisionEvenSequence"Deci
sionAfterEvent"gt - lteventTreegt
- ltscenarioTree numberOfScenarios"8"gt
- ltrootScenario prob"1" stage"0"/gt
- ltscenario prob"0.5" stage"3"
parent"0"gt - ltlinearConstraintCoefficientsgt
- ltel rowIdx"3"
colIdx"4"gt1.06lt/elgt - ltel rowIdx"3"
colIdx"5"gt1.12lt/elgt - lt/linearConstraintCoefficientsgt
- lt/scenariogt
- ltscenario prob"0.5" stage"2"
parent"0"gt -
25Distributions (implicit tree)
26Discrete random vector
- ltdistributionsgt
- ltmultivariategt
- ltdistr stage"1"gt
- ltmultiDimensionalDistributionGroupgt
- ltmultivariateDiscretegt
- ltscenariogt
- ltprobgt0.5lt/probgt
- ltelgt1.25lt/elgt
- ltelgt1.14lt/elgt
- lt/scenariogt
- ltscenariogt
- ltprobgt0.5lt/probgt
- ltelgt1.06lt/elgt
- ltelgt1.12lt/elgt
- lt/scenariogt
- lt/multivariateDiscretegt
- lt/multiDimensionalDistributionGroupgt
- lt/distrgt
-
27Transformations p f(v)
28Linear transformation Example
- ltstochasticTransformationgt
- ltlinearTransformationgt
- ltstochasticElements
- numberOfElements"6"gt
- ltel rowIdx"1" colIdx"0"/gt
- ltel rowIdx"1" colIdx"1"/gt
- ltel rowIdx"2" colIdx"2"/gt
- ltel rowIdx"2" colIdx"3"/gt
- ltel rowIdx"3" colIdx"4"/gt
- ltel rowIdx"3" colIdx"5"/gt
- lt/stochasticElementsgt
- ltmatrixCoefficients
- numberOfElements"6"gt
- ltstartgt
- ltelgt0lt/elgt
- ltelgt1lt/elgt
- ltelgt2lt/elgt
- ltelgt3lt/elgt
- ltelgt4lt/elgt
ltrowIdxgt ltelgt0lt/elgt
ltelgt1lt/elgt
ltelgt2lt/elgt ltelgt3lt/elgt
ltelgt4lt/elgt ltelgt1lt/elgt
lt/rowIdxgt ltvaluegt
ltel mult6"gt1.0lt/elgt lt/valuegt
lt/matrixCoefficientsgt lt/linearTransformationgt
lt/stochasticTransformationgt
29Penalties and probabilistic constraints
30Robust optimization
31Capabilities
- Arbitrary nonlinear expressions
- Arbitrary distributions
- Scenario trees
- Stochastic problem dimensions
- Simple recourse
- Soft constraints with arbitrary penalties
- Probabilistic constraints
- Arbitrary moment constraints
32OSInstance In-memory representation
- XML elements correspond to C classes
- Child elements mapped as member classes
- set(), get() and calculate() methods
class OSInstance public OSInstance()
InstanceHeader instanceHeader InstanceData
instanceData // class OSInstance
33OSoL OS option language
- Solver options
- Initializations of variables
- System requirements
- Job parameters
- In-memory representation OSOption
- API get(), set(), add() methods
34OSoL schema
35Sample .osol file
- lt?xml version"1.0" encoding"UTF-8"?gt
- ltosol xmlns"os.optimizationservices.org"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-instan
ce" xsischemaLocation"os.optimizationservices.or
g http//www.optimizationservices.org/schemas/2.0/
OSoL.xsd"gt - ltoptimization numberOfVariables"2"gt
- ltvariablesgt
- ltinitialVariableValues
numberOfVar"2"gt - ltvar idx"0" value"5."/gt ltvar
idx"1" value"5."/gt - lt/initialVariableValuesgt
- lt/variablesgt
- ltsolverOptions numberOfSolverOptions"3"gt
- ltsolverOption name"tol"
solver"ipopt" type"numeric"
value"1.e-9"/gt - ltsolverOption name"print_level"
solver"ipopt" type"integer"
value"5"/gt - ltsolverOption name"max_iter"
solver"ipopt" type"integer"
value"2000"/gt - lt/solverOptionsgt
- lt/optimizationgt
- lt/osolgt
36OSrL and OSResult
- Result of the optimization
- Solution status
- Statistics
- Value of primal and dual variables
- Can be displayed in a browser
37Sample result file
- lt?xml version"1.0" encoding"UTF-8"?gtlt?xml-styles
heet type"text/xsl href"../stylesheets/OSrL.x
slt"?gt - ltosrl xmlns"os.optimizationservices.org"
xmlnsxsihttp//www.w3.org/2001/XMLSchema-instanc
e xsischemaLocation"os.optimizationservices.or
g http//www.optimizationservices.org/schemas/2
.0/OSrL.xsd" gt - ltgeneralgt
- ltgeneralStatus type"normal"/gt
- ltserviceNamegtIpopt solver servicelt/serviceName
gt - ltinstanceNamegtOriginal Rosenbrocklt/instanceNam
egt - ltmessagegtIpopt solver finishes to the
end.lt/messagegt - lt/generalgt
- ltoptimization numberOfSolutions"1"
numberOfVariables"2 numberOfConstraints"0"
numberOfObjectives"1"gt - ltsolution targetObjectiveIdx"-1"gt
- ltstatus type"locallyOptimal"
description"SUCCESSIPOPT Algorithm
terminated normally at a locally optimal point,
satisfying the convergence tolerances."/gt - ltvariables numberOfOtherVariableResults"2"gt
- ltvalues numberOfVar"2"gt
- ltvar idx"0"gt1.0000000011552117lt/vargt
- ltvar idx"1"gt1.0000000023142723lt/vargt
- lt/valuesgt
38Sample result file (contd)
- ltother numberOfVar"2" name"varL"
description"Lagrange Multiplier on the
Variable Lower Bound"gt - ltvar idx"0"gt7.701488100457089e-10lt/vargt
- ltvar idx"1"gt7.701498562828543e-10lt/vargt
- lt/othergt
- ltother numberOfVar"2" name"varU"
description"Lagrange Multiplier on the
Variable Upper Bound"gt - ltvar idx"0"gt0lt/vargt
- ltvar idx"1"gt0lt/vargt
- lt/othergt
- lt/variablesgt
- ltobjectives gt
- ltvalues numberOfObj"1"gt
- ltobj idx"-1"gt1.3359955006550299e-18lt/ob
jgt - lt/valuesgt
- lt/objectivesgt
- lt/solutiongt
- lt/optimizationgt
- lt/osrlgt
39Current status and future plans
- Changes to OSoL and OSrL schemas and API
- Version 2.0 released this week
- Stochastic extensions to be finalized
- Proof of concept
- Generate and solve deterministic equivalent
- Link to MSLiP
- Link to sampling-based solvers
40How to get OS
- Binaries
- http//www.coin-or.org/download/binary/OS
- OS-1.0.0-win32-msvs-v8.zip
- OS-1.1.1-linux-x86_64-icc10.1.tgz
- Source code
- http//www.coin-or.org/download/source/OS/
- OS-1.1.1.tgz
- OS-1.1.1.zip
41Get involved
- There are several ways you can help make COIN-OR
better - Download and use COIN-OR software
- Send us feedback
- Volunteer your time
- Become an Associate Member of the COIN-OR
Foundation - Contribute code or documentation
42QUESTIONS?
http//myweb.dal.ca/gassmann http//www.optimizati
onservices.org http//www.coin-or.org/projects/OS.
xml Horand.Gassmann_at_dal.ca