Optimize Linprog
optimize_linprogSolve linear and mixed-integer programming problems from JSON coefficients via simplex and branch-and-bound, returning checked primal/dual diagnostics and basis RHS ranges.
Instructions
LP accepts JSON coefficients: two-phase simplex with Bland pivots and integer branch and bound. Caps: 200 variables/rows, 30 integer indices, 10000 nodes. Returns checked primal/dual diagnostics and basis RHS ranges; ambiguous certificates refuse. Grammar: numbers, names, + - * / ^ (**), parentheses, whitelisted math calls; no comparisons inside expressions. Variables are plain numbers in the units you choose; the tool does not track units inside expressions.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "optimize_linprog"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| c | No | Required objective coefficient JSON vector, e.g. '[1,2]'; 1..200 variables; '' refuses. | |
| A_eq | No | Equality matrix JSON, e.g. '[[1,1]]', for A_eq*x=b_eq; '[]' omits; <=200 total rows. | [] |
| A_ub | No | Inequality matrix JSON, e.g. '[[1,2]]', for A_ub*x<=b_ub; '[]' omits; <=200 total rows. | [] |
| b_eq | No | Equality RHS JSON vector, e.g. '[2]'; '[]' omits; one value per A_eq row. | [] |
| b_ub | No | Inequality RHS JSON vector, e.g. '[3]'; '[]' omits; one value per A_ub row. | [] |
| bounds | No | JSON [lower,upper] pairs, e.g. '[[0,5],[null,null]]'; null is unbounded; '' defaults to nonnegative. | |
| integer | No | JSON zero-based integer-variable indices, e.g. '[0,2]'; at most 30; '[]' uses continuous variables. | [] |
| maximize | No | Objective direction, e.g. true maximizes c*x; false minimizes and is the default. | |
| node_limit | No | Branch and bound cap, e.g. 1000 nodes; integer 1..10000; cap exhaustion refuses. | |
| time_limit | No | Wall-clock budget with time units, e.g. '10 s'; supported 0.001..60 s, shared by all solver stages. | 10 s |