diff --git a/demo/src/app.jsx b/demo/src/app.jsx index 443e7807..3579c85b 100644 --- a/demo/src/app.jsx +++ b/demo/src/app.jsx @@ -107,6 +107,8 @@ import { useSnackMessage, commonButtonEn, commonButtonFr, + networkModificationsEn, + networkModificationsFr, } from '../../src'; const messages = { @@ -127,6 +129,7 @@ const messages = { ...flatParametersEn, ...multipleSelectionDialogEn, ...commonButtonEn, + ...networkModificationsEn, ...inputsEn, ...translations.en, }, @@ -146,6 +149,7 @@ const messages = { ...cardErrorBoundaryFr, ...flatParametersFr, ...commonButtonFr, + ...networkModificationsFr, ...multipleSelectionDialogFr, ...inputsFr, ...translations.fr, diff --git a/src/hooks/index.ts b/src/hooks/index.ts index d29051c1..a19c87da 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -6,6 +6,7 @@ */ export * from './customStates'; +export * from './useModificationLabelComputer'; export * from './useConfidentialityWarning'; export * from './useDebounce'; export * from './useIntlRef'; diff --git a/src/hooks/useModificationLabelComputer.tsx b/src/hooks/useModificationLabelComputer.tsx new file mode 100644 index 00000000..3ba493f9 --- /dev/null +++ b/src/hooks/useModificationLabelComputer.tsx @@ -0,0 +1,106 @@ +/** + * Copyright (c) 2024, RTE (http://www.rte-france.com) + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +import { useIntl } from 'react-intl'; +import { useCallback } from 'react'; +import { UUID } from 'crypto'; +import { MODIFICATION_TYPES } from '../utils/types/modificationType'; +import { EQUIPMENT_TYPE } from '../utils/types/equipmentType'; + +export interface NetworkModificationMetadata { + uuid: UUID; + type: string; + date: Date; + stashed: boolean; + activated: boolean; + messageType: string; + messageValues: string; +} + +interface ModificationValues { + equipmentId: string; + action: string; + energizedVoltageLevelId: string; + equipmentAttributeName: string; + equipmentAttributeValue: string; +} + +const getOperatingStatusModificationValues = (modification: ModificationValues, withFormat: boolean) => { + return { + action: modification.action, + energizedEnd: modification.energizedVoltageLevelId, + computedLabel: withFormat ? {modification.equipmentId} : modification.equipmentId, + }; +}; +const getEquipmentAttributeModificationValues = (modification: ModificationValues, withFormat: boolean) => { + return { + equipmentAttributeName: modification.equipmentAttributeName, + equipmentAttributeValue: modification.equipmentAttributeValue, + computedLabel: withFormat ? {modification.equipmentId} : modification.equipmentId, + }; +}; + +export const useModificationLabelComputer = () => { + const intl = useIntl(); + + const getLabel = useCallback( + (modif: NetworkModificationMetadata) => { + const modificationMetadata = JSON.parse(modif.messageValues); + + switch (modif.messageType) { + case MODIFICATION_TYPES.LINE_SPLIT_WITH_VOLTAGE_LEVEL.type: + return modificationMetadata.lineToSplitId; + case MODIFICATION_TYPES.LINE_ATTACH_TO_VOLTAGE_LEVEL.type: + return modificationMetadata.lineToAttachToId; + case MODIFICATION_TYPES.LINES_ATTACH_TO_SPLIT_LINES.type: + return modificationMetadata.attachedLineId; + case MODIFICATION_TYPES.DELETE_VOLTAGE_LEVEL_ON_LINE.type: + return `${modificationMetadata.lineToAttachTo1Id}/${modificationMetadata.lineToAttachTo2Id}`; + case MODIFICATION_TYPES.DELETE_ATTACHING_LINE.type: + return `${modificationMetadata.attachedLineId}/${modificationMetadata.lineToAttachTo1Id}/${modificationMetadata.lineToAttachTo2Id}`; + case MODIFICATION_TYPES.TABULAR_MODIFICATION.type: + return intl.formatMessage({ + id: `network_modifications.tabular.${modificationMetadata.tabularModificationType}`, + }); + case MODIFICATION_TYPES.BY_FILTER_DELETION.type: + return intl.formatMessage({ + id: + modificationMetadata.equipmentType === EQUIPMENT_TYPE.HVDC_LINE + ? 'Hvdc' + : modificationMetadata.equipmentType, + }); + case MODIFICATION_TYPES.TABULAR_CREATION.type: + return intl.formatMessage({ + id: `network_modifications.tabular.${modificationMetadata.tabularCreationType}`, + }); + default: + return modificationMetadata.equipmentId || ''; + } + }, + [intl] + ); + + const computeLabel = useCallback( + (modif: NetworkModificationMetadata, withFormat = true) => { + const modificationValues = JSON.parse(modif.messageValues); + + switch (modif.messageType) { + case MODIFICATION_TYPES.OPERATING_STATUS_MODIFICATION.type: + return getOperatingStatusModificationValues(modificationValues, withFormat); + case MODIFICATION_TYPES.EQUIPMENT_ATTRIBUTE_MODIFICATION.type: + return getEquipmentAttributeModificationValues(modificationValues, withFormat); + default: + return { + computedLabel: withFormat ? {getLabel(modif)} : getLabel(modif), + }; + } + }, + [getLabel] + ); + + return { computeLabel }; +}; diff --git a/src/translations/en/index.ts b/src/translations/en/index.ts index d22688bb..01c3ce53 100644 --- a/src/translations/en/index.ts +++ b/src/translations/en/index.ts @@ -22,5 +22,6 @@ export * from './reportViewerEn'; export * from './tableEn'; export * from './topBarEn'; export * from './treeviewFinderEn'; +export * from './networkModificationsEn'; export * from './external/exportParamsEn'; export * from './external/importParamsEn'; diff --git a/src/translations/en/networkModificationsEn.ts b/src/translations/en/networkModificationsEn.ts new file mode 100644 index 00000000..c12e4be3 --- /dev/null +++ b/src/translations/en/networkModificationsEn.ts @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2024, RTE (http://www.rte-france.com) + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +export const networkModificationsEn = { + 'network_modifications.modificationsCount': + '{hide, select, false {{count, plural, =0 {no modification} =1 {{count} modification} other {{count} modifications}}} other {...}}', + 'network_modifications.EQUIPMENT_DELETION': 'Deletion of {computedLabel}', + 'network_modifications.BY_FILTER_DELETION': 'By filter deletion ({computedLabel})', + 'network_modifications.SUBSTATION_CREATION': 'Creating substation {computedLabel}', + 'network_modifications.SUBSTATION_MODIFICATION': 'Modifying substation {computedLabel}', + 'network_modifications.VOLTAGE_LEVEL_CREATION': 'Creating voltage level {computedLabel}', + 'network_modifications.VOLTAGE_LEVEL_MODIFICATION': 'Modifying voltage level {computedLabel}', + 'network_modifications.LINE_SPLIT_WITH_VOLTAGE_LEVEL': 'Splitting a line {computedLabel}', + 'network_modifications.LINE_ATTACH_TO_VOLTAGE_LEVEL': 'Attaching line {computedLabel}', + 'network_modifications.LINES_ATTACH_TO_SPLIT_LINES': 'Attaching lines to splitting lines {computedLabel}', + 'network_modifications.LOAD_SCALING': 'Load scaling {computedLabel}', + 'network_modifications.DELETE_VOLTAGE_LEVEL_ON_LINE': 'Deleting a voltage level on a line {computedLabel}', + 'network_modifications.DELETE_ATTACHING_LINE': 'Deleting attaching line {computedLabel}', + 'network_modifications.LOAD_CREATION': 'Creating load {computedLabel}', + 'network_modifications.LOAD_MODIFICATION': 'Modifying load {computedLabel}', + 'network_modifications.BATTERY_CREATION': 'Creating battery {computedLabel}', + 'network_modifications.BATTERY_MODIFICATION': 'Modifying battery {computedLabel}', + 'network_modifications.GENERATOR_CREATION': 'Creating generator {computedLabel}', + 'network_modifications.GENERATOR_MODIFICATION': 'Modifying generator {computedLabel}', + 'network_modifications.LINE_CREATION': 'Creating line {computedLabel}', + 'network_modifications.LINE_MODIFICATION': 'Modifying line {computedLabel}', + 'network_modifications.TWO_WINDINGS_TRANSFORMER_CREATION': 'Creating 2 windings transformer {computedLabel}', + 'network_modifications.TWO_WINDINGS_TRANSFORMER_MODIFICATION': 'Modifying 2 windings transformer {computedLabel}', + 'network_modifications.OPERATING_STATUS_MODIFICATION': + '{action, select, TRIP {Trip {computedLabel}} LOCKOUT {Lock out {computedLabel}} ENERGISE_END_ONE {Energise {computedLabel} on {energizedEnd}} ENERGISE_END_TWO {Energise {computedLabel} on {energizedEnd}} SWITCH_ON {Switch on {computedLabel}} other {Equipment operating status modification {computedLabel}}}', + 'network_modifications.SHUNT_COMPENSATOR_CREATION': 'Creating shunt compensator {computedLabel}', + 'network_modifications.SHUNT_COMPENSATOR_MODIFICATION': 'Modifying shunt compensator {computedLabel}', + 'network_modifications.GENERATOR_SCALING': 'Generator scaling {computedLabel}', + 'network_modifications.VSC_CREATION': 'Creating HVDC (VSC) {computedLabel}', + 'network_modifications.VSC_MODIFICATION': 'Modifing HVDC (VSC) {computedLabel}', + 'network_modifications.GROOVY_SCRIPT': 'Modification by script', + 'network_modifications.EQUIPMENT_ATTRIBUTE_MODIFICATION': + '{equipmentAttributeName, select, open {{equipmentAttributeValue, select, true {Open {computedLabel}} other {Close {computedLabel}}}} other {Equipment modification {computedLabel}}}', + 'network_modifications.creatingModification': 'Creating modification ...', + 'network_modifications.deletingModification': 'Deleting modification ...', + 'network_modifications.updatingModification': 'Updating modification ...', + 'network_modifications.stashingModification': 'Stashing modification ...', + 'network_modifications.restoringModification': 'Restoring modification ...', + 'network_modifications.modifications': 'Updating modification list ...', + 'network_modifications.GENERATION_DISPATCH': 'Generation dispatch {computedLabel}', + 'network_modifications.VOLTAGE_INIT_MODIFICATION': 'Voltage profile initialization {computedLabel}', + 'network_modifications.TABULAR_MODIFICATION': 'Tabular modification - {computedLabel}', + 'network_modifications.tabular.GENERATOR_MODIFICATION': 'generator modifications', + 'network_modifications.tabular.LOAD_MODIFICATION': 'load modifications', + 'network_modifications.BY_FORMULA_MODIFICATION': 'Modification by formula {computedLabel}', + 'network_modifications.MODIFICATION_BY_ASSIGNMENT': 'Modification by filter {computedLabel}', + 'network_modifications.tabular.LINE_MODIFICATION': 'line modifications', + 'network_modifications.tabular.BATTERY_MODIFICATION': 'battery modifications', + 'network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION': 'voltage level modifications', + 'network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION': 'two windings transformer modifications', + 'network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION': 'linear shunt compensator modifications', + 'network_modifications.tabular.SUBSTATION_MODIFICATION': 'substation modifications', + 'network_modifications.TABULAR_CREATION': 'Tabular creation - {computedLabel}', + 'network_modifications.tabular.GENERATOR_CREATION': 'generator creations', +}; diff --git a/src/translations/fr/index.ts b/src/translations/fr/index.ts index 69ec4afa..bc942712 100644 --- a/src/translations/fr/index.ts +++ b/src/translations/fr/index.ts @@ -22,5 +22,6 @@ export * from './reportViewerFr'; export * from './tableFr'; export * from './topBarFr'; export * from './treeviewFinderFr'; +export * from './networkModificationsFr'; export * from './external/exportParamsFr'; export * from './external/importParamsFr'; diff --git a/src/translations/fr/networkModificationsFr.ts b/src/translations/fr/networkModificationsFr.ts new file mode 100644 index 00000000..8c7a10ca --- /dev/null +++ b/src/translations/fr/networkModificationsFr.ts @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2024, RTE (http://www.rte-france.com) + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +export const networkModificationsFr = { + 'network_modifications.modificationsCount': + '{hide, select, false {{count, plural, =0 {aucune modification} =1 {# modification} other {# modifications}}} other {...}}', + 'network_modifications.EQUIPMENT_DELETION': 'Suppression de {computedLabel}', + 'network_modifications.BY_FILTER_DELETION': 'Suppression par filtre ({computedLabel})', + 'network_modifications.SUBSTATION_CREATION': 'Création du site {computedLabel}', + 'network_modifications.SUBSTATION_MODIFICATION': 'Modification du site {computedLabel}', + 'network_modifications.VOLTAGE_LEVEL_CREATION': 'Création du poste {computedLabel}', + 'network_modifications.VOLTAGE_LEVEL_MODIFICATION': 'Modification du poste {computedLabel}', + 'network_modifications.LINE_SPLIT_WITH_VOLTAGE_LEVEL': "Création d'une coupure {computedLabel}", + 'network_modifications.LINE_ATTACH_TO_VOLTAGE_LEVEL': "Création d'un piquage {computedLabel}", + 'network_modifications.LINES_ATTACH_TO_SPLIT_LINES': 'Passage de piquage en coupure {computedLabel}', + 'network_modifications.LOAD_SCALING': 'Variation plan de consommation {computedLabel}', + 'network_modifications.DELETE_VOLTAGE_LEVEL_ON_LINE': "Suppression d'une coupure {computedLabel}", + 'network_modifications.DELETE_ATTACHING_LINE': "Suppression d'un piquage {computedLabel}", + 'network_modifications.LOAD_CREATION': 'Création de la charge {computedLabel}', + 'network_modifications.LOAD_MODIFICATION': 'Modification de la charge {computedLabel}', + 'network_modifications.BATTERY_CREATION': 'Création de batterie {computedLabel}', + 'network_modifications.BATTERY_MODIFICATION': 'Modification de batterie {computedLabel}', + 'network_modifications.GENERATOR_CREATION': 'Création du générateur {computedLabel}', + 'network_modifications.GENERATOR_MODIFICATION': 'Modification du générateur {computedLabel}', + 'network_modifications.LINE_CREATION': 'Création de la ligne {computedLabel}', + 'network_modifications.LINE_MODIFICATION': 'Modification de la ligne {computedLabel}', + 'network_modifications.TWO_WINDINGS_TRANSFORMER_CREATION': + 'Création du transformateur à 2 enroulements {computedLabel}', + 'network_modifications.TWO_WINDINGS_TRANSFORMER_MODIFICATION': + 'Modification du transformateur à 2 enroulements {computedLabel}', + 'network_modifications.OPERATING_STATUS_MODIFICATION': + "{action, select, TRIP {Déclenchement de {computedLabel}} LOCKOUT {Consignation de {computedLabel}} ENERGISE_END_ONE {Mise sous tension à vide de {computedLabel} depuis {energizedEnd}} ENERGISE_END_TWO {Mise sous tension à vide de {computedLabel} depuis {energizedEnd}} SWITCH_ON {Mise en service de {computedLabel}} other {Modification du statut opérationnel de l'équipement {computedLabel}}}", + 'network_modifications.SHUNT_COMPENSATOR_CREATION': "Création d'un moyen de compensation {computedLabel}", + 'network_modifications.SHUNT_COMPENSATOR_MODIFICATION': "Modification d'un moyen de compensation {computedLabel}", + 'network_modifications.GENERATOR_SCALING': 'Variation plan de production {computedLabel}', + 'network_modifications.VSC_CREATION': 'Création de la HVDC (VSC) {computedLabel}', + 'network_modifications.VSC_MODIFICATION': 'Modification de la HVDC (VSC) {computedLabel}', + 'network_modifications.GROOVY_SCRIPT': 'Modification par script', + 'network_modifications.EQUIPMENT_ATTRIBUTE_MODIFICATION': + "{equipmentAttributeName, select, open {{equipmentAttributeValue, select, true {Ouverture de {computedLabel}} other {Fermeture de {computedLabel}}}} other {Modification de l'equipement {computedLabel}}}", + 'network_modifications.creatingModification': 'Création de la modification en cours ...', + 'network_modifications.deletingModification': 'Suppression de la modification en cours ...', + 'network_modifications.updatingModification': 'Mise à jour de la modification en cours ...', + 'network_modifications.stashingModification': 'Mise en corbeille de la modification en cours ...', + 'network_modifications.restoringModification': 'Restauration de la modification en cours ...', + 'network_modifications.modifications': 'Mise à jour de la liste des modifications en cours ...', + 'network_modifications.GENERATION_DISPATCH': 'Démarrage de groupes {computedLabel}', + 'network_modifications.VOLTAGE_INIT_MODIFICATION': 'Initialisation du plan de tension {computedLabel}', + 'network_modifications.TABULAR_MODIFICATION': 'Modification tabulaire - {computedLabel}', + 'network_modifications.tabular.GENERATOR_MODIFICATION': 'modifications de générateurs', + 'network_modifications.tabular.LOAD_MODIFICATION': 'modifications de consommations', + 'network_modifications.BY_FORMULA_MODIFICATION': 'Modification par formule {computedLabel}', + 'network_modifications.MODIFICATION_BY_ASSIGNMENT': 'Modification par filtre {computedLabel}', + 'network_modifications.tabular.LINE_MODIFICATION': 'modifications de lignes', + 'network_modifications.tabular.BATTERY_MODIFICATION': 'modifications de batteries', + 'network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION': 'modifications de postes', + 'network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION': + 'modifications de transformateurs à 2 enroulements', + 'network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION': 'modifications de MCS linéaires', + 'network_modifications.tabular.SUBSTATION_MODIFICATION': 'modifications de sites', + 'network_modifications.TABULAR_CREATION': 'Création tabulaire - {computedLabel}', + 'network_modifications.tabular.GENERATOR_CREATION': 'créations de générateurs', +}; diff --git a/src/utils/types/index.ts b/src/utils/types/index.ts index fcd99782..bb53009a 100644 --- a/src/utils/types/index.ts +++ b/src/utils/types/index.ts @@ -9,3 +9,4 @@ export * from './equipmentType'; export * from './equipmentTypes'; export * from './metadata'; export * from './types'; +export * from './modificationType'; diff --git a/src/utils/types/modificationType.ts b/src/utils/types/modificationType.ts new file mode 100644 index 00000000..494a85ad --- /dev/null +++ b/src/utils/types/modificationType.ts @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2023, RTE (http://www.rte-france.com) + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +export enum ModificationType { + GROOVY_SCRIPT = 'GROOVY_SCRIPT', + LOAD_CREATION = 'LOAD_CREATION', + LOAD_MODIFICATION = 'LOAD_MODIFICATION', + BATTERY_CREATION = 'BATTERY_CREATION', + BATTERY_MODIFICATION = 'BATTERY_MODIFICATION', + GENERATOR_CREATION = 'GENERATOR_CREATION', + GENERATOR_MODIFICATION = 'GENERATOR_MODIFICATION', + LINE_CREATION = 'LINE_CREATION', + LINE_MODIFICATION = 'LINE_MODIFICATION', + SUBSTATION_CREATION = 'SUBSTATION_CREATION', + SUBSTATION_MODIFICATION = 'SUBSTATION_MODIFICATION', + VOLTAGE_LEVEL_CREATION = 'VOLTAGE_LEVEL_CREATION', + VOLTAGE_LEVEL_MODIFICATION = 'VOLTAGE_LEVEL_MODIFICATION', + SHUNT_COMPENSATOR_CREATION = 'SHUNT_COMPENSATOR_CREATION', + SHUNT_COMPENSATOR_MODIFICATION = 'SHUNT_COMPENSATOR_MODIFICATION', + STATIC_VAR_COMPENSATOR_CREATION = 'STATIC_VAR_COMPENSATOR_CREATION', + TWO_WINDINGS_TRANSFORMER_CREATION = 'TWO_WINDINGS_TRANSFORMER_CREATION', + TWO_WINDINGS_TRANSFORMER_MODIFICATION = 'TWO_WINDINGS_TRANSFORMER_MODIFICATION', + VSC_CREATION = 'VSC_CREATION', + EQUIPMENT_DELETION = 'EQUIPMENT_DELETION', + BY_FILTER_DELETION = 'BY_FILTER_DELETION', + LINE_SPLIT_WITH_VOLTAGE_LEVEL = 'LINE_SPLIT_WITH_VOLTAGE_LEVEL', + LINE_ATTACH_TO_VOLTAGE_LEVEL = 'LINE_ATTACH_TO_VOLTAGE_LEVEL', + LINES_ATTACH_TO_SPLIT_LINES = 'LINES_ATTACH_TO_SPLIT_LINES', + OPERATING_STATUS_MODIFICATION = 'OPERATING_STATUS_MODIFICATION', + EQUIPMENT_ATTRIBUTE_MODIFICATION = 'EQUIPMENT_ATTRIBUTE_MODIFICATION', + LOAD_SCALING = 'LOAD_SCALING', + DELETE_VOLTAGE_LEVEL_ON_LINE = 'DELETE_VOLTAGE_LEVEL_ON_LINE', + DELETE_ATTACHING_LINE = 'DELETE_ATTACHING_LINE', + GENERATOR_SCALING = 'GENERATOR_SCALING', + GENERATION_DISPATCH = 'GENERATION_DISPATCH', + VOLTAGE_INIT_MODIFICATION = 'VOLTAGE_INIT_MODIFICATION', + CONVERTER_STATION_CREATION = 'CONVERTER_STATION_CREATION', + TABULAR_MODIFICATION = 'TABULAR_MODIFICATION', + BY_FORMULA_MODIFICATION = 'BY_FORMULA_MODIFICATION', + MODIFICATION_BY_ASSIGNMENT = 'MODIFICATION_BY_ASSIGNMENT', + TABULAR_CREATION = 'TABULAR_CREATION', + VSC_MODIFICATION = 'VSC_MODIFICATION', + CONVERTER_STATION_MODIFICATION = 'CONVERTER_STATION_MODIFICATION', + COMPOSITE_MODIFICATION = 'COMPOSITE_MODIFICATION', +} + +export const MODIFICATION_TYPES = { + GROOVY_SCRIPT: { + type: ModificationType.GROOVY_SCRIPT, + }, + LOAD_CREATION: { + type: ModificationType.LOAD_CREATION, + }, + LOAD_MODIFICATION: { + type: ModificationType.LOAD_MODIFICATION, + }, + BATTERY_CREATION: { + type: ModificationType.BATTERY_CREATION, + }, + BATTERY_MODIFICATION: { + type: ModificationType.BATTERY_MODIFICATION, + }, + GENERATOR_CREATION: { + type: ModificationType.GENERATOR_CREATION, + }, + GENERATOR_MODIFICATION: { + type: ModificationType.GENERATOR_MODIFICATION, + }, + LINE_CREATION: { + type: ModificationType.LINE_CREATION, + }, + LINE_MODIFICATION: { + type: ModificationType.LINE_MODIFICATION, + }, + SUBSTATION_CREATION: { + type: ModificationType.SUBSTATION_CREATION, + }, + SUBSTATION_MODIFICATION: { + type: ModificationType.SUBSTATION_MODIFICATION, + }, + VOLTAGE_LEVEL_CREATION: { + type: ModificationType.VOLTAGE_LEVEL_CREATION, + }, + VOLTAGE_LEVEL_MODIFICATION: { + type: ModificationType.VOLTAGE_LEVEL_MODIFICATION, + }, + SHUNT_COMPENSATOR_CREATION: { + type: ModificationType.SHUNT_COMPENSATOR_CREATION, + }, + SHUNT_COMPENSATOR_MODIFICATION: { + type: ModificationType.SHUNT_COMPENSATOR_MODIFICATION, + }, + STATIC_VAR_COMPENSATOR_CREATION: { + type: ModificationType.STATIC_VAR_COMPENSATOR_CREATION, + }, + TWO_WINDINGS_TRANSFORMER_CREATION: { + type: ModificationType.TWO_WINDINGS_TRANSFORMER_CREATION, + }, + TWO_WINDINGS_TRANSFORMER_MODIFICATION: { + type: ModificationType.TWO_WINDINGS_TRANSFORMER_MODIFICATION, + }, + VSC_CREATION: { + type: ModificationType.VSC_CREATION, + }, + EQUIPMENT_DELETION: { + type: ModificationType.EQUIPMENT_DELETION, + }, + BY_FILTER_DELETION: { + type: ModificationType.BY_FILTER_DELETION, + }, + LINE_SPLIT_WITH_VOLTAGE_LEVEL: { + type: ModificationType.LINE_SPLIT_WITH_VOLTAGE_LEVEL, + }, + LINE_ATTACH_TO_VOLTAGE_LEVEL: { + type: ModificationType.LINE_ATTACH_TO_VOLTAGE_LEVEL, + }, + LINES_ATTACH_TO_SPLIT_LINES: { + type: ModificationType.LINES_ATTACH_TO_SPLIT_LINES, + }, + OPERATING_STATUS_MODIFICATION: { + type: ModificationType.OPERATING_STATUS_MODIFICATION, + }, + EQUIPMENT_ATTRIBUTE_MODIFICATION: { + type: ModificationType.EQUIPMENT_ATTRIBUTE_MODIFICATION, + }, + LOAD_SCALING: { + type: ModificationType.LOAD_SCALING, + }, + DELETE_VOLTAGE_LEVEL_ON_LINE: { + type: ModificationType.DELETE_VOLTAGE_LEVEL_ON_LINE, + }, + DELETE_ATTACHING_LINE: { + type: ModificationType.DELETE_ATTACHING_LINE, + }, + GENERATOR_SCALING: { + type: ModificationType.GENERATOR_SCALING, + }, + GENERATION_DISPATCH: { + type: ModificationType.GENERATION_DISPATCH, + }, + VOLTAGE_INIT_MODIFICATION: { + type: ModificationType.VOLTAGE_INIT_MODIFICATION, + }, + CONVERTER_STATION_CREATION: { + type: ModificationType.CONVERTER_STATION_CREATION, + }, + TABULAR_MODIFICATION: { + type: ModificationType.TABULAR_MODIFICATION, + }, + BY_FORMULA_MODIFICATION: { + type: ModificationType.BY_FORMULA_MODIFICATION, + }, + MODIFICATION_BY_ASSIGNMENT: { + type: 'MODIFICATION_BY_ASSIGNMENT', + }, + TABULAR_CREATION: { + type: ModificationType.TABULAR_CREATION, + }, + VSC_MODIFICATION: { + type: ModificationType.VSC_MODIFICATION, + }, + CONVERTER_STATION_MODIFICATION: { + type: ModificationType.CONVERTER_STATION_MODIFICATION, + }, + COMPOSITE_MODIFICATION: { + type: ModificationType.COMPOSITE_MODIFICATION, + }, +};