[Scip] Adding model constraints after presolving

Stefan Heinz heinz at zib.de
Fri Dec 16 21:59:59 MET 2011


Hi Daniel,


On 12/16/2011 03:48 PM, Daniel Karch wrote:
> Never mind, I think I can implement this in a relaxation handler.
>
Yes that is possible. Easier, however, is to create the Fx <= g 
constraints with the "initilal" flag set to FALSE, the separate flag set 
to TRUE, and the "removable" flag TRUE. In contrast the Ax <= b should 
have flags: initial = TRUE, separate=TRUE, removable=FALSE.

http://scip.zib.de/doc/html/cons__linear_8h.html#aa7aed137a4130b35b168812414413481

Doing that means that only Ax <= b will be in the initial LP (and stay 
there) and the constraints Fx <= g are separated on demand and might 
leave the LP relaxation if not needed. Note that the constraints Fx <= g 
are presolved and propagated.


> 2011/12/16 Daniel Karch <karch at math.tu-berlin.de 
> <mailto:karch at math.tu-berlin.de>>
>
>     Hi everyone,
>
>     I have the following problem. I have an ILP formulation of a
>     problem, it looks something like this:
>
>     (P)
>
>     min c'x
>
>     Ax <= b
>     Fx <= g
>
>     x in {0,1}^n
>
>     I would like to solve the following relaxation first,
>
>     (P')
>
>     min c'x
>
>     Ax <= b
>
>     x in {0,1}^n
>
>     and then add the cuts in the system Fx <= g later (as linear
>     constraints). The reason is that (P') is much faster so solve,
>     I know that in this particular case the solution to (P') is
>     probably a very good lower bound for the solution of (P),
>     and I can also use it for a primal heuristic.
>
>     The problem is now that the approach does not work as expected. I
>     get told that the problem is infeasible and get:
>
>     [src/scip/var.c:6341] ERROR: cannot change the bounds of a fixed
>     variable
>     [src/scip/var.c:6318] ERROR: Error <-9> in function call
>     [src/scip/var.c:8079] ERROR: Error <-9> in function call
>     [src/scip/prob.c:514] ERROR: Error <-9> in function call
>     [src/scip/scip.c:7302] ERROR: Error <-9> in function call
>     [src/scip/scip.c:7744] ERROR: Error <-9> in function call
>     [src/scip/scip.c:4357] ERROR: Error <-9> in function call
>     [src/scip/scip.c:586] ERROR: Error <-9> in function call
>     [src/cppmain.cpp:107] ERROR: Error <-9> in function call
>     SCIP Error (-9): method cannot be called with this type of data
>
>     This does not occur if I disable presolving, so I guess that SCIP
>     fixes some variables that it shouldn't.
>     Is there some way to make SCIP "aware" of the constraints that I
>     will eventually add, so that presolving
>     does not destroy feasibility?
>
Yes that is the problem.

Best Stefan


More information about the Scip mailing list