Skip to content

Conversation

laurgarn
Copy link
Contributor

A search for lines geo-data currently raises an exception as part of the code assumes

  • two voltage levels for each line, one at each side ; enforced by the model, although cgmes permits more than two, it is ok
  • a voltage level is in a non null substation ; network level allows to create a voltage level without a substation , so assumption is wrong
    This pull request adds a test for an adverse case and a fix for this case

@laurgarn laurgarn force-pushed the fix_out_of_substation_voltage_level_should_not_hinder_geo_search branch from 8d05daa to a0096b7 Compare May 28, 2025 11:23
@laurgarn laurgarn requested review from ghazwarhili and FranckLecuyer and removed request for ghazwarhili May 28, 2025 11:40
mapSubstationsByLine.entrySet().stream()
.filter(entry -> entry.getValue() != null)
.filter(entry -> entry.getValue().getLeft() != null)
.filter(entry -> entry.getValue().getRight() != null)
Copy link
Contributor

Choose a reason for hiding this comment

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

Only one filter call instead of 3 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see it clearer that way. Do you think it could have a noticeable influence on performance ?

@laurgarn
Copy link
Contributor Author

laurgarn commented Jun 3, 2025

Substations and LinePositions are returned in a reasonable time but some 73 substations can not be assigned coordinates, as for many lines.
Substations that have been assigned coordinates are correctly drawn on the map but no line is shown though the first request return 1.72 Mio of coordinates in json.

Copy link

sonarqubecloud bot commented Jun 4, 2025

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.

2 participants