help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Feasibility in glpk?


From: Yao Wu
Subject: [Help-glpk] Feasibility in glpk?
Date: Thu, 9 Oct 2008 22:08:10 -0500

Hi Andrew,

Thanks for your reply. Yes, I know the latest version is 4.32. But
since version 4.8 has Java API provided by Bjoern
(http://bjoern.dapnet.de/glpk/index.htm), my Java programs used the
API.

I tried other coefficients. It turns out for larger values, I got
strange results as well. This may be because I'm trying to solve
feasibility problem, so I modified my subject a bit.
Below is an example of the feasibility problem (I don't need objective
function. In my implementation, I use a fake objective function z = x1
+ x2):
The LP is as follows:
Maximize
z = x1 + x2
0.04600662731785218 x1 - 1 x2 <= 0
0.0036805289240121435 x1 - 1 x2 <= 0
0.08833272571169222 x1  - 1 x2 <= 0
x1 + x2 = 1

We can see that (x1 = 0, x2 =1) is a feasible solution.
The glpk tells me that the problem is feasible, but the values of x1
and x2 are both 0, which contradicts with my constraint x1 + x2 = 1.

I figured that if I change my problem to the follows, glpk works.
Maximize
z = x1 + x2
0.04600662731785218 x1 <= 0
0.0036805289240121435 x1 <= 0
0.08833272571169222 x1 <= 0
x1 + x2 = 1

glpk tells me that: (x1 = 0, x2 =1) is a feasible solution. This is
what I expected.

Can you explain why glpk gives me strange results in the first problem?

Thank you very much!
Yao




reply via email to

[Prev in Thread] Current Thread [Next in Thread]