0

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

  1. generate new nodes without branching on integer variables
  2. with a different new constraint for each node
Ggouvine
  • 136
  • 6
  • It sounds that you want to do column-/row-generation technique :) – Alexander Radev Jul 25 '15 at 13:54
  • In order to do that with GLPK, you can either build a generic model and gradually change/extend the data + solve via command line call OR you should use C APIs (https://en.wikibooks.org/wiki/GLPK/Using_the_GLPK_callable_library) – Alexander Radev Jul 25 '15 at 14:01
  • JuMP (a library for the Julia programming language) is a fast-growing modelling language which supports efficient LP re-solves and callbacks for mixed-integer programming. A lot of solvers are supported too (see table [link](http://www.juliaopt.org/) ). Custom branching may be a problem. I know for a fact, that this is, in general, not possible with Gurobi (there is a comment on this in the google-group by a developer). – sascha Jul 26 '15 at 00:57
  • Indeed, it is very similar to row generation - or maybe a special case. The tricky part is that I want to take the LP solution and branch by adding a different constraint in each case: it is not a lazy constraint. GLPK and others seem to allow branching only on integer variables, but I could just duplicate the LP **if** there is a simple API to restart the solution process with a new constraint. – Ggouvine Jul 26 '15 at 19:30
  • JuMP API seems nice. Custom branching and incremental solution may not be possible, but I'll give it a look. – Ggouvine Jul 26 '15 at 20:02

0 Answers0