Tool Use & Environment

Solver-Ready Formulation Handoff

Have the agent emit a declarative optimisation model — decision variables, objective, hard constraints — in a solver-agnostic representation, and let an exact solver produce the decision with its feasibility or optimality certificate.

Problem

A schedule produced by sampling carries no proof. Nothing in it tells an operator whether every ramp-rate limit holds, whether the assignment is the cheapest available, or whether the problem was infeasible from the start, and a hard physical constraint admits no partly-satisfied answer — a plan that breaks one is not a slightly worse plan but an unusable one. The reasoning trace that produced the schedule is also the wrong artefact for review: an auditor has to follow prose rather than read constraints. When the input data changes, a broken-down truck or an updated price, the entire run has to be repeated at model-call cost, and the new answer need not be consistent with the previous one.

Solution

Split the work at the point where guarantees begin. The agent reads the situation and pins down the sets, parameters and data sources, then emits a declarative model: decision variables with their domains, an objective, and the hard constraints, each one traceable to a sentence in the source statement. That model is written in a solver-agnostic intermediate representation rather than in one vendor's API, so it compiles deterministically to Gurobi, CPLEX, PuLP, Pyomo or OR-Tools without another model call. Before any solve, a validation step checks index consistency, units, variable bounds and feasibility on known instances; when a check fails, the specific violation is handed back for repair rather than the whole problem being regenerated. The solver then produces the assignment together with its status — optimal within a stated gap, feasible, or infeasible with an inconsistent subset of constraints named. What reaches the operator is the assignment and that status. The agent's remaining job is to explain the solver's output, reading its numbers rather than recomputing them, and when the data changes tomorrow the same representation is recompiled and re-solved with no model in the loop at all.

When to use

  • The problem has hard constraints that a plan either satisfies or does not, such as capacity, ramp rates, delivery windows or conservation of flow.
  • An operator or auditor has to see why a plan is acceptable, not only what the plan is.
  • The same problem is re-solved often on changing data, so re-deciding by prompt each time is expensive and inconsistent between runs.
  • A mature exact solver already exists for the problem class, and the missing piece is the translation from the described situation into its model.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related