Page 1 of 1

Computational time of model extremely increased

Posted: Wed Oct 04, 2017 6:28 pm
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.

Re: Computational time of model extremely increased

Posted: Mon Oct 09, 2017 11:19 am
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.

Re: Computational time of model extremely increased

Posted: Wed Oct 11, 2017 11:02 am
by Gideon Kruseman
same model and same data?

Re: Computational time of model extremely increased

Posted: Tue Oct 17, 2017 12:21 pm
by akerdeth
Hi PeterBe,
I get the same error in my simulation. Did you find any solution about?

Larissa
Thank you.

Re: Computational time of model extremely increased

Posted: Tue Oct 17, 2017 3:39 pm
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

Re: Computational time of model extremely increased

Posted: Thu Nov 09, 2017 10:43 am
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?

Re: Computational time of model extremely increased

Posted: Thu Nov 09, 2017 12:03 pm
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

Re: Computational time of model extremely increased

Posted: Thu Nov 09, 2017 7:07 pm
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?

Re: Computational time of model extremely increased

Posted: Tue Nov 14, 2017 10:42 am
by PeterBe
Would anyone mind telling me whether my insereted code and the file are correct?

Re: Computational time of model extremely increased

Posted: Fri Nov 24, 2017 4:44 am
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