[SCIP] Difficulty in restarting B&B; SCIPreleaseVar Assertion failed with my constraint handler

Marc Pfetsch pfetsch at mathematik.tu-darmstadt.de
Tue Aug 24 14:39:13 CEST 2021



Hi Devanand,

from what you write, I would suspect that the corresponding variable is 
released too early (probably in your code or implied by it). Then this 
variable is freed and not available for the clique separator anymore.

You can debug this by setting a breakpoint in SCIP_DECL_CONSDELETE. Then 
you can set a watch point on the corresponding variable and see which 
component releases the variable.

Alternatively, you can run valgrind to see whether something goes wrong 
with memory.

Best

Marc

On 20/08/2021 11.36, Dev Anand wrote:
> Hi,
> 
> Sorry for the typo. Instead " the branch restarts I get the error message
> just after the solver calls ", it will be
> " the *branch and bound* restarts I get the error message just after the
> solver calls "
> 
> Regards,
> Devanand
> 
> 
> On Fri, Aug 20, 2021 at 10:17 AM Dev Anand <dev.ismdhanbad at gmail.com> wrote:
> 
>> Dear Scipers,
>>
>> I am new to SCIP. I am trying to implement my own brancher in scip. My
>> brancher requires storing some relevant information at each branching node.
>> The FAQ provided in SCIP documentation guided me to create a
>> constraint_handler for this. As mentioned I took the help of constraint
>> handler of the coloring problem
>> (examples/Coloring/src/cons_storeGraph.c)).  To get the data stored in a
>> constraint, I have written external methods to my constraint handler.
>> The brancher works fine and my constraint handler helps in storing and
>> fetching the relevant data at each branching node. But, when the branch
>> restarts I get the error message just after the solver calls
>> SCIPsetExitsolPlugins.
>> The message I get is:
>> SCIPreleaseVar: Assertion `(*var)->scip == scip' failed.
>>
>> When I debugged, I found that after executing SCIP_DECL_CONSEXITSOL and
>> SCIP_DECL_CONSDELETE in my constraint handle without any error, it stuck on
>> SCIPsepaExitsol in deinitialization method of *clique* *separator.*
>> When I further looked into it, the tcliquegraphFree in sepa_clique.c,
>> calls the method SCIPreleaseVar. And surprisingly the first variable
>> itself, when I check (*var)->scip = 0x0, failed with  Assertion
>> `(*var)->scip == scip' failed.
>>
>> Currently, I am only adding one constraint to my constraint handler when
>> the B&B process is about to begin (in the method SCIP_DECL_CONSINITSOL).
>> So, I am not using SCIP_DECL_CONSACTIVE and SCIP_DECL_CONSDEACTIVE methods.
>> I use my external methods to fetch and store the consdata information.
>>
>> I would like to know how my constraint handle is linked with the tclique
>> separator. I am finding difficulty in resolving this issue. Please help me
>> to resolve it.
>>
>> Regards,
>> Devanand
>>
>>
> 
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
> 


More information about the Scip mailing list