Is there an option in GAMS that sets the tolerance for declaring two real numbers to equal?

For example, how can I tell GAMS or GAMS/CPLEX that $0.999100 = 0.99909$?

Thank you for your help!

  • 3
    $\begingroup$ Welcome to OR.SE. To add @Mark L. Stone said, GAMS has an option to set decimals of numbers. You could try (E.g. option decimals = 4;). $\endgroup$ – A.Omidi Jan 31 at 18:52

Per https://www.gams.com/latest/docs/S_CPLEX.html

eprhs (real): feasibility tolerance

Feasibility tolerance. This specifies the degree to which a problem's basic variables may violate their bounds. This tolerance influences the selection of an optimal basis and can be reset to a higher value when a problem is having difficulty maintaining feasibility during optimization. You may also wish to lower this tolerance after finding an optimal solution if there is any doubt that the solution is truly optimal. If the feasibility tolerance is set too low, Cplex may falsely conclude that a problem is infeasible.

Range: [1e-009, 0.1]

Default: 1e-006

I believe this tolerance applies to assessing feasibility of bound, inequality, and equality constraints.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.