feat: allow congested mesh branches to be ranked by mean congestion #474
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 havecongestion_metric
andcost_metric
(replacesmethod
). Most of the code changes are simply renamingmethod
->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 acongestion_metric_values
variable regardless of whether it's a quantile or a mean (previously, this variable had been calledquantile_cong_abs
).Testing
Previous unit tests pass, new ones have been added which return different results if we select
"mean"
rather than"quantile"
as thecongestion_metric
.Time estimate
15-30 minutes. Functional code changes are <10 lines, but a few other things are renamed or reorganized for clarity.