'Is there a python library to use Choco solver from python? Or is it planned in the roadmap?
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
Solution 1:[1]
PuLP appears to have partial Choco support, but not all constraint types are implemented (see https://github.com/chocoteam/choco-parsers/issues/15 )
Solution 2:[2]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Etienne PY-CIRCAN |
Solution 2 | cprudhom |