[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## [Bug-glpk] Re: Doesn't Solve A Simple Problem

**From**: |
Andrew Makhorin |

**Subject**: |
[Bug-glpk] Re: Doesn't Solve A Simple Problem |

**Date**: |
Tue, 28 Mar 2006 10:23:31 +0400 |

>* I tried solving a simple problem using GLPK on a MS Visual Studio 6.*
>* I attached the code itself to the e-mail - the lines where I use you*
>* library is in the Filter() function.*
>* *
>* The rest of the code is rather sloppy because of the time limits but*
>* it forms correct matrices which I put into an LPX structure. In the*
>* enclosed example I try solving a simple problem of minimizing*
>* *
>* Z=x3+x4*
>* *
>* With the the variables constrained as follows:*
>* x1+00+x3+00<=10*
>* 00+x2+00+x4<=10*
>* -x1+00+x3+00<=-10*
>* 00-x2+00+x4<=-10*
>* 00+00-x3+00<=0*
>* 00+00+00-x4<=0*
>* *
>* And the output is usually *
>* 0: objval = 0.000000000e+000 infeas = 1.000000000e+000 (0)*
>* PROBLEM HAS NO FEASIBLE SOLUTION*
>* *
>* Here's as much as I got so far.*
I solved your instance (in lp format) with no troubles:
minimize Z: x3+x4
subject to
x1 +x3 <= 10
x2 +x4 <= 10
-x1 +x3 <=-10
-x2 +x4 <=-10
-x3 <= 0
-x4 <= 0
end
lpx_read_cpxlp: reading problem data from `foo.lp'...
lpx_read_cpxlp: 6 rows, 4 columns, 10 non-zeros
lpx_read_cpxlp: 9 lines were read
lpx_simplex: original LP has 6 rows, 4 columns, 10 non-zeros
lpx_simplex: presolved LP has 4 rows, 4 columns, 8 non-zeros
lpx_adv_basis: size of triangular part = 4
0: objval = 0.000000000e+00 infeas = 1.000000000e+00 (0)
2: objval = 0.000000000e+00 infeas = 0.000000000e+00 (0)
OPTIMAL SOLUTION FOUND
Time used: 0.0 secs
Memory used: 0.1M (91828 bytes)
Try to check your code more carefully. (Since you are non-member,
your message was rejected and the attachment has been lost. You can
subscribe to the list visiting the page
http://lists.gnu.org/mailman/listinfo/bug-glpk )

[Prev in Thread] |
**Current Thread** |
[Next in Thread] |

**[Bug-glpk] Re: Doesn't Solve A Simple Problem**,
*Andrew Makhorin* **<=**