Tuning CPLEX solver options for large-scale MIP problems

Problems with modeling
Post Reply
GabrielYin
User
User
Posts: 72
Joined: 6 years ago
Location: Dallas, TX, USA
Contact:

Tuning CPLEX solver options for large-scale MIP problems

Post by GabrielYin »

Hello GAMS experts!

I'm working on solving a sequence of large-scale mixed-integer programs (each with million-ish constraints and variables) using GAMS/CPLEX. I found that under the same solver options, using GAMS version 24.9 (I don't know the exact CPLEX version, though) takes around 40 minutes to solve one problem, whereas using GAMS version 44.4 (with a definitely newer version of CPLEX) takes more than 1.5 hours to solve.

I would expect upgrading to a much newer version should render a much better performance, but actually it got even much worse... I know it could be the case that CPLEX changed some of the solver option behaviors, so the previous solver options might not work well in the new version. Hence, I'd like to ask for experts' help here to understand which solver option I would need to tweak to gain a better performance.

Here is the list of solver options I set for GAMS/CPLEX in both versions:

Code: Select all

polishafterintsol 1
epgap 0.03
eprhs 1e-5
solverfinal 0
repairtries 500
mipstart 1
mipemphasis 1
relaxfixedinfeas 1
nodefileind 2
varsel 0
scaind 1
numericalemphasis 0
mipdisplay 3
workmem 100
clocktype 1
detilim 2500000
iis 1
symmetry 0
This solver option has been tuned myself to be near-optimal in GAMS version 24.9. I used it as the same in version 44.4, and it was performing much worse. Do you have any recommendations on the CPLEX solver options to be used in the newer version?

P.S. I tried the Benders decomposition algorithm in the new CPLEX and it performed so badly. I guess that was because I didn't provide my own partition strategy.

Any advise is much appreciated! Happy Thanksgiving!

Best,
Gabriel
User avatar
bussieck
Moderator
Moderator
Posts: 1042
Joined: 7 years ago

Re: Tuning CPLEX solver options for large-scale MIP problems

Post by bussieck »

When switching from one version to another, I always give "default" a try (you can copy the tolerance options, e.g. epgap etc) but no algorithmic option and see how the solver does. If that's no good, then I would go for the meta options (e.g. mipemphasis) and depending on some experiments set options that a) either help finding good solutions faster (if that's the problem) or b) setting options to increase the lower bound faster (if that's the problem). There is also the automatic Cplex tuning. For large models that don't solve well this is usually not the best options. You can also sent in your model to support@gams.com and see if they have some good idea to speed things up (they usually need the instance to play around with it).

-Michael
GabrielYin
User
User
Posts: 72
Joined: 6 years ago
Location: Dallas, TX, USA
Contact:

Re: Tuning CPLEX solver options for large-scale MIP problems

Post by GabrielYin »

bussieck wrote: 5 months ago When switching from one version to another, I always give "default" a try (you can copy the tolerance options, e.g. epgap etc) but no algorithmic option and see how the solver does. If that's no good, then I would go for the meta options (e.g. mipemphasis) and depending on some experiments set options that a) either help finding good solutions faster (if that's the problem) or b) setting options to increase the lower bound faster (if that's the problem). There is also the automatic Cplex tuning. For large models that don't solve well this is usually not the best options. You can also sent in your model to support@gams.com and see if they have some good idea to speed things up (they usually need the instance to play around with it).

-Michael
Thanks, Michael, for your reply! I tried the default way, and it was much worse than my original solver option in 44.4, like much much worse. I was spending a lot of time tuning the solver options for 24.9, and I just don't really want to spend the time again in 44.4 tuning the solver from scratch. I'm seriously thinking about consulting with support@gams.com, and I'm wondering what kind of instance I would need to provide to them. Is a CPLEX LP file sufficient?

Best,
Gabriel
PondersnWonders
User
User
Posts: 7
Joined: 10 months ago

Re: Tuning CPLEX solver options for large-scale MIP problems

Post by PondersnWonders »

Hi, I'm not super familiar with how CPLEX works, but Im also using CPLEX to solve my large-scap MIP problem. It is taking several hours to run. How do you tune the solver options to be near-optimal? How do you determine that its near-optimal?
GabrielYin wrote: 5 months ago Hello GAMS experts!

I'm working on solving a sequence of large-scale mixed-integer programs (each with million-ish constraints and variables) using GAMS/CPLEX. I found that under the same solver options, using GAMS version 24.9 (I don't know the exact CPLEX version, though) takes around 40 minutes to solve one problem, whereas using GAMS version 44.4 (with a definitely newer version of CPLEX) takes more than 1.5 hours to solve.

I would expect upgrading to a much newer version should render a much better performance, but actually it got even much worse... I know it could be the case that CPLEX changed some of the solver option behaviors, so the previous solver options might not work well in the new version. Hence, I'd like to ask for experts' help here to understand which solver option I would need to tweak to gain a better performance.

Here is the list of solver options I set for GAMS/CPLEX in both versions:

Code: Select all

polishafterintsol 1
epgap 0.03
eprhs 1e-5
solverfinal 0
repairtries 500
mipstart 1
mipemphasis 1
relaxfixedinfeas 1
nodefileind 2
varsel 0
scaind 1
numericalemphasis 0
mipdisplay 3
workmem 100
clocktype 1
detilim 2500000
iis 1
symmetry 0
This solver option has been tuned myself to be near-optimal in GAMS version 24.9. I used it as the same in version 44.4, and it was performing much worse. Do you have any recommendations on the CPLEX solver options to be used in the newer version?

P.S. I tried the Benders decomposition algorithm in the new CPLEX and it performed so badly. I guess that was because I didn't provide my own partition strategy.

Any advise is much appreciated! Happy Thanksgiving!

Best,
Gabriel
GabrielYin
User
User
Posts: 72
Joined: 6 years ago
Location: Dallas, TX, USA
Contact:

Re: Tuning CPLEX solver options for large-scale MIP problems

Post by GabrielYin »

PondersnWonders wrote: 4 months ago Hi, I'm not super familiar with how CPLEX works, but Im also using CPLEX to solve my large-scap MIP problem. It is taking several hours to run. How do you tune the solver options to be near-optimal? How do you determine that its near-optimal?
GabrielYin wrote: 5 months ago Hello GAMS experts!

I'm working on solving a sequence of large-scale mixed-integer programs (each with million-ish constraints and variables) using GAMS/CPLEX. I found that under the same solver options, using GAMS version 24.9 (I don't know the exact CPLEX version, though) takes around 40 minutes to solve one problem, whereas using GAMS version 44.4 (with a definitely newer version of CPLEX) takes more than 1.5 hours to solve.

I would expect upgrading to a much newer version should render a much better performance, but actually it got even much worse... I know it could be the case that CPLEX changed some of the solver option behaviors, so the previous solver options might not work well in the new version. Hence, I'd like to ask for experts' help here to understand which solver option I would need to tweak to gain a better performance.

Here is the list of solver options I set for GAMS/CPLEX in both versions:

Code: Select all

polishafterintsol 1
epgap 0.03
eprhs 1e-5
solverfinal 0
repairtries 500
mipstart 1
mipemphasis 1
relaxfixedinfeas 1
nodefileind 2
varsel 0
scaind 1
numericalemphasis 0
mipdisplay 3
workmem 100
clocktype 1
detilim 2500000
iis 1
symmetry 0
This solver option has been tuned myself to be near-optimal in GAMS version 24.9. I used it as the same in version 44.4, and it was performing much worse. Do you have any recommendations on the CPLEX solver options to be used in the newer version?

P.S. I tried the Benders decomposition algorithm in the new CPLEX and it performed so badly. I guess that was because I didn't provide my own partition strategy.

Any advice is much appreciated! Happy Thanksgiving!

Best,
Gabriel
Hi,

It's nothing but just a series of experiments by exhaustively trying different combinations of GAMS/CPLEX option values. And by saying "near-optimal", I'm just tuning the solver till its performance is satisfactory in our scenario. It's very subjective.

Best,
Gabriel
Post Reply