-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modifying eol method in component.py to allow multiple split #213
base: dev-circfutures
Are you sure you want to change the base?
Conversation
With the fairly large caveat that I haven't tested this on a data version with the multiple-facility-split feature, I'm not sure this logic will work. The I've annotated the current logic below for context. I think the most efficient solution would be to refactor (Side note: An alternate implementation here would be to use the loss fraction as the probability on a Boolean random variable, and making it so instead of 10% of each component going to landfill, 10% of whole components go to landfill and the rest continue as is. This might be an adjustment to make in the future and would help to capture e.g. window breakage during installation with a little more specificity.)
|
We modified one line (line 221) in the eol_process method of component.py to allow for multiple splits between one origin and several destimation options.
Basically, we allowed any key in self.split_dict starting with factype to proceed with the split. It assumes that cost_graph will optimize the pathway and the split will not occur for pathways that do not minimize costs.
Now that any string starting with factype works we can create duplicates of the split between one origin and several destinations in the scenario.yaml file. The modified code is below: