JijModeling 2.6.0 Release Notes#

Feature Enhancements#

Add fixed_variables keyword argument to generate_random_instance#

Added a keyword arugment to specify fixed_variabes to be passed to eval when using generate_random_instance.

Error Codes and Comprehensive Error Guide#

Starting with this release, all error messages now include an error code, as shown below.

import jijmodeling as jm

problem = jm.Problem("Test Problem")
N = problem.Natural("N")
x = problem.BinaryVar("x", shape=(N,))
try:
    problem += x
except Exception as e:
    print(e)
Traceback (most recent last):
    while checking if expression `x` has type `float!`,
        defined at File "/var/folders/mg/mg6st30d18s7pxjjrk6pkxym0000gn/T/ipykernel_38542/3357087315.py", line 7, col 5-17

File "/var/folders/mg/mg6st30d18s7pxjjrk6pkxym0000gn/T/ipykernel_38542/3357087315.py", line 7, col 5-17:

    7  |      problem += x
              ^^^^^^^^^^^^

error[E-TE0004] Could not match actual type `Array[N; binary!]` with expected `float!`

Hint: You can read the description and possible fix at https://jij-inc-jijmodeling.readthedocs-hosted.com/en/stable/error_codes/error/E-TE0004.html

The E-TE0004 inside [] corresponds to the individual error message.

An index is also now available that summarizes possible causes and solutions for each error code.

You can access each individual code at URLs such as https://jij-inc-jijmodeling.readthedocs-hosted.com/en/stable/error_codes/error/E-TE0004.html. In some terminals, the [E-TE0004] portion in an error message like the one above is hyperlinked so that you can open it directly. The full list of errors and category-by-category overviews are available at https://jij-inc-jijmodeling.readthedocs-hosted.com/en/stable/error_codes/index.html.

Bugfixes#

Bugfix 1: Fixed min folding to max during OMMX compilation#

Fixed a bug where min() over constants incorrectly computed the maximum value when compiling to OMMX.

Bugfix 2: Fixed models containing the count() function failing to serialize#

Fixed an issue where using the count() function on a CategoryLabel in a model caused an unexpected runtime error during serialization to Protobuf format.