-
Notifications
You must be signed in to change notification settings - Fork 15
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
Further improvement of the supplychain module #124
Comments
Thanks a lot @spjuhel - this is quite alinged with what I had in mind! |
I like these ideas, and having a granular, pythonic refactor would be lovely.
|
I also have an additional functionality request! Maybe this should be a separate Issue. But I'll start here for the purpose of discussion since it seems at least a little relevant. One particular bit of granularity that I'd like is flexibility with the
My proposed solution here is to separate Both of these solutions allow me to work with large numbers of For now I have a local workaround with the second method. I'd be happy to turn it into a pull request! |
The module provides an excellent basis for indirect impact computation, but there are several aspects in the code structure that could largely benefit from a rework.
calc_shock_to_sectors
andcalc_impact
can quickly confuse the user. Notably, as they both accept exposure and impact as arguments, thus the entry point for exposure and impact is unclear.calc_impact
where exposure and impact arguments are ignored if a shock was already computed. (note that Integrate the BOARIO model into CLIMADA SupplyChain Module #81 will add a warning)SupplyChain
object are initiallyNone
and are set by methods thereafter. This can create confusion on when attributes are correctly computed, and may lead to incoherent objects.I propose to improve the implementation with the following (and could work on that once #81 is merged, or later, this is mostly to track ideas). I see at least two ways to do this:
calc_shock_to_sectors
andcalc_impact
. The core idea would be that instantiating a SupplyChain object would by default require both MRIOT, Exposure and Impact, and create an object which holds direct impact translated into MRIOT format, from which indirect impact can then be computed.Pros:
Cons:
IO_Shock
andIndirectImpact
(Other suggestions welcome!), such that,IO_Shock
does the translation of a CLIMADA impact into a MRIOT formatted one, and IndirectImpact does the computation.Pros:
Cons:
05/06/24: Approach chosen is 2.
Other sub-issues that should be addressed:
boario
approach, the simulation length is currentlylast_event_date + 365
, the 365 should not be hardcodedio_model
variable in the calc_matrices() method should probably be a class attribute?Features that could be added / or should be thought of while doing the rework:
IO_Shocks
from other inputs like summary statistics instead ofImpact
objects.The text was updated successfully, but these errors were encountered: