[SCIP] Constraint handler (especially TSP) documentation question

Alex Meiburg timeroot.alex at gmail.com
Fri May 6 00:35:15 CEST 2022


Hi, I'm following the TSP example, trying to understand the (somewhat
dizzying!) array of different callbacks for the constraint handler. I'm
particularly confused by the comment on line 359 of ConshdlrSubtour.cpp (in
SCIP version 8.0.0), in ENFOLP, where it says:

// if a subtour was found, we generate a cut constraint saying that there
must be at least two outgoing edges

immediately after a call to findSubtour. But as far as I can tell,
findSubtour only checks for a subtour, without actually adding any cuts. My
understanding (and I would love it if someone could confirm or correct me)
is that:

 (1) ENFOPS, ENFOLP, and CHECK all *need* to check for feasibility and
return SCIP_FEASIBLE or SCIP_INFEASIBLE appropriately
 (2) ENFOPS and ENFOLP both *may* also add new constraints/branch/change
domains, and then return something else. The difference between these two
is that ENFOPS may be given variable assignments that don't obey the
current LP, and LP slack variables etc. will not be defined.
 (3) SEPASOL and SEPALP both *need* to add constraints/cuts to separate
infeasible solutions. SEPASOL is like ENFOPS in that won't necessarily be
given actual LP solutions.
 (4) The only *required* callbacks for a handler are ENFOLP, ENFOPS, and
and CHECK.

So the behavior of the TSP's ENFOLP example is acceptable, but a more
"complete" constraint handler would also add a cut there? The comment was
just a bit confusing.

How important is it, performance-wise, to implement SEPASOL and SEPALP? I
assume that if I don't add *any* cuts ever in my constraint handler,
solving would be very very slow, so I add cuts in at least one of {enfops,
enfolp, sepasol, sepalp}. But, for example, if I add cuts in ENFOPS and
ENFOLP only, would I gain anything by also implementing callbacks for
SEPASOL and SEPALP? And vice versa -- if I implements SEPASOL and SEPALP,
what differences would I observe if I think also added cuts in ENFOPS and
ENFOLP?

Thank you!

Best,
Alexander Meiburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20220505/e30cc9b0/attachment.html>


More information about the Scip mailing list