-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feat/489 refactor resilience curve and adjusting the calculation #502
Feat/489 refactor resilience curve and adjusting the calculation #502
Conversation
…loss_per_capita-of-the-losses-module
…ta-of-the-losses-module' into feat/489-adjusting-the-calculation
…ta-of-the-losses-module' into feat/489-create-dataclasses-with-readers-for-losses-csvs
…_period to ana config
Co-authored-by: Sahand Asgarpour <133748876+sahand-asgarpour@users.noreply.github.com>
…ps://github.com/Deltares/ra2ce into feat/489-traffic-intensities-per-traffic-period
…loss_per_capita-of-the-losses-module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some remarks to process before merging is possible.
tests/analysis/losses/resilience_curves/test_resilience_curves.py
Outdated
Show resolved
Hide resolved
ra2ce/analysis/losses/resilience_curves/resilience_curves_reader.py
Outdated
Show resolved
Hide resolved
…ta-of-the-losses-module' into feat/489-create-dataclasses-with-readers-for-losses-csvs
resilience_curves: dict[ | ||
tuple[RoadTypeEnum, tuple[float, float]], list[tuple[float, float]] | ||
] = field(default_factory=dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I like this approach slightly more I believe it could be simplified with just a specific class representing the tuple[RoadTypeEnum, tuple[float,float]
Issue addressed
Solves #489
Code of conduct
What has been done?
A subpackage with dataclass and related reader is created for resilience_curve.
Losses_base is adjusted to using this new subpackage.
The new dataclass is used to extract the right data for the loss per capita calculation
Checklist
black
andisort
definitions.master
.Additional Notes (optional)
N.A.