ecole
ecole copied to clipboard
Too many indices!
Describe the problem or improvement suggested
There are too many indices in Ecole, which is confusing at best, but most likely error prone.
NodeBipartitecolumns observation are indexed by the LP position of columns;Khalil2016are ordered by whateverPseudoBranchCandsvariables order is- Branching action set maps the order of
PseudoBranchCandsORLPBranchCandsvariables to the LP position. - Branching action is to be an index of LP position
I find this all very confusing, and I spend quite some time on that code, actually I'm reading it right now.
The indices and ordering is also global, so one cannot safely make changes somewhere without risking breaking everything.
Furthermore, it is not possible to use Khalil2016 and Branching with LPBranchCands because we cannot recover that index.
This will only grow more complicated as we add observations/environments.
Describe the solution you would like
The ordering of variables or column should be self contained.
- Observations should return an additional vector that tell for every line the
SCIP_VAR*for the features; Branchingenvironment should only accept aSCIP_VAR*, no indices involved;- Branching
action_setwould need to become a vector ofSCIP_VAR*, which NodeBipartite users would need to pass throughnumpy.argwhereto get the indices they had before.