I will like to identify some rows and cols.
I need to create a constraints set like the code shown below and give it an
ID or index to the constraints names, then find the number of some rows and
give them their respective value to load the constraint matrix.
glp_add_rows(lp,a*b);
for(int i=0; i<a; i++){
for(int j=0; j<b; j++){
glp_set_row_name(lp,i*a*b+j,*"rest[i][j]"*); //create some
like "rest[i][j]"
}
}
glp_create_index(lp);
int ind[2];
ind[0]=glp_find_row(lp,*rest[1][2]*);
ind[1]=glp_find_row(lp,*rest[2][3]*);
int val[2]= 1, 1;
for(i=0; i<2; i++){
glp_set_mat_row(lp, i+1, int len, ind[i], val[i]);
}
Best regards
_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk