[SCIP] Deactive constraint in a substree
Ambros Gleixner
gleixner at zib.de
Wed Sep 2 15:44:05 CEST 2020
Dear Xu Liding,
Sorry for the wait. SCIPdelConsLocal() is your friend:
https://scipopt.org/doc/html/group__LocalSubproblemMethods.php#gaf6738f851626c9248b8e3786ee45f842
It disables a constraint at the *current* node, so you need to call it
when SCIP enters the "y=1" child node. If you do not already have a
plugin with the right timing, you could, e.g., write an event handler
that catches SCIP_EVENTTYPE_NODEFOCUSED.
Hope that helps,
Ambros
Am 24.08.20 um 14:09 schrieb liding xu:
> Dear all,
> As I defined a branch rule on a binary variable of which a
> constraint becomes feasible in in the upbranch, can I declare this
> constraint to be inactive at the branch node?
> For example, constraint: sum_{i=1}^{n} x_i / n <= y, x_i \in
> {0,1}, y in {0,1}, when I branch on y, and in the branch y =1, this
> constraint is useless,
>
> Best regards,
> XU Liding
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
>
--
Ambros Gleixner, Research Group Mathematical Optimization Methods at
Zuse Institute Berlin, http://www.zib.de/gleixner
More information about the Scip
mailing list