Closed margotcosson closed 2 years ago
Hi @margotcosson ,
The origin of this discrepancy is in the branching/vanillafullstrong/idempotent
parameter, which is set to False
by default when you use the vanillafullstrong
branching rule in SCIP. Without idempotence SCIP triggers side-effects during the computation of the strong branching scores, which reduces the tree size. When we extract strong branching scores in Ecole we set this parameter to True
, so that extracting this observation does not change the state of the environment (or at least minimizes the amount of changes, some changes will still happen, such as the state of the LP solver).
Here is a reproduction of your experiment with the fix
vanilla_sb_env = SimpleConfiguring(observation_function=None,
branching_method="vanillafullstrong",
scip_params={"branching/vanillafullstrong/idempotent": True},
information_function=ecole.reward.NNodes())
Hope that helps.
Best, Maxime
Hello Mr Gasse, Thank you very much for your answer, it does help a lot. I'll be able to make fair comparisons in my work. Thanks again ! Best, Margot
Describe the bug
First, I apologize if it is not a bug but a misunderstanding on my part. I am studying learning on branching so I a am very glad to be able to use ecole. However, I encountered a strange behavior : when I compare the tree sizes (number of nodes) of problems solved with
ecole.dynamics.BranchingDynamics
ecole.dynamics.ConfiguringDynamics
I am getting smaller tree sizes with the second one. To be sure that it was not a question of random seed, I tested it on 500 set covering instances (n_rows=200, n_cols=200, density=0.1) and on 100 bigger set covering instances (n_rows = 300, n_cols = 300, density = 0.1). I got the following plots :
500 instances (200, 200, 0.1) :
100 instances (300, 300, 0.1) :
My code is the following :
Once again, sorry if this is not a bug but a mistake on my part. Furthermore, I tried to understand the issue by mylself but I did not success to run SCIP vanilla strong branching inside ecole (with
ecole.dynamics.ConfiguringDynamics
or others) while getting the strong branching scores, the action set and the decision made by SCIP at each node.Setting
To Reproduce
You can run the code above if you want to reproduce the plot. Otherwise, if you want to test the two models on one instance, you can run the code above with
nb_runs = 1
.Expected behavior
As expected, full strong branching is getting better result than vanilla strong branching as it allows several deductions during gathering of strong branching scores. For the two others, I would expect hard-coded vanilla strong branching and SCIP vanilla strong branching to perform the same, at least in average.
Additional context