[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-glpk] [Fwd: wrong answer]
From: |
Andrew Makhorin |
Subject: |
[Bug-glpk] [Fwd: wrong answer] |
Date: |
Thu, 06 Aug 2015 17:05:37 +0300 |
-------- Forwarded Message --------
From: Michal Trněný <address@hidden>
To: address@hidden
Subject: wrong answer
Date: Thu, 06 Aug 2015 14:18:33 +0200 (CEST)
Here is a simple LP problem that GLPK didn't solve correctly:
maximize objective: 4*x1 + x2 + 2*x2
given constraints:
var x1>=0;
var x2>=0;
var x3>=0;
c1: x1 <= 1;
c2: x2 <= 1;
c3: x3 <= 1;
c4: x1 + x2 + x3 = 2.5;
Solver yielded answer:
x1=1, x2=1, x3=0.5, obj=7
that is obviously wrong, because:
4*1 + 1 + 2*0.5 != 7 but
4*1 + 1 + 2*0.5 = 6
and this solution (1,1,0.5) isn't optimal, because ...
there exist solution (1,0.5,1), which objective is 6.5 - bigger, than
objective of (1,1,0.5).
You may imagine feasible region as unit cube with vertex (1,1,1) cuted
off.
I'd like you to nottice me, when you fix this bug.
I want commented pseudocode of GLPK.
Do you have it? Thank you.
--
Michal Trněný
www.michaltrneny.cz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-glpk] [Fwd: wrong answer],
Andrew Makhorin <=