> I am trying to access constraint coefficient matrix. When I use
> function glp_get_num_rows, I am getting unexpected number of rows.
> In model assign.mod (from standard glpk examples), there are 8
> elements in each of set I and set J. So total number of constraints
> should be 16. But function glp_get_num_rows returns 17. Number of
> columns are as expected (64).

> It seems that, glpk is counting obj. function as a constraint. Is
> this intentional behaviour?

Yes, all objectives are also included in the set of rows as if they
were constraints. You can distinguish them by the row type, which is
GLP_FR unlike other rows, or by theirs names. If necessary, such rows
can be removed from the model with glp_del_rows.

> But there is separate function
> glp_get_obj_func for accessing obj. fun. coefficients.

Coefficients of the very first objective in the model are used as
objective coefficients in the problem object.



_______________________________________________
Bug-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-glpk

Reply via email to