pyomo

Solve LP, MILP, NLP, MINLP, and DAE optimization models with Pyomo.

1|Updated Oct 1, 2025
One-click install
npx skills add https://github.com/sverzijl/planning_latest --skill pyomo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pyomo
Source: https://github.com/sverzijl/planning_latest/tree/main/.claude/skills/pyomo
Command: npx skills add https://github.com/sverzijl/planning_latest --skill pyomo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.

Frequently Asked Questions about pyomo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I formulate and solve linear and mixed-integer optimization models in Python?

You can formulate and solve linear and mixed-integer optimization models in Python by defining variables, objectives, and constraints within a ConcreteModel, then invoking a solver like GLPK or CBC through a solver factory interface.

Can I handle dynamic optimization and differential algebraic equations in Pyomo?

Yes, you can handle dynamic optimization and differential algebraic equations in Pyomo using the pyomo.dae module, which supports discretization and simulation of differential equations for dynamic system modeling.

What solvers are compatible with Pyomo for nonlinear and MINLP problems?

Pyomo is compatible with open-source solvers like GLPK, CBC, and IPOPT, as well as commercial solvers like Gurobi and CPLEX for solving nonlinear and mixed-integer nonlinear programming problems.

Does Pyomo support generalized disjunctive programming for networked distribution models?

Yes, Pyomo supports generalized disjunctive programming (GDP) and can be applied to networked production-distribution problems, guiding model formulation and advanced analysis for complex logical constraints.

Do I need to install external solvers separately to run Pyomo optimization tasks?

Yes, you need to install Pyomo and at least one external solver separately, as the library provides interfaces to integrate with these solvers rather than bundling the solver algorithms directly.

What is the best way to start building a Pyomo optimization model from scratch?

The best way to start is installing Pyomo via pip, creating a simple ConcreteModel with two variables, defining an objective and a constraint, then solving it with a solver factory and displaying the results.