Commit 09d77cdf authored by tfalque.ext's avatar tfalque.ext
Browse files

🐛 fixes a bus with Gaussian Constraint

parent 681be8df
Pipeline #17748 passed with stages
in 40 minutes and 40 seconds
......@@ -1323,17 +1323,17 @@ public final class SolverFactory extends ASolverFactory<IPBSolver> {
return solver;
}
public static IPBSolver newGaussPreprocessingCuttingPlanesPOS2020Solver() {
public static IPBSolver newGaussPreprocessingCuttingPlanesPOS2020() {
return new PreprocessibleSolver(newCuttingPlanesPOS2020(),
new GaussPBPreprocessing());
}
public static IPBSolver newGaussPreprocessingPartialRoundingSatPOS2020Solver() {
public static IPBSolver newGaussPreprocessingPartialRoundingSatPOS2020() {
return new PreprocessibleSolver(newPartialRoundingSatPOS2020(),
new GaussPBPreprocessing());
}
public static IPBSolver newGaussPreprocessingRoundingSatPOS2020Solver() {
public static IPBSolver newGaussPreprocessingRoundingSatPOS2020() {
return new PreprocessibleSolver(newRoundingSatPOS2020(),
new GaussPBPreprocessing());
}
......
......@@ -33,8 +33,10 @@ public class GaussPBPreprocessing extends AbstractPBPreprocessing {
@Override
protected List<PBPreprocessingConstraint> internalPreprocess(
List<PBPreprocessingConstraint> constraints) {
List<PBPreprocessingConstraint> finalList = new ArrayList<>();
for (PBPreprocessingConstraint pbCtr : constraints) {
if (pbCtr.getType() != PBPreprocessingConstraintType.EQ) {
finalList.add(pbCtr);
continue;
}
pbCtr = pbCtr.translateToVarOnly();
......@@ -44,7 +46,7 @@ public class GaussPBPreprocessing extends AbstractPBPreprocessing {
groups.add(group);
}
}
List<PBPreprocessingConstraint> finalList = new ArrayList<>();
for (PBPreprocessingConstraintGroup group : groups) {
finalList.addAll(applyGauss(group.getLists()));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment