I am increasing the RHS of less-than-or-equal constraint of a MIP problem with GLPK. However, sometimes, after re-optimizing, GLPK cannot find any feasible solution within the time limit. So I am guessing it does not check if the previous solution was feasible. Does anybody have any experience with that? Or can point me to a document that is not the source code itself?
Also, I would like to know what is the workflow after I add a constraint for any other solver (e.g. Gurobi, Cplex, SCIP, CBC) so any information is helpful.
Cheers!
After changing something in the model, all solving information is typically discarded and the problem is solved from scratch. Even though you relaxed the problem, this does not necessarily mean that it is easier to solve for a MIP solver, in particular, it may always lead to different LP solutions, that cause different branching, primal heuristic start from a different starting point and are unlucky in the end. So in the end, you might just be unlucky that the solver takes longer now.
Performing a "warmstart" in a MIP solver is quite hard. SCIP provides such functionality, see http://scip.zib.de/doc-5.0.1/html/REOPT.php, but this only works if you change objective coefficients or tighten constraints (it is based on the assumption that everything that was infeasible before is still infeasible, so you only have to search again only in the feasible part of the tree).
In your particular case, though, just storing the feasible solutions and trying them in the next run would help already. This is what SCIP does by default. Also, SCIP (as well as all the alternatives you mentioned) should be much more stable and performant than GLPK. Please see http://plato.asu.edu/ftp/milpc.html for a benchmark of MIP solvers on MIPLIB 2010, the standard MIP benchmark set: GLPK is able to solve 2 of 87 instances within the time limit of 2 hours, while CBC solves 53, SCIP solves 76, and CPLEX and Gurobi both solve all 87 instances. Also Xpress and SAS perform very well on the benchmark set.
Clearly, if you relax the formulation, the problem cannot become infeasible (if it was feasible before). So either you are misinterpreting something or the code has a bug.
I take it that you did not try another solver, yet. You should definitely do that. In general, all the ones you mentioned in your question are considered more reliable/stable than GLPK.
来源:https://stackoverflow.com/questions/50830360/what-happens-when-i-modified-the-rhs-of-a-constraint-glpk