From c78d3d9023645a7e7042fa6e69ff4645efc9fb7c Mon Sep 17 00:00:00 2001 From: Arthur Godet Date: Tue, 12 Nov 2024 10:39:05 +0100 Subject: [PATCH] Fix bin packing initial propagation (#1113) * #1112 : fix bin packing initial propagation * move code initialising P and sumP from constructor to fullPropagation in PropBinPacking * clear R and P sets before full propagation in PropBinPacking --- .../nary/binPacking/PropBinPacking.java | 33 +++++++++++-------- .../constraints/nary/BinPackingTest.java | 26 +++++++++++++++ 2 files changed, 45 insertions(+), 14 deletions(-) diff --git a/solver/src/main/java/org/chocosolver/solver/constraints/nary/binPacking/PropBinPacking.java b/solver/src/main/java/org/chocosolver/solver/constraints/nary/binPacking/PropBinPacking.java index 639ff6d233..6e54938dfb 100644 --- a/solver/src/main/java/org/chocosolver/solver/constraints/nary/binPacking/PropBinPacking.java +++ b/solver/src/main/java/org/chocosolver/solver/constraints/nary/binPacking/PropBinPacking.java @@ -127,20 +127,8 @@ public PropBinPacking(IntVar[] itemBin, int[] itemSize, IntVar[] binLoad, int of for(int j = 0; j