> I have another question about my algorithm. I am using a Branch Price > scheme. When I add variables, I want to use the basis of the previous run > as the first basis of the current run (I donĀ“t want to solve the model > from scratch each time!)
If you add new column(s), glp_add_cols makes them non-basic, so the current basis as well as the basis factorization remain valid. Note that by default the glpk simplex solver (glp_simplex) starts the search from the current basis defined in the problem object, so if the basis is valid, you do not need to call lpx_warm_up. > When I delete columns however, it may occur that > one of them was in the basis, that consequently is not valid any more. > Is there a simple way for me to use the same basis in the next run in > case it was not modified, and update this basis in the case it has lost > at least one variable? You can use the routine glp_get_col_stat to determine whether a column is basic or non-basic. If the column is basic, deleting it invalidates the basis. So if you want the simplex solver to continue the search, you should use the routine glp_set_row_stat/glp_set_col_stat to change the status of some appropriate non-basic row/column to GLP_BS, i.e. to make the basis valid. > (I used the warm_up function and I was looking at > its return code, but this function seems to be deprecated on the newest > versions.) Lpx_warm_up will be replaced by glp_warm_up, which will provide the same functionality. _______________________________________________ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk