package ortools_solvers
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Call Google OR-Tools solvers
Install
dune-project
Dependency
Authors
Maintainers
Sources
ortools-9.15.0-1.tbz
sha256=7cb1810955bae43d7b65dc8f9ca68731048862ad1acc7dbb38adbe4d2fac47d4
sha512=95a42628e35985ffe2056f98e0d4b88684d1e669fd94101060cab9bdf694528816509e6d971442608d52f28cd78cff8b959a28e75dec7ddf0e2fdf4c4f2fe4a9
Description
Google OR-Tools is an open source software suite for optimization, tuned for tackling the world's toughest problems in vehicle routing, flows, integer and linear programming, and constraint programming. This package provides OCaml wrappers for calling the OR-Tools solvers. It currently only supports the CP-SAT solver. Pull requests for other solvers are welcome.
Published: 10 Mar 2026
README
OCaml interface to Google OR-Tools
Currently only a subset of CP-SAT is supported.
Pull requests providing the missing features are welcome, but please pay attention to documentation and tests.
This project provides two packages:
ortoolsis an OCaml interface for building CP-SAT models. It does not require an installation of OR-Tools as it simply works with the protocol buffer format. Seeutils/sat_solve_pb.{c,py}for examples of interfacing with the CP-SAT solver.ortools_solversbuilds onortoolsto provide a simple OCaml interface for calling CP-SAT. This package builds its own version of OR-Tools and, on Linux, the libraries abseil, re2, protobuf, and protobuf-c.
Online docs: https://inria.github.io/ocaml-ortools/
opam install ocamlfind ortools_solvers
ocamlfind ocamlopt -o cp_is_fun_sat.exe \
-package ortools_solvers -linkpkg \
samples/sat/cp_is_fun_sat.ml
./cp_is_fun_sat.exeTODOs
- Finish migrating OR-Tools
sat/samples - Use
alcotestto test the interface. - CP-SAT: Support
Intervalconstraints - CP-SAT: Support
NoOverlapconstraints - CP-SAT: Support
NoOverlap2Dconstraints - CP-SAT: Support
Elementconstraints - CP-SAT: Support
Circuitconstraints - CP-SAT: Support
Routesconstraints - CP-SAT: Support
Tableconstraints - CP-SAT: Support
Automatonconstraints - CP-SAT: Support
Inverseconstraints - CP-SAT: Support
Reservoirconstraints - CP-SAT: Support
Cumulativeconstraints - CP-SAT: Support
Dummyconstraints - Support other solvers
Dependencies (8)
- conf-bzip2
- conf-zlib
-
csexp
build -
sexplib0
build -
conf-cmake
build -
ortools
>= "9.15" -
dune
>= "3.21" -
ocaml
>= "4.14.2"
Dev Dependencies (1)
-
odoc
with-doc
Used by
None
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page