Open dchetelat opened 4 years ago
Hi,
I wonder if the fair node counting feature is implemented. If not do you have any suggestion for ad-hoc modification to get the fair node counting?
Thanks!
No this has not been implemented yet! What are you trying to do, exactly?
Just wanna see the fair node counting in addition to the standard one. From this paper [1] it seems like it is more appropriate to compare ML methods with SCIP default policy with fair node counting?
[1] Parameterizing Branch-and-Bound Search Trees to Learn Branching Policies, Zarpellon et al. https://arxiv.org/pdf/2002.05120.pdf
SCIP's default policy is not really compatible with fair node counting, as it has many side-effects besides taking branching decisions. Tracking all those side-effects (mostly variable tightenings) to compute a fair number of nodes is technically hard, and has not been implemented in Ecole. However, in general any branching policy which is implemented via the Ecole API can be interpreted as an oracle with no side-effect, and can directly be evaluated in terms of fair node counting by measuring the final number of nodes (tree size).
Finally, note that the fair node number should not be measured in a default solving setting, as the optimal solution should be provided from the start to alleviate any side-effect due to node selection and primal heuristics. See Measuring the Impact of Branching Rules for Mixed-Integer Programming Gerald Gamrath, Christoph Schubert, 2018
For benchmarking purposes (I think mostly for reliability pseudocost and allfullstrong in branching?), it would be good to implement as a reward/metric fair node counting.
Currently, this is implementing in the branching work by monitoring the SCIP branching results
SCIP_RESULT.REDUCEDDOM
andSCIP_RESULT.CUTOFF
, and the fair node count isnnodes+2*(ndomchgs+ncutoffs)
. We could do the same thing, although maybe it is inefficient. Perhaps there is a way to implement this with an event handler, which would probably be more efficient, although I am not certain how.Alternatively, in the SCIP 7 release nodes, there is a mysterious sentence:
This makes me wonder if it was implemented as a metric in SCIP 7, but I could not find it anywhere, so I supposed they computed it by hand in this experiment. That is, there doesn't seem to be any easy
SCIPgetFairNNodes
function.