Home

Pyomo

Pyomo is an open-source optimization modeling language built in Python. It provides a flexible framework for formulating and solving a wide range of mathematical optimization problems using external solvers. In Pyomo, users define models by declaring data structures, variables, an objective, and a set of constraints. Models can be concrete (data embedded in the model) or abstract (data supplied separately), making Pyomo suitable for both single-run and data-driven workflows.

Key components include variables (Var), objectives (Objective), and constraints (Constraint), along with sets and parameters (Set,

Solving a Pyomo model involves selecting a solver with SolverFactory, translating the model into the solver’s

While Pyomo does not include solvers itself, it interfaces with many external solvers such as CBC, GLPK,

Param)
to
represent
indices
and
data.
The
modeling
process
is
expressed
in
Python
using
Pyomo’s
object-oriented
interface,
which
supports
algebraic
expressions
and
standard
mathematical
constructs.
compatible
formulation,
and
running
the
solver
to
obtain
a
solution.
Pyomo
supports
a
broad
range
of
problem
classes,
including
linear
programming
(LP),
mixed-integer
programming
(MILP),
nonlinear
programming
(NLP),
and
mixed-integer
nonlinear
programming
(MINLP).
It
also
provides
facilities
for
stochastic
programming
(via
PySP)
and
robust
optimization,
as
well
as
disjunctive
programming
and
other
advanced
modeling
constructs
through
its
extensions.
CPLEX,
Gurobi,
Ipopt,
and
Knitro.
The
project
emphasizes
readability,
modularity,
and
extensibility,
enabling
researchers
and
practitioners
to
prototype
models,
reuse
components,
and
integrate
optimization
workflows
into
Python-based
data
processing
and
simulation
pipelines.
Pyomo
is
widely
used
in
academia
and
industry
for
modeling,
experimentation,
and
education.