Due to the answers to this and this questions, I was able to find the optimal solution for scheduling problem. However, if there are many tasks that must be scheduled, e.g. 1000+, then the solver takes obviously more time to solve it and OS terminates the program due to RAM lack with the following message: Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
. My PC specs are:
- OS: Ubuntu 20.04.4 LTS
- CPU: Intel Core i5-8265U; 4 cores; 8 threads
- RAM: 32 GB
What I've tried first of all is setting the log_search_progress = true
flag and saw that for 1000 jobs the solver creates 2000000
literals described in this line: #kBoolAnd: 2000 (#enforced: 2000) (#literals: 2000000)
.
The next line: [Symmetry] Problem too large. Skipping. You can use symmetry_level:3 or more to force it.
hints to try to use setSymmetryLevel(3)
. With this set, program will also get terminated. Solver uses all 8 threads available.
With this in mind, my question is: should this be run on the server hardware to improve performance or can I optimise the model much better? Talking about the model optimisation, I've found answer of Laurent Perron to this issue that it is a challenge for the solver to schedule so many intervals without decomposition. My team leader suggested that we can firstly take tasks of higher priority jobs, schedule them and then try to schedule those tasks that left. Say, take first 100 tasks of highest priority jobs and initialize their intervals, constraints and circuit between them and solve the problem. If the solution is found, add equalities and hints to the solver to schedule next tasks. What are your thoughts about that?