help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Re: java-binding: zero-coefficients


From: Andrew Makhorin
Subject: [Help-glpk] Re: java-binding: zero-coefficients
Date: Sat, 31 Jan 2004 11:57:20 +0300

>I am using the java-binding for glpk and
>want to solve an LP which also has zero-coefficients. 
>
>I read that this is no valid input. Is there a workaround for that? 

You need to remove zero coefficients from the list before call to
lpx_set_mat_row, lpx_set_mat_col, or lpx_load_matrix.

>I read in the User's Guide under glp_new_aij 
>that zero coefficients do not need to be specified.
>(Any non specified coefficients are assumed to be zero.) 
>Is this correct?

Correct. However, you are using a very old version of glpk. The most
recent version is 4.4.

>How is it with the java-binding? Is there a way too? 
>(I have not found any possibility to enter single coefficients.) 

To change a single constraint coefficient you can obtain corresponding
row/column via lpx_get_mat_row/lpx_get_mat_col, change the coefficient,
and then put the row/column back to the problem object.






reply via email to

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