Description
What version of OR-Tools and what language are you using?
Google OR-Tools version: 9.11.4210
SCIP 9.0.0 [LP solver: Glop 9.11]
Language: Java
Java version: 21.0.5 (JDK)
Apache Maven 3.9.9
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
MPSolver.OptimizationProblemType.SCIP_MIXED_INTEGER_PROGRAMMING
What operating system (Linux, Windows, ...) and version?
I tried on both Windows 11 24H2 and Ubuntu 22.04.2 LTS (WSL). I don't have any fully Linux-based machine.
What did you do?
I used the basic example provided here https://developers.google.com/optimization/install/java/pkg_linux and loaded my proto model (1233 variables & 1367 constraints)
MPModelProto modelProto = MPModelProto.parseFrom(new FileInputStream("model.proto"));
MPSolver solver = new MPSolver("WRSP", MPSolver.OptimizationProblemType.SCIP_MIXED_INTEGER_PROGRAMMING);
solver.setTimeLimit(Duration.ofSeconds(300).getSeconds()*1000);
solver.loadModelFromProto(modelProto);
solver.enableOutput();
// [START solve]
System.out.println("Solving with " + solver.solverVersion());
final MPSolver.ResultStatus resultStatus = solver.solve();
// [END solve]
// [START print_solution]
System.out.println("Status: " + resultStatus);
Steps to reproduce the behavior:
- Pull the example repo https://github.com/or-tools/java_or-tools
- Download the model and put it at the root of the repo (downloadable here : https://github.com/Fredrik2002/Proto-Models)
- Replace lines 35-97 of BasicExample.java by the code above (don't forget imports and make main method to throw IOException)
- Compile and run with mvn compile -B and maven exec:java
What did you expect to see
SCIP Status : solving was interrupted [time limit reached]
Solving Time (sec) : 300.00 (more or less)
What did you see instead?
The output showing the solving in real time gets stuck after a few seconds, and the solving process does not stop after the 300 seconds, but after 421s (7min instead of 5)
With a 60 seconds time limit :
With a 30 minutes time limit : (2623 seconds = 43 minutes and 43 seconds)
As you can see, the more time you give to the solver, the more time it takes to stop, and it always gets stuck at the same point
Anything else we should know about your project / environment
In the tests above, I have some constraints with some coefficients set to
I can provide more models experiencing the same issue if needed (but with much more variables and constraints)