Savanty vs. writing OR-Tools by hand
If you can already model in CP-SAT, you do not need Savanty. This page is about when the trade flips.
The frame
Google's OR-Tools is the standard open-source toolkit for constraint programming, mixed-integer programming, and routing. Its CP-SAT solver is competitive at international solver competitions. If you have an operations-research engineer on staff, OR-Tools is very likely what they already use, and they almost certainly do not need an LLM to write the model.
Savanty does something different. It accepts a natural-language description, has an LLM translate it into Answer Set Programming, hands the encoding to Clingo, and runs a typed self-repair loop when the solver rejects the encoding. The user never writes formal code. The cost is a translation step that may fail and a different solver (ASP, not CP-SAT) with different ergonomics for different problem classes.
Side by side
| Axis | Savanty | OR-Tools (CP-SAT) by hand |
|---|---|---|
| Input format | English prose passed to solve_optimization_problem(...), CLI flag, or REST body. | Python (or C++ / Java / .NET) program building a CpModel with explicit variable and constraint construction. |
| Required skill set | Describe the problem clearly. No formal modelling knowledge required. | Familiarity with constraint programming idioms: NewIntVar, AddNoOverlap, AddCircuit, channeling constraints, etc. |
| Underlying solver | Clingo — Answer Set Programming, stable model semantics, finite domains. | CP-SAT — Lazy clause generation, integer / boolean variables, native cumulative and interval constraints. |
| Correctness guarantee | Returned assign/2 atoms provably satisfy every emitted integrity constraint (Clingo soundness). Translation from English is best-effort, not guaranteed. | Returned solution provably satisfies every constraint added to the CpModel (CP-SAT soundness). The model itself is what you wrote, so faithfulness is up to you. |
| Continuous variables | Not supported. Suitability check redirects you to scipy or cvxpy. | Not directly supported in CP-SAT; OR-Tools includes a separate linear / GLOP solver for LP and a routing library for VRP. |
| Cumulative / interval constraints | Possible but verbose — encoded via aggregates over assign/2 atoms. | First-class: NewIntervalVar, AddNoOverlap, AddCumulative. |
| Routing / VRP | Possible only for small graphs; ASP is not a natural fit. | First-class — OR-Tools ships a dedicated routing library used in production at Google and elsewhere. |
| Debugging when infeasible | Computes a minimal unsatisfiable core over your integrity constraints and feeds it back to the LLM, which either revises or reports faithful infeasibility. | CP-SAT has assumption-based UNSAT extraction (solver.SufficientAssumptionsForInfeasibility); you read it and revise by hand. |
| Time to first valid model | One LLM round-trip plus solve, typically seconds for small problems. | Minutes to hours of human modelling time for an unfamiliar problem, then sub-second solve. |
| Auditability of the model | The generated ASP is returned as result.asp_code for inspection. | The model is your source code. Authoritative. |
| Cost per run | LLM token cost (one or more rounds depending on repair iterations) plus Clingo CPU. | CPU only. |
| Language coverage | Python package (CLI, library, FastAPI server). Optional Vue.js frontend and Slint desktop GUI. | Native bindings for Python, C++, Java, .NET. |
| License | MIT. | Apache 2.0. |
When OR-Tools by hand is the right answer
- You have a vehicle routing problem and want the routing library.
- Your problem involves heavy cumulative or interval constraints over real-valued resources.
- You have a stable, long-lived model that ships in production code and the cost of modelling once is amortised over millions of solves.
- You need solver-internal knobs — search strategies, parallelism, decision policies — that are exposed in CP-SAT and not in Clingo.
- Your team already speaks fluent CP and there is no translation layer needed.
When Savanty is the right answer
- The problem is ad-hoc and short-lived — a one-off scheduling question, a what-if exploration, a small allocation puzzle from a stakeholder.
- The person formulating the problem is not a CP modeller and would otherwise hire one.
- The problem family fits ASP well: shift scheduling, timetabling, discrete assignment, seating, team formation, logic puzzles, graph colouring.
- Inspectability matters — having the generated ASP returned next to the solution is more useful than a black-box answer.
- You want faithful infeasibility reports (the unsat core surfaces, with the model asked to distinguish "I over-constrained" from "the user's problem is genuinely infeasible") without writing your own assumption tracking.
A note on the comparison itself
It is not honest to claim Savanty “beats” OR-Tools or vice versa. They sit at different points on the abstraction axis. CP-SAT is a finished solver with first-class support for several constraint families that ASP encodes only awkwardly; ASP, in turn, has a uniform encoding model and a particularly clean story for stable-model semantics that makes typed repair loops natural. The interesting axis is who is writing the model and whether the modelling time matters.
If you can write the CP-SAT model yourself in twenty minutes, do that. If you cannot, or if you want a stakeholder to be able to re-run the analysis with different requirements without calling you, that is what Savanty is for.