Skip to content

Commit 83cd277

Browse files
committed
Update ConvexSolver.
1 parent bb8ca81 commit 83cd277

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/java/org/ojalgo/optimisation/convex/BasePrimitiveSolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static BasePrimitiveSolver newSolver(final ConvexData<Double> data, final Optimi
8080
}
8181
}
8282

83-
} else if (data.countEqualityConstraints() > 0) {
83+
} else if (nbEqus > 0) {
8484
return new QPESolver(data, options);
8585
} else {
8686
return new UnconstrainedSolver(data, options);

src/main/java/org/ojalgo/optimisation/convex/ConvexSolver.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,8 @@ public ConvexSolver build(final ExpressionsBasedModel model) {
571571

572572
Boolean projection = options.convex().getProjection();
573573

574-
if (nbEqus > 0 && nbInes > 0 && (Boolean.TRUE.equals(projection) || (projection == null && (nbVars >= 80) && (nbVars / nbEqus <= 2)))) {
574+
if (nbEqus > 0 && nbInes > 0 && nbEqus <= nbVars
575+
&& (Boolean.TRUE.equals(projection) || (projection == null && (nbVars >= 80) && (nbVars / nbEqus <= 2)))) {
575576

576577
ConvexSolver solver = new NullSpaceASS(options, data);
577578

0 commit comments

Comments
 (0)