0

I work at Air Liquide and we are using choco solver in one of our optimization tool, and it is consequently coded in java. The question has been asked recently of the possibility to migrate the code of the tool to python

Hence my question : is there a python library available today to use choco solver?

I have tried to find the answer in the existing discussions but did not succeed so far

2 Answers2

0

PuLP appears to have partial Choco support, but not all constraint types are implemented (see https://github.com/chocoteam/choco-parsers/issues/15 )

  • 1
    This is true, but it imposes a purely linear model, which erases the presence of global constraints, which are the strength of CP. – cprudhom May 11 '22 at 09:39
0

The easiest way to use Choco via Python is to use PyCSP3. Choco-solver is one of the backend solvers. Although using the Java library directly offers more freedom, it is quite practical.

Alternatively, although it requires a bit more work, with GraalVM native image it is possible to provide a standalone native library without dependency on the JVM and build Python code to link Choco-solver (see similar work done for JHeaps). But everything has to be done.

cprudhom
  • 111
  • 4