ampl_eval
Execute AMPL statements in sequence, returning per-statement output and errors to help debug optimization models.
Instructions
Run AMPL statements in order, returning per-statement output and errors.
Model-mode set literals need braces: set S = {1,2,3}; and
set S := {1,2,3}; both work. Omitting the braces, e.g.
set S := 1 2 3;, is a syntax error in model mode. A failing statement
stops the batch but never kills the session.
statements must be a non-empty list of strings that contains at least
one actual statement: an empty list, or input that is only comments and
whitespace, is reported as an argument_error rather than as a
successful call over nothing.
A warnings list appears on the result when a statement loads a file
(include, commands, model, data) or a shared library (load).
Loading is permitted on purpose, but the loaded file's contents are
executed WITHOUT being guard-checked - read the warning and tell the
user rather than assuming the guard covered it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session | No | ||
| statements | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||