help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] lpx_load_matrix


From: Jeff Abrahamson
Subject: [Help-glpk] lpx_load_matrix
Date: Sat, 11 Sep 2004 13:40:27 -0400
User-agent: Mutt/1.5.6+20040722i

I have an LP problem that looks like this:

    S1 = F11 + F12 + F13 
    S2 =                 + F21 + F22 + F23
    D1 = F11             + F21           
    D2 =       F12             + F22     
    D3 =             F13             + F23

(Aside: it's a graph theory statement about flow from vertices VS1 and
VS2 and flow to VD1, VD2, and VD3.)

But when loading the coefficient matrix I'm told that zero values
aren't allowed.  Am I misunderstanding something?

    lpx_load_matrix(lp, num, ia, ja, ar);

(gdb) p address@hidden
$5 = {1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 
5, 5, 5, 5, 5, 5}
(gdb) p address@hidden
$6 = {1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 
1, 2, 3, 4, 5, 6}
(gdb) p address@hidden
$7 = {1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 
0, 0, 1, 0, 0, 1}
(gdb) p num
$8 = 30
(gdb) n
lpx_load_matrix: ar[4] = 0; zero element not allowed

Program exited with code 01.
(gdb)


The error comes from glplpx1.c, line 26 ff:

         if (ar[k] == 0.0)
            fault("lpx_load_matrix: ar[%d] = 0; zero element not allowe"
               "d", k);


Thanks in advance for any suggestions.

-- 
 Jeff

 Jeff Abrahamson  <http://www.purple.com/jeff/>    +1 215/837-2287
 GPG fingerprint: 1A1A BA95 D082 A558 A276  63C6 16BF 8C4C 0D1D AE4B

 A cool book of games, highly worth checking out:
 http://www.amazon.com/exec/obidos/ASIN/1931686963/purple-20

Attachment: signature.asc
Description: Digital signature


reply via email to

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