Computational time of model extremely increased

Solver related questions
PeterBe
User
User
Posts: 29
Joined: 8 months ago

Computational time of model extremely increased

Postby PeterBe » 2 months ago

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 13 times

PeterBe
User
User
Posts: 29
Joined: 8 months ago

Re: Computational time of model extremely increased

Postby PeterBe » 2 months ago

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: 18
Joined: 6 months ago

Re: Computational time of model extremely increased

Postby Gideon Kruseman » 2 months ago

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: 3
Joined: 1 month ago

Re: Computational time of model extremely increased

Postby akerdeth » 1 month ago

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: 57
Joined: 1 year ago

Re: Computational time of model extremely increased

Postby bussieck » 1 month ago

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: 29
Joined: 8 months ago

Re: Computational time of model extremely increased

Postby PeterBe » 1 month ago

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: 10
Joined: 1 year ago

Re: Computational time of model extremely increased

Postby Fred » 1 month ago

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: 29
Joined: 8 months ago

Re: Computational time of model extremely increased

Postby PeterBe » 1 month ago

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: 29
Joined: 8 months ago

Re: Computational time of model extremely increased

Postby PeterBe » 1 month ago

Would anyone mind telling me whether my insereted code and the file are correct?

User avatar
Gideon Kruseman
User
User
Posts: 18
Joined: 6 months ago

Re: Computational time of model extremely increased

Postby Gideon Kruseman » 3 weeks ago

$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


Who is online

Users browsing this forum: No registered users and 1 guest