Skip to content
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: allow congested mesh branches to be ranked by mean congestion #474

Merged
merged 4 commits into from
May 4, 2021

Conversation

danielolsen
Copy link
Contributor

Pull Request doc

Purpose

Allow congested mesh branches to be ranked by mean congestion, rather than only by a quantile value of congestion. Closes #439 (we will create a separate, more detailed issue for the third bullet of #439, which requires more design thought).

What the code is doing

Previously, we had a method parameter, which only applied to the denominator of the (congestion metric) / (upgrade cost proxy) ratio. Now, we have congestion_metric and cost_metric (replaces method). Most of the code changes are simply renaming method -> cost_metric, and elaborating in the documentation. Within _identify_mesh_branch_upgrades, we call .mean() rather than .quantile() on the congestion data frame as applicable, and we rename some variables so that we create a congestion_metric_values variable regardless of whether it's a quantile or a mean (previously, this variable had been called quantile_cong_abs).

Testing

Previous unit tests pass, new ones have been added which return different results if we select "mean" rather than "quantile" as the congestion_metric.

Time estimate

15-30 minutes. Functional code changes are <10 lines, but a few other things are renamed or reorganized for clarity.

@danielolsen danielolsen added the new feature Feature that is currently in progress. label May 3, 2021
@danielolsen danielolsen requested review from rouille and BainanXia May 3, 2021 19:42
@danielolsen danielolsen self-assigned this May 3, 2021
Copy link
Collaborator

@BainanXia BainanXia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@danielolsen danielolsen force-pushed the daniel/congestion_mean branch from f28bdd9 to 1684ef8 Compare May 4, 2021 15:09
@danielolsen danielolsen merged commit cdc6ab2 into develop May 4, 2021
@danielolsen danielolsen deleted the daniel/congestion_mean branch May 4, 2021 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Feature that is currently in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve flexibility of congested branch upgrade algorithm
3 participants