@gridsuite/commons-ui 0.222.0 → 0.224.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/directoryItemSelector/DirectoryItemSelector.d.ts +2 -1
- package/dist/components/ui/directoryItemSelector/DirectoryItemSelector.js +3 -1
- package/dist/components/ui/directoryItemSelector/utils.js +1 -1
- package/dist/components/ui/reactHookForm/DirectoryItemsInput.js +1 -1
- package/dist/components/ui/treeViewFinder/TreeViewFinder.d.ts +2 -0
- package/dist/components/ui/treeViewFinder/TreeViewFinder.js +53 -45
- package/dist/features/index.js +9 -1
- package/dist/features/network-modification-table/index.js +2 -1
- package/dist/features/network-modification-table/network-modifications-table.d.ts +4 -2
- package/dist/features/network-modification-table/network-modifications-table.js +54 -6
- package/dist/features/network-modification-table/renderers/cell-renderers.d.ts +1 -1
- package/dist/features/network-modification-table/renderers/cell-renderers.js +2 -2
- package/dist/features/network-modification-table/renderers/name-cell.d.ts +3 -2
- package/dist/features/network-modification-table/renderers/name-cell.js +24 -15
- package/dist/features/network-modification-table/utils.d.ts +1 -0
- package/dist/features/network-modification-table/utils.js +11 -0
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.d.ts +3 -2
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js +29 -7
- package/dist/features/network-modifications/common/regulatingTerminal/RegulatingTerminalForm.js +1 -1
- package/dist/features/network-modifications/common/regulatingTerminal/regulatingTerminal.utils.d.ts +4 -4
- package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.d.ts +8 -0
- package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +192 -0
- package/dist/features/network-modifications/generator/creation/generatorCreation.types.d.ts +2 -3
- package/dist/features/network-modifications/generator/creation/generatorCreation.utils.d.ts +123 -0
- package/dist/features/network-modifications/generator/creation/generatorCreation.utils.js +200 -0
- package/dist/features/network-modifications/generator/creation/index.d.ts +2 -0
- package/dist/features/network-modifications/generator/creation/index.js +9 -1
- package/dist/features/network-modifications/generator/generatorDialog.type.d.ts +0 -3
- package/dist/features/network-modifications/generator/index.js +9 -1
- package/dist/features/network-modifications/index.js +7 -0
- package/dist/features/parameters/common/contingency-table/columns-definitions.d.ts +3 -3
- package/dist/features/parameters/common/contingency-table/columns-definitions.js +5 -5
- package/dist/features/parameters/common/contingency-table/contingency-table.js +1 -1
- package/dist/features/parameters/common/contingency-table/types.d.ts +6 -17
- package/dist/features/parameters/security-analysis/columns-definitions.d.ts +3 -3
- package/dist/features/parameters/security-analysis/columns-definitions.js +8 -8
- package/dist/features/parameters/security-analysis/security-analysis-parameters-inline.js +1 -1
- package/dist/features/parameters/security-analysis/security-analysis-parameters-selector.d.ts +1 -1
- package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.d.ts +1 -1
- package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.js +1 -1
- package/dist/features/parameters/sensi/constants.d.ts +0 -2
- package/dist/features/parameters/sensi/constants.js +0 -4
- package/dist/features/parameters/sensi/use-sensitivity-analysis-parameters.js +33 -32
- package/dist/features/parameters/sensi/utils.d.ts +31 -63
- package/dist/features/parameters/sensi/utils.js +49 -61
- package/dist/hooks/use-unique-name-validation.js +1 -1
- package/dist/index.js +20 -7
- package/dist/services/directory.d.ts +1 -1
- package/dist/services/index.js +6 -3
- package/dist/services/pcc-min.d.ts +2 -1
- package/dist/services/pcc-min.js +27 -1
- package/dist/services/security-analysis.d.ts +2 -1
- package/dist/services/security-analysis.js +33 -1
- package/dist/services/sensitivity-analysis.d.ts +2 -1
- package/dist/services/sensitivity-analysis.js +87 -1
- package/dist/translations/en/networkModificationsEn.d.ts +7 -0
- package/dist/translations/en/networkModificationsEn.js +7 -0
- package/dist/translations/fr/networkModificationsFr.d.ts +7 -0
- package/dist/translations/fr/networkModificationsFr.js +7 -0
- package/dist/utils/constants/filterConstant.d.ts +1 -1
- package/dist/utils/index.js +7 -5
- package/dist/utils/types/dynamic-security-analysis.type.d.ts +3 -5
- package/dist/utils/types/equipmentType.d.ts +20 -0
- package/dist/utils/types/equipmentType.js +13 -0
- package/dist/utils/types/index.d.ts +1 -0
- package/dist/utils/types/index.js +7 -5
- package/dist/utils/types/parameters.type.d.ts +1 -1
- package/dist/utils/types/pcc-min.type.d.ts +0 -1
- package/dist/utils/types/pcc-min.type.js +0 -21
- package/dist/utils/types/security-analysis.type.d.ts +26 -0
- package/dist/utils/types/security-analysis.type.js +14 -0
- package/dist/utils/types/sensitivity-analysis.type.d.ts +3 -7
- package/dist/utils/types/sensitivity-analysis.type.js +17 -103
- package/dist/utils/types/types.d.ts +7 -0
- package/package.json +1 -1
- package/dist/features/parameters/security-analysis/types.d.ts +0 -20
- package/dist/features/parameters/security-analysis/types.js +0 -42
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as yup from "yup";
|
|
2
|
-
import { FLOW_VOLTAGE_SENSITIVITY_VALUE_THRESHOLD, ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD, FLOW_FLOW_SENSITIVITY_VALUE_THRESHOLD, PARAMETER_SENSI_NODES, EQUIPMENTS_IN_VOLTAGE_REGULATION, SUPERVISED_VOLTAGE_LEVELS, PARAMETER_SENSI_PST, PSTS, PARAMETER_SENSI_HVDC, HVDC_LINES, PARAMETER_SENSI_INJECTION, INJECTIONS, PARAMETER_SENSI_INJECTIONS_SET, DISTRIBUTION_TYPE, SENSITIVITY_TYPE, MONITORED_BRANCHES
|
|
2
|
+
import { FLOW_VOLTAGE_SENSITIVITY_VALUE_THRESHOLD, ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD, FLOW_FLOW_SENSITIVITY_VALUE_THRESHOLD, PARAMETER_SENSI_NODES, EQUIPMENTS_IN_VOLTAGE_REGULATION, SUPERVISED_VOLTAGE_LEVELS, PARAMETER_SENSI_PST, PSTS, PARAMETER_SENSI_HVDC, HVDC_LINES, PARAMETER_SENSI_INJECTION, INJECTIONS, PARAMETER_SENSI_INJECTIONS_SET, DISTRIBUTION_TYPE, SENSITIVITY_TYPE, MONITORED_BRANCHES } from "./constants.js";
|
|
3
3
|
import { ID } from "../../../utils/constants/filterConstant.js";
|
|
4
4
|
import { YUP_REQUIRED } from "../../../utils/constants/translationKeys.js";
|
|
5
5
|
import "../../../utils/conversionUtils.js";
|
|
@@ -96,23 +96,23 @@ const getSensiHvdcformatNewParams = (newParams) => {
|
|
|
96
96
|
return {
|
|
97
97
|
[PARAMETER_SENSI_HVDC]: newParams.sensitivityHVDC?.map((sensitivityHVDCs) => {
|
|
98
98
|
return {
|
|
99
|
-
[MONITORED_BRANCHES]: sensitivityHVDCs[MONITORED_BRANCHES].map((
|
|
99
|
+
[MONITORED_BRANCHES]: sensitivityHVDCs[MONITORED_BRANCHES].map((elem) => {
|
|
100
100
|
return {
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
id: elem[ID],
|
|
102
|
+
name: elem[NAME]
|
|
103
103
|
};
|
|
104
104
|
}),
|
|
105
|
-
[HVDC_LINES]: sensitivityHVDCs[HVDC_LINES].map((
|
|
105
|
+
[HVDC_LINES]: sensitivityHVDCs[HVDC_LINES].map((elem) => {
|
|
106
106
|
return {
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
id: elem[ID],
|
|
108
|
+
name: elem[NAME]
|
|
109
109
|
};
|
|
110
110
|
}),
|
|
111
111
|
[SENSITIVITY_TYPE]: sensitivityHVDCs[SENSITIVITY_TYPE],
|
|
112
|
-
[CONTINGENCIES]: sensitivityHVDCs[CONTINGENCIES]?.map((
|
|
112
|
+
[CONTINGENCIES]: sensitivityHVDCs[CONTINGENCIES]?.map((elem) => {
|
|
113
113
|
return {
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
id: elem[ID],
|
|
115
|
+
name: elem[NAME]
|
|
116
116
|
};
|
|
117
117
|
}),
|
|
118
118
|
[ACTIVATED]: sensitivityHVDCs[ACTIVATED]
|
|
@@ -141,22 +141,22 @@ const getSensiInjectionsformatNewParams = (newParams) => {
|
|
|
141
141
|
return {
|
|
142
142
|
[PARAMETER_SENSI_INJECTION]: newParams.sensitivityInjection?.map((sensitivityInjections) => {
|
|
143
143
|
return {
|
|
144
|
-
[MONITORED_BRANCHES]: sensitivityInjections[MONITORED_BRANCHES].map((
|
|
144
|
+
[MONITORED_BRANCHES]: sensitivityInjections[MONITORED_BRANCHES].map((elem) => {
|
|
145
145
|
return {
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
id: elem[ID],
|
|
147
|
+
name: elem[NAME]
|
|
148
148
|
};
|
|
149
149
|
}),
|
|
150
|
-
[INJECTIONS]: sensitivityInjections[INJECTIONS].map((
|
|
150
|
+
[INJECTIONS]: sensitivityInjections[INJECTIONS].map((elem) => {
|
|
151
151
|
return {
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
id: elem[ID],
|
|
153
|
+
name: elem[NAME]
|
|
154
154
|
};
|
|
155
155
|
}),
|
|
156
|
-
[CONTINGENCIES]: sensitivityInjections[CONTINGENCIES]?.map((
|
|
156
|
+
[CONTINGENCIES]: sensitivityInjections[CONTINGENCIES]?.map((elem) => {
|
|
157
157
|
return {
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
id: elem[ID],
|
|
159
|
+
name: elem[NAME]
|
|
160
160
|
};
|
|
161
161
|
}),
|
|
162
162
|
[ACTIVATED]: sensitivityInjections[ACTIVATED]
|
|
@@ -185,36 +185,27 @@ const getSensiInjectionsSetFormSchema = () => ({
|
|
|
185
185
|
})
|
|
186
186
|
)
|
|
187
187
|
});
|
|
188
|
-
const getGenericRowNewParams = (newRowParams) => {
|
|
189
|
-
return {
|
|
190
|
-
[MONITORED_BRANCHES]: newRowParams[MONITORED_BRANCHES].map((container) => container[ID]),
|
|
191
|
-
[INJECTIONS]: newRowParams[INJECTIONS]?.map((container) => container[ID]),
|
|
192
|
-
[HVDC_LINES]: newRowParams[HVDC_LINES]?.map((container) => container[ID]),
|
|
193
|
-
[PSTS]: newRowParams[PSTS]?.map((container) => container[ID]),
|
|
194
|
-
[CONTINGENCIES]: newRowParams[CONTINGENCIES]?.map((container) => container[ID])
|
|
195
|
-
};
|
|
196
|
-
};
|
|
197
188
|
const getSensiInjectionsSetformatNewParams = (newParams) => {
|
|
198
189
|
return {
|
|
199
190
|
[PARAMETER_SENSI_INJECTIONS_SET]: newParams.sensitivityInjectionsSet?.map((sensitivityInjectionSet) => {
|
|
200
191
|
return {
|
|
201
|
-
[MONITORED_BRANCHES]: sensitivityInjectionSet[MONITORED_BRANCHES].map((
|
|
192
|
+
[MONITORED_BRANCHES]: sensitivityInjectionSet[MONITORED_BRANCHES].map((elem) => {
|
|
202
193
|
return {
|
|
203
|
-
|
|
204
|
-
|
|
194
|
+
id: elem[ID],
|
|
195
|
+
name: elem[NAME]
|
|
205
196
|
};
|
|
206
197
|
}),
|
|
207
|
-
[INJECTIONS]: sensitivityInjectionSet[INJECTIONS].map((
|
|
198
|
+
[INJECTIONS]: sensitivityInjectionSet[INJECTIONS].map((elem) => {
|
|
208
199
|
return {
|
|
209
|
-
|
|
210
|
-
|
|
200
|
+
id: elem[ID],
|
|
201
|
+
name: elem[NAME]
|
|
211
202
|
};
|
|
212
203
|
}),
|
|
213
204
|
[DISTRIBUTION_TYPE]: sensitivityInjectionSet[DISTRIBUTION_TYPE],
|
|
214
|
-
[CONTINGENCIES]: sensitivityInjectionSet[CONTINGENCIES]?.map((
|
|
205
|
+
[CONTINGENCIES]: sensitivityInjectionSet[CONTINGENCIES]?.map((elem) => {
|
|
215
206
|
return {
|
|
216
|
-
|
|
217
|
-
|
|
207
|
+
id: elem[ID],
|
|
208
|
+
name: elem[NAME]
|
|
218
209
|
};
|
|
219
210
|
}),
|
|
220
211
|
[ACTIVATED]: sensitivityInjectionSet[ACTIVATED]
|
|
@@ -251,24 +242,22 @@ const getSensiNodesformatNewParams = (newParams) => {
|
|
|
251
242
|
return {
|
|
252
243
|
[PARAMETER_SENSI_NODES]: newParams.sensitivityNodes?.map((sensitivityNode) => {
|
|
253
244
|
return {
|
|
254
|
-
[SUPERVISED_VOLTAGE_LEVELS]: sensitivityNode[SUPERVISED_VOLTAGE_LEVELS]?.map((
|
|
245
|
+
[SUPERVISED_VOLTAGE_LEVELS]: sensitivityNode[SUPERVISED_VOLTAGE_LEVELS]?.map((elem) => {
|
|
246
|
+
return {
|
|
247
|
+
id: elem[ID],
|
|
248
|
+
name: elem[NAME]
|
|
249
|
+
};
|
|
250
|
+
}),
|
|
251
|
+
[EQUIPMENTS_IN_VOLTAGE_REGULATION]: sensitivityNode[EQUIPMENTS_IN_VOLTAGE_REGULATION]?.map((elem) => {
|
|
255
252
|
return {
|
|
256
|
-
|
|
257
|
-
|
|
253
|
+
id: elem[ID],
|
|
254
|
+
name: elem[NAME]
|
|
258
255
|
};
|
|
259
256
|
}),
|
|
260
|
-
[
|
|
261
|
-
(container) => {
|
|
262
|
-
return {
|
|
263
|
-
[CONTAINER_ID]: container[ID],
|
|
264
|
-
[CONTAINER_NAME]: container[NAME]
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
),
|
|
268
|
-
[CONTINGENCIES]: sensitivityNode[CONTINGENCIES]?.map((container) => {
|
|
257
|
+
[CONTINGENCIES]: sensitivityNode[CONTINGENCIES]?.map((elem) => {
|
|
269
258
|
return {
|
|
270
|
-
|
|
271
|
-
|
|
259
|
+
id: elem[ID],
|
|
260
|
+
name: elem[NAME]
|
|
272
261
|
};
|
|
273
262
|
}),
|
|
274
263
|
[ACTIVATED]: sensitivityNode[ACTIVATED]
|
|
@@ -298,23 +287,23 @@ const getSensiPstformatNewParams = (newParams) => {
|
|
|
298
287
|
return {
|
|
299
288
|
[PARAMETER_SENSI_PST]: newParams.sensitivityPST?.map((sensitivityPSTs) => {
|
|
300
289
|
return {
|
|
301
|
-
[MONITORED_BRANCHES]: sensitivityPSTs[MONITORED_BRANCHES].map((
|
|
290
|
+
[MONITORED_BRANCHES]: sensitivityPSTs[MONITORED_BRANCHES].map((elem) => {
|
|
302
291
|
return {
|
|
303
|
-
|
|
304
|
-
|
|
292
|
+
id: elem[ID],
|
|
293
|
+
name: elem[NAME]
|
|
305
294
|
};
|
|
306
295
|
}),
|
|
307
|
-
[PSTS]: sensitivityPSTs[PSTS].map((
|
|
296
|
+
[PSTS]: sensitivityPSTs[PSTS].map((elem) => {
|
|
308
297
|
return {
|
|
309
|
-
|
|
310
|
-
|
|
298
|
+
id: elem[ID],
|
|
299
|
+
name: elem[NAME]
|
|
311
300
|
};
|
|
312
301
|
}),
|
|
313
302
|
[SENSITIVITY_TYPE]: sensitivityPSTs[SENSITIVITY_TYPE],
|
|
314
|
-
[CONTINGENCIES]: sensitivityPSTs[CONTINGENCIES]?.map((
|
|
303
|
+
[CONTINGENCIES]: sensitivityPSTs[CONTINGENCIES]?.map((elem) => {
|
|
315
304
|
return {
|
|
316
|
-
|
|
317
|
-
|
|
305
|
+
id: elem[ID],
|
|
306
|
+
name: elem[NAME]
|
|
318
307
|
};
|
|
319
308
|
}),
|
|
320
309
|
[ACTIVATED]: sensitivityPSTs[ACTIVATED]
|
|
@@ -353,7 +342,6 @@ export {
|
|
|
353
342
|
filterSensiParameterRows,
|
|
354
343
|
formSchema,
|
|
355
344
|
getFormSchema,
|
|
356
|
-
getGenericRowNewParams,
|
|
357
345
|
getSensiHVDCsFormSchema,
|
|
358
346
|
getSensiHvdcformatNewParams,
|
|
359
347
|
getSensiInjectionsFormSchema,
|
|
@@ -3,10 +3,10 @@ import { useFormContext, useController } from "react-hook-form";
|
|
|
3
3
|
import { FieldConstants } from "../utils/constants/fieldConstants.js";
|
|
4
4
|
import "../utils/conversionUtils.js";
|
|
5
5
|
import "../utils/types/equipmentType.js";
|
|
6
|
-
import { elementAlreadyExists } from "../services/directory.js";
|
|
7
6
|
import "react/jsx-runtime";
|
|
8
7
|
import "@mui/icons-material";
|
|
9
8
|
import { useDebounce } from "./useDebounce.js";
|
|
9
|
+
import { elementAlreadyExists } from "../services/directory.js";
|
|
10
10
|
function useUniqueNameValidation({
|
|
11
11
|
name,
|
|
12
12
|
currentName = "",
|
package/dist/index.js
CHANGED
|
@@ -260,17 +260,18 @@ import { CustomError } from "./utils/types/CustomError.js";
|
|
|
260
260
|
import { ProblemDetailError } from "./utils/types/ProblemDetailError.js";
|
|
261
261
|
import { NetworkTimeoutError } from "./utils/types/NetworkTimeoutError.js";
|
|
262
262
|
import { ElementType } from "./utils/types/elementType.js";
|
|
263
|
-
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./utils/types/equipmentType.js";
|
|
263
|
+
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, ENERGY_SOURCES, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEnergySourceLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./utils/types/equipmentType.js";
|
|
264
264
|
import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, isInjection } from "./utils/types/equipmentTypes.js";
|
|
265
265
|
import { AnnouncementSeverity, ArrayAction } from "./utils/types/types.js";
|
|
266
266
|
import { MODIFICATION_TYPES, ModificationType } from "./utils/types/modificationType.js";
|
|
267
267
|
import { FieldType } from "./utils/types/fieldType.js";
|
|
268
268
|
import { ParameterType } from "./utils/types/parameters.type.js";
|
|
269
269
|
import { SolverType } from "./utils/types/dynamic-simulation.type.js";
|
|
270
|
-
import {
|
|
270
|
+
import { mapSecurityAnalysisParameters } from "./utils/types/security-analysis.type.js";
|
|
271
|
+
import { DistributionType, SensitivityType, mapSensitivityAnalysisParameters } from "./utils/types/sensitivity-analysis.type.js";
|
|
271
272
|
import { CalculationType, LoadModelsRule } from "./utils/types/dynamic-margin-calculation.type.js";
|
|
272
273
|
import { OperationType } from "./utils/types/network-modification-types.js";
|
|
273
|
-
import {
|
|
274
|
+
import { mapPccMinParameters } from "./utils/types/pcc-min.type.js";
|
|
274
275
|
import { areIdsEqual, getIdOrSelf, getIdOrValue, getLabelOrValue, getObjectId, notNull, notUndefined, parseIntData, removeNullFields, richTypeEquals, sanitizeString } from "./utils/ts-utils.js";
|
|
275
276
|
import { toNumber, validateValueIsANumber } from "./utils/validation-functions.js";
|
|
276
277
|
import { NO_ITEM_SELECTION_FOR_COPY } from "./utils/directory-utils.js";
|
|
@@ -279,9 +280,9 @@ import { fetchConfigParameter, fetchConfigParameters, getAppName, updateConfigPa
|
|
|
279
280
|
import { PermissionType, elementAlreadyExists, fetchDirectoryContent, fetchDirectoryElementPath, fetchElementNames, fetchRootFolders, hasElementPermission } from "./services/directory.js";
|
|
280
281
|
import { createFilter, createParameter, fetchElementsInfos, saveFilter, updateParameter } from "./services/explore.js";
|
|
281
282
|
import { PREFIX_STUDY_QUERIES, fetchLoadFlowParameters, getLoadFlowDefaultLimitReductions, getLoadFlowProviders, getLoadFlowSpecificParametersDescription, getLoadFlowUrl, setLoadFlowParameters } from "./services/loadflow.js";
|
|
282
|
-
import { fetchPccMinParameters, getPccMinStudyParameters, updatePccMinParameters } from "./services/pcc-min.js";
|
|
283
|
-
import { fetchSecurityAnalysisParameters, fetchSecurityAnalysisProviders, getSecurityAnalysisDefaultLimitReductions, getSecurityAnalysisParameters, getStudyUrl, setSecurityAnalysisParameters, updateSecurityAnalysisParameters } from "./services/security-analysis.js";
|
|
284
|
-
import { fetchSensitivityAnalysisParameters, fetchSensitivityAnalysisProviders, getSensiUrl, getSensitivityAnalysisFactorsCount, getSensitivityAnalysisParameters, getStudyUrlWithNodeUuidAndRootNetworkUuid, setSensitivityAnalysisParameters, updateSensitivityAnalysisParameters } from "./services/sensitivity-analysis.js";
|
|
283
|
+
import { enrichPccMinParameters, fetchPccMinParameters, getPccMinStudyParameters, updatePccMinParameters } from "./services/pcc-min.js";
|
|
284
|
+
import { enrichSecurityAnalysisParameters, fetchSecurityAnalysisParameters, fetchSecurityAnalysisProviders, getSecurityAnalysisDefaultLimitReductions, getSecurityAnalysisParameters, getStudyUrl, setSecurityAnalysisParameters, updateSecurityAnalysisParameters } from "./services/security-analysis.js";
|
|
285
|
+
import { enrichSensitivityAnalysisParameters, fetchSensitivityAnalysisParameters, fetchSensitivityAnalysisProviders, getSensiUrl, getSensitivityAnalysisFactorsCount, getSensitivityAnalysisParameters, getStudyUrlWithNodeUuidAndRootNetworkUuid, setSensitivityAnalysisParameters, updateSensitivityAnalysisParameters } from "./services/sensitivity-analysis.js";
|
|
285
286
|
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, getStudyShortCircuitParameters, setStudyNetworkVisualizationParameters, updateVoltageInitParameters } from "./services/study.js";
|
|
286
287
|
import { getNetworkVisualizationsParameters } from "./services/study-config.js";
|
|
287
288
|
import { fetchCurrentAnnouncement, fetchUserDetails } from "./services/userAdmin.js";
|
|
@@ -312,6 +313,8 @@ import { EQUIPMENT_TYPE_ORDER, byFilterDeletionDtoToForm, byFilterDeletionFormSc
|
|
|
312
313
|
import { ModificationByAssignmentForm } from "./features/network-modifications/by-filter/assignment/modification-by-assignment-form.js";
|
|
313
314
|
import { emptyModificationByAssignmentFormData, modificationByAssignmentDtoToForm, modificationByAssignmentFormSchema, modificationByAssignmentFormToDto } from "./features/network-modifications/by-filter/assignment/modificationByAssignment.utils.js";
|
|
314
315
|
import { DataType as DataType2 } from "./features/network-modifications/by-filter/assignment/assignment/assignment.type.js";
|
|
316
|
+
import { generatorCreationDtoToForm, generatorCreationEmptyFormData, generatorCreationFormSchema, generatorCreationFormToDto } from "./features/network-modifications/generator/creation/generatorCreation.utils.js";
|
|
317
|
+
import { GeneratorCreationForm } from "./features/network-modifications/generator/creation/GeneratorCreationForm.js";
|
|
315
318
|
import { batteryCreationDtoToForm, batteryCreationEmptyFormData, batteryCreationFormSchema, batteryCreationFormToDto } from "./features/network-modifications/battery/creation/batteryCreation.utils.js";
|
|
316
319
|
import { BatteryCreationForm } from "./features/network-modifications/battery/creation/BatteryCreationForm.js";
|
|
317
320
|
import { batteryModificationDtoToForm, batteryModificationEmptyFormData, batteryModificationFormSchema, batteryModificationFormToDto } from "./features/network-modifications/battery/modification/batteryModification.utils.js";
|
|
@@ -345,7 +348,7 @@ import { SelectHeaderCell } from "./features/network-modification-table/renderer
|
|
|
345
348
|
import { SwitchCell } from "./features/network-modification-table/renderers/switch-cell.js";
|
|
346
349
|
import { DragCloneRow } from "./features/network-modification-table/row/drag-row-clone.js";
|
|
347
350
|
import { ModificationRow } from "./features/network-modification-table/row/modification-row.js";
|
|
348
|
-
import { MAX_COMPOSITE_NESTING_DEPTH, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findModificationInTree, formatToComposedModification, isCompositeModification, mergeSubModificationsIntoTree, moveSubModificationInTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./features/network-modification-table/utils.js";
|
|
351
|
+
import { MAX_COMPOSITE_NESTING_DEPTH, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, mergeSubModificationsIntoTree, moveSubModificationInTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./features/network-modification-table/utils.js";
|
|
349
352
|
import { AnnouncementBanner } from "./features/announcement/AnnouncementBanner.js";
|
|
350
353
|
import { AnnouncementNotification } from "./features/announcement/AnnouncementNotification.js";
|
|
351
354
|
import { useGlobalAnnouncement } from "./features/announcement/useGlobalAnnouncement.js";
|
|
@@ -578,6 +581,7 @@ export {
|
|
|
578
581
|
DynamicMarginCalculationInline,
|
|
579
582
|
DynamicSecurityAnalysisInline,
|
|
580
583
|
DynamicSimulationInline,
|
|
584
|
+
ENERGY_SOURCES,
|
|
581
585
|
ENERGY_SOURCE_OPTIONS,
|
|
582
586
|
EQUIPMENTS_IN_VOLTAGE_REGULATION_TYPES,
|
|
583
587
|
EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE,
|
|
@@ -633,6 +637,7 @@ export {
|
|
|
633
637
|
GENERATORS_SELECTION_TYPE,
|
|
634
638
|
GRIDSUITE_DEFAULT_PRECISION,
|
|
635
639
|
Generator,
|
|
640
|
+
GeneratorCreationForm,
|
|
636
641
|
GridLogo,
|
|
637
642
|
GroupValueEditor,
|
|
638
643
|
HIGH_VOLTAGE_LIMIT,
|
|
@@ -1045,6 +1050,7 @@ export {
|
|
|
1045
1050
|
emptyModificationByAssignmentFormData,
|
|
1046
1051
|
emptyProperties,
|
|
1047
1052
|
enrichPccMinParameters,
|
|
1053
|
+
enrichSecurityAnalysisParameters,
|
|
1048
1054
|
enrichSensitivityAnalysisParameters,
|
|
1049
1055
|
equalsArray,
|
|
1050
1056
|
equipmentDeletionDtoToForm,
|
|
@@ -1113,6 +1119,7 @@ export {
|
|
|
1113
1119
|
filterExpertFr,
|
|
1114
1120
|
filterFr,
|
|
1115
1121
|
findAllLoadedCompositeModifications,
|
|
1122
|
+
findDepth,
|
|
1116
1123
|
findModificationInTree,
|
|
1117
1124
|
flatParametersEn,
|
|
1118
1125
|
flatParametersFr,
|
|
@@ -1120,6 +1127,10 @@ export {
|
|
|
1120
1127
|
formatToComposedModification,
|
|
1121
1128
|
genHelperError,
|
|
1122
1129
|
generateTreeViewFinderClass,
|
|
1130
|
+
generatorCreationDtoToForm,
|
|
1131
|
+
generatorCreationEmptyFormData,
|
|
1132
|
+
generatorCreationFormSchema,
|
|
1133
|
+
generatorCreationFormToDto,
|
|
1123
1134
|
getActivePowerControlEmptyFormData,
|
|
1124
1135
|
getActivePowerControlSchema,
|
|
1125
1136
|
getActivePowerSetPointSchema,
|
|
@@ -1160,6 +1171,7 @@ export {
|
|
|
1160
1171
|
getCreateSwitchesValidationSchema,
|
|
1161
1172
|
getDefaultRowData,
|
|
1162
1173
|
getDynamicMappings,
|
|
1174
|
+
getEnergySourceLabel,
|
|
1163
1175
|
getEquipmentTypeShortLabel,
|
|
1164
1176
|
getEquipmentsInfosForSearchBar,
|
|
1165
1177
|
getExpertFilterEmptyFormData,
|
|
@@ -1280,6 +1292,7 @@ export {
|
|
|
1280
1292
|
logout,
|
|
1281
1293
|
makeComposeClasses,
|
|
1282
1294
|
mapPccMinParameters,
|
|
1295
|
+
mapSecurityAnalysisParameters,
|
|
1283
1296
|
mapSensitivityAnalysisParameters,
|
|
1284
1297
|
mergeModificationAndEquipmentProperties,
|
|
1285
1298
|
mergeSubModificationsIntoTree,
|
|
@@ -10,4 +10,4 @@ export declare enum PermissionType {
|
|
|
10
10
|
MANAGE = "MANAGE"
|
|
11
11
|
}
|
|
12
12
|
export declare function hasElementPermission(elementUuid: UUID, permission: PermissionType): Promise<boolean>;
|
|
13
|
-
export declare function fetchElementNames(elementUuids: Set<string>): Promise<
|
|
13
|
+
export declare function fetchElementNames(elementUuids: Set<string>): Promise<Record<string, string>>;
|
package/dist/services/index.js
CHANGED
|
@@ -3,9 +3,9 @@ import { fetchConfigParameter, fetchConfigParameters, getAppName, updateConfigPa
|
|
|
3
3
|
import { PermissionType, elementAlreadyExists, fetchDirectoryContent, fetchDirectoryElementPath, fetchElementNames, fetchRootFolders, hasElementPermission } from "./directory.js";
|
|
4
4
|
import { createFilter, createParameter, fetchElementsInfos, saveFilter, updateParameter } from "./explore.js";
|
|
5
5
|
import { PREFIX_STUDY_QUERIES, fetchLoadFlowParameters, getLoadFlowDefaultLimitReductions, getLoadFlowProviders, getLoadFlowSpecificParametersDescription, getLoadFlowUrl, setLoadFlowParameters } from "./loadflow.js";
|
|
6
|
-
import { fetchPccMinParameters, getPccMinStudyParameters, updatePccMinParameters } from "./pcc-min.js";
|
|
7
|
-
import { fetchSecurityAnalysisParameters, fetchSecurityAnalysisProviders, getSecurityAnalysisDefaultLimitReductions, getSecurityAnalysisParameters, getStudyUrl, setSecurityAnalysisParameters, updateSecurityAnalysisParameters } from "./security-analysis.js";
|
|
8
|
-
import { fetchSensitivityAnalysisParameters, fetchSensitivityAnalysisProviders, getSensiUrl, getSensitivityAnalysisFactorsCount, getSensitivityAnalysisParameters, getStudyUrlWithNodeUuidAndRootNetworkUuid, setSensitivityAnalysisParameters, updateSensitivityAnalysisParameters } from "./sensitivity-analysis.js";
|
|
6
|
+
import { enrichPccMinParameters, fetchPccMinParameters, getPccMinStudyParameters, updatePccMinParameters } from "./pcc-min.js";
|
|
7
|
+
import { enrichSecurityAnalysisParameters, fetchSecurityAnalysisParameters, fetchSecurityAnalysisProviders, getSecurityAnalysisDefaultLimitReductions, getSecurityAnalysisParameters, getStudyUrl, setSecurityAnalysisParameters, updateSecurityAnalysisParameters } from "./security-analysis.js";
|
|
8
|
+
import { enrichSensitivityAnalysisParameters, fetchSensitivityAnalysisParameters, fetchSensitivityAnalysisProviders, getSensiUrl, getSensitivityAnalysisFactorsCount, getSensitivityAnalysisParameters, getStudyUrlWithNodeUuidAndRootNetworkUuid, setSensitivityAnalysisParameters, updateSensitivityAnalysisParameters } from "./sensitivity-analysis.js";
|
|
9
9
|
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, getStudyShortCircuitParameters, setStudyNetworkVisualizationParameters, updateVoltageInitParameters } from "./study.js";
|
|
10
10
|
import { getNetworkVisualizationsParameters } from "./study-config.js";
|
|
11
11
|
import { fetchCurrentAnnouncement, fetchUserDetails } from "./userAdmin.js";
|
|
@@ -31,6 +31,9 @@ export {
|
|
|
31
31
|
createFilter,
|
|
32
32
|
createParameter,
|
|
33
33
|
elementAlreadyExists,
|
|
34
|
+
enrichPccMinParameters,
|
|
35
|
+
enrichSecurityAnalysisParameters,
|
|
36
|
+
enrichSensitivityAnalysisParameters,
|
|
34
37
|
exportFilter,
|
|
35
38
|
fetchAppsMetadata,
|
|
36
39
|
fetchBaseVoltages,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UUID } from 'node:crypto';
|
|
2
|
-
import { PccMinParametersEnriched } from '../utils';
|
|
2
|
+
import { PccMinParameters, PccMinParametersEnriched } from '../utils';
|
|
3
|
+
export declare function enrichPccMinParameters(parameters: PccMinParameters): Promise<PccMinParametersEnriched>;
|
|
3
4
|
export declare function getPccMinStudyParameters(studyUuid: UUID): Promise<PccMinParametersEnriched | null>;
|
|
4
5
|
export declare function fetchPccMinParameters(parameterUuid: UUID): Promise<PccMinParametersEnriched>;
|
|
5
6
|
export declare function updatePccMinParameters(studyUuid: UUID | null, newParams: PccMinParametersEnriched | null): Promise<Response>;
|
package/dist/services/pcc-min.js
CHANGED
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
import { backendFetchJson, backendFetch } from "./utils.js";
|
|
2
2
|
import { getStudyUrl } from "./security-analysis.js";
|
|
3
|
-
import {
|
|
3
|
+
import { FILTERS } from "../utils/constants/filterConstant.js";
|
|
4
|
+
import "../utils/conversionUtils.js";
|
|
5
|
+
import "../utils/types/equipmentType.js";
|
|
6
|
+
import { mapPccMinParameters } from "../utils/types/pcc-min.type.js";
|
|
7
|
+
import "react/jsx-runtime";
|
|
8
|
+
import "@mui/icons-material";
|
|
9
|
+
import { fetchElementNames } from "./directory.js";
|
|
4
10
|
const PREFIX_PCC_MIN_SERVER_QUERIES = `${"api/gateway"}/pcc-min`;
|
|
5
11
|
function getPccMinUrl() {
|
|
6
12
|
return `${PREFIX_PCC_MIN_SERVER_QUERIES}/v1/`;
|
|
7
13
|
}
|
|
14
|
+
function collectAllElementIds(params) {
|
|
15
|
+
return new Set(params[FILTERS]);
|
|
16
|
+
}
|
|
17
|
+
function enrichPccMinParameters(parameters) {
|
|
18
|
+
const allElementIds = collectAllElementIds(parameters);
|
|
19
|
+
const elementNamesPromise = allElementIds.size === 0 ? Promise.resolve(null) : fetchElementNames(allElementIds);
|
|
20
|
+
return elementNamesPromise.then((elementNames) => {
|
|
21
|
+
const mapIdsToFilterIdentifiers = (ids) => {
|
|
22
|
+
return ids ? ids.map((id) => ({
|
|
23
|
+
filterId: id,
|
|
24
|
+
filterName: elementNames?.[id] ?? void 0
|
|
25
|
+
})) : [];
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
...parameters,
|
|
29
|
+
[FILTERS]: mapIdsToFilterIdentifiers(parameters[FILTERS])
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
}
|
|
8
33
|
function getPccMinStudyParameters(studyUuid) {
|
|
9
34
|
console.info("get pcc min study parameters");
|
|
10
35
|
const url = `${getStudyUrl(studyUuid)}/pcc-min/parameters`;
|
|
@@ -33,6 +58,7 @@ function updatePccMinParameters(studyUuid, newParams) {
|
|
|
33
58
|
});
|
|
34
59
|
}
|
|
35
60
|
export {
|
|
61
|
+
enrichPccMinParameters,
|
|
36
62
|
fetchPccMinParameters,
|
|
37
63
|
getPccMinStudyParameters,
|
|
38
64
|
updatePccMinParameters
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { UUID } from 'node:crypto';
|
|
2
|
-
import { SAParametersEnriched } from '../
|
|
2
|
+
import { SAParameters, SAParametersEnriched } from '../utils';
|
|
3
3
|
export declare const getStudyUrl: (studyUuid: UUID | null) => string;
|
|
4
4
|
export declare function fetchSecurityAnalysisProviders(): Promise<any>;
|
|
5
|
+
export declare function enrichSecurityAnalysisParameters(parameters: SAParameters): Promise<SAParametersEnriched>;
|
|
5
6
|
export declare function fetchSecurityAnalysisParameters(parameterUuid: string): Promise<SAParametersEnriched>;
|
|
6
7
|
export declare function getSecurityAnalysisDefaultLimitReductions(): Promise<any>;
|
|
7
8
|
export declare function getSecurityAnalysisParameters(studyUuid: UUID): Promise<SAParametersEnriched>;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { safeEncodeURIComponent, backendFetchJson, backendFetch } from "./utils.js";
|
|
2
2
|
import { PREFIX_STUDY_QUERIES } from "./loadflow.js";
|
|
3
|
-
import
|
|
3
|
+
import "../utils/conversionUtils.js";
|
|
4
|
+
import "../utils/types/equipmentType.js";
|
|
5
|
+
import { mapSecurityAnalysisParameters } from "../utils/types/security-analysis.type.js";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
|
+
import { fetchElementNames } from "./directory.js";
|
|
9
|
+
import { NAME, ID } from "../features/parameters/common/parameter-table/constants.js";
|
|
4
10
|
const PREFIX_SECURITY_ANALYSIS_SERVER_QUERIES = `${"api/gateway"}/security-analysis`;
|
|
5
11
|
const getStudyUrl = (studyUuid) => `${PREFIX_STUDY_QUERIES}/v1/studies/${safeEncodeURIComponent(studyUuid)}`;
|
|
6
12
|
function getSecurityAnalysisUrl() {
|
|
@@ -12,6 +18,31 @@ function fetchSecurityAnalysisProviders() {
|
|
|
12
18
|
console.debug(url);
|
|
13
19
|
return backendFetchJson(url);
|
|
14
20
|
}
|
|
21
|
+
function collectElementIds(params) {
|
|
22
|
+
const allElementIds = params.contingencyListsInfos ? params.contingencyListsInfos.flatMap((cli) => cli.contingencyLists ?? []) : [];
|
|
23
|
+
return new Set(allElementIds);
|
|
24
|
+
}
|
|
25
|
+
function enrichSecurityAnalysisParameters(parameters) {
|
|
26
|
+
const allElementIds = collectElementIds(parameters);
|
|
27
|
+
const elementNamesPromise = allElementIds.size === 0 ? Promise.resolve(null) : fetchElementNames(allElementIds);
|
|
28
|
+
return elementNamesPromise.then((elementNames) => {
|
|
29
|
+
const mapIdsToIdNames = (ids) => {
|
|
30
|
+
return ids ? ids.map((id) => ({
|
|
31
|
+
[ID]: id,
|
|
32
|
+
[NAME]: elementNames?.[id] ?? void 0
|
|
33
|
+
})) : [];
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
...parameters,
|
|
37
|
+
contingencyListsInfos: parameters.contingencyListsInfos ? parameters.contingencyListsInfos.map((cli) => {
|
|
38
|
+
return {
|
|
39
|
+
...cli,
|
|
40
|
+
contingencyLists: mapIdsToIdNames(cli.contingencyLists)
|
|
41
|
+
};
|
|
42
|
+
}) : []
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
}
|
|
15
46
|
function fetchSecurityAnalysisParameters(parameterUuid) {
|
|
16
47
|
console.info("fetch security analysis parameters");
|
|
17
48
|
const url = `${getSecurityAnalysisUrl()}parameters/${encodeURIComponent(parameterUuid)}`;
|
|
@@ -59,6 +90,7 @@ function updateSecurityAnalysisParameters(parameterUuid, newParams) {
|
|
|
59
90
|
});
|
|
60
91
|
}
|
|
61
92
|
export {
|
|
93
|
+
enrichSecurityAnalysisParameters,
|
|
62
94
|
fetchSecurityAnalysisParameters,
|
|
63
95
|
fetchSecurityAnalysisProviders,
|
|
64
96
|
getSecurityAnalysisDefaultLimitReductions,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { UUID } from 'node:crypto';
|
|
2
|
-
import { FactorsCount, SensitivityAnalysisParametersInfosEnriched } from '../utils';
|
|
2
|
+
import { FactorsCount, SensitivityAnalysisParametersInfos, SensitivityAnalysisParametersInfosEnriched } from '../utils';
|
|
3
3
|
export declare const getStudyUrlWithNodeUuidAndRootNetworkUuid: (studyUuid: string | null | undefined, nodeUuid: string | undefined, rootNetworkUuid: string | undefined | null) => string;
|
|
4
4
|
export declare function getSensiUrl(): string;
|
|
5
5
|
export declare function fetchSensitivityAnalysisProviders(): Promise<string[]>;
|
|
6
|
+
export declare function enrichSensitivityAnalysisParameters(parameters: SensitivityAnalysisParametersInfos): Promise<SensitivityAnalysisParametersInfosEnriched>;
|
|
6
7
|
export declare function getSensitivityAnalysisParameters(studyUuid: UUID): Promise<SensitivityAnalysisParametersInfosEnriched>;
|
|
7
8
|
export declare function fetchSensitivityAnalysisParameters(parameterUuid: string): Promise<SensitivityAnalysisParametersInfosEnriched>;
|
|
8
9
|
export declare function setSensitivityAnalysisParameters(studyUuid: UUID | null, newParams: SensitivityAnalysisParametersInfosEnriched | null): Promise<Response>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { safeEncodeURIComponent, backendFetchJson, backendFetch } from "./utils.js";
|
|
2
2
|
import "../utils/conversionUtils.js";
|
|
3
3
|
import "../utils/types/equipmentType.js";
|
|
4
|
-
import {
|
|
4
|
+
import { mapSensitivityAnalysisParameters } from "../utils/types/sensitivity-analysis.type.js";
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
import "@mui/icons-material";
|
|
7
7
|
import { PREFIX_STUDY_QUERIES } from "./loadflow.js";
|
|
8
|
+
import { fetchElementNames } from "./directory.js";
|
|
8
9
|
const GET_PARAMETERS_PREFIX = `${"api/gateway"}/sensitivity-analysis/v1/parameters`;
|
|
9
10
|
const PREFIX_SENSITIVITY_ANALYSIS_SERVER_QUERIES = `${"api/gateway"}/sensitivity-analysis`;
|
|
10
11
|
const getStudyUrl = (studyUuid) => `${PREFIX_STUDY_QUERIES}/v1/studies/${safeEncodeURIComponent(studyUuid)}`;
|
|
@@ -20,6 +21,90 @@ function fetchSensitivityAnalysisProviders() {
|
|
|
20
21
|
console.debug(url);
|
|
21
22
|
return backendFetchJson(url);
|
|
22
23
|
}
|
|
24
|
+
function collectAllElementIds(parameters) {
|
|
25
|
+
const allElementIds = /* @__PURE__ */ new Set();
|
|
26
|
+
parameters.sensitivityInjection?.forEach((i) => {
|
|
27
|
+
i.monitoredBranches?.forEach((id) => allElementIds.add(id));
|
|
28
|
+
i.injections?.forEach((id) => allElementIds.add(id));
|
|
29
|
+
i.contingencies?.forEach((id) => allElementIds.add(id));
|
|
30
|
+
});
|
|
31
|
+
parameters.sensitivityInjectionsSet?.forEach((is) => {
|
|
32
|
+
is.monitoredBranches?.forEach((id) => allElementIds.add(id));
|
|
33
|
+
is.injections?.forEach((id) => allElementIds.add(id));
|
|
34
|
+
is.contingencies?.forEach((id) => allElementIds.add(id));
|
|
35
|
+
});
|
|
36
|
+
parameters.sensitivityHVDC?.forEach((hvdc) => {
|
|
37
|
+
hvdc.monitoredBranches?.forEach((id) => allElementIds.add(id));
|
|
38
|
+
hvdc.hvdcs?.forEach((id) => allElementIds.add(id));
|
|
39
|
+
hvdc.contingencies?.forEach((id) => allElementIds.add(id));
|
|
40
|
+
});
|
|
41
|
+
parameters.sensitivityPST?.forEach((pst) => {
|
|
42
|
+
pst.monitoredBranches?.forEach((id) => allElementIds.add(id));
|
|
43
|
+
pst.psts?.forEach((id) => allElementIds.add(id));
|
|
44
|
+
pst.contingencies?.forEach((id) => allElementIds.add(id));
|
|
45
|
+
});
|
|
46
|
+
parameters.sensitivityNodes?.forEach((n) => {
|
|
47
|
+
n.monitoredVoltageLevels?.forEach((id) => allElementIds.add(id));
|
|
48
|
+
n.equipmentsInVoltageRegulation?.forEach((id) => allElementIds.add(id));
|
|
49
|
+
n.contingencies?.forEach((id) => allElementIds.add(id));
|
|
50
|
+
});
|
|
51
|
+
return allElementIds;
|
|
52
|
+
}
|
|
53
|
+
function enrichSensitivityAnalysisParameters(parameters) {
|
|
54
|
+
const allElementIds = collectAllElementIds(parameters);
|
|
55
|
+
const elementNamesPromise = allElementIds.size === 0 ? Promise.resolve(null) : fetchElementNames(allElementIds);
|
|
56
|
+
return elementNamesPromise.then((elementNames) => {
|
|
57
|
+
const mapIdsToIdNames = (ids) => {
|
|
58
|
+
return ids ? ids.map((id) => ({
|
|
59
|
+
id,
|
|
60
|
+
name: elementNames?.[id] ?? void 0
|
|
61
|
+
})) : [];
|
|
62
|
+
};
|
|
63
|
+
return {
|
|
64
|
+
...parameters,
|
|
65
|
+
sensitivityInjectionsSet: parameters.sensitivityInjectionsSet ? parameters.sensitivityInjectionsSet.map((is) => {
|
|
66
|
+
return {
|
|
67
|
+
...is,
|
|
68
|
+
monitoredBranches: mapIdsToIdNames(is.monitoredBranches),
|
|
69
|
+
injections: mapIdsToIdNames(is.injections),
|
|
70
|
+
contingencies: mapIdsToIdNames(is.contingencies)
|
|
71
|
+
};
|
|
72
|
+
}) : [],
|
|
73
|
+
sensitivityInjection: parameters.sensitivityInjection ? parameters.sensitivityInjection.map((i) => {
|
|
74
|
+
return {
|
|
75
|
+
...i,
|
|
76
|
+
monitoredBranches: mapIdsToIdNames(i.monitoredBranches),
|
|
77
|
+
injections: mapIdsToIdNames(i.injections),
|
|
78
|
+
contingencies: mapIdsToIdNames(i.contingencies)
|
|
79
|
+
};
|
|
80
|
+
}) : [],
|
|
81
|
+
sensitivityHVDC: parameters.sensitivityHVDC ? parameters.sensitivityHVDC.map((hvdc) => {
|
|
82
|
+
return {
|
|
83
|
+
...hvdc,
|
|
84
|
+
monitoredBranches: mapIdsToIdNames(hvdc.monitoredBranches),
|
|
85
|
+
hvdcs: mapIdsToIdNames(hvdc.hvdcs),
|
|
86
|
+
contingencies: mapIdsToIdNames(hvdc.contingencies)
|
|
87
|
+
};
|
|
88
|
+
}) : [],
|
|
89
|
+
sensitivityPST: parameters.sensitivityPST ? parameters.sensitivityPST.map((pst) => {
|
|
90
|
+
return {
|
|
91
|
+
...pst,
|
|
92
|
+
monitoredBranches: mapIdsToIdNames(pst.monitoredBranches),
|
|
93
|
+
psts: mapIdsToIdNames(pst.psts),
|
|
94
|
+
contingencies: mapIdsToIdNames(pst.contingencies)
|
|
95
|
+
};
|
|
96
|
+
}) : [],
|
|
97
|
+
sensitivityNodes: parameters.sensitivityNodes ? parameters.sensitivityNodes.map((n) => {
|
|
98
|
+
return {
|
|
99
|
+
...n,
|
|
100
|
+
monitoredVoltageLevels: mapIdsToIdNames(n.monitoredVoltageLevels),
|
|
101
|
+
equipmentsInVoltageRegulation: mapIdsToIdNames(n.equipmentsInVoltageRegulation),
|
|
102
|
+
contingencies: mapIdsToIdNames(n.contingencies)
|
|
103
|
+
};
|
|
104
|
+
}) : []
|
|
105
|
+
};
|
|
106
|
+
});
|
|
107
|
+
}
|
|
23
108
|
function getSensitivityAnalysisParameters(studyUuid) {
|
|
24
109
|
console.info("get sensitivity analysis parameters");
|
|
25
110
|
const url = `${getStudyUrl(studyUuid)}/sensitivity-analysis/parameters`;
|
|
@@ -74,6 +159,7 @@ function updateSensitivityAnalysisParameters(parameterUuid, newParams) {
|
|
|
74
159
|
});
|
|
75
160
|
}
|
|
76
161
|
export {
|
|
162
|
+
enrichSensitivityAnalysisParameters,
|
|
77
163
|
fetchSensitivityAnalysisParameters,
|
|
78
164
|
fetchSensitivityAnalysisProviders,
|
|
79
165
|
getSensiUrl,
|
|
@@ -67,6 +67,7 @@ export declare const networkModificationsEn: {
|
|
|
67
67
|
'network_modifications.CREATE_VOLTAGE_LEVEL_SECTION': string;
|
|
68
68
|
'network_modifications.MOVE_VOLTAGE_LEVEL_FEEDER_BAYS': string;
|
|
69
69
|
ModificationReadError: string;
|
|
70
|
+
CompositeModification: string;
|
|
70
71
|
CreateSubstation: string;
|
|
71
72
|
DeleteEquipmentByFilter: string;
|
|
72
73
|
ModifyByAssignment: string;
|
|
@@ -261,6 +262,12 @@ export declare const networkModificationsEn: {
|
|
|
261
262
|
QminPmin: string;
|
|
262
263
|
QmaxPmin: string;
|
|
263
264
|
Pmax: string;
|
|
265
|
+
CreateGenerator: string;
|
|
266
|
+
GeneratorCreationError: string;
|
|
267
|
+
VoltageRegulationText: string;
|
|
268
|
+
GenerationDispatch: string;
|
|
269
|
+
generatorMinimumActivePowerMaxValueError: string;
|
|
270
|
+
PlannedActivePowerSetPointMustBeBetweenMinAndMaxActivePower: string;
|
|
264
271
|
NoBusbarSectionFound: string;
|
|
265
272
|
SubstationTab: string;
|
|
266
273
|
ConnectivityTab: string;
|
|
@@ -72,6 +72,7 @@ const networkModificationsEn = {
|
|
|
72
72
|
"network_modifications.CREATE_VOLTAGE_LEVEL_SECTION": "Adding busbar section to voltage level {computedLabel}",
|
|
73
73
|
"network_modifications.MOVE_VOLTAGE_LEVEL_FEEDER_BAYS": "Moving feeder bays in voltage level {computedLabel}",
|
|
74
74
|
ModificationReadError: "An error occurred while fetching the modification",
|
|
75
|
+
CompositeModification: "Composite modification",
|
|
75
76
|
CreateSubstation: "Create substation",
|
|
76
77
|
DeleteEquipmentByFilter: "Delete equipment by filter",
|
|
77
78
|
ModifyByAssignment: "Modify by filter",
|
|
@@ -266,6 +267,12 @@ const networkModificationsEn = {
|
|
|
266
267
|
QminPmin: "QminPmin",
|
|
267
268
|
QmaxPmin: "QmaxPmin",
|
|
268
269
|
Pmax: "Pmax",
|
|
270
|
+
CreateGenerator: "Create generator",
|
|
271
|
+
GeneratorCreationError: "Error while creating generator",
|
|
272
|
+
VoltageRegulationText: "Voltage regulation",
|
|
273
|
+
GenerationDispatch: "Generation dispatch",
|
|
274
|
+
generatorMinimumActivePowerMaxValueError: "Minimum active power must be inferior to maximum active power",
|
|
275
|
+
PlannedActivePowerSetPointMustBeBetweenMinAndMaxActivePower: "Planned active power set point must be between minimum and maximum active power values",
|
|
269
276
|
NoBusbarSectionFound: "No busbar section found for this voltage level",
|
|
270
277
|
// Tabs
|
|
271
278
|
SubstationTab: "Substation",
|