Computational time of model extremely increased

Solver related questions
Post Reply
PeterBe
User
User
Posts: 66
Joined: 7 years ago

Computational time of model extremely increased

Post by PeterBe »

Hi guys,

I am using GAMS with CPLEX as the solver. I have a really strange problem. I have a MIP model with many binary vairables which was solved within 5 minutes.

All of a sudden - without having changed anything - the same model requires quite much time to be solved. I let the solver run for 5000 seconds, but still the problem was not solved (meaning that the Gap of the best found solution is still quite high).

Has someone experienced something similar? Or could someone think about a possible reason for that? I uploaded the node log file of that run. Maybe someone of you will see something interesting in it.

Thanks a lot in advance for your comments.
Attachments
Log3 - Time 5000.txt
Node Log File
(167.81 KiB) Downloaded 438 times
PeterBe
User
User
Posts: 66
Joined: 7 years ago

Re: Computational time of model extremely increased

Post by PeterBe »

Does nobody have a clue?

Do you think the I should let the model run for more than 5000 Seconds? The improvement for the last 3000 senconds were 0 % with regard to the gap (sett uploaded logfile). This is why I stronlgy doubt that a higher runtime will significantly improve the results.
User avatar
Gideon Kruseman
User
User
Posts: 24
Joined: 6 years ago

Re: Computational time of model extremely increased

Post by Gideon Kruseman »

same model and same data?
Gideon Kruseman
ex-ante and foresight lead @CIMMYT, big data focal point @CIMMYT, coordinator CoP socio-economic data @CGIAR_BigData
akerdeth
User
User
Posts: 4
Joined: 6 years ago

Re: Computational time of model extremely increased

Post by akerdeth »

Hi PeterBe,
I get the same error in my simulation. Did you find any solution about?

Larissa
Thank you.
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: Computational time of model extremely increased

Post by bussieck »

GAMS/Cplex (in default mode) runs deterministically when executed on the identical model instance on the same machine. There are a few options that can make it behave non-deterministically (only with option thread<>1). But even slight changes (e.g. the order of variables and equations, or a coefficient slightly changed) can result in a different path of the algorithm and hence in different performance of the solver. This is known as performance variability. Here are a few good entries on this topic: -Michael
PeterBe
User
User
Posts: 66
Joined: 7 years ago

Re: Computational time of model extremely increased

Post by PeterBe »

Hi guys,

sorry for not responding for so long. I was busy with other things.

Now again the problem still remains that the computational time of my model has extremely increased altough I am not aware of any changes.

I read about mipemphasis parameters: https://www.gams.com/latest/docs/S_CPLE ... ipemphasis

How can I use them with GAMS? I tried different syntax like:

Code: Select all

mipemphasis 0;
mipemphasis =0;
mipemphasis (0);
modelname.mipemphasis =0;
I always got a syntax error. Could anyone tell me which syntax I have to use to specify this parameter?
Fred
Posts: 372
Joined: 7 years ago

Re: Computational time of model extremely increased

Post by Fred »

Peter,

It seems that you try to set the mipemphasis option in your GAMS program. However, mipemphasis is a CPLEX solver option (https://www.gams.com/latest/docs/S_CPLE ... ipemphasis) that needs to be specified via a solver option file and then you also need to instruct the solver to read that option file , e.g as follows:

Code: Select all

[...]
$echo mipemphasis 0 > cplex.opt 
modelname.optfile = 1;
[...]
For details see the following chapter in the documentation: https://www.gams.com/latest/docs/UG_Sol ... PTION_FILE

I hope this helps!

Fred
PeterBe
User
User
Posts: 66
Joined: 7 years ago

Re: Computational time of model extremely increased

Post by PeterBe »

Thanks for your answer Fred,

I inserted the following code in GAMS:

Code: Select all

mymodel.optfile = 1;
then I created a file called cplex.opt and this file looks like this:

Code: Select all

* CPLEX options file
mipemphasis 2
I changed the number but nothing seemed to have an effect on the results. I always get the same results (when specifying the maximal running time of the solver to 100). Do you think this is just a coincidence or did I made a mistake?
PeterBe
User
User
Posts: 66
Joined: 7 years ago

Re: Computational time of model extremely increased

Post by PeterBe »

Would anyone mind telling me whether my insereted code and the file are correct?
User avatar
Gideon Kruseman
User
User
Posts: 24
Joined: 6 years ago

Re: Computational time of model extremely increased

Post by Gideon Kruseman »

$echo mipemphasis 0 > cplex.opt
modelname.optfile = 1;


The first statement writes the cplex options file
the second statement tells gams to use the cplex options file
Gideon Kruseman
ex-ante and foresight lead @CIMMYT, big data focal point @CIMMYT, coordinator CoP socio-economic data @CGIAR_BigData
Post Reply