Improvement of utilities for TwoLevelTree#82
Conversation
|
I am not sure I see the need for the I guess, some of the utilities can be exported. At the same time, I am bit concerned about exposing to much functionality for interacting directly with the tree structure. Is it not enough to be able to iterate through the nodes of the tree and the scenario paths to each leave? At least, I think we should have some good use cases where it seems relevant. |
Honestly speaking, I do not recall it right now. I probably lost a bit track of the different branches and stashes I have within all EMX packages ;) I think however it is good to have it for a latter stage (but without a docstring and internal). It is in general preferred to use the iterator utilities, but sometimes this is, at least in my view, not really possible as we do not consider all potential applications.
I agree. I am currently using at least the functionality for identification of the numbers, i.e., |
|
The last two commits just update the exports and tests. The former was discussed above, the latter was essentially a requirement. |
This PR combines two topics:
probability_branchandA key factor for the changes to
probability_branchis that we have to include it in practice in all multiplications for CAPEX contributions to the cost function. Otherwise, we would end up counting each branch as if the probability is 1. In this respect, the function is similar toprobability. However, we could improve in the documentation that one should either useprobabilityorprobability_branchas the latter is included in all otherTreePeriods orAbstractTreeStructure.Regarding the utility functions, I would suggest we think whether we should export some of them. Specifically, I used
n_strat_perin one of the changes I plan to implement withinEnergyModelsBase.