Optimization Solver (LP / MIP, scheduling, allocation)
optimization_solverFind the best plan within limits and explain it. Templates (problem_type): production_mix (products with profit, min/max and use of each resource + resources with available amounts); blend (ingredients with cost and nutrient columns + requirements with min/max, batch_size); transportation (sources with supply, destinations with demand, costs per route); schedule (periods with staff required + shifts or shift_length; or staff + shifts for a roster; or jobs + machines); allocation (projects with value and cost + budget, groups, dependencies); custom (objective + constraints as text such as '3x + 2y <= 18', or MPS). Returns the optimal plan, decision cards, shadow prices with valid ranges (value of one more unit of each limit), reduced costs and price ranges, proven bounds for whole-number plans, conflicting limits with the smallest fix when no plan exists, and the gain over a current_plan. Uses simplex, branch and bound (MIP) and the transportation simplex. Not for forecasting demand, nonlinear or stochastic models, or vehicle routing with time windows. Up to ~3,000 variables; larger: optimization_solver_get_engine.
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": "optimization_solver"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mps | No | custom: an MPS model as text. | |
| jobs | No | jobs on machines: name, duration (or a column per machine), allowed machines, due. | |
| basis | No | ||
| costs | No | transportation: rows of source, destination, cost (optional capacity), or one row per source with a column per destination, or {source: {destination: cost}}. | |
| staff | No | roster: name, cost_per_shift (or hourly_rate), max_shifts, min_shifts, max_hours, unavailable (shifts or days), skills. | |
| usage | No | Optional long form: product, resource, amount per unit. | |
| budget | No | ||
| cyclic | No | ||
| groups | No | Mutually exclusive groups: name, members, max, min. | |
| shifts | No | schedule: shift name, cost, periods covered (or start + length); for rosters: name, day, required, skill, hours. | |
| budgets | No | Several budgets: name, available. | |
| mip_gap | No | ||
| periods | No | schedule: period / day name, staff required. | |
| sources | No | transportation: name, supply. | |
| currency | No | INR | |
| machines | No | Machine names (or rows with name). | |
| products | No | production_mix: name, profit (or price and cost), min, max / demand, and per-unit use of each resource as columns named like the resources (or a 'uses' object). | |
| projects | No | allocation: name, value, cost (or a column per budget), must, exclude, group, requires, divisible. | |
| max_nodes | No | ||
| objective | No | custom: 'maximize 3x + 5y' or {sense, terms}. | |
| resources | No | production_mix: name, available (capacity), unit. | |
| variables | No | custom: name, lower, upper, type (continuous / integer / binary), objective. | |
| batch_size | No | blend: total amount per batch; requirements then mean per unit of blend (shares). Omit for totals (diet). | |
| max_listed | No | ||
| constraints | No | Rules as text ('2x + 3y <= 10', '10 <= a + b <= 20', 'A >= 2 B') or {name, terms, sense, rhs}; also extra rules for the templates. | |
| ingredients | No | blend: name, cost per unit, one column per nutrient / property, optional min / max amount, min_share / max_share. | |
| whole_units | No | true, false or 'auto' (default). | |
| current_plan | No | What is done today (name -> value, or shipment rows) to measure the gain. | |
| destinations | No | transportation: name, demand. | |
| problem_type | No | Template; detected from the inputs when omitted. | |
| requirements | No | blend: nutrient / property, min, max (or target). | |
| shift_length | No | Generate shifts of this many consecutive periods (e.g. 5 working days). | |
| shortage_cost | No | ||
| allow_shortage | No | ||
| allow_unfilled | No | ||
| currency_symbol | No | ||
| forbidden_pairs | No | Shift pairs one person may not both work (e.g. night then early). | |
| unfilled_penalty | No | ||
| one_shift_per_day | No | ||
| time_limit_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | No | ||
| alerts | No | ||
| status | Yes | 1 = a plan was found, 0 = no plan (see decisions) | |
| message | No | ||
| metadata | Yes | ||
| solution | No | ||
| decisions | Yes | Plain-language cards, priority order. Relay these first. | |
| comparison | No | ||
| assumptions | No | ||
| infeasibility | No | ||
| data_quality_report | No |