Dear all

I am solving a MILP model using CPLEX as a solver. I increase the ‘reslim’ to enhance the solution and reduce the optimality gap. But sometimes increasing the ‘reslim’ leads to worse objective. Initially I guessed that probably it is because of different CPU and/or RAM amount engaged by operating system in some moments. So I repeated the simulations several time. However the same results obtained. Even I closed and reopen the GAMS for each different ‘reslim’ to ensure the exactly same conditions be applied for all simulation bud didn’t helped. It was become more strange when I checked the number of nodes processed in the simulations. As an example, setting ‘reslim’ to 300 results in objective value of 1016024. The total processed nodes is 43438. I doubled the ‘reslim’ to 600. The objective is 1016098 with 80453 processed nodes.

Is there any stochastic processing in MIP solution procedure? I thought that CPLEX is robust but the simulation results show something else.

Best regards;

Hossein

## Increasing ‘reslim’ but weaker result in a mip solver

### Re: Increasing ‘reslim’ but weaker result in a mip solver

Hi,

Assuming that you solve the exact same problem on the exact same hardware with the exact same software and that there are no other computationally expensive jobs running simultaneously, increasing reslim should not lead to a worse solution.

You don't say whether you minimze or maximize but from the context of your initial message it seems that you minimize and expect the objective value with reslim=600 to be <1016024 (which is what you get with reslim=300).

Maybe you can share the log files of the two runs plus the files other users need to reproduce your findings?

Best,

Fred

Assuming that you solve the exact same problem on the exact same hardware with the exact same software and that there are no other computationally expensive jobs running simultaneously, increasing reslim should not lead to a worse solution.

You don't say whether you minimze or maximize but from the context of your initial message it seems that you minimize and expect the objective value with reslim=600 to be <1016024 (which is what you get with reslim=300).

Maybe you can share the log files of the two runs plus the files other users need to reproduce your findings?

Best,

Fred

### Re: Increasing ‘reslim’ but weaker result in a mip solver

Many thanks for your quick answer.

The model is minimizing problem.

I didn’t mean that the solutions with reslim=300 always are better than ones with reslim=600.

Actually, the obtained results usually oscillate between two or three objective values for the both reslims. I did my best to keep everything equally in simulations. I did not engage my laptop with any other jobs. Even, if because of some unknown conditions, the processing speed in reslim=300 is faster than reslim=600 the number of processed note and/or iteration should confirm it which is not the case in my simulations.

Details of log files are as follows:

reslim=300:

MIP solution: 1016024

Final solve: 1016024

Iteration: 839012

Nodes: 43404

Absolute gap:2955.191

Relative gap: 0.002909

-----------------------

reslim=600:

MIP solution: 1016098

Final solve: 1016098

Iteration: 1474355

Nodes: 80453

Absolute gap:2981.238

Relative gap: 0.002934

As mentioned above, final solutions are oscillatory and in some simulations MIP solutions are similar for the both reslims.

Best regards;

Hossein

The model is minimizing problem.

I didn’t mean that the solutions with reslim=300 always are better than ones with reslim=600.

Actually, the obtained results usually oscillate between two or three objective values for the both reslims. I did my best to keep everything equally in simulations. I did not engage my laptop with any other jobs. Even, if because of some unknown conditions, the processing speed in reslim=300 is faster than reslim=600 the number of processed note and/or iteration should confirm it which is not the case in my simulations.

Details of log files are as follows:

reslim=300:

MIP solution: 1016024

Final solve: 1016024

Iteration: 839012

Nodes: 43404

Absolute gap:2955.191

Relative gap: 0.002909

-----------------------

reslim=600:

MIP solution: 1016098

Final solve: 1016098

Iteration: 1474355

Nodes: 80453

Absolute gap:2981.238

Relative gap: 0.002934

As mentioned above, final solutions are oscillatory and in some simulations MIP solutions are similar for the both reslims.

Best regards;

Hossein

### Re: Increasing ‘reslim’ but weaker result in a mip solver

Hi,

What about the log files and files required for reproduction?

Fred

What about the log files and files required for reproduction?

Fred

### Re: Increasing ‘reslim’ but weaker result in a mip solver

One potential explanation could be that you suffer from non-deterministic behavior when cplex hits the time limit. When you use time limits, the solving process becomes non-deterministic close to the end of the time limit.

Eventually, Cplex does "something smart" close to the end with reslim=360 which it does not do (as successful) with reslim=600.

See also the following blog post:

http://yetanothermathprogrammingconsult ... s.html?m=1

Fred

Eventually, Cplex does "something smart" close to the end with reslim=360 which it does not do (as successful) with reslim=600.

See also the following blog post:

http://yetanothermathprogrammingconsult ... s.html?m=1

Fred

### Re: Increasing ‘reslim’ but weaker result in a mip solver

Dear Fred

Many thanks for taking the time and effort in answering this post.

Best regards;

Hossein

Many thanks for taking the time and effort in answering this post.

Best regards;

Hossein