Skip to content

Fix 1231 - #1238

Merged
cprudhom merged 8 commits into
developfrom
fix_1231
Sep 9, 2026
Merged

cprudhom merged 8 commits into
developfrom
fix_1231

Conversation

@cprudhom

Copy link
Copy Markdown
Member

Branch fix_1231 brings the following improvements to the Knapsack module:

  1. Bug fix (close [BUG] Knapsack removes valid solutions and can return false UNSAT or a wrong optimum #1231): Synchronize search trees before first propagation in PropKnapsackKatriel01
  2. Complete documentation: Added Javadoc for:
    • Propagators (PropKnapsack, PropKnapsackKatriel01)
    • Data structures (13 files)
  3. Test reinforcement: +492 lines of tests for KnapsackTest.java
  4. Readability improvement: Renamed variables to match academic terminology

@cprudhom cprudhom added this to the 6.0.2 milestone Aug 28, 2026
@cprudhom cprudhom self-assigned this Aug 28, 2026
@cprudhom cprudhom added the bug label Aug 28, 2026
@mergify

mergify Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@cprudhom

Copy link
Copy Markdown
Member Author

#1237 must be amended accordingly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

full and not custom ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. This is legacy but not correct.

@ArthurGodet ArthurGodet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, modifications are OK, but as @jgFages said, I agree there is a forcePropagate() to change.

That said, the failing test should also be investigated on why it is failing

@ArthurGodet

Copy link
Copy Markdown
Collaborator

#1237 must be amended accordingly

Done 😉

@cprudhom

Copy link
Copy Markdown
Member Author

I’ve just spent a bit of time looking into what the problem is with the test that’s failing.
At first glance, it seems that the patch provided here is necessary but not sufficient. I’ll try to put together a minimal working example, but it seems that despite a (necessary) update to the structures, there’s a deeper issue.

Given the complexity of the algorithm and the underlying structures, the fact that the original contributor cannot be easily contacted, and the time I have already spent on this issue, I am reluctant to look into it further.

I propose amending this pull request to add a comment explaining the use of the constraint in question and opening a separate issue to describe the bug.

@cprudhom

Copy link
Copy Markdown
Member Author

I plunged back into the 2nd error and it seems that there is a bug in the neighbourhood.
I'll double-check in the next days.

+ new assertion that check the trees consistency
+ add new tests that exhibit propagation strength
@cprudhom
cprudhom merged commit e306e8b into develop Sep 9, 2026
22 checks passed
@cprudhom
cprudhom deleted the fix_1231 branch September 9, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants