Skip to content

Commit

Permalink
[Network modification] Modify log when no extension is created. (#3100)
Browse files Browse the repository at this point in the history
* Modify the log when no extension is created when a feeder is created with its bay.
* Use already defined constant.

Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
  • Loading branch information
colinepiloquet committed Jul 22, 2024
1 parent cf598b1 commit 49bcb76
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ private void createExtensionAndTopology(Connectable<?> connectable, Network netw
createConnectablePosition = true;
}
} else {
LOGGER.warn("No order positions found on voltageLevel {}. The extension is not created.", voltageLevel.getId());
noConnectablePositionExtension(reportNode, voltageLevel);
LOGGER.warn("No ConnectablePosition extension found on voltageLevel {}. The ConnectablePosition extension is not created for new feeder {}.", voltageLevel.getId(), connectableId);
noConnectablePositionExtension(reportNode, voltageLevel, connectableId);
}
// create switches and a breaker linking the connectable to the busbar sections.
createTopology(side, network, voltageLevel, connectable, namingStrategy, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,11 @@ public static void positionOrderTooHighReport(ReportNode reportNode, int maxValu
.add();
}

public static void noConnectablePositionExtension(ReportNode reportNode, VoltageLevel voltageLevel) {
public static void noConnectablePositionExtension(ReportNode reportNode, VoltageLevel voltageLevel, String connectableId) {
reportNode.newReportNode()
.withMessageTemplate("noConnectablePositionExtensions", "No extensions found on voltageLevel ${voltageLevel}. The extension on the connectable is not created.")
.withMessageTemplate("noConnectablePositionExtensions", "No ConnectablePosition extension found on voltageLevel ${voltageLevel}. The ConnectablePosition extension is not created for new feeder ${connectableId}.")
.withUntypedValue("voltageLevel", voltageLevel.getId())
.withUntypedValue(CONNECTABLE_ID, connectableId)
.withSeverity(TypedValue.WARN_SEVERITY)
.add();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
+ Testing creating line reportNode without extensions
New connectable lineTest of type LINE created.
No extensions found on voltageLevel vl2. The extension on the connectable is not created.
No ConnectablePosition extension found on voltageLevel vl2. The ConnectablePosition extension is not created for new feeder lineTest.
No busbar section position extension found on bbs5, only one disconnector is created.
New feeder bay associated to lineTest of type LINE was created and connected to voltage level vl2 on busbar section bbs5 with a closed disconnector and on 0 parallel busbar sections with an open disconnector.
No extensions found on voltageLevel vl1. The extension on the connectable is not created.
No ConnectablePosition extension found on voltageLevel vl1. The ConnectablePosition extension is not created for new feeder lineTest.
No busbar section position extension found on bbs1, only one disconnector is created.
New feeder bay associated to lineTest of type LINE was created and connected to voltage level vl1 on busbar section bbs1 with a closed disconnector and on 0 parallel busbar sections with an open disconnector.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+ Testing reportNode for a load creation in a network without extensions
New connectable newLoad of type LOAD created.
No extensions found on voltageLevel vl1. The extension on the connectable is not created.
No ConnectablePosition extension found on voltageLevel vl1. The ConnectablePosition extension is not created for new feeder newLoad.
No busbar section position extension found on bbs4, only one disconnector is created.
New feeder bay associated to newLoad of type LOAD was created and connected to voltage level vl1 on busbar section bbs4 with a closed disconnector and on 0 parallel busbar sections with an open disconnector.

0 comments on commit 49bcb76

Please sign in to comment.