scipopt / scip

SCIP - Solving Constraint Integer Programs
Other
366 stars 63 forks source link

Coloring application Branching Rule contradictory code #77

Open meffertj opened 6 months ago

meffertj commented 6 months ago

Hello,

The coloring branch and price application documentation says it selects the "most" fractional variable (both in the doc and in the branch_coloring.c itself) but in the actual code it selects the "least" fractional variable, even stating so in the comment:

https://github.com/scipopt/scip/blob/6d9a5d4b96030945e8f620bf03887a59e0bd31a9/applications/Coloring/src/branch_coloring.c#L141

meffertj commented 6 months ago

I could do a pull request editing the mentioned code segment to indeed select the most fractional node

ambros-gleixner commented 6 months ago

Yes, that would be wonderful. Thank you for noticing!

If you wanted to then you could even introduce a parameter to be able to switch between most and least fractional. But I believe that least fractional leads to better performance in practice.

meffertj commented 6 months ago

Alright, I changed the section in my fork. https://github.com/meffertj/scip_vcp_mostfractional/blob/master/applications/Coloring/src/branch_coloring.c

Do you have a recommendation as to what the most elegant place to introduce that parameter would be?

ambros-gleixner commented 6 months ago

Yes, the include method of the branching rule would be the natural place to do so, see https://github.com/meffertj/scip_vcp_mostfractional/blob/master/src/scip/branch_pscost.c#L777 for one example.

ambros-gleixner commented 6 months ago

A character parameter from the string "ml" might be a natural choice.

leoneifler commented 4 months ago

Is there any progress on this?

meffertj commented 4 months ago

I‘ve implemented it. My windows machine died, have since been working on my mac and was not able to test it yet