absolute gap

275 views
Skip to first unread message

saba

unread,
Jan 29, 2015, 10:05:58 AM1/29/15
to gams...@googlegroups.com
Hi dear friends

How can i reduce absolute gap in solving MIP model?? In one of my reprts in gams I have MIP solution =5000 and Best solution=2500 and absolute gap=2500 although I add option optca=0 but it has not effect for reducttion named gap too. Can any one help me on this issue??

regards,

 

Federico Perea

unread,
Jan 29, 2015, 10:14:59 AM1/29/15
to gams...@googlegroups.com
Hello ??

Have you tried optcr=0?

Regards

Fede

--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

saba

unread,
Jan 30, 2015, 12:08:20 AM1/30/15
to gams...@googlegroups.com
Hi
dear Fedperea.

no I have not!

In fact, I defined optcr=0.05 and optca=0 . Is it incorrect??

Federico Perea

unread,
Jan 30, 2015, 8:29:12 AM1/30/15
to gams...@googlegroups.com
I would try optcr =0

--

saba

unread,
Jan 31, 2015, 6:00:29 AM1/31/15
to gams...@googlegroups.com

On Thursday, 29 January 2015 18:35:58 UTC+3:30, saba wrote:
Hi dear friends

Hi
 
Thanks alot.
I did it ,but it had not effect
 
regards,

Hossein Sharifzadeh

unread,
Feb 1, 2015, 6:57:34 AM2/1/15
to gams...@googlegroups.com
Dear Saba

If you are using the CPLEX solver, try the following CPLEX options

epagap absolute stopping tolerance
epgap relative stopping tolerance

Regards;

Hossein

--

saba

unread,
Feb 1, 2015, 11:35:50 AM2/1/15
to gams...@googlegroups.com
hi
thanks dear hossein

but i have two questions : how i should code(write)  epgap and epagap in model? and if i use epgap and epagap, its not necessary to use optcr and optca?!

regards


On Thursday, 29 January 2015 19:35:58 UTC+4:30, saba wrote:

Hossein Sharifzadeh

unread,
Feb 2, 2015, 2:37:21 AM2/2/15
to gams...@googlegroups.com

Dear Saba

 

First, force Cplex to read the option file:

ModelName.OptFile = 1;

(Instructs Cplex to read the option file. The name of the option file is cplex.opt.)

Then, make the option file and put your desired options. You can use the following code. Just put your model name instead of " ModelName ".


ModelName.Optfile =1;

file opts cplex option file/ cplex.opt /;

putclose opts /'epgap=0' /'epagap=0';


You can study CPLEX manual for more details.

 

Regards;

 

Hossein


--

Hossein Sharifzadeh

unread,
Feb 2, 2015, 2:37:24 AM2/2/15
to gams...@googlegroups.com

These Cplex options override GAMS option. So, these option always applies whether GAMS option (optcr and optca) write or not provided that reading option file is enabled (ModelName.OptFile = 1;). Read Cplex manual:

 

epagap (real)

Absolute tolerance on the gap between the best integer objective and the objective of the best node remaining. When

the value falls below the value of the epagap setting, the optimization is stopped. This option overrides GAMS OptCA

which provides its initial value.

(default = GAMS OptCA)

 

epgap (real)

Relative tolerance on the gap between the best integer objective and the objective of the best node remaining. When

the value falls below the value of the epgap setting, the mixed integer optimization is stopped. Note the difference in

the Cplex definition of the relative tolerance with the GAMS definition. This option overrides GAMS OptCR which

provides its initial value.

Range: [0,1]

(default = GAMS OptCR)

saba

unread,
Feb 3, 2015, 10:37:10 AM2/3/15
to gams...@googlegroups.com
hi dear hossein

you say right but my question is different with your answer!In fact I askes you say me whether two sentences such as option OptcR=0.05 and
option OptcA=0 before "solve  ......using mip minimizing...." are enough or I should use epgap and epagap?. and my another question is how i can write them??

regards

On Thursday, 29 January 2015 19:35:58 UTC+4:30, saba wrote:
Reply all
Reply to author
Forward
0 new messages