[Scip] Questions regarding a Constraint Handler

Jose L Walteros jl.walteros at gmail.com
Wed Aug 29 04:29:40 MEST 2012


Hi SCIP team,

I have been working on my own constraint handler for a BPC code. The
purpose of the constraint handler is to manage a set of constraints that is
exponential in size. A similar concept of the one used for the TSP but a
different kind of constraints and a different context. I am
currently studying the ConshdlrSubtour.cpp file as well as the
documentation for the constraint handlers (
http://scip.zib.de/doc/html/CONS.shtml) that you have online. I have some
questions and I was hoping you guys can help me with those. This email is a
bit long so I apologize for this in advance.

1. In the cpp file you don't have the method SCIPcreateConsSubtourBasic(). When
do you need this?. I am not really sure about its purpose. I totally get
the SCIPcreateConsSubtour() method. However, the basic method is not clear
for me. You have:


Now, *SCIP gets notified* of the presence of the constraint handler
together with its basic
callbacks<http://scip.zib.de/doc/html/CONS.shtml#CONS_FUNDAMENTALCALLBACKS>
.


and then you give the line of code for the knapsack case, but since you are
not using it for the TSP, I am not sure if I should use it.

2. About the CONSCHECK method. What I understand about it is the following:
The only purpose this method is to check if a solution that is produced by
any method "outside" the standard BCP (i.e., a heuristic) is feasible. The
reason why it does not adds a cut or a constraint is because the fact that
the solution that it is being checked is not produced by the LP cycle,
hence, there is no point of adding any cut. Is this correct?

3. About the CONSENFOLP. Since it may add a cut or a constraint, is it
possible for the case of the TSP to call sepaSubtour instead of
findSubtourwithin this method?

4. Also, what is the main difference between adding a global cut pool and
adding a constraint for the case of the TSP? If you use  SCIPaddCut(), you
add the cut locally to the current node of the B&B tree?. I guess that if
you add it to the global cut, they become available for other nodes to use,
right? This is also the case if you add a constraint instead, right? The
reason I am asking is that the sub-tour elimination constraints are
constraints that actually define the TSP polyhedron. Contrary to simple
valid inequalities that just cut fractional solutions. This constraints
define the feasible integer solutions, so why do you add those as cuts and
not as constraints.

5. Furthermore, since those are added with   SCIPaddCut() that means that
they are added locally. This implies that you may have to add the same cut
in a different node of the B&B tree, right? Is it better if you add those
as SCIPaddCons()and then  return, SCIP_CONSADDEDinstead?

6. SCIP_DECL_CONSHDLRCLONE has the same purpose as
the SCIP_DECL_CONSHDLRCOPY, right? SCIP_DECL_CONSHDLRCLONE is just for cpp
(implements the cloneable property). I guess that for c I should implement
COPY instead, right?

7. Could you please elaborate a little bit more the explanation of the
WARNING in CONSDELETE method. I guess that this is only valid if for an
reason you plan to delete the constraint while the BPC is still in process,
right? should I be worried is this is not the case?

8. For CONSPROP you have:

The CONSPROP callback is called during the subproblem processing. It should
propagate the constraints, which means that it should infer reductions in
the variables' local bounds from the current local bounds.


By the subproblem you mean when a pricer is called? So, I'm guessing that
the idea is propagate possible bound changes possibly produced by the
constraint handler inside the pricer's subproblem. I concluded this because
for the TSP, since you are not generating variables, you don have to
perform such propagations, right? That is why you return DIDNOTTURN. Do you
guys have an example of a case in which you implement this?

Thanks a lot, and sorry for the length of this email.

-Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.zib.de/mailman/private/scip/attachments/20120829/b216e3f1/attachment.html


More information about the Scip mailing list