java: Fix samples using SCIP
This commit is contained in:
@@ -42,6 +42,10 @@ public class AssignmentMip {
|
||||
// [START solver]
|
||||
// Create the linear solver with the SCIP backend.
|
||||
MPSolver solver = MPSolver.createSolver("SCIP");
|
||||
if (solver == null) {
|
||||
System.out.println("Could not create solver SCIP");
|
||||
return;
|
||||
}
|
||||
// [END solver]
|
||||
|
||||
// Variables
|
||||
|
||||
@@ -44,6 +44,10 @@ public class BinPackingMip {
|
||||
// [START solver]
|
||||
// Create the linear solver with the SCIP backend.
|
||||
MPSolver solver = MPSolver.createSolver("SCIP");
|
||||
if (solver == null) {
|
||||
System.out.println("Could not create solver SCIP");
|
||||
return;
|
||||
}
|
||||
// [END solver]
|
||||
|
||||
// [START program_part2]
|
||||
|
||||
@@ -50,6 +50,10 @@ public class MipVarArray {
|
||||
// [START solver]
|
||||
// Create the linear solver with the SCIP backend.
|
||||
MPSolver solver = MPSolver.createSolver("SCIP");
|
||||
if (solver == null) {
|
||||
System.out.println("Could not create solver SCIP");
|
||||
return;
|
||||
}
|
||||
// [END solver]
|
||||
|
||||
// [START program_part2]
|
||||
|
||||
@@ -45,6 +45,10 @@ public class MultipleKnapsackMip {
|
||||
// [START solver]
|
||||
// Create the linear solver with the SCIP backend.
|
||||
MPSolver solver = MPSolver.createSolver("SCIP");
|
||||
if (solver == null) {
|
||||
System.out.println("Could not create solver SCIP");
|
||||
return;
|
||||
}
|
||||
// [END solver]
|
||||
|
||||
// [START program_part2]
|
||||
|
||||
@@ -29,6 +29,10 @@ public class SimpleMipProgram {
|
||||
// [START solver]
|
||||
// Create the linear solver with the SCIP backend.
|
||||
MPSolver solver = MPSolver.createSolver("SCIP");
|
||||
if (solver == null) {
|
||||
System.out.println("Could not create solver SCIP");
|
||||
return;
|
||||
}
|
||||
// [END solver]
|
||||
|
||||
// [START variables]
|
||||
|
||||
Reference in New Issue
Block a user