pycsp3 icon indicating copy to clipboard operation
pycsp3 copied to clipboard

Feature Request: Compiler API

Open sirwhinesalot opened this issue 6 months ago • 3 comments

Right now when working with PyCSP3, you create one model in a script, which is then compiled to XCSP3 when executed.

I would much rather have the option to script the actual compilation process, so I can create multiple different models through the PyCSP3 API, compile them through the API, and then solve them with whatever XCSP3 capable solver I choose.

Consider for example a single Jupyter notebook that models different constraint problems and wants to solve them separately.

The alternative is to generate the XML directly myself but that's not nearly as convenient as using the API, or to generate a python string in memory and then "exec" it to do the compilation.

sirwhinesalot avatar Aug 22 '24 13:08 sirwhinesalot