large sync with main
This commit is contained in:
@@ -19,10 +19,7 @@ import com.google.ortools.linearsolver.MPObjective;
|
||||
import com.google.ortools.linearsolver.MPSolver;
|
||||
import com.google.ortools.linearsolver.MPVariable;
|
||||
|
||||
/**
|
||||
* Integer programming example that shows how to use the API.
|
||||
*
|
||||
*/
|
||||
/** Integer programming example that shows how to use the API. */
|
||||
public class IntegerProgramming {
|
||||
private static void runIntegerProgrammingExample(String solverType) {
|
||||
MPSolver solver = MPSolver.createSolver(solverType);
|
||||
@@ -55,7 +52,7 @@ public class IntegerProgramming {
|
||||
|
||||
// Verify that the solution satisfies all constraints (when using solvers
|
||||
// others than GLOP_LINEAR_PROGRAMMING, this is highly recommended!).
|
||||
if (!solver.verifySolution(/*tolerance=*/1e-7, /* log_errors= */ true)) {
|
||||
if (!solver.verifySolution(/* tolerance= */ 1e-7, /* log_errors= */ true)) {
|
||||
System.err.println("The solution returned by the solver violated the"
|
||||
+ " problem constraints by at least 1e-7");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user