Repository navigation
LumiX 0.1.2
Added
- CONTRIBUTING.md with comprehensive development guidelines
- CODE_OF_CONDUCT.md with academic-focused community standards
- SECURITY.md with vulnerability reporting policy
- This CHANGELOG.md to track project changes
- Regression tests for the linearizer (both objective senses), the CP-SAT adapter and expression arithmetic
Fixed
- Linearizer kept every objective as a minimization.
LXLinearizer.linearize_model()
compared the objective sense to"maximize"whileLXObjectiveSensevalues are
"min"/"max". Maximized product, min and piecewise objectives returned wrong optima
(example 06 reported an area of 16 instead of 100). LXOptimizer.enable_linearization()had no effect.solve()now linearizes the model
with the solver's capabilities when linearization is enabled and the model needs it.- CP-SAT crashed the process with OR-Tools ≥ 9.13. Constraints are now named with
with_name()instead of writing throughProto(). priority_to_weight(1)returned1e5instead of the documented1e6.- Adding two expressions that share a variable silently dropped terms.
e1 + e2combined
the twowherefilters with AND, so instances selected by only one of them were lost.
Callingadd_termtwice for the same variable overwrote the first term. Both now keep every
term: an instance is included when either term includes it, with the sum of the
coefficients that apply to it. expr * scalaralways raisedValueError. It now scales every term (including
multi-indexed terms) and the constant.- Version strings in
lumix.__version__and the documentation now match the package version. pytestcoverage now measureslumix(was the oldoptixngname).
Behavior changes
These fixes intentionally change results of code that relied on the old behavior:
- Maximized nonlinear objectives solved through the linearizer now return the correct
(different) optimum. - Goal-programming objective values are 10× larger with the default weights because
priority 1 now weighs1e6. The ranking of priorities is unchanged; the optimal plan is
usually the same. enable_linearization()now linearizes. Models that were linearized by hand are not
linearized twice:needs_linearization()is false for them.- Expressions built by adding expressions (or repeated
add_termcalls) on the same variable
now contain all of their terms; models that silently lost terms will change.