RE: GLPK finds a solution that violates a constraint

"Meketon, Marc" via "Users list for GLPK \(GNU Linear Programming Kit\)" <[email protected]> Sun, 27 Jun 2021 22:07:31 +0000
Newsgroups gmane.comp.gnu.glpk
Message-ID <SN6PR11MB26556BD112668DD59DB1949092049@SN6PR11MB2655.namprd11.prod.outlook.com>
My guess:  You have a numerically unstable constraint.

If x=20, y=10 and x - y + 1000000 * z = 1000000, then z = 0.99999.  This is most likely 'close enough' for the solver to believe  z  is 1.0.

I'm not aware of any parameter using glpsol.exe to set a tolerance.  Also, using '--exact' math also does not seem to help.

-Marc

-----Original Message-----
From: Help-glpk <[email protected]> On Behalf Of Evgeny Kapun
Sent: Sunday, June 27, 2021 5:51 PM
To: [email protected]
Subject: GLPK finds a solution that violates a constraint

I have a model (attached). It includes a constraint:

> s.t. contra : x - y + 1000000 * z <= 1000000;

When I solve it (using glpsol --math model.sol), I get a solution with x=20, y=10 and z=1, which clearly violates that constraint. Why is it happening?


________________________________
This e-mail and any attachments may be confidential or legally privileged. If you received this message in error or are not the intended recipient, you should destroy the e-mail message and any attachments or copies, and you are prohibited from retaining, distributing, disclosing or using any information contained herein. Please inform us of the erroneous delivery by return e-mail. Thank you for your cooperation.