A New AML Era
Algebraic modeling languages (AMLs) let a modeler state an optimization problem in something close to the indexed algebraic notation of a textbook, and they translate that statement into the data structures a solver needs. This note asks the question: Why not let a large language model (LLM) go directly from the algebraic notation to an implementation for deployment in, say, the C programming language and ''cut out the middleman'' so to speak? Claude Code, an LLM-based coding agent, translated a published unit commitment formulation directly into a C program that calls Gurobi, with no AML in between. Working from the paper alone, it found five problems in the published formulation and resolved them with its own judgment. On the pglib-uc instances the program generally agrees with the open-source EGRET package, which implements the same formulation: 43 of the 56 linear programming bounds agree, and the other 13 differ because of one constraint whose published form the program follows, which is valid and tighter. After a constraint was added to the formulation, the agent updated the program in 79 seconds, and in 38 seconds after it was removed, whereas the same changes to a JuMP model took about two to five seconds to rebuild. LLMs translate models well, but their output needs independent verification, and developing a model in an AML and then having an LLM produce an implementation for deployment may suit many settings.
Authors
- David M. Woodruff
Institutions
- University of California, Davis (US)
Publication Details
- Journal
- Research Square
- Published
- 2026-12-03
- DOI
- https://doi.org/10.21203/rs.3.rs-11935458/v1
- Primary Topic
- Electric Power System Optimization
- Type
- preprint