I have the following code:
from ortools.linear_solver import pywraplp
SOLVER = pywraplp.Solver.CreateSolver('SCIP')
...
SOLVER.solve()
It executes for really long time - so to optimize it I attempted: SOLVER.SetNumThreads(8) prior to line with .solve() - but it didn't work at all then.
So I have the following questions:
- I assumed multithreading to be a low-hanging fruit here, so how can
I make it work - we're talking about regular python shell, in
particular on jupyter notebook (but we can also just run this as
python script.py- I just can't see reason why it wouldn't run on jupyter, but run as script). - Is there maybe any other way to speed it up? Maybe something less obvious?
Caveat
I'm data engineer, and I assume whatever was done in there by data scientists is perfect - so I'm looking for recommendation how to work faster with ortools and not how to replace them with faster tool ;)