Skip to content

INRIA/ocaml-ortools

Repository files navigation

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:

  • ortools is 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. See utils/sat_solve_pb.{c,py} for examples of interfacing with the CP-SAT solver.

  • ortools_solvers builds on ortools to 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/

TODOs

  • Finish migrating OR-Tools sat/samples

  • Use alcotest to test the interface.

  • CP-SAT: Support Interval constraints

  • CP-SAT: Support NoOverlap constraints

  • CP-SAT: Support NoOverlap2D constraints

  • CP-SAT: Support Element constraints

  • CP-SAT: Support Circuit constraints

  • CP-SAT: Support Routes constraints

  • CP-SAT: Support Table constraints

  • CP-SAT: Support Automaton constraints

  • CP-SAT: Support Inverse constraints

  • CP-SAT: Support Reservoir constraints

  • CP-SAT: Support Cumulative constraints

  • CP-SAT: Support Dummy constraints

  • Support other solvers