From Excel to AMPL

Python and AMPL ecosystems with logos

From Excel to AMPL: My 10-Year Journey in Mathematical Optimization

I still remember the first time I stumbled upon mathematical optimization while studying economics.
It felt like unlocking a hidden superpower — here was a way to combine economics, production, energy, environmental impact, and so much more into a single decision-making model, all aimed at maximizing efficiency.

For me, the magic was never just in the math. It was in the application — taking abstract formulas and turning them into tools that actually shape industries, influence policy, and solve real-world problems.

Like many students a decade ago, my first step into optimization wasn’t with a fancy tool or a custom-built framework.
It was with something familiar: Excel’s Solver add-in.

Step 1 — Excel: The First Spark

At first, it felt like wizardry. I could:

  • Plug in data
  • Add some constraints
  • Click Solve and… voilà — Excel crunched the numbers and found a solution.

But the magic didn’t last forever.
Soon, I ran into limits:

  • Models had to stay small.
  • There was no clean separation between data, constraints, variables, and objectives.
  • Every small tweak to the model could mean restructuring half the spreadsheet.

OpenSolver, an Excel add-in, helped make things more visual and flexible.
Still, as my models grew more complex, Excel became more of a bottleneck than a boost.

Step 2 — SolverStudio: New Horizons, New Hurdles

Next came SolverStudio, an Excel add-in that introduced me to the wider world of modeling languages.
That’s where I first met Pyomo and PuLP.

Here was the catch: to use them, I had to learn Python at the same time as learning the modeling frameworks.
For someone already grappling with optimization concepts, that was like trying to learn chess in a foreign language.

I realized I needed something that matched the logic of optimization — without the friction of excessive programming overhead.

Step 3 — Julia, GAMS, AMPL: Love at First Model

I experimented with Julia, GAMS, and AMPL.

When I tried AMPL, it just… clicked.

My first impressions:

  • The syntax was clean and algebraic — it read like the math I was trying to express.
  • Building complex systems was unexpectedly straightforward.
  • It felt like AMPL was made for the way optimization problems naturally take shape.

Everything ingenious is simple — and AMPL proved it.

10 Years Later — Still Discovering

Fast-forward to today, and AMPL still surprises me.
The development team keeps adding features that handle bigger challenges while keeping models readable and elegant.

Some personal highlights:

  • MP Interface and Model Collaboratory for collaborative, scalable work.
  • Built-in support for logical constraints and multiple objectives.
  • Python integration via amplpy for the best of both worlds.

Why I’m Sharing This

I know many students and newcomers are right now where I was 10 years ago:

  • Starting in Excel, Pyomo, PuLP, or another framework.
  • Wondering, What should I learn next?
  • Trying to decide where to invest their time.

When I started, AMPL was harder to get. Today, free academic and personal licenses make it much more accessible.

Excel, Pyomo, PuLP, and others all have their place — but in my experience, AMPL has offered the best long-term mix of:

  • Clear, mathematical syntax.
  • Speed of development.
  • Powerful solver integration.
  • Tools for diagnosing and fixing problems fast.

If you’re trying to choose a tool, here’s a side-by-side comparison table of AMPL, Pyomo, and PuLP based on my experience — so you can see how they stack up in problem scope, scalability, learning curve, and more.

AMPL vs. Pyomo vs. PuLP — Feature-by-Feature

Table legend

  1. Free for Open-source solvers.
  2. Only for Commercial Solvers.
  3. Easy to read and write mathematical models.
Feature / AspectAMPLPyomoPuLP
SourceClosed-sourceOpen-source
Type of problem
  • Linear (LP)
  • Quadratic (QP)
  • Mixed-Integer Linear (MILP)
  • Mixed-Integer Quadratic (MIQP)
  • Nonlinear (NLP)
  • Mixed-Integer Nonlinear (MINLP)
  • Stochastic (SP)
  • Generalized Disjunctive (GDP)
  • Differential Algebraic Equations (DAE)
  • Bilevel (BP)
  • Mathematical Programs with Equilibrium Constraints (MPEC)
  • Conic (SOCP, SDP)
  • Complementarity Problems (MCP, MPCC)
  • Constraint (CP)
  • Network Flow Problems
  • Robust Optimization
  • Decomposition Methods
  • LP, QP, MILP, MIQP
  • NLP, MINLP, SP, GDP
  • DAE, BP, MPEC
Limited to LP/MILP
Model Size ScalingLargeMediumLow
License cost
– AcademiaFreeFree
– Research
– PersonalFree1
– EnterprisePaid2
Ease of installationEasy
Language Type, Syntax complexity and ReadabilityMultiple APIs, natural and concise syntax (high readability)Python-based, flexible but verboseLP-focused, but less expressive for complex problems
Integration
  • Pure Python library
  • Google Colab
  • Notre Dame CRC Cluster
  • Jupyter notebook
Pure Python library
Development speedFastestSlower for large modelsSlower for large models
SolversGurobi, CPLEX, Xpress, Mosek, COPT, CONOPT, Knitro, LOQO, SNOPT, MINOS, Baron, LGO, SNOPT, LINDO Global, Octeract, HiGHS, CBC, SCIP, GCG, IPOPT, Bonmin, Couenne, Gecode, cuOpt, RAPOSaGurobi, Ipopt, Cplex, Cbc, HiGHS, MAiNGOMosek, Gurobi, Cplex, Xpress, HiGHS, SCIP, XPRESS, COPT
Solvers supportTight integration with solvers, providing consistent error reportingDepends on the solver interface (some solvers give better feedback than others)Minimal solver feedback; debugging is mostly manual
Performance (model gen time)FastestMediumLow–Medium
Debugging & diagnostics
Presolve phaseYesNoNo
– Model Inspection & Debugging Tools
  • display – inspect variables, constraints, parameters
  • expand – see expanded constraints/expressions
  • Reformulation explorer
Requires manual inspection (e.g., model.pprint(), model.constraint_name.display())Very limited debugging tools (mostly printing variables/constraints)
– Handling Infeasibility & UnboundednessTroubleshooting model infeasibility using AMPL’s presolve featureNo built-in infeasibility diagnostics; requires manual checking or solver-specific toolsNo infeasibility debugging—mostly relies on solver reports
Community & support
– Technical support
  • Premium prioritary support for commercial and academic users
  • Bug fixes
  • Training and consulting services
Open-source communityOpen-source community
– Forumhttps://discuss.ampl.com/https://groups.google.com/g/pyomo-forumhttps://github.com/coin-or/pulp/issues
– BooksThe Pyomo BookYes
– Online documentationhttps://dev.ampl.com/index.htmlPyomo Documentationhttps://coin-or.github.io/pulp/
– Model repository100+ models10+ models
Learning curveModerate (math-based+Python)Steeper learning curve (+Python)Steeper learning curve (+Python)

Your Turn

This is just my story. I’d love to hear yours:

  • Have you switched optimization tools over the years? Why?
  • What features matter most to you when choosing a modeling language?

Drop your thoughts below — let’s make this a shared guide for anyone stepping into the world of optimization.

Table of Contents

Picture of AMPL Team

AMPL Team

Technical Development Team