Allow to place poles along road geometry#21
Merged
Conversation
234a06b to
2e3c3f3
Compare
Collaborator
Author
|
@CelinaKellinghaus if this approach ends up working well, it might be worth it to use it for fixed poles too. What happens here so far is:
It is still work in progress, but it will hopefully respect the existing constraints (max. distribution cable length etc). Perhaps the fixed poles could run the same process, simply skipping the first two steps. |
4d8af08 to
b37ad1b
Compare
1ddc9d5 to
c4193d9
Compare
When grid_opt_json["roads"] is present, poles are sampled along road polylines at distribution_cable_max_length/2 intervals and consumers within connection_cable_max_length are assigned to them directly. K-means runs only on consumers road poles cannot reach.
Both determine_poles and _place_poles_with_roads duplicated the same post-placement steps. Extract them into optimize() so each placement method is responsible for poles only.
Both functions ran identical k-means logic. Unified by adding optional consumer_indices param — None means all connected consumers (non-road path), a subset means road-unassigned consumers only.
cluster_labels sometimes was including NaN label from power-house
c4193d9 to
cd0b1fb
Compare
Used to happen automatically when rebuilding nodes, but not anymore because of concat due to road poles
bac28f3 to
0846ff5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.