|
From: | Joey Rios |
Subject: | RE: [Help-glpk] Name index discrepancies? |
Date: | Tue, 18 Sep 2007 22:01:45 -0700 |
>You are mistaken in the fragment: >/* Print out each column name present in the objective fcn */ >for( j = 1; j <= len; j++) > printf(" Row %d Col %d variable %s\n", i, j, glp_get_col_name(bip, ind[j])); > >You print j while you should print ind[j]. Thank you for the quick clarification, Andrew... I'll be interested to fix up my code tomorrow (I had a feeling I was doing something silly). > Btw, if you need to change the objective coefficients I am not changing objective coeff's. I just need to examine the objective function in order to see which columns will need to be changed on the next iteration... I am using lpx_set_col_bnds to lock down certain binary variables in between runs. That seems the most appropriate, yes? And on the subject of re-solving, I have read several of the help-glpk threads about re-solving, but would like to ask for a little clarification. If I set a binary variable after obtaining a feasible solution and I know that by setting that variable the prior solution will become infeasible, what is the best way to proceed? Just call: glp_simplex(bip, simplex_control_params); lpx_integer(bip); as I did before? Is there anything more efficient/appropriate I can try? Thanks again for the help, it is much appreciated. Gear up for Halo® 3 and get a $25 Best Buy gift card. It’s our way of saying thanks for using Windows Live™. Get it now! |
[Prev in Thread] | Current Thread | [Next in Thread] |