@gridsuite/commons-ui 0.223.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.js +1 -1
- package/dist/components/ui/directoryItemSelector/utils.js +1 -1
- package/dist/components/ui/reactHookForm/DirectoryItemsInput.js +1 -1
- 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 +8 -5
- 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/utils/constants/filterConstant.d.ts +1 -1
- package/dist/utils/index.js +4 -4
- package/dist/utils/types/dynamic-security-analysis.type.d.ts +3 -5
- package/dist/utils/types/index.d.ts +1 -0
- package/dist/utils/types/index.js +4 -4
- 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
|
@@ -5,10 +5,10 @@ import { snackWithFallback } from "../../../utils/error.js";
|
|
|
5
5
|
import { arraysContainIdenticalStrings } from "../../../utils/functions.js";
|
|
6
6
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
7
7
|
import "../../../utils/types/equipmentType.js";
|
|
8
|
-
import { fetchRootFolders, fetchDirectoryContent } from "../../../services/directory.js";
|
|
9
8
|
import { getFileIcon } from "../../../utils/mapper/getFileIcon.js";
|
|
10
9
|
import { TreeViewFinder } from "../treeViewFinder/TreeViewFinder.js";
|
|
11
10
|
import "react-intl";
|
|
11
|
+
import { fetchRootFolders, fetchDirectoryContent } from "../../../services/directory.js";
|
|
12
12
|
import { fetchElementsInfos } from "../../../services/explore.js";
|
|
13
13
|
import "@mui/material";
|
|
14
14
|
import "localized-countries";
|
|
@@ -2,10 +2,10 @@ import { LAST_SELECTED_DIRECTORY, COMMON_APP_NAME } from "../../../utils/constan
|
|
|
2
2
|
import "../../../utils/conversionUtils.js";
|
|
3
3
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
4
4
|
import "../../../utils/types/equipmentType.js";
|
|
5
|
-
import { fetchDirectoryElementPath } from "../../../services/directory.js";
|
|
6
5
|
import "react/jsx-runtime";
|
|
7
6
|
import "@mui/icons-material";
|
|
8
7
|
import { updateConfigParameter } from "../../../services/config.js";
|
|
8
|
+
import { fetchDirectoryElementPath } from "../../../services/directory.js";
|
|
9
9
|
function getLastSelectedDirectoryId() {
|
|
10
10
|
const lastSelectedDirId = localStorage.getItem(LAST_SELECTED_DIRECTORY);
|
|
11
11
|
if (!lastSelectedDirId || lastSelectedDirId === "null") {
|
|
@@ -12,9 +12,9 @@ import { MidFormError } from "./errorManagement/MidFormError.js";
|
|
|
12
12
|
import "../../../utils/conversionUtils.js";
|
|
13
13
|
import "../../../utils/types/equipmentType.js";
|
|
14
14
|
import { ArrayAction } from "../../../utils/types/types.js";
|
|
15
|
-
import { fetchDirectoryElementPath } from "../../../services/directory.js";
|
|
16
15
|
import { getEquipmentTypeShortLabel } from "../../../utils/labelUtils.js";
|
|
17
16
|
import { mergeSx } from "../../../utils/styles.js";
|
|
17
|
+
import { fetchDirectoryElementPath } from "../../../services/directory.js";
|
|
18
18
|
import "localized-countries";
|
|
19
19
|
import "localized-countries/data/fr";
|
|
20
20
|
import "localized-countries/data/en";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { FieldValues } from 'react-hook-form';
|
|
2
|
-
import { ContingencyListsInfosEnriched } from '
|
|
2
|
+
import { ContingencyListsInfosEnriched } from '../../../../utils';
|
|
3
3
|
import { DndColumn } from '../../../../components/composite/dnd-table';
|
|
4
4
|
import * as yup from 'yup';
|
|
5
5
|
export declare const COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS: DndColumn[];
|
|
6
6
|
export declare const getContingencyListsInfosFormSchema: () => yup.ObjectSchema<{
|
|
7
7
|
contingencyListsInfos: {
|
|
8
8
|
description?: string | undefined;
|
|
9
|
+
activated: NonNullable<boolean | undefined>;
|
|
9
10
|
contingencyLists: {
|
|
10
11
|
id: string;
|
|
11
12
|
name: string;
|
|
12
13
|
}[];
|
|
13
|
-
activated: NonNullable<boolean | undefined>;
|
|
14
14
|
}[] | undefined;
|
|
15
15
|
}, yup.AnyObject, {
|
|
16
16
|
contingencyListsInfos: "";
|
|
@@ -18,8 +18,8 @@ export declare const getContingencyListsInfosFormSchema: () => yup.ObjectSchema<
|
|
|
18
18
|
export declare const toFormValuesContingencyListsInfos: (contingencyListsInfos: ContingencyListsInfosEnriched[]) => {
|
|
19
19
|
contingencyListsInfos: {
|
|
20
20
|
contingencyLists: {
|
|
21
|
-
name: string;
|
|
22
21
|
id: `${string}-${string}-${string}-${string}-${string}`;
|
|
22
|
+
name: string | undefined;
|
|
23
23
|
}[];
|
|
24
24
|
description: string;
|
|
25
25
|
activated: boolean;
|
|
@@ -85,12 +85,12 @@ const toFormValuesContingencyListsInfos = (contingencyListsInfos) => {
|
|
|
85
85
|
return {
|
|
86
86
|
[CONTINGENCY_LISTS_INFOS]: contingencyListsInfos?.map(
|
|
87
87
|
(contingencyListInfos) => ({
|
|
88
|
-
[CONTINGENCY_LISTS]: contingencyListInfos
|
|
89
|
-
[
|
|
90
|
-
[
|
|
88
|
+
[CONTINGENCY_LISTS]: contingencyListInfos.contingencyLists?.map((c) => ({
|
|
89
|
+
[ID]: c[ID],
|
|
90
|
+
[NAME]: c[NAME]
|
|
91
91
|
})),
|
|
92
|
-
[DESCRIPTION]: contingencyListInfos
|
|
93
|
-
[ACTIVATED]: contingencyListInfos
|
|
92
|
+
[DESCRIPTION]: contingencyListInfos.description,
|
|
93
|
+
[ACTIVATED]: contingencyListInfos.activated
|
|
94
94
|
})
|
|
95
95
|
)
|
|
96
96
|
};
|
|
@@ -9,8 +9,8 @@ import { COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS, isValidContingencyRow } fr
|
|
|
9
9
|
import "../../../../utils/conversionUtils.js";
|
|
10
10
|
import { snackWithFallback } from "../../../../utils/error.js";
|
|
11
11
|
import "../../../../utils/types/equipmentType.js";
|
|
12
|
-
import { DEFAULT_TIMEOUT_MS, IGNORE_SIGNAL } from "../../../../services/utils.js";
|
|
13
12
|
import "@mui/icons-material";
|
|
13
|
+
import { DEFAULT_TIMEOUT_MS, IGNORE_SIGNAL } from "../../../../services/utils.js";
|
|
14
14
|
import "localized-countries";
|
|
15
15
|
import "localized-countries/data/fr";
|
|
16
16
|
import "localized-countries/data/en";
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
export interface ContingencyListsInfosEnriched {
|
|
9
|
-
[CONTINGENCY_LISTS]: IdName[];
|
|
10
|
-
[DESCRIPTION]: string;
|
|
11
|
-
[ACTIVATED]: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface ContingencyListsInfos {
|
|
14
|
-
[CONTINGENCY_LISTS]: UUID[];
|
|
15
|
-
[DESCRIPTION]: string;
|
|
16
|
-
[ACTIVATED]: boolean;
|
|
17
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
18
7
|
export interface ContingencyCount {
|
|
19
8
|
contingencies: number;
|
|
20
9
|
notFoundElements: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ILimitReductionsByVoltageLevel } from '../common';
|
|
2
|
-
import { SAParametersEnriched } from '
|
|
2
|
+
import { SAParametersEnriched } from '../../../utils';
|
|
3
3
|
/**
|
|
4
4
|
* Copyright (c) 2026, RTE (http://www.rte-france.com)
|
|
5
5
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
@@ -40,8 +40,8 @@ export declare const toFormValueSaParameters: (params: SAParametersEnriched) =>
|
|
|
40
40
|
limitReductionsForm?: undefined;
|
|
41
41
|
contingencyListsInfos: {
|
|
42
42
|
contingencyLists: {
|
|
43
|
-
name: string;
|
|
44
43
|
id: `${string}-${string}-${string}-${string}-${string}`;
|
|
44
|
+
name: string | undefined;
|
|
45
45
|
}[];
|
|
46
46
|
description: string;
|
|
47
47
|
activated: boolean;
|
|
@@ -59,8 +59,8 @@ export declare const toFormValueSaParameters: (params: SAParametersEnriched) =>
|
|
|
59
59
|
}[];
|
|
60
60
|
contingencyListsInfos: {
|
|
61
61
|
contingencyLists: {
|
|
62
|
-
name: string;
|
|
63
62
|
id: `${string}-${string}-${string}-${string}-${string}`;
|
|
63
|
+
name: string | undefined;
|
|
64
64
|
}[];
|
|
65
65
|
description: string;
|
|
66
66
|
activated: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as yup from "yup";
|
|
2
|
-
import { PARAM_SA_PROVIDER, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD
|
|
2
|
+
import { PARAM_SA_PROVIDER, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD } from "../common/constants.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "@mui/material";
|
|
5
5
|
import "react-intl";
|
|
@@ -58,15 +58,15 @@ const getSAParametersFormSchema = (name, limitReductions) => {
|
|
|
58
58
|
}).concat(getNameElementEditorSchema(name));
|
|
59
59
|
};
|
|
60
60
|
const toFormValueSaParameters = (params) => ({
|
|
61
|
-
[PARAM_SA_PROVIDER]: params
|
|
62
|
-
...toFormValuesContingencyListsInfos(params?.
|
|
61
|
+
[PARAM_SA_PROVIDER]: params.provider,
|
|
62
|
+
...toFormValuesContingencyListsInfos(params?.contingencyListsInfos ?? []),
|
|
63
63
|
...toFormValuesLimitReductions(params?.limitReductions),
|
|
64
64
|
// SA specific form values
|
|
65
|
-
[PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD]: params
|
|
66
|
-
[PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD]: params
|
|
67
|
-
[PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD]: params
|
|
68
|
-
[PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD]: params
|
|
69
|
-
[PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD]: params
|
|
65
|
+
[PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD]: params.flowProportionalThreshold * 100,
|
|
66
|
+
[PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD]: params.lowVoltageProportionalThreshold * 100,
|
|
67
|
+
[PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD]: params.lowVoltageAbsoluteThreshold,
|
|
68
|
+
[PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD]: params.highVoltageProportionalThreshold * 100,
|
|
69
|
+
[PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD]: params.highVoltageAbsoluteThreshold
|
|
70
70
|
});
|
|
71
71
|
export {
|
|
72
72
|
getSAParametersFormSchema,
|
|
@@ -6,6 +6,7 @@ import "../../../utils/conversionUtils.js";
|
|
|
6
6
|
import { snackWithFallback } from "../../../utils/error.js";
|
|
7
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
8
|
import "../../../utils/types/equipmentType.js";
|
|
9
|
+
import { mapSecurityAnalysisParameters } from "../../../utils/types/security-analysis.type.js";
|
|
9
10
|
import "@mui/icons-material";
|
|
10
11
|
import { mergeSx } from "../../../utils/styles.js";
|
|
11
12
|
import { LineSeparator } from "../common/line-separator.js";
|
|
@@ -46,7 +47,6 @@ import "@hookform/resolvers/yup";
|
|
|
46
47
|
import "../../../components/composite/filter/HeaderFilterForm.js";
|
|
47
48
|
import { useSecurityAnalysisParametersForm } from "./use-security-analysis-parameters-form.js";
|
|
48
49
|
import { SecurityAnalysisParametersForm } from "./security-analysis-parameters-form.js";
|
|
49
|
-
import { mapSecurityAnalysisParameters } from "./types.js";
|
|
50
50
|
import { toFormValueSaParameters } from "./columns-definitions.js";
|
|
51
51
|
function SecurityAnalysisParametersInline({
|
|
52
52
|
studyUuid,
|
package/dist/features/parameters/security-analysis/security-analysis-parameters-selector.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ILimitReductionsByVoltageLevel } from '../common';
|
|
2
|
-
import { SAParametersEnriched } from '
|
|
2
|
+
import { SAParametersEnriched } from '../../../utils/types';
|
|
3
3
|
export declare function SecurityAnalysisParametersSelector({ params, currentProvider, isDeveloperMode, defaultLimitReductions, }: Readonly<{
|
|
4
4
|
params: SAParametersEnriched | null;
|
|
5
5
|
currentProvider?: string;
|
package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ObjectSchema } from 'yup';
|
|
|
3
3
|
import { UUID } from 'node:crypto';
|
|
4
4
|
import { UseParametersBackendReturnProps } from '../../../utils';
|
|
5
5
|
import { ComputingType, ILimitReductionsByVoltageLevel } from '../common';
|
|
6
|
-
import { SAParametersEnriched } from '
|
|
6
|
+
import { SAParametersEnriched } from '../../../utils/types';
|
|
7
7
|
export interface UseSecurityAnalysisParametersFormReturn {
|
|
8
8
|
formMethods: UseFormReturn;
|
|
9
9
|
formSchema: ObjectSchema<any>;
|
|
@@ -5,13 +5,13 @@ import "../../../utils/conversionUtils.js";
|
|
|
5
5
|
import { snackWithFallback } from "../../../utils/error.js";
|
|
6
6
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
7
7
|
import "../../../utils/types/equipmentType.js";
|
|
8
|
+
import { mapSecurityAnalysisParameters } from "../../../utils/types/security-analysis.type.js";
|
|
8
9
|
import "react/jsx-runtime";
|
|
9
10
|
import "@mui/icons-material";
|
|
10
11
|
import { PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, CONTINGENCY_LISTS_INFOS, PARAM_SA_PROVIDER, CONTINGENCY_LISTS } from "../common/constants.js";
|
|
11
12
|
import "@mui/material";
|
|
12
13
|
import "react-intl";
|
|
13
14
|
import { updateParameter } from "../../../services/explore.js";
|
|
14
|
-
import { mapSecurityAnalysisParameters } from "./types.js";
|
|
15
15
|
import "localized-countries";
|
|
16
16
|
import "localized-countries/data/fr";
|
|
17
17
|
import "localized-countries/data/en";
|
|
@@ -22,8 +22,6 @@ export declare const PARAMETER_SENSI_INJECTION = "sensitivityInjection";
|
|
|
22
22
|
export declare const PARAMETER_SENSI_HVDC = "sensitivityHVDC";
|
|
23
23
|
export declare const PARAMETER_SENSI_PST = "sensitivityPST";
|
|
24
24
|
export declare const PARAMETER_SENSI_NODES = "sensitivityNodes";
|
|
25
|
-
export declare const CONTAINER_ID = "containerId";
|
|
26
|
-
export declare const CONTAINER_NAME = "containerName";
|
|
27
25
|
export declare const MAX_RESULTS_COUNT = 500000;
|
|
28
26
|
export declare const MAX_VARIABLES_COUNT = 5000;
|
|
29
27
|
export declare const DEFAULT_FACTOR_COUNT: {
|
|
@@ -16,15 +16,11 @@ const PARAMETER_SENSI_INJECTION = "sensitivityInjection";
|
|
|
16
16
|
const PARAMETER_SENSI_HVDC = "sensitivityHVDC";
|
|
17
17
|
const PARAMETER_SENSI_PST = "sensitivityPST";
|
|
18
18
|
const PARAMETER_SENSI_NODES = "sensitivityNodes";
|
|
19
|
-
const CONTAINER_ID = "containerId";
|
|
20
|
-
const CONTAINER_NAME = "containerName";
|
|
21
19
|
const MAX_RESULTS_COUNT = 5e5;
|
|
22
20
|
const MAX_VARIABLES_COUNT = 5e3;
|
|
23
21
|
const DEFAULT_FACTOR_COUNT = { resultCount: null, variableCount: null };
|
|
24
22
|
export {
|
|
25
23
|
ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD,
|
|
26
|
-
CONTAINER_ID,
|
|
27
|
-
CONTAINER_NAME,
|
|
28
24
|
DEFAULT_FACTOR_COUNT,
|
|
29
25
|
DISTRIBUTION_TYPE,
|
|
30
26
|
EQUIPMENTS_IN_VOLTAGE_REGULATION,
|
|
@@ -7,12 +7,12 @@ import { snackWithFallback } from "../../../utils/error.js";
|
|
|
7
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
8
|
import "../../../utils/types/equipmentType.js";
|
|
9
9
|
import { mapSensitivityAnalysisParameters } from "../../../utils/types/sensitivity-analysis.type.js";
|
|
10
|
-
import { DEFAULT_TIMEOUT_MS, IGNORE_SIGNAL } from "../../../services/utils.js";
|
|
11
10
|
import "react/jsx-runtime";
|
|
12
11
|
import "@mui/icons-material";
|
|
13
12
|
import { getFormSchema, getSensiNodesformatNewParams, getSensiPstformatNewParams, getSensiHvdcformatNewParams, getSensiInjectionsformatNewParams, getSensiInjectionsSetformatNewParams, filterSensiParameterRows } from "./utils.js";
|
|
14
|
-
import { DEFAULT_FACTOR_COUNT, PARAMETER_SENSI_NODES, PARAMETER_SENSI_PST, PARAMETER_SENSI_HVDC, PARAMETER_SENSI_INJECTION, PARAMETER_SENSI_INJECTIONS_SET, FLOW_VOLTAGE_SENSITIVITY_VALUE_THRESHOLD, ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD, FLOW_FLOW_SENSITIVITY_VALUE_THRESHOLD,
|
|
13
|
+
import { DEFAULT_FACTOR_COUNT, PARAMETER_SENSI_NODES, PARAMETER_SENSI_PST, PARAMETER_SENSI_HVDC, PARAMETER_SENSI_INJECTION, PARAMETER_SENSI_INJECTIONS_SET, FLOW_VOLTAGE_SENSITIVITY_VALUE_THRESHOLD, ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD, FLOW_FLOW_SENSITIVITY_VALUE_THRESHOLD, EQUIPMENTS_IN_VOLTAGE_REGULATION, SUPERVISED_VOLTAGE_LEVELS, SENSITIVITY_TYPE, PSTS, MONITORED_BRANCHES, HVDC_LINES, INJECTIONS, DISTRIBUTION_TYPE, MAX_RESULTS_COUNT, MAX_VARIABLES_COUNT } from "./constants.js";
|
|
15
14
|
import { getSensitivityAnalysisFactorsCount, setSensitivityAnalysisParameters } from "../../../services/sensitivity-analysis.js";
|
|
15
|
+
import { DEFAULT_TIMEOUT_MS, IGNORE_SIGNAL } from "../../../services/utils.js";
|
|
16
16
|
import { updateParameter } from "../../../services/explore.js";
|
|
17
17
|
import "react-intl";
|
|
18
18
|
import "@mui/material";
|
|
@@ -195,21 +195,22 @@ const useSensitivityAnalysisParametersForm = ({
|
|
|
195
195
|
return {
|
|
196
196
|
[MONITORED_BRANCHES]: sensiInjectionsSet[MONITORED_BRANCHES]?.map((sensiInjection) => {
|
|
197
197
|
return {
|
|
198
|
-
[FieldConstants.ID]: sensiInjection
|
|
199
|
-
[FieldConstants.NAME]: sensiInjection
|
|
198
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
199
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
200
|
+
// schema name is required but dto fetched may not exist
|
|
200
201
|
};
|
|
201
202
|
}) ?? [],
|
|
202
203
|
[INJECTIONS]: sensiInjectionsSet[INJECTIONS]?.map((sensiInjection) => {
|
|
203
204
|
return {
|
|
204
|
-
[FieldConstants.ID]: sensiInjection
|
|
205
|
-
[FieldConstants.NAME]: sensiInjection
|
|
205
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
206
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
206
207
|
};
|
|
207
208
|
}) ?? [],
|
|
208
209
|
[DISTRIBUTION_TYPE]: sensiInjectionsSet[DISTRIBUTION_TYPE],
|
|
209
210
|
[CONTINGENCIES]: sensiInjectionsSet[CONTINGENCIES]?.map((sensiInjection) => {
|
|
210
211
|
return {
|
|
211
|
-
[FieldConstants.ID]: sensiInjection
|
|
212
|
-
[FieldConstants.NAME]: sensiInjection
|
|
212
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
213
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
213
214
|
};
|
|
214
215
|
}) ?? [],
|
|
215
216
|
[ACTIVATED]: sensiInjectionsSet[ACTIVATED] ?? false
|
|
@@ -219,20 +220,20 @@ const useSensitivityAnalysisParametersForm = ({
|
|
|
219
220
|
return {
|
|
220
221
|
[MONITORED_BRANCHES]: sensiInjections[MONITORED_BRANCHES]?.map((sensiInjection) => {
|
|
221
222
|
return {
|
|
222
|
-
[FieldConstants.ID]: sensiInjection
|
|
223
|
-
[FieldConstants.NAME]: sensiInjection
|
|
223
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
224
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
224
225
|
};
|
|
225
226
|
}) ?? [],
|
|
226
227
|
[INJECTIONS]: sensiInjections[INJECTIONS]?.map((sensiInjection) => {
|
|
227
228
|
return {
|
|
228
|
-
[FieldConstants.ID]: sensiInjection
|
|
229
|
-
[FieldConstants.NAME]: sensiInjection
|
|
229
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
230
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
230
231
|
};
|
|
231
232
|
}) ?? [],
|
|
232
233
|
[CONTINGENCIES]: sensiInjections[CONTINGENCIES]?.map((sensiInjection) => {
|
|
233
234
|
return {
|
|
234
|
-
[FieldConstants.ID]: sensiInjection
|
|
235
|
-
[FieldConstants.NAME]: sensiInjection
|
|
235
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
236
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
236
237
|
};
|
|
237
238
|
}) ?? [],
|
|
238
239
|
[ACTIVATED]: sensiInjections[ACTIVATED] ?? false
|
|
@@ -242,21 +243,21 @@ const useSensitivityAnalysisParametersForm = ({
|
|
|
242
243
|
return {
|
|
243
244
|
[MONITORED_BRANCHES]: sensiInjectionsSet[MONITORED_BRANCHES]?.map((sensiInjection) => {
|
|
244
245
|
return {
|
|
245
|
-
[FieldConstants.ID]: sensiInjection
|
|
246
|
-
[FieldConstants.NAME]: sensiInjection
|
|
246
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
247
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
247
248
|
};
|
|
248
249
|
}) ?? [],
|
|
249
250
|
[HVDC_LINES]: sensiInjectionsSet[HVDC_LINES]?.map((sensiInjection) => {
|
|
250
251
|
return {
|
|
251
|
-
[FieldConstants.ID]: sensiInjection
|
|
252
|
-
[FieldConstants.NAME]: sensiInjection
|
|
252
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
253
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
253
254
|
};
|
|
254
255
|
}) ?? [],
|
|
255
256
|
[SENSITIVITY_TYPE]: sensiInjectionsSet[SENSITIVITY_TYPE],
|
|
256
257
|
[CONTINGENCIES]: sensiInjectionsSet[CONTINGENCIES]?.map((sensiInjection) => {
|
|
257
258
|
return {
|
|
258
|
-
[FieldConstants.ID]: sensiInjection
|
|
259
|
-
[FieldConstants.NAME]: sensiInjection
|
|
259
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
260
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
260
261
|
};
|
|
261
262
|
}) ?? [],
|
|
262
263
|
[ACTIVATED]: sensiInjectionsSet[ACTIVATED] ?? false
|
|
@@ -266,21 +267,21 @@ const useSensitivityAnalysisParametersForm = ({
|
|
|
266
267
|
return {
|
|
267
268
|
[MONITORED_BRANCHES]: sensiInjectionsSet[MONITORED_BRANCHES]?.map((sensiInjection) => {
|
|
268
269
|
return {
|
|
269
|
-
[FieldConstants.ID]: sensiInjection
|
|
270
|
-
[FieldConstants.NAME]: sensiInjection
|
|
270
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
271
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
271
272
|
};
|
|
272
273
|
}) ?? [],
|
|
273
274
|
[PSTS]: sensiInjectionsSet[PSTS]?.map((sensiInjection) => {
|
|
274
275
|
return {
|
|
275
|
-
[FieldConstants.ID]: sensiInjection
|
|
276
|
-
[FieldConstants.NAME]: sensiInjection
|
|
276
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
277
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
277
278
|
};
|
|
278
279
|
}) ?? [],
|
|
279
280
|
[SENSITIVITY_TYPE]: sensiInjectionsSet[SENSITIVITY_TYPE],
|
|
280
281
|
[CONTINGENCIES]: sensiInjectionsSet[CONTINGENCIES]?.map((sensiInjection) => {
|
|
281
282
|
return {
|
|
282
|
-
[FieldConstants.ID]: sensiInjection
|
|
283
|
-
[FieldConstants.NAME]: sensiInjection
|
|
283
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
284
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
284
285
|
};
|
|
285
286
|
}) ?? [],
|
|
286
287
|
[ACTIVATED]: sensiInjectionsSet[ACTIVATED] ?? false
|
|
@@ -290,20 +291,20 @@ const useSensitivityAnalysisParametersForm = ({
|
|
|
290
291
|
return {
|
|
291
292
|
[SUPERVISED_VOLTAGE_LEVELS]: sensiInjectionsSet[SUPERVISED_VOLTAGE_LEVELS]?.map((sensiInjection) => {
|
|
292
293
|
return {
|
|
293
|
-
[FieldConstants.ID]: sensiInjection
|
|
294
|
-
[FieldConstants.NAME]: sensiInjection
|
|
294
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
295
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
295
296
|
};
|
|
296
297
|
}) ?? [],
|
|
297
298
|
[EQUIPMENTS_IN_VOLTAGE_REGULATION]: sensiInjectionsSet[EQUIPMENTS_IN_VOLTAGE_REGULATION]?.map((sensiInjection) => {
|
|
298
299
|
return {
|
|
299
|
-
[FieldConstants.ID]: sensiInjection
|
|
300
|
-
[FieldConstants.NAME]: sensiInjection
|
|
300
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
301
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
301
302
|
};
|
|
302
303
|
}) ?? [],
|
|
303
304
|
[CONTINGENCIES]: sensiInjectionsSet[CONTINGENCIES]?.map((sensiInjection) => {
|
|
304
305
|
return {
|
|
305
|
-
[FieldConstants.ID]: sensiInjection
|
|
306
|
-
[FieldConstants.NAME]: sensiInjection
|
|
306
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
307
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
307
308
|
};
|
|
308
309
|
}) ?? [],
|
|
309
310
|
[ACTIVATED]: sensiInjectionsSet[ACTIVATED] ?? false
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
1
2
|
import { FieldValues } from 'react-hook-form';
|
|
2
|
-
import { HVDC_LINES, INJECTIONS, MONITORED_BRANCHES, PSTS } from './constants';
|
|
3
3
|
import { DistributionType, SensitivityType } from '../../../utils';
|
|
4
|
-
import { CONTINGENCIES } from '../common';
|
|
5
|
-
import { NAME } from '../../../components/ui';
|
|
6
|
-
import { ID } from '../../../utils/constants/filterConstant';
|
|
7
4
|
import * as yup from 'yup';
|
|
8
5
|
export declare const getSensiHVDCsFormSchema: () => {
|
|
9
6
|
sensitivityHVDC: yup.ArraySchema<{
|
|
@@ -26,17 +23,17 @@ export declare const getSensiHVDCsFormSchema: () => {
|
|
|
26
23
|
export declare const getSensiHvdcformatNewParams: (newParams: SensitivityAnalysisParametersFormSchema) => {
|
|
27
24
|
sensitivityHVDC: {
|
|
28
25
|
monitoredBranches: {
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
id: UUID;
|
|
27
|
+
name: string;
|
|
31
28
|
}[];
|
|
32
29
|
hvdcs: {
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
id: UUID;
|
|
31
|
+
name: string;
|
|
35
32
|
}[];
|
|
36
33
|
sensitivityType: SensitivityType | undefined;
|
|
37
34
|
contingencies: {
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
id: UUID;
|
|
36
|
+
name: string;
|
|
40
37
|
}[] | undefined;
|
|
41
38
|
activated: NonNullable<boolean | undefined>;
|
|
42
39
|
}[] | undefined;
|
|
@@ -61,16 +58,16 @@ export declare const getSensiInjectionsFormSchema: () => {
|
|
|
61
58
|
export declare const getSensiInjectionsformatNewParams: (newParams: SensitivityAnalysisParametersFormSchema) => {
|
|
62
59
|
sensitivityInjection: {
|
|
63
60
|
monitoredBranches: {
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
id: UUID;
|
|
62
|
+
name: string;
|
|
66
63
|
}[];
|
|
67
64
|
injections: {
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
id: UUID;
|
|
66
|
+
name: string;
|
|
70
67
|
}[];
|
|
71
68
|
contingencies: {
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
id: UUID;
|
|
70
|
+
name: string;
|
|
74
71
|
}[] | undefined;
|
|
75
72
|
activated: NonNullable<boolean | undefined>;
|
|
76
73
|
}[] | undefined;
|
|
@@ -93,49 +90,20 @@ export declare const getSensiInjectionsSetFormSchema: () => {
|
|
|
93
90
|
}[];
|
|
94
91
|
}[] | undefined, yup.AnyObject, "", "">;
|
|
95
92
|
};
|
|
96
|
-
export interface IRowNewParams {
|
|
97
|
-
[MONITORED_BRANCHES]: Array<{
|
|
98
|
-
[ID]: string;
|
|
99
|
-
[NAME]: string;
|
|
100
|
-
}>;
|
|
101
|
-
[INJECTIONS]: Array<{
|
|
102
|
-
[ID]: string;
|
|
103
|
-
[NAME]: string;
|
|
104
|
-
}>;
|
|
105
|
-
[HVDC_LINES]: Array<{
|
|
106
|
-
[ID]: string;
|
|
107
|
-
[NAME]: string;
|
|
108
|
-
}>;
|
|
109
|
-
[PSTS]: Array<{
|
|
110
|
-
[ID]: string;
|
|
111
|
-
[NAME]: string;
|
|
112
|
-
}>;
|
|
113
|
-
[CONTINGENCIES]: Array<{
|
|
114
|
-
[ID]: string;
|
|
115
|
-
[NAME]: string;
|
|
116
|
-
}>;
|
|
117
|
-
}
|
|
118
|
-
export declare const getGenericRowNewParams: (newRowParams: IRowNewParams) => {
|
|
119
|
-
monitoredBranches: string[];
|
|
120
|
-
injections: string[];
|
|
121
|
-
hvdcs: string[];
|
|
122
|
-
psts: string[];
|
|
123
|
-
contingencies: string[];
|
|
124
|
-
};
|
|
125
93
|
export declare const getSensiInjectionsSetformatNewParams: (newParams: SensitivityAnalysisParametersFormSchema) => {
|
|
126
94
|
sensitivityInjectionsSet: {
|
|
127
95
|
monitoredBranches: {
|
|
128
|
-
|
|
129
|
-
|
|
96
|
+
id: UUID;
|
|
97
|
+
name: string;
|
|
130
98
|
}[];
|
|
131
99
|
injections: {
|
|
132
|
-
|
|
133
|
-
|
|
100
|
+
id: UUID;
|
|
101
|
+
name: string;
|
|
134
102
|
}[];
|
|
135
103
|
distributionType: DistributionType | undefined;
|
|
136
104
|
contingencies: {
|
|
137
|
-
|
|
138
|
-
|
|
105
|
+
id: UUID;
|
|
106
|
+
name: string;
|
|
139
107
|
}[] | undefined;
|
|
140
108
|
activated: NonNullable<boolean | undefined>;
|
|
141
109
|
}[] | undefined;
|
|
@@ -160,16 +128,16 @@ export declare const getSensiNodesFormSchema: () => {
|
|
|
160
128
|
export declare const getSensiNodesformatNewParams: (newParams: SensitivityAnalysisParametersFormSchema) => {
|
|
161
129
|
sensitivityNodes: {
|
|
162
130
|
monitoredVoltageLevels: {
|
|
163
|
-
|
|
164
|
-
|
|
131
|
+
id: UUID;
|
|
132
|
+
name: string;
|
|
165
133
|
}[] | undefined;
|
|
166
134
|
equipmentsInVoltageRegulation: {
|
|
167
|
-
|
|
168
|
-
|
|
135
|
+
id: UUID;
|
|
136
|
+
name: string;
|
|
169
137
|
}[] | undefined;
|
|
170
138
|
contingencies: {
|
|
171
|
-
|
|
172
|
-
|
|
139
|
+
id: UUID;
|
|
140
|
+
name: string;
|
|
173
141
|
}[] | undefined;
|
|
174
142
|
activated: NonNullable<boolean | undefined>;
|
|
175
143
|
}[] | undefined;
|
|
@@ -195,17 +163,17 @@ export declare const getSensiPSTsFormSchema: () => {
|
|
|
195
163
|
export declare const getSensiPstformatNewParams: (newParams: SensitivityAnalysisParametersFormSchema) => {
|
|
196
164
|
sensitivityPST: {
|
|
197
165
|
monitoredBranches: {
|
|
198
|
-
|
|
199
|
-
|
|
166
|
+
id: UUID;
|
|
167
|
+
name: string;
|
|
200
168
|
}[];
|
|
201
169
|
psts: {
|
|
202
|
-
|
|
203
|
-
|
|
170
|
+
id: UUID;
|
|
171
|
+
name: string;
|
|
204
172
|
}[];
|
|
205
173
|
sensitivityType: SensitivityType | undefined;
|
|
206
174
|
contingencies: {
|
|
207
|
-
|
|
208
|
-
|
|
175
|
+
id: UUID;
|
|
176
|
+
name: string;
|
|
209
177
|
}[] | undefined;
|
|
210
178
|
activated: NonNullable<boolean | undefined>;
|
|
211
179
|
}[] | undefined;
|