Skip to content

Adjusted the automated node placement#52

Merged
JulStraus merged 2 commits into
mainfrom
adjust/node_positions
May 20, 2026
Merged

Adjusted the automated node placement#52
JulStraus merged 2 commits into
mainfrom
adjust/node_positions

Conversation

@Zetison
Copy link
Copy Markdown
Collaborator

@Zetison Zetison commented May 19, 2026

This PR adjusts the following:

  • If coordinates have not been saved to a design file for the nodes under an Area, they are now placed symetrically around the circle (that is, acounting for one node being the GeoAvailability node to be placed at the center). This is illustrated well by comparing changes to the docs/src/figures/EMI_geography_Oslo.png file.
  • The default value for the radius of the circle for placing nodes without coordinates is now a third of the minimal distance between area coordinates defined in the top_level design file.

@Zetison Zetison requested a review from Copilot May 19, 2026 15:02
@Zetison Zetison self-assigned this May 19, 2026
@Zetison Zetison added the enhancement New feature or request label May 19, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts automated node placement so that, when child node coordinates are not stored in the design file, the nodes are arranged on a circle accounting for the central availability node, and the default circle radius is derived from the minimum inter-area distance at the top level.

Changes:

  • In setup_topology.jl, attempt to load x/y for each child from the saved design file before falling back to lon/lat, and compute radius = min_dist / 3 from those coordinates.
  • Subtract one from nodes_count when placing nodes whose parent is a SystemGeo, to account for the centered GeoAvailability node.
  • Update place_nodes_in_circle docstring parameter names and use explicit Float32 conversions in the angle computation.

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.

File Description
src/setup_topology.jl Reorders initialization, adds design-file coordinate loading for SystemGeo, and adjusts nodes_count for the central availability node.
src/utils_gen/structures_utils.jl Aligns docstring parameter names with the function signature and uses explicit Float32 in the angle computation.
NEWS.md Adds an unversioned release note describing the placement adjustments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread NEWS.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Zetison Zetison requested a review from dqpinel May 19, 2026 15:07
@JulStraus JulStraus merged commit 513c049 into main May 20, 2026
3 checks passed
@JulStraus JulStraus deleted the adjust/node_positions branch May 20, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants