[Scip] problems with customized branching rule which adds constraints

Grit Claßen classen at math2.rwth-aachen.de
Mon Apr 16 13:14:23 MEST 2012


Hello,

we would like to implement a customized branching rule in SCIP 2.1.1. 
This rule "branches" on constraints instead of variables. This means, 
the rule creates to child nodes with a new constraint each. These 
constraints cut off the current LP solution.

The problem is that the constraints never occur in the current LP (which 
we get calling SCIPwriteLP(scip,fname) ) and also the LP solution does 
not change. Hence, we end up in a loop adding the same constraints to 
new child nodes again and again.

Here are the relevant parts of our code:

SCIP_NODE* child_less_than;
SCIP_CONS* cons_less_than = NULL;

SCIPcreateChild(scip, &child_less_than, 0.0, 
SCIPgetLocalTransEstimate(scip));

  SCIPcreateConsLinear
                      ( scip,
&cons_less_than,
                        cut_less_than->get_name().c_str(),
                        int( num_vars ),
                        scip_vars_less,
                        scip_coeffs_less,
                        lhs,
                        rhs,
                        FALSE,
                        FAlSE,
                        FALSE,
                        FALSE,
                        TRUE,
                        TRUE,
                        FALSE,
                        FALSE,
                        FALSE,
                        TRUE
                       ) ;

  SCIPaddConsNode(scip, child_less_than, cons_less_than, NULL);

  SCIPreleaseCons(scip, &cons_less_than);


Does anybody have an idea what goes wrong? We mainly followed the 
binpacking example of SCIP but we do not use an extra constraint handler 
to create the (linear) constraints.

Any suggestions/hints are appreciated!


Best wishes
Grit Claßen

-- 

Dipl.-Comp.Math. Grit Claßen

UMIC Research Centre and Lehrstuhl II für Mathematik
RWTH Aachen University
52056 Aachen
Germany

phone: +49 241 80 20753 or +49 241 80 94999
http://www.math2.rwth-aachen.de
http://www.isek.rwth-aachen.de



More information about the Scip mailing list