[SCIP] Constraint Handler is not adding the cuts as expected

Naga Venkata Chaitanya Gudapati - nagavenkata.gudapati@studio.unibo.it nagavenkata.gudapati at studio.unibo.it
Wed Aug 5 16:43:02 CEST 2020


Hello,

I have a very simple min-max routing problem and I seem to have hit a small snag. I think I am missing something very simple in my understanding of the constraint handler inner mechanisms.

The constructor of my constraint handler is as follows:

ObjConshdlr(scip, "sub-tour", "sub-tour elimination constraints",
                     1000000, -20000, -25000, 1, -1, 1, 0,
                     FALSE, FALSE, TRUE, SCIP_PROPTIMING_BEFORELP, SCIP_PRESOLTIMING_FAST)

1) the checkpriority flag is -25000 which I assume is just gonna only run the scip_check function  when the feasible solutions are integeral.

2) in my scip_check I have a function which tells us whether there is a subtour or not and if there is a subtour, it sets the *result to SCIP_INFEASIBLE;

3) Then in the scip_sepalp function , I call another function sepaSubtour which will add the cut.

But the issue is that the solution values in scip_check and sepaSubtour seem to be different. I find a sub-tour using the scip_check but there is no correspondence with the solution in sepaSubtour function as the arc variables have different values (the objective function value is same in both cases).
 

I am just prototyping here and I assumed the solution values in both the scip_check and sepa_lp (thus in sepaSubtour)  would be same but the solution value in subTour seems to be fractional (objective values are the same but the arc variables are fractional in sepaSubtour whereas they are integral in scip_check). 

Maybe I am missing something very trivial here. Is there a way to get the same solution in the sepa_lp as scip_check? 

Regards,
Nag




More information about the Scip mailing list