Re: [Help-glpk] API glp_find_col

2009-03-30 Thread xypron
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;

Re: [Help-glpk] API glp_find_col

2009-03-30 Thread Andrew Makhorin
My code is very simple as shown below. I use it to test glp_find_col but it doesn't work. const char* p=z[0][0]; Col_Num=glp_add_cols(lp,1); glp_set_col_name(lp, Col_Num, p); Col_Num=glp_find_col(lp, p); I debug it step by step. When it goes to the last line, I get

Re: [Help-glpk] API glp_find_col

2009-03-30 Thread rainly
Thanks for your reply. I should call glp_create_index after each glp_set_col_name, right? or I only need to call it once after glp_create_prob? Thanks again. To create the name index you should call the routine glp_create_index after glp_create_prob.