What problem does it solve?
Pyomo is a Python-based optimization modeling library that enables building, solving, and analyzing mathematical programs, removing the friction of switching between modeling languages and solvers.
Core Features & Use Cases
- Modeling versatility: LP, MILP, NLP, MINLP, and generalized disjunctive programming (GDP) models.
- Dynamic optimization: Differential equations and DAEs with pyomo.dae, including discretization and simulation.
- Solver integration: Interfaces to open-source and commercial solvers (GLPK, CBC, IPOPT, Gurobi, CPLEX) and solver workflows for parametric studies and scenario analysis.
- Reference-rich guidance: Access comprehensive API, tutorials, and usage patterns in the included references directory for self-paced learning and advanced usage.
Quick Start
Install Pyomo and a solver, then create a minimal Pyomo model in Python, solve it with a solver, and print the results. Example steps:
- Install: pip install pyomo
- Create a simple ConcreteModel with two variables, an objective, and a constraint.
- Solve with e.g., SolverFactory('glpk') and display variable values.