[Top][All Lists]

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

[Help-glpk] confusion on constraints

From: dtucker
Subject: [Help-glpk] confusion on constraints
Date: Mon, 5 Jul 2004 14:06:43 -0500

How does one attempt to add a constraint which does not involve every structural variable (i.e. x[m+1]...x[m+n]) using lpx_load_matrix?  It would seem that if I had three structural variables (x1, x2, x3) and a constraint of the form x1 + x2 = 4, that I would have the following

ia[1] = 1, ja[1] = 1, ar[1] = 1.0;
ia[2] = 1, ja[2] = 2, ar[2] = 1.0;
ia[3] = 1, ja[3] = 3, ar[3] = 0.0;

but, I receive the following run-time error if I attempt to do this:

lpx_load_matrix: ar[1] = 0; zero element not allowed


[Please reply to me as well as the list.  I am not subscribed to the list.]
reply via email to

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