partial sync with main (without the routing part)

This commit is contained in:
Laurent Perron
2024-07-12 13:56:11 +02:00
parent 2c333f58a3
commit 21a75638c2
266 changed files with 13149 additions and 6408 deletions

View File

@@ -18,13 +18,14 @@ import com.google.ortools.sat.BoolVar;
import com.google.ortools.sat.CpModel;
import com.google.ortools.sat.CpSolver;
import com.google.ortools.sat.CpSolverSolutionCallback;
import com.google.ortools.sat.CpSolverStatus;
import com.google.ortools.sat.DecisionStrategyProto;
import com.google.ortools.sat.IntVar;
import com.google.ortools.sat.LinearExpr;
import com.google.ortools.sat.SatParameters;
/** Link integer constraints together. */
public class ChannelingSampleSat {
public final class ChannelingSampleSat {
public static void main(String[] args) throws Exception {
Loader.loadNativeLibraries();
// Create the CP-SAT model.
@@ -60,7 +61,7 @@ public class ChannelingSampleSat {
solver.getParameters().setEnumerateAllSolutions(true);
// Solve the problem with the printer callback.
solver.solve(model, new CpSolverSolutionCallback() {
CpSolverStatus unusedStatus = solver.solve(model, new CpSolverSolutionCallback() {
public CpSolverSolutionCallback init(IntVar[] variables) {
variableArray = variables;
return this;
@@ -77,4 +78,6 @@ public class ChannelingSampleSat {
private IntVar[] variableArray;
}.init(new IntVar[] {vars[0], vars[1], b}));
}
private ChannelingSampleSat() {}
}