[SCIP] Default branching rules but only over a subset of binary variables.

Eduardo Moreno eduardo.moreno at gmail.com
Mon May 20 16:53:55 CEST 2024


Thanks Leon for the response!. It works!. For the records, this is how
I solve the problem:
1) I set a higher VarBranchPriority to the "y" variables.
2) On my Ryan/Foster-like branch, if I receive a fractional "y" var, I
stop the execution returning SCIP_DIDNOTRUN. So SCIP will execute the
other default branching rules.
3) Only when receiving  lp candidates are not "y" variables on my
branching, I execute my branching rules.

Best

Eduardo



On Sat, May 18, 2024 at 5:26 PM Leon Eifler <eifler at zib.de> wrote:
>
> Hi Eduardo,
>
>
>
> You can set the priority for branching on a variable by calling `SCIPchgVarBranchPriority` for that variable. Variables with a higher priority are always branched on first.
>
> You also should make sure that your Ryan Foster branching rule has a lower priority than the default SCIP one that you want to use (relpscost has 10000 by default)
>
>
>
> Best,
> Leon
>
>
>
>
>
> From: Scip <scip-bounces at zib.de> On Behalf Of Eduardo Moreno
> Sent: Saturday, May 18, 2024 12:41 PM
> To: scip at zib.de
> Subject: [SCIP] Default branching rules but only over a subset of binary variables.
>
>
>
> Hi All.  I'm coding for the first time a B&P using SCIP. Apologies if this question already exists in the forum (I couldn't find it).
>
>
>
> I'm coding a "kind-of" binpacking using Branch-and-Price, where instead of Sum lambda_c >=1 my problem has a binary variable on the RHS, so Sum lambda_c >= y (or may be, Sum lambda_c = y).  In other words, either y=0 (fixing all columns including it to zero) or y=1 (becoming a bin packing)
>
>
>
> I also implemented a kind-of Ryan/Foster Branching rule (following the bin packing example). However, this branching rule only applies for the case y=1.  Hence, I need to prioritize the standard default branching but only on the subset of binary "y" variables first, and only after that to enforce the RyanFoster branching rule for the priced variables "lambda".
>
>
>
> How do you recommend doing that?  Do I need to re-code some default branching rules to deal only with a subset of variables "y"?  Or is there another simpler way? If not, which branching rules do you recommend to adapt? Just a simpler one like assume "branch_leastinf"? Or all of them that apply to my problem?
>
>
>
> BTW: I cannot relax the integrality of the priced vars, because I can obtain optimal integer solutions for "y" vars using fractional values for "lambda" vars. So that's not a viable solution.
>
>
>
> Thanks for the help!
>
>
>
> Eduardo
>
>
>
> -----
>
> Eduardo Moreno, Ph.D.
>
> Professor, Universidad Adolfo Ibañez, Chile.
>
> Visiting Researcher, Google Research, France
>
>
>
>
>
>
>
>



More information about the Scip mailing list