lingo_solve
Solve LINGO optimization models inline or from a .lng/.lg4 file and return status, objective, variable values, and dual prices.
Instructions
Solve a LINGO optimization model and return the structured solution (status, objective value, variable values with reduced costs, row slacks/surplus with dual prices). Accepts LINGO 11 model source inline or a path to a .lng/.lg4 file. The model may be written in plain LINGO 11 syntax; MODEL: and END are added automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | LINGO model source, e.g. "MAX = 3*X1 + 4*X2;\nX1 + X2 <= 10;\nX2 <= 6;". | |
| file_path | No | Path to an existing LINGO model file (.lng / .lg4) to solve instead of inline source. | |
| timeout_ms | No | Solver timeout in milliseconds. Default 120000. | |
| nonzero_only | No | Report only nonzero variable values. Default false. |