[SCIP] Custom branching -- catching an assert

Schrotenboer, Albert a.h.schrotenboer at rug.nl
Thu Jan 9 10:45:04 CET 2020


Dear SCIP Community,

I am solving a basic VRP with branch & price, and have a question regarding
a branching rule I've implemented (Actually, I forgot how to do it...) I
branch on x_{ij} arcs, which I identify with my branchrule object. To
handle this information down the b&b tree, I use a constraint handler with
the following virtual methods implemented:

SCIP_DECL_CONSTRANS(ObjConshdlrOwn::scip_trans)
      To transform the info, nothing special
SCIP_DECL_CONSACTIVE(ObjConshdlrOwn::scip_active)
      Here I search which of my generated routes should be fixed to zero
corresponding to my branching information. (I also do the appropriate
adaptations in my pricing based on the branching). I fix my variables by
the following routines:

if (SCIPvarGetUbLocal(var) > 0.01)
      SCIP_CALL(SCIPchgVarUb(scip, (*d_varConsInfo).v_path[r].d_var, 0.0)
);

This all works nicely (when I do not run in debug mode). When I run in
Debug mode, however, an assert is collapsing when SCIP alters the path of
the tree (when it backtracks a few nodes), saying that:
JRP: src/scip/tree.c:1803: SCIPnodeAddBoundinfer: Assertion
`(SCIP_NODETYPE)node->nodetype == SCIP_NODETYPE_FOCUSNODE ||
(SCIP_NODETYPE)node->nodetype == SCIP_NODETYPE_PROBINGNODE ||
(SCIP_NODETYPE)node->nodetype == SCIP_NODETYPE_CHILD ||
(SCIP_NODETYPE)node->nodetype == SCIP_NODETYPE_REFOCUSNODE || node->depth
== 0' failed.

My question is, therefore, the following: Is changing the UB to enforce
variables to 0 the correct way to go? In addition, am I required to
implement the deactive virtual method as well, to change the upper bounds
back to what they were?

Kind regards,
Albert

-- 

Albert Schrotenboer

Postdoctoral Researcher

Faculty of Economics and Business

University of Groningen

P.O. Box 800, 9700 AV Groningen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20200109/dd5acd62/attachment.html>


More information about the Scip mailing list