Hi @rodafig , as @gdiepen mentioned, asynchronous solver sessions might help but you have to make sure that these solver sessions are not going to compete for the (logical) cores. If CPLEX solves an MIP problem then it will use multiple threads, at least for some part of the solve. By default CPLEX can use as many threads as there are (logical) cores; this is controlled by the CPLEX option ‘Global thread limit’. For example, if you have a computer with 8 cores then CPLEX can use 8 threads. If two solver sessions are running at the same time on this computer, each using 8 threads, then the total amount of threads used will be 16 while only 8 cores are available, and this will harm the performance. So if the computer has 8 cores then the following “logical” configurations are possible:
- use 1 CPLEX session using 8 threads
- use 2 CPLEX sessions, each using 4 threads
- use 4 CPLEX sessions, each using 2 threads
- use 8 CPLEX sessions, each using 1 thread
It is hard do say upfront which configuration will be the most efficient.
If the generation time is significant, and the differences between the MIP problems is fairly small, then you could use GMP modification functions to speed up the generation.
Finally, it might be an idea to look at improving the solving time of each MIP problem itself. A first step would be to print the CPLEX status file by switching on the following options:
- Solvers General option 'Solver listing messages' to 'All'
- CPLEX option 'MIP display' to 'Nth node + info on node cuts'
- CPLEX option 'Parameter display' to 'Yes'
The CPLEX status file will be printed in the log sub-folder. I would be interested in seeing this CPLEX status file, so if you can generate and share it, that would be great. (This CPLEX status file will also tell us how many threads CPLEX is using during the solve which might be useful information for selecting a configuration with asynchronous solver sessions.)