I would like to solve a linear programming problem incrementally, adding new constraints and solving it to optimality with dual simplex. Although it is done internally in the solvers, I can't find how to do it in the APIs of GLPK, Clp or LPsolve.
I am solving an NP-complete problem with rectangle packing constraints. I use a custom branch-and-bound algorithm with a linear relaxation. Mixed integer programming is out of question: it adds far too many variables (n^2), is not tighter and generally makes bad branching decisions. I solve the problem by branching on the added constraints rather than on boolean variables.
I currently have a hand-written solver, which only handles a limited subset of LP, and want to tighten the relaxation: I would like to use a true (open) LP solver. GLPK, for example, allows lazy constraints, but does not seem to allow branching, adding a different constraint to each problem and solving them without destroying the previous basis factorization.
How would you do it properly with any of these solvers?
Thanks
Edit - Background:
I solve a problem with hard runtime limits, which includes rectangle packing constraints. For any pair of rectangles, there are four disjunctive constraints i.e. R1 above/below/right/left of R2.
Modeling it with boolean variables (with big-M), is too slow (bad branching choices + slower relaxation even with custom branching + lots of redundancy between feasible solutions): I need to branch directly on the disjunctive constraints, which works well, but I now need to use a general-purpose LP solver rather than my custom flow solver.
i.e. in the callback I want to
- generate new nodes without branching on integer variables
- with a different new constraint for each node