> I am using glpk to solve scheduling problem. I encountered a simple > problem but couldn't figure out why is that. > The error message I got is 'lpx_load_matrix: ja[55] = 7; column index > out of range" > Does this mean I cannot have fewer structural variables than variables > in the raw constrains. > For example, the objective function of my problem is like this: > > Min A1I1+ A2I2 + ... A6I6 (there are only six columns) > st. > C11 + C12 + ... + C19 = C1 (I have 9 variables here) > ... > > How could get around of this problem?
This error message means that the problem object has less than 7 columns while you attempt to specify a constraint coefficient at column 7. You may determine the current number of columns (i.e. structural variables) using the api routine lpx_get_num_cols(). To avoid the error make sure that you added the correct number of columns to the problem object before calling lpx_load_mat(). _______________________________________________ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk