Skip to content

Releases: MiniZinc/minizinc-python

MiniZinc Python 0.3.1

29 Oct 05:59
Compare
Choose a tag to compare

Changed

  • Store path of loaded solver configuration paths so that no configuration file
    has to be generated if no changes are made to the solver.

Fixed

  • Ensure generated solver configurations exists during the full existence of
    the created asynchronous process.

MiniZinc Python 0.3.0

29 Oct 05:58
Compare
Choose a tag to compare

Added

  • Add support for different MiniZinc compiler optimisation levels. All methods that
    compile an instance now have an additional optimisation_level argument.

Changed

  • The DZN parser functionality has been moved into the dzn extra. If your
    application requires parsed dzn information, then you have to ensure your
    MiniZinc Python is installed with this extra enabled:
    pip install minizinc[dzn].
  • Solver has been turned into a dataclass and has been updated with all
    attributes used in the compiler.

Fixed

  • Resolve relative paths when directly loading a solver configuration. This
    ensures that when a temporary solver configuration is created, the paths are
    correct.

MiniZinc Python 0.2.3

29 Oct 05:58
Compare
Choose a tag to compare

Changed

  • Add text to the empty MiniZincError that occurs when MiniZinc exits with a non-zero
    exit status

Fixed

  • Close generated solver configuration before handing it to MiniZinc. This fixes the
    usage of generated solver configurations on Windows.
  • The DZN parser now constructs correct range objects. The parser was off by one due to
    the exclusive upper bound in Python range objects.
  • Rewrite MiniZinc fields that are keywords in Python. These names cannot be used
    directly as members of a dataclass. Python keywords used in MiniZinc are rewritten to
    "mzn_" + {keyword} and a warning is thrown.

MiniZinc Python 0.2.2

29 Oct 05:57
Compare
Choose a tag to compare

Added

  • Add output property to CLIInstance to expose the output interface given by
    MiniZinc.

Changed

  • Improved interaction with solution checker models. Solution checkers can
    now be added to an ```Instance/Model`` and an ``check`` method will be
    added to the generated solution objects.
  • Change the Python packaging system back to setuptools due to the excessive
    required dependencies of Poetry.

Fixed

  • Fix the MiniZinc output parsing of sets of an enumerated type.
  • Fix the TypeError that occurred when a hard timeout occurred.
  • Allow trailing commas for sets and arrays in DZN files.

MiniZinc Python 0.2.1

29 Oct 05:56
Compare
Choose a tag to compare

Added

  • Add support for other command line flags for CLIInstance.flatten()
    through the use of **kwargs.
  • Add initial Checker class to allow the usage of MiniZinc solution
    checkers.

Changed

  • The string method for Result will now refer to the string method of its
    Solution attribute.

Fixed

  • Ensure the event loop selection on Windows to always selects
    ProactorEventLoop. This ensures the usage on Windows when the python
    version <= 3.8.0.

MiniZinc Python 0.2.0

29 Oct 05:55
Compare
Choose a tag to compare

Added

  • Support and testing for Python 3.8
  • Logging of started processes and attributes of generated output items
  • Export Pygments Lexer for MiniZinc

Changed

  • Driver.check_version now raises an ConfigurationError exception
    when an incompatible function is detected; otherwise, the method not return a
    value.
  • Output classes generated by CLIIinstance.analyse() no longer contain
    the _output_item str attribute when MiniZinc does not find a output item.
    (New in MiniZinc 2.3.3)
  • Improved parsing of non-standard (numerical) statistical information
    provided by the solver.

Fixed

  • CLIInstance.solutions(): The separator detection is now OS independent.
    The separator previously included a \n literal instead of \r\n on
    Windows.
  • Solve an issue in CLIInstance.solution() where a solution with a size
    bigger than the buffer size would result in a LimitOverrunError exception.
  • Correctly catch the asyncio.TimeoutError and kill the process when
    reaching a hard timeout. (i.e., the solver and minizinc do not stop in
    time)
  • Check if file exists before opening file when an error occurs. (File might
    have been part of a compiled solver)
  • Ensure the objective attribute is only added to the generated solution
    type once
  • Remove '\r' characters from input when parsing statistics (Windows Specific).

MiniZinc Python 0.1.0

29 Oct 05:54
Compare
Choose a tag to compare

Initial release of MiniZinc Python. This release contains an initial functionality to use MiniZinc directly from Python using an interface to the minizinc command line application. The exact functionality available in this release is best described in the documentation.