Skip to content

Allow to place poles along road geometry#21

Merged
paulapreuss merged 28 commits into
mainfrom
feature/road-poles
Jun 9, 2026
Merged

Allow to place poles along road geometry#21
paulapreuss merged 28 commits into
mainfrom
feature/road-poles

Conversation

@paulapreuss

Copy link
Copy Markdown
Collaborator

No description provided.

@paulapreuss paulapreuss force-pushed the feature/road-poles branch 2 times, most recently from 234a06b to 2e3c3f3 Compare May 14, 2026 08:44
@paulapreuss

Copy link
Copy Markdown
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:

  • Roads are split into segments
  • Poles are placed along all segments
  • Consumers that are directly by the poles are connected
  • The rest of the poles are still kept for the optimization

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.

@paulapreuss paulapreuss force-pushed the feature/road-poles branch from 4d8af08 to b37ad1b Compare May 26, 2026 08:41
@paulapreuss paulapreuss force-pushed the feature/road-poles branch 2 times, most recently from 1ddc9d5 to c4193d9 Compare June 9, 2026 07:51
  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
@paulapreuss paulapreuss force-pushed the feature/road-poles branch from c4193d9 to cd0b1fb Compare June 9, 2026 07:58
@paulapreuss paulapreuss force-pushed the feature/road-poles branch from bac28f3 to 0846ff5 Compare June 9, 2026 08:49
@paulapreuss paulapreuss marked this pull request as ready for review June 9, 2026 09:23
@paulapreuss paulapreuss merged commit 1f85f6c into main Jun 9, 2026
1 check passed
@paulapreuss paulapreuss deleted the feature/road-poles branch June 9, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant