xcsp3team / pycsp3

A Python Library for modeling combinatorial constrained problems
https://www.pycsp.org
MIT License
61 stars 9 forks source link

Add the possibility to store log of solver and generated xml files in a specific directory. #30

Closed audemard closed 2 years ago

xcsp3team commented 2 years ago

The use of the option -output has been extended:

You can give the name of the XML files as eg : python3 Audrey.py -data=5 -output=toto -dataexport -lzma -solve Then, you get 4 files in the current directory: solver_0x42380e86ca_31176_0.log toto.json toto.xml toto.xml.lzma

You can give the name of a directory : python3 Audrey.py -data=5 -output=tt -dataexport -lzma -solve Then, you get 4 files in the existing directory called tt : Audrey-5.json Audrey-5.xml Audrey-5.xml.lzma solver_0x42380e86ca_32626_0.log

You can give the name of a file in a specific directory : python3 Audrey.py -data=5 -output=tt/toto -dataexport -lzma -solve Then, you get 4 files in the directory tt: solver_0x42380e86ca_31176_0.log toto.json toto.xml toto.xml.lzma

In a notebook, you should be able to write for example: from pycsp3.dashboard import options options.output="/tmp"