@@ -179,7 +179,7 @@ private void prepareGeoDataForComputation(Network network, Map<String, Substatio
179
179
if (geoDataForComputation .get (neighbourId ) == null && !substationsToCalculate .contains (neighbourId )) {
180
180
substationsToCalculate .add (neighbourId );
181
181
Substation sub = network .getSubstation (neighbourId );
182
- if (sub != null ) { // comes from a Request param string, could not exists in the network
182
+ if (sub != null ) { // neighbours comes from a Request param string, could not exists in the network
183
183
substations .add (sub );
184
184
} else {
185
185
LOGGER .debug ("{} substation doesn't exist in the newtwork, will be ignored." , neighbourId );
@@ -288,7 +288,7 @@ private void step(Step step, Network network, Map<String, Set<String>> sortedNei
288
288
for (Iterator <String > it = substationsToCalculate .iterator (); it .hasNext ();) {
289
289
String substationId = it .next ();
290
290
Set <String > neighbours = sortedNeighbours .get (substationId );
291
- if (neighbours != null ) {
291
+ if (neighbours != null ) { // substationsToCalculate comes from a Request param string, could not exists in the network
292
292
double neighborhoodOffset = calculatedSubstationsOffset .get (neighbours ) != null ? nextNeighborhoodOffset (calculatedSubstationsOffset .get (neighbours )) : 0 ;
293
293
294
294
// centroid calculation
@@ -545,7 +545,7 @@ public List<LineGeoData> getLinesByIds(Network network, Set<String> linesIds) {
545
545
546
546
linesIds .forEach (id -> {
547
547
Line line = network .getLine (id );
548
- if (line != null ) { // comes from a Request param string, could not exists in the network
548
+ if (line != null ) { // linesIds comes from a Request param string, could not exists in the network
549
549
lines .add (line );
550
550
} else {
551
551
LOGGER .debug ("{} line doesn't exist in the newtwork, will be ignored." , id );
0 commit comments