Hello!
rainly wrote:
>
> My code is very simple as shown below. I use it to test glp_find_col but
> it doesn't work.
>
You missed calling glp_create_index. See working example below.
Best regards
Xypron
Example:
int main (int argc, char *argv[])
{
const char n[] = "z_0_0";
glp_prob* lp;
int c;
lp = glp_create_prob();
glp_add_cols(lp, 1);
glp_set_col_name(lp, 1, n);
glp_create_index(lp);
c = glp_find_col(lp, n);
printf("Column number: %d\n", c);
glp_delete_prob(lp);
}
--
View this message in context:
http://www.nabble.com/API-glp_find_col-tp22787490p22789055.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk