JijModeling 1.11.0 Release Notes#

Bugfix: Interpreter is now more liberal on duplicated constraint name#

Since JijModeling v1.10.0, Interpreter cannot have more than one constraints with the same name, which is not the case with <= 1.9. Now, Interpreter is more liberal on duplicated constraint names:

  • It now treats constraints seprately for each problem, so constraints from distinct problems won’t cause any name collision.

  • If the newly evaluated constraint has the same name as the previously evaluated constraints, it won’t cause error if either:

    1. it has the same definition on the already-defined forall parameters, or

    2. the forall parameter is previously undefined.

This change allows more intuitive treatment of problem relaxation or partition.

Improvements in Hint Detection#

  • You can now pass hints optional argument to eval_problem, which specifies the list of constraint types to be detected. This should be useful when you use specific solvers that supports only a subset of constraint types are supported.

    • hints = None (default): Detects the default set of constraint types (currently, OneHot only).

    • hints = []: Disables hint detection entirely.

  • Now hint detection mechanism can take into account some algebraic congruence (though not complete).

    • For example, it can now detects the following as the one-hot constraint: $\( 0 = 1 - \sum_i (2 - 1) x_i\\ \sum_i 2 x_i + 1 = 3 \)$

  • Now jm.eval_problem() can derive additional constraints for duplicated variables. For example, if you have \(\sum_{i < 3} x_i = 1\) with \(x_1 = x_2\), then it outputs new constraint \(x_1 = 0\).

  • jm.eval_problem() now raises an exception when infeasible constraint is detected, e.g. \(\sum_{i < 0} x_i = 1\).

Other Improvements#

  • Now stub file has more functions with type hints!