Skip to content

Commit

Permalink
Fix RC enabled export for Generators (#2920).
Browse files Browse the repository at this point in the history
Signed-off-by: stojkovicn <nemanja.stojkovic@rte-france.com>
  • Loading branch information
stojkovicn committed Jun 10, 2024
1 parent 449d3f7 commit cba59bc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -371,17 +371,20 @@ private static void addRegulatingControlView(Generator g, Map<String, List<Regul
double targetDeadband = 0;
double target;
String targetValueUnitMultiplier;
boolean enabled;
RemoteReactivePowerControl rrpc = g.getExtension(RemoteReactivePowerControl.class);
if (rrpc != null) {
target = rrpc.getTargetQ();
targetValueUnitMultiplier = "M";
enabled = rrpc.isEnabled();
} else {
target = g.getTargetV();
targetValueUnitMultiplier = "k";
enabled = g.isVoltageRegulatorOn();
}

RegulatingControlView rcv = new RegulatingControlView(rcid, RegulatingControlType.REGULATING_CONTROL, false,
g.isVoltageRegulatorOn(), targetDeadband, target, targetValueUnitMultiplier);
enabled, targetDeadband, target, targetValueUnitMultiplier);
regulatingControlViews.computeIfAbsent(rcid, k -> new ArrayList<>()).add(rcv);
}
}
Expand Down

0 comments on commit cba59bc

Please sign in to comment.