Skip to content

v2.9.0

Choose a tag to compare

@rcrida rcrida released this 27 May 13:04
· 129 commits to main since this release

Breaking changes

  • ConstraintSatisfactionProblem.decomposeSubproblems() now returns Optional<Set<ConstraintSatisfactionProblem>> — returns Optional.empty() when the problem has only one connected component, avoiding the cost of reconstructing an equivalent CSP

New features

  • FallbackAssignmentFactory: delegates to a primary InitialAssignmentFactory for the first n calls then switches permanently to a fallback — useful for seeding early restarts with a structured assignment before diversifying with random starts

Bug fixes

  • conflictConstraints in MinConflictsSolver: AtLeastN and AtMostN constraints were silently dropped because they have no binary decomposition. The solver now uses binary decompositions where available (preserving per-pair granularity for AllDiff, ExactlyOne etc.) and falls back to the original n-ary constraint where none exists
  • Per-role load in greedy initialisers: dual-role people were penalised for slots in one role when competing for slots in another role, causing role-only people to crowd them out and leaving atLeastN constraints unmet from the start

Other changes

  • Assignment.isSolution: checks isComplete before isConsistent to short-circuit before the expensive constraint scan on partial assignments
  • decomposeSubproblems callers updated to use Optional.map/orElseGet