hey, i was running a model on gams with cplex as solver and found that i didnt get an optimal solution, because i did the same model on lingo and got a better one,(compared the solution and find the lingo one feasible, so its not a problem in the model itself). i think it might be due to some cplex tolerances or heuristic methods or smth i dont know. Is there a way to fix this, making cplex solve with 0 tolerance or something?. (dont know how to enter to cplex parameters and options neither).

btw i added a constraint forcing gams to make a better solution(the lingo solution) and it made it with no problem,so its not about the model its about the solver.

thanks in advance

asked 03 Jun '16, 01:43

jmslaterc's gravatar image

accept rate: 0%

edited 03 Jun '16, 02:30

The default relative gap parameter in GAMS is 10%. So, the solver would stop after finding a feasible solution within the 10% distance of the bound (hence, it's not necessarily optimal anymore). To change this behavior, use the following command with your desired gap.

option optcr = 0.00001;

The above command set the relative gap to 0.001 percent.

PS. To change the absolute gap parameter, use the keyword optca.


answered 03 Jun '16, 03:24

Ehsan's gravatar image

Ehsan ♦
accept rate: 16%

Thanks for the quick answer, it was indeed the relative gap parameter that made me get diff solution.

(03 Jun '16, 18:10) jmslaterc
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 03 Jun '16, 01:43

Seen: 1,821 times

Last updated: 03 Jun '16, 18:10

OR-Exchange! Your site for questions, answers, and announcements about operations research.