What are default values of gapRel and gapAbs? #663
-
Hello, I've run into a precision issue for a problem: the solver doesn't converge to the optimal solution when the input variables are too small. I've heard of the parameters gapRel and gapAbs to fix these issues, but what are their default values? I cannot find them in the documentation nor in the python code. Yet, I need to have a starting point before making changes. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Default values are effectively zero. Absolute gap is 1.0e-10 and relative gap is zero. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply! Well, 1e-10 is very small so the issue must come from elsewhere. I could create an issue in this github, but the challenge would be to come up with a minimal reproducible example since the optimization problem is a bit complex. |
Beta Was this translation helpful? Give feedback.
-
Looking at the code, there is a possibility that it is the cutoff increment causing the problem. It looks as if it defaults to 1.0e-4 (may be more e.g. if all objective coefficients are integer). Try setting to something smaller. |
Beta Was this translation helpful? Give feedback.
-
Ok, thank you for the tip. May I ask you how this parameter is named? I can't find it in the solver interface (https://github.com/coin-or/pulp/blob/master/pulp/apis/coin_api.py). |
Beta Was this translation helpful? Give feedback.
-
It does look as if very few Cbc parameters are available from the pulp interface. Can you just multiply all objective coefficients by 1000 or so before passing model to Cbc and then adjust answer? |
Beta Was this translation helpful? Give feedback.
-
That's exactly what I'm doing! But that's not the most elegant solution... |
Beta Was this translation helpful? Give feedback.
Default values are effectively zero. Absolute gap is 1.0e-10 and relative gap is zero.