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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

A New AML Era

David M. Woodruff
Research Square
Electric Power System Optimization
preprint

A New AML Era

David M. Woodruff
preprint en

Abstract

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.

Research Square
University of California, Davis (US)
Electric Power System Optimization
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon