Recent Releases of minizinc
minizinc - MiniZinc Python 0.10.0
Added
- Add the
Instance.diverse_solutionsmethod to use the MiniZinc experimental feature to model diversity and try and find a set of diverse solutions for the given problem.
Removed
- BREAKING: The project no longer supports Python 3.7. This change will make it easier to manage MiniZinc Python's build system.
Changed
- Minimum supported version of MiniZinc has increased from 2.5.4 to 2.6.0.
Instance.solutionsis now able to use theintermediate_solutionsflag correctly and will only yield a single solution when it is set toFalse.helpers.check_solutionnow includes an optional time limit flag. If the time limit is exceeded, then aTimeoutErrorexception will be raised.helpers.check_solutionwill no longer capture MiniZinc exceptions. Capturing these exceptions sometimes hid problems.- The
timeoutparameter has been renamed totime_limitinInstance.solve,Instance.solve_async, andInstance.solutions. Thetimeoutparameter is still accepted, but will add aDeprecationWarningand will be removed in future versions. - The
intermediate_solutionsparameter can now be explicitly set toFalseto avoid the-iflag to be passed to MiniZinc, which is generally added to ensure that a final solution is available.
Fixed
- Fix problem where some exceptions when creating processes where hidden and
would then cause errors where the
procvariable did not exist. - Fix issue where MiniZinc would not correctly be terminated on Windows when the Python process was interrupted.
- Python
Published by Dekker1 12 months ago
minizinc - MiniZinc Python 0.9.0
Added
- Add support for MiniZinc tuple and record types.
Changed
- Minimum supported version of MiniZinc has increased from 2.5.0 to 2.5.4.
Fixed
- Ensure time events send using the JSON stream are parsed as
timedeltaobjects. - Pass JSON definitions in using JSON instead of generated DZN files.
- Python
Published by Dekker1 almost 3 years ago
minizinc - MiniZinc Python 0.8.0
This release concerned mostly some of the internals of the Python package, and its dependency management. The little external changes are listed below.
Removed
- BREAKING: The project no longer supports Python 3.6. This change will make it easier to manage MiniZinc Python's build system.
Fixed
- Fix the conversion when using a Python enumerated type in MiniZinc that uses non-ascii identifiers.
- Python
Published by Dekker1 about 3 years ago
minizinc - MiniZinc Python 0.7.0
Added
- Add additional
Driver.executableproperty to safely access the location of the executable used by theDriverobject. - Support for input and output of complex MiniZinc enumerated types, such as anonymous enumerated types or enumerated types using constructor functions.
Removed
- BREAKING: The project no longer contains the (uncompleted) direct library
connection to libminizinc. With this change come some simplifications in methods of
relocated from
CLIDriverandCLIInstance, and the move offind_drivertoDriver.find.
Fixed
- Store statistics as a string when incorrectly reported by the solver.
- Fix the conversion of statistics when using MiniZinc 2.6+
- Python
Published by Dekker1 over 3 years ago
minizinc - MiniZinc Python 0.6.0
Added
- Add support for the usage of JSON Stream output when using MiniZinc 2.6+
Fixed
- Do not raise error about unsupported solver flags when MiniZinc driver would not raise an error.
- Fix warnings caused by unterminated coroutines when using the asynchronous iterators
- Python
Published by Dekker1 almost 4 years ago
minizinc - MiniZinc Python 0.5.0
Added
- Add (generated)
__version__field to the package to abide by the PEP recommendations. - Add support for using NumPy types to instantiate Models. (
np.arrayand any type that falls undernp.generic). - Add
available_solversmethod to theDriverobjects to explicitly report the available solvers according to the current environment. - Add support for Python 3.10.
Changed
- BREAKING: Update minimal supported MiniZinc version to 2.5.0 to ensure full functionality.
- Remove the (additional) hard time-out in from the CLI driver. MiniZinc should correctly enforce set time limit.
Solver.lookupnow has an extrarefreshargument to signal whether the driver should refresh the found solver configurations.
Fixed
- Always close temporary files before removing them, so that if an exception is raised while a file is still open, it gets removed correctly on Windows.
- Set the required process creation flags on Windows to allow MiniZinc to terminate its subprocesses correctly.
- Pass
--intermediate-solutionsflag when-ior-ais supported by the solver. - Pygments parser generated by Iro did not contain the correct
#poprules. The parser was manually edited to work correctly, but we can no longer generate is automatically unless the bug in upstream Iro is resolved. - Resolve a syntax error (a missing semicolon) in the meta-heuristics example in the documentation.
- Correctly pass the
-O0flag to the CLI whenoptimisation_levelis set to zero. - Set type of MiniZinc annotation output type
anntostrin Python in accordance with the JSON output format.
- Python
Published by Dekker1 over 4 years ago
minizinc - MiniZinc Python 0.4.2
Fixed
- Terminate the MiniZinc process when stopping early (instead of killing it). This allows MiniZinc to correctly stop any solver processes.
Changed
- Revert change from 0.4.1 where enumerated types unknown to Python would be made stored as anonymous enumerations. Interoperability between the MiniZinc driver and the MiniZinc Python has instead changed to allow JSON strings as valid input for enumerated types. (required MiniZinc 2.5.3)
- Python
Published by Dekker1 about 5 years ago
minizinc - MiniZinc Python 0.4.1
Added
- Support for Python 3.9. (MiniZinc Python will aim to support all versions of Python that are not deprecated)
- Experimental support for capturing the error output of the MiniZinc process
in
CLIInstance. - Experimental support for verbose compiler and solver output (using the
-vflag) inCLIInstance.
Changed
- The MiniZinc Python repository moved from GitLab to GitHub, replacing GitLab CI for GitHub Actions for the continuous testing.
- Values of an enumerated type defined in MiniZinc will now appear in solutions
as a member of a singular anonymous
enum.Enumclass.
Fixed
- Handle the cancellation of asynchronous solving and correctly dispose of the process
- Correct the JSON representation of sets of with
IntEnummembers. (Lists are still not correctly represented). check_solutionwill now correctly handle solution values of an enumerated type defined in MiniZinc.
- Python
Published by Dekker1 over 5 years ago
minizinc - MiniZinc Python 0.4.0
Changed
- The
check_solutionhas been split into two separate functions. Thecheck_resultfunction allows the user to check the correctness of aResultobject and the newcheck_solutionfunction can check the correctness of an individual solution in the form of a data class object or a dictionary. Model.add_fileno longer has itsparse_dataflag enabled by default.
Fixed
- Catch lark
ImportErrorbeforeLarkErrorduringModel.add_file()sinceLarkErrorwill not exist if the import failed. - Ensure a DZN file does not get included if its data is parsed.
- Python
Published by Dekker1 over 5 years ago
minizinc - MiniZinc Python 0.3.3
Added
- Add
requiredFlagsfield to theSolverdata class.
Fixed
- Ignore extra (undocumented) fields from MiniZinc's
--solvers-jsonoutput when initialisingSolverobjects.
- Python
Published by Dekker1 over 5 years ago
minizinc - MiniZinc Python 0.3.2
Fixed
- Add full support for string input and output. The usage of strings would previously incorrectly give a warning.
- Python
Published by Dekker1 over 5 years ago
minizinc - MiniZinc Python 0.3.1
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.
- Python
Published by Dekker1 over 5 years ago
minizinc - MiniZinc Python 0.3.0
Added
- Add support for different MiniZinc compiler optimisation levels. All methods that
compile an instance now have an additional
optimisation_levelargument.
Changed
- The DZN parser functionality has been moved into the
dznextra. If your application requires parseddzninformation, then you have to ensure your MiniZinc Python is installed with this extra enabled:pip install minizinc[dzn]. Solverhas been turned into adataclassand 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.
- Python
Published by Dekker1 over 5 years ago
minizinc - MiniZinc Python 0.2.3
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.
- Python
Published by Dekker1 over 5 years ago
minizinc - MiniZinc Python 0.2.2
Added
- Add output property to
CLIInstanceto expose the output interface given by MiniZinc.
Changed
- Improved interaction with solution checker models. Solution checkers can
now be added to an `
Instance/Modeland ancheckmethod 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.
- Python
Published by Dekker1 over 5 years ago
minizinc - MiniZinc Python 0.2.1
Added
- Add support for other command line flags for
CLIInstance.flatten()through the use of**kwargs. - Add initial
Checkerclass to allow the usage of MiniZinc solution checkers.
Changed
- The string method for
Resultwill now refer to the string method of itsSolutionattribute.
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.
- Python
Published by Dekker1 over 5 years ago
minizinc - MiniZinc Python 0.2.0
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_versionnow raises anConfigurationErrorexception when an incompatible function is detected; otherwise, the method not return a value.- Output classes generated by
CLIIinstance.analyse()no longer contain the_output_itemstrattribute 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\nliteral instead of\r\non Windows.- Solve an issue in
CLIInstance.solution()where a solution with a size bigger than the buffer size would result in aLimitOverrunErrorexception. - Correctly catch the
asyncio.TimeoutErrorand kill the process when reaching a hard timeout. (i.e., the solver andminizincdo 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
objectiveattribute is only added to the generated solution type once - Remove '\r' characters from input when parsing statistics (Windows Specific).
- Python
Published by Dekker1 over 5 years ago
minizinc - MiniZinc Python 0.1.0
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.
- Python
Published by Dekker1 over 5 years ago