help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Got a wrong order of column by lpx_get_mat_row(lp, j, ndx, v


From: ロ コクユウ
Subject: [Help-glpk] Got a wrong order of column by lpx_get_mat_row(lp, j, ndx, val)?
Date: Wed, 19 Jan 2005 10:52:04 +0900

Dose anyone meet this problem:
 
for example  in jth row :  a*x-y+b*z=0;
 
by len=lpx_get_mat_row(lp, j, ndx, val), I found val=[-1,a,b], that mean the order of column is y,x,z.
I added two new columns to this row like:
 
ndx[len+1]=w, ndx[len+2]=v, val[len+1]=d, val[len+2]=e, len+=2
lpx_set_mat_row(lp,j,len,ndx,val)
 
then I thought the jth row should be a*x-y+b*z+d*w+e*v=0, but when I tried len=lpx_get_mat_row(lp, j, ndx, val) again,
I found it's d*w+e*v+a*x-y+b*z=0.
 
I wonder whether the order of columns in row is fixed and how the order of columns in a row is arranged there.
 

reply via email to

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