- Support parsing of saved solution streams.
- Bugfixes.
- Massive redesign of the whole pipeline using features from MiniZinc 2.2.0 (earlier MiniZinc versions are no longer supported, yet PyMzn 0.17.1 should work fine for the most part).
- Now PyMzn interfaces only to the
minizinc
executable, greatly simplifying internal complexity. - The
minizinc
function now only executes MiniZinc synchronously (i.e. wait for it to finish before parsing the solution stream). - Asyncronous solving is now handled via Python's
asyncio
package. The newpymzn.aio
module contains theminizinc
coroutine, i.e. an asyncronous version of thepymzn.minizinc
function. Thepymzn.aio
module requires Python >= 3.6. - PyMzn can now parse MiniZinc enums into Python Enums and back.
- Substantial improvement of the preprocessing, solving and solution parsing.
- The
Solutions
class returned by theminizinc
function has been improved too. - Removed the
MiniZincModel
class for dynamic modelling, just use Jinja instead. - Improved configuration facility.
- The
pymzn
command line executable has been greatly improved. - This version is not backward compatible. Most of the existing code will need to be adapted.
- Introduced templating using Jinja2. The
pymzn.MiniZincModel
class can now compile templated models, and that is also done automatically usingpymzn.minizinc
. - The
pymzn.templates
added for managing template search. - Substantially improve the API for managing external processes. Now the
pymzn.Process
class takes care of executing either synchronously or asynchronously an external process. - The functions
pymzn.minizinc
andpymzn.solns2out
have become asynchronous by default. - The
pymzn.minizinc
now returns a instance ofpymzn.Solutions
, which receives lazily the solutions from the solving pipeline, but can also be referenced as a list after receiving the full solution stream. - Add
num_solutions
parameter topymzn.minizinc
. - API changes:
- Deleted
pymzn.utils
module, along with thepymzn.run
function - Added
pymzn.process
module - Renamed
pymzn.SolnStream
intopymzn.Solutions
- The function
pymzn.solns2out
now returns a generator - The function
pymzn.minizinc
is no longer blocking until the underlying solving process is completed. It now returns apymzn.Solutions
that can be lazily accessed. - Added
solve_start
method topymzn.Solver
class which returns a started process that produces solutions asynchronously.
- Deleted
- Several improvements and bug fixes.
- Function
pymzn.minizinc
now returns aSolnStream
- Completely revisited
pymzn.Solver
abstract class. - Added support to many new solvers:
- Chuffed
- CBC
- Gurobi
- G12 (fd, lazy, mip)
- API changes:
- Renamed
pymzn.dzn_eval
intopymzn.dzn2dict
- Renamed
pymzn.dzn
intopymzn.dict2dzn
- Renamed
pymzn.dzn_statement
intopymzn.stmt2dzn
- Renamed
pymzn.dzn_value
intopymzn.val2dzn
- Renamed
path
intoinclude
in thepymzn.minizinc
andpymzn.mzn2fzn
functions. - Introduced
output_mode
in place ofparse_output
andeval_output
as parameter to thepymzn.minizinc
function.
- Renamed
- Moved
pymzn.run
into utils - Slim down the library quite a bit. Removed unnecessary stuff.
- Many bug fixes