You are on page 1of 3

Optimization Language/AML Decision Making

Requirements

Run a real-time stochastic model in under 30 seconds (compile + solve)


Must be able to model compositionally

Criteria Pyomo AMPL OR-TOOLS JuMP

Compile Slow for Quantify/benchmark Quantify Fast. See page 9 of this paper for benchmarks.
Speed larger /benchmark
models.
Quantify
/benchmark

Language Python C++, C#, Java, C++, Python, Julia


MATLAB, Python, Java, C#
and R

Solver See here. Gurobi, CPLEX, Lots! Covers everything we want. See here.
Support SCIP, GLPK,
GLOP, and CBC

Solver Mostly memory Memory “JuMP communicates with most solvers in memory, avoiding the need to write
Interaction (In (except SCIP) intermediary files”
memory or
via
intermediary
files?)

Supported lazy constraints lazy Limited to a few solvers


Solver user-cuts constraints
Callbacks user-cuts lazy constraints
user-cuts
It can be added heuristic solutions
by modifying linea
r_solver.h

Open-Source Open- Commercial - Price Open-Source - Open-Source - MPL 2.0


/Commercial? Source - TBC Apache 2.0
BSD
/Sandia-
Specific

Ease of The easiest among Easy to specify Easy to specify simple models. Larger more complex models start to get a bit
Modelling all AMLs simple models. hairy.
Larger more
complex models
start to get a bit
hairy.

Stability See here. Released in 0.21.1 - Suggestion that they are going to undertake a major refactor
(Maturity of 2015, since its an
the software) open-source,
support is limited.

Community 694 365 questions on 184 questions on Stack Overflow, 76 contributors on Github, lots of activity on
/Software questions Stack Overflow, their discourse.
Support on Stack 83 contributors on
Overflow, Github
55
Contributors
on Github

Additional Bilevel, Bilevel Stochastic, Polynomial, Robust


Functionality Stochastic

Ease of Very Easy Complex


Prototyping

Development A developer with an A developer with Julia as a language is more computer-sciency than Python, although don’t need
Learning optimization a C++ to manage memory as in C++. A developer with a python background could
Curve background could background could pick it up in a couple of weeks to a month.
pick it up in a pick it up in a
couple of weeks to couple of weeks
a month. to a month.
Ability to Yes Yes Yes Complicated to update an existing model - see Parameter below. They might
update an argue that instantiation is so fast you don’t need to worry about it. See p9/10 of
instantiated this paper where they discuss how Julia can modify the solver’s in-memory
model with representation of the problem (mainly for adding constraints etc.) - unclear if this
new data? helps us.

Ability to Yes
easily add
additional
terms to the
Objective

Support for Yes Yes Yes Default would be concrete - Abstract can be represented by wrapping model in
Abstract + a function. See here.
Concrete
Models

Code
Examples

Model

model = Model(GLPK.Optimizer)

Variable

@variable(model, 0 <= x <= 2)


set_lower_bound(x, -1)

Parameter Not natively supported - can achieve by setting dummy variables with fixed
equality constraints (can lead to bilinear problems for general parameters) or by
explicitly modifying coefficients of linear expressions (quadratic not supported
yet). There is an extension to support parameters. See p10 of this paper for a
discussion on this design choice.

Expression

ex = @expression(model, 2x + y
- 1)

Constraint

@constraint(model, con, 2x <=


1)

Objective

@objective(model, Max, 2x - 1)

Solve
Command

optimize!(model)
Basic Toy Pyomo AMPL Examples Google OR-Tools JuMP Code Examples
Optimization Code Code Examples
Model Examples
Example

Minimum Pyomo AMPL Examples JuMP Code Examples


Compositional Code
Working Examples
Example
(demo of
cross-
referencing)

You might also like