> After I solve either a primal or dual simplex LP successively I then > use glp_get_col_stat() to recover the statuses. Then based on the > solution values I modify some of the variables by using > glp_set_col_bnds() with either GLP_DB or GLB_FX attributes.
> When I try to re-solve by first calling glp_set_col_stat() and > glp_set_row_stat() the return from glp_simplex() (i.e., glp_warm_up() > called internally) is usually that the LP basis is invalid. > Therefore I am wondering how I can modify the statuses apriori given > the new column bounds if that is even possible? If you have changed column types/bounds, you don't need to change row/column statuses, because changing bounds does not affect the basis. You may just call glp_simplex to re-optimize. To save the basis at some point, you should obtain current statuses of all rows and columns with glp_get_row/col_stat and store them somewhere (in an array, for example). Then to restore (at any point) the basis saved you should use glp_set_row/col_stat to assign statuses to all rows and columns. _______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
