Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

csa profiles groups and dependencies #889

Merged
merged 9 commits into from
Feb 23, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,16 @@ public PropertyBags getSchemeRemedialActions() {
return getPropertyBags(CsaProfileConstants.REQUEST_SCHEME_REMEDIAL_ACTION, CsaProfileConstants.CsaProfileKeywords.REMEDIAL_ACTION.toString());
}

public PropertyBags getRemedialActionGroups() {
return getPropertyBags(CsaProfileConstants.REQUEST_REMEDIAL_ACTION_GROUP, CsaProfileConstants.CsaProfileKeywords.REMEDIAL_ACTION.toString());

}

public PropertyBags getRemedialActionDependencies() {
return getPropertyBags(CsaProfileConstants.REQUEST_REMEDIAL_ACTION_DEPENDENCY, CsaProfileConstants.CsaProfileKeywords.REMEDIAL_ACTION.toString());

}

public Map<String, String> getOverridingCracData(OffsetDateTime importTimestamp) {
Map<String, String> overridingData = new HashMap<>();
for (CsaProfileConstants.OverridingObjectsFields overridingObject : CsaProfileConstants.OverridingObjectsFields.values()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public String toString() {
public static final String SIPS = "http://entsoe.eu/ns/nc#RemedialActionSchemeKind.sips";
public static final String NORMAL_ARMED = "normalArmed";
public static final String OVERRIDE_ARMED = "armed";
public static final String DEPENDING_REMEDIAL_ACTION_GROUP = "dependingRemedialActionGroup";
public static final String GRID_STATE_ALTERATION_COLLECTION = "gridStateAlterationCollection";
public static final String GRID_STATE_ALTERATION_REMEDIAL_ACTION = "gridStateAlterationRemedialAction";
public static final String TOPOLOGY_ACTION = "topologyAction";
Expand All @@ -119,7 +120,7 @@ public String toString() {
public static final String TSO = "tso";
public static final String NORMAL_AVAILABLE = "normalAvailable";
public static final String OVERRIDE_AVAILABLE = "available";
public static final String RA_KIND = "kind";
public static final String KIND = "kind";
public static final String COMBINATION_CONSTRAINT_KIND = "combinationConstraintKind";
public static final String SWITCH = "switchId";
public static final String NORMAL_ENABLED = "normalEnabled";
Expand All @@ -128,6 +129,8 @@ public String toString() {
public static final String SHUNT_COMPENSATOR_MODIFICATION = "shuntCompensatorModification";
public static final String SHUNT_COMPENSATOR_ID = "shuntCompensatorId";
public static final String REQUEST_SCHEME_REMEDIAL_ACTION = "schemeRemedialAction";
public static final String REQUEST_REMEDIAL_ACTION_GROUP = "remedialActionGroup";
public static final String REQUEST_REMEDIAL_ACTION_DEPENDENCY = "remedialActionDependency";

public enum PropertyReference {
SWITCH("Switch.open"),
Expand Down Expand Up @@ -346,7 +349,8 @@ public enum OverridingObjectsFields {
ROTATING_MACHINE_ACTION("rotatingMachineActionOverriding", REQUEST_ROTATING_MACHINE_ACTION, NORMAL_ENABLED, OVERRIDE_ENABLED, HeaderType.START_END_DATE),
SHUNT_COMPENSATOR_MODIFICATION("shuntCompensatorModificationOverriding", REQUEST_SHUNT_COMPENSATOR_MODIFICATION, NORMAL_ENABLED, OVERRIDE_ENABLED, HeaderType.START_END_DATE),
TAP_POSITION_ACTION("tapPositionActionOverriding", REQUEST_TAP_POSITION_ACTION, NORMAL_ENABLED, OVERRIDE_ENABLED, HeaderType.START_END_DATE),
SCHEME_REMEDIAL_ACTION("schemeRemedialActionOverriding", REQUEST_SCHEME_REMEDIAL_ACTION, NORMAL_AVAILABLE, OVERRIDE_AVAILABLE, HeaderType.START_END_DATE);
SCHEME_REMEDIAL_ACTION("schemeRemedialActionOverriding", REQUEST_SCHEME_REMEDIAL_ACTION, NORMAL_AVAILABLE, OVERRIDE_AVAILABLE, HeaderType.START_END_DATE),
SCHEME_REMEDIAL_ACTION_DEPENDENCY("remedialActionDependencyOverriding", REQUEST_REMEDIAL_ACTION_DEPENDENCY, NORMAL_ENABLED, OVERRIDE_ENABLED, HeaderType.START_END_DATE);

final String requestName;
final String objectName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ public CsaProfileCracCreationContext createCrac(CsaProfileCrac nativeCrac, Netwo
PropertyBags shuntCompensatorModifications = CsaProfileCracUtils.overrideData(nativeCrac.getShuntCompensatorModifications(), overridingData, CsaProfileConstants.OverridingObjectsFields.SHUNT_COMPENSATOR_MODIFICATION);
PropertyBags tapPositionActions = CsaProfileCracUtils.overrideData(nativeCrac.getTapPositionAction(), overridingData, CsaProfileConstants.OverridingObjectsFields.TAP_POSITION_ACTION);
PropertyBags schemeRemedialActions = CsaProfileCracUtils.overrideData(nativeCrac.getSchemeRemedialActions(), overridingData, CsaProfileConstants.OverridingObjectsFields.SCHEME_REMEDIAL_ACTION);
PropertyBags remedialActionDependencies = CsaProfileCracUtils.overrideData(nativeCrac.getRemedialActionDependencies(), overridingData, CsaProfileConstants.OverridingObjectsFields.SCHEME_REMEDIAL_ACTION_DEPENDENCY);

createContingencies(contingencies, nativeCrac.getContingencyEquipments());
createCnecs(assessedElements, assessedElementsWithContingencies, currentLimits, voltageLimits, angleLimits, cracCreationParameters.getDefaultMonitoredSides());

OnConstraintUsageRuleHelper onConstraintUsageRuleAdder = new OnConstraintUsageRuleHelper(creationContext.getCnecCreationContexts(), assessedElements, assessedElementsWithRemedialAction);

ElementaryActionsHelper elementaryActionsHelper = new ElementaryActionsHelper(gridStateAlterationRemedialAction, schemeRemedialActions, remedialActionSchemes, nativeCrac.getStage(), gridStateAlterationsCollection, assessedElementsWithRemedialAction, contingenciesWithRemedialAction, staticPropertyRanges, topologyActions, rotatingMachineActions, shuntCompensatorModifications, tapPositionActions);
ElementaryActionsHelper elementaryActionsHelper = new ElementaryActionsHelper(gridStateAlterationRemedialAction, schemeRemedialActions, remedialActionSchemes, nativeCrac.getStage(), gridStateAlterationsCollection, assessedElementsWithRemedialAction, contingenciesWithRemedialAction, staticPropertyRanges, topologyActions, rotatingMachineActions, shuntCompensatorModifications, tapPositionActions, nativeCrac.getRemedialActionGroups(), remedialActionDependencies);
createRemedialActions(onConstraintUsageRuleAdder, elementaryActionsHelper);
creationContext.buildCreationReport();
return creationContext.creationSuccess(crac);
Expand Down
Loading
Loading