diff --git a/src/components/filter/expert/ExpertFilterForm.tsx b/src/components/filter/expert/ExpertFilterForm.tsx index 8ce33e04..9d3d0d2e 100644 --- a/src/components/filter/expert/ExpertFilterForm.tsx +++ b/src/components/filter/expert/ExpertFilterForm.tsx @@ -24,13 +24,13 @@ import { RULES, } from './expertFilterConstants'; -import { FieldType } from './expertFilter.type'; import { FieldConstants } from '../../../utils/constants/fieldConstants'; import { InputWithPopupConfirmation } from '../../inputs/reactHookForm/selectInputs/InputWithPopupConfirmation'; import { SelectInput } from '../../inputs/reactHookForm/selectInputs/SelectInput'; import { FilterType } from '../constants/FilterConstants'; import { CustomReactQueryBuilder } from '../../inputs/reactQueryBuilder/CustomReactQueryBuilder'; import { unscrollableDialogStyles } from '../../dialogs'; +import { FieldType } from '../../../utils'; yup.setLocale({ mixed: { diff --git a/src/components/filter/expert/expertFilter.type.ts b/src/components/filter/expert/expertFilter.type.ts index 0d54b98c..9a102032 100644 --- a/src/components/filter/expert/expertFilter.type.ts +++ b/src/components/filter/expert/expertFilter.type.ts @@ -6,6 +6,7 @@ */ import { FullField } from 'react-querybuilder'; import { UUID } from 'crypto'; +import { FieldType } from '../../../utils'; export enum OperatorType { EQUALS = 'EQUALS', @@ -31,143 +32,6 @@ export enum CombinatorType { OR = 'OR', } -export enum FieldType { - ID = 'ID', - NAME = 'NAME', - NOMINAL_VOLTAGE = 'NOMINAL_VOLTAGE', - MIN_P = 'MIN_P', - MAX_P = 'MAX_P', - TARGET_V = 'TARGET_V', - TARGET_P = 'TARGET_P', - TARGET_Q = 'TARGET_Q', - ENERGY_SOURCE = 'ENERGY_SOURCE', - COUNTRY = 'COUNTRY', - VOLTAGE_REGULATOR_ON = 'VOLTAGE_REGULATOR_ON', - PLANNED_ACTIVE_POWER_SET_POINT = 'PLANNED_ACTIVE_POWER_SET_POINT', - RATED_S = 'RATED_S', - RATED_S1 = 'RATED_S1', - RATED_S2 = 'RATED_S2', - RATED_S3 = 'RATED_S3', - MARGINAL_COST = 'MARGINAL_COST', - PLANNED_OUTAGE_RATE = 'PLANNED_OUTAGE_RATE', - FORCED_OUTAGE_RATE = 'FORCED_OUTAGE_RATE', - VOLTAGE_LEVEL_ID = 'VOLTAGE_LEVEL_ID', - P0 = 'P0', - Q0 = 'Q0', - LOW_VOLTAGE_LIMIT = 'LOW_VOLTAGE_LIMIT', - HIGH_VOLTAGE_LIMIT = 'HIGH_VOLTAGE_LIMIT', - SECTION_COUNT = 'SECTION_COUNT', - MAXIMUM_SECTION_COUNT = 'MAXIMUM_SECTION_COUNT', - SHUNT_COMPENSATOR_TYPE = 'SHUNT_COMPENSATOR_TYPE', - CONNECTED = 'CONNECTED', - MAX_Q_AT_NOMINAL_V = 'MAX_Q_AT_NOMINAL_V', - MIN_Q_AT_NOMINAL_V = 'MIN_Q_AT_NOMINAL_V', - FIX_Q_AT_NOMINAL_V = 'FIX_Q_AT_NOMINAL_V', - SWITCHED_ON_Q_AT_NOMINAL_V = 'SWITCHED_ON_Q_AT_NOMINAL_V', - MAX_SUSCEPTANCE = 'MAX_SUSCEPTANCE', - MIN_SUSCEPTANCE = 'MIN_SUSCEPTANCE', - SWITCHED_ON_SUSCEPTANCE = 'SWITCHED_ON_SUSCEPTANCE', - CONNECTED_1 = 'CONNECTED_1', - CONNECTED_2 = 'CONNECTED_2', - CONNECTED_3 = 'CONNECTED_3', - VOLTAGE_LEVEL_ID_1 = 'VOLTAGE_LEVEL_ID_1', - VOLTAGE_LEVEL_ID_2 = 'VOLTAGE_LEVEL_ID_2', - VOLTAGE_LEVEL_ID_3 = 'VOLTAGE_LEVEL_ID_3', - NOMINAL_VOLTAGE_1 = 'NOMINAL_VOLTAGE_1', - NOMINAL_VOLTAGE_2 = 'NOMINAL_VOLTAGE_2', - NOMINAL_VOLTAGE_3 = 'NOMINAL_VOLTAGE_3', - COUNTRY_1 = 'COUNTRY_1', - COUNTRY_2 = 'COUNTRY_2', - SERIE_RESISTANCE = 'SERIE_RESISTANCE', - SERIE_RESISTANCE_1 = 'SERIE_RESISTANCE_1', - SERIE_RESISTANCE_2 = 'SERIE_RESISTANCE_2', - SERIE_RESISTANCE_3 = 'SERIE_RESISTANCE_3', - SERIE_REACTANCE = 'SERIE_REACTANCE', - SERIE_REACTANCE_1 = 'SERIE_REACTANCE_1', - SERIE_REACTANCE_2 = 'SERIE_REACTANCE_2', - SERIE_REACTANCE_3 = 'SERIE_REACTANCE_3', - SHUNT_CONDUCTANCE = 'SHUNT_CONDUCTANCE', - SHUNT_CONDUCTANCE_1 = 'SHUNT_CONDUCTANCE_1', - SHUNT_CONDUCTANCE_2 = 'SHUNT_CONDUCTANCE_2', - SHUNT_SUSCEPTANCE = 'SHUNT_SUSCEPTANCE', - SHUNT_SUSCEPTANCE_1 = 'SHUNT_SUSCEPTANCE_1', - SHUNT_SUSCEPTANCE_2 = 'SHUNT_SUSCEPTANCE_2', - MAGNETIZING_CONDUCTANCE = 'MAGNETIZING_CONDUCTANCE', - MAGNETIZING_CONDUCTANCE_1 = 'MAGNETIZING_CONDUCTANCE_1', - MAGNETIZING_CONDUCTANCE_2 = 'MAGNETIZING_CONDUCTANCE_2', - MAGNETIZING_CONDUCTANCE_3 = 'MAGNETIZING_CONDUCTANCE_3', - MAGNETIZING_SUSCEPTANCE = 'MAGNETIZING_SUSCEPTANCE', - MAGNETIZING_SUSCEPTANCE_1 = 'MAGNETIZING_SUSCEPTANCE_1', - MAGNETIZING_SUSCEPTANCE_2 = 'MAGNETIZING_SUSCEPTANCE_2', - MAGNETIZING_SUSCEPTANCE_3 = 'MAGNETIZING_SUSCEPTANCE_3', - LOAD_TYPE = 'LOAD_TYPE', - RATED_VOLTAGE_0 = 'RATED_VOLTAGE_0', - RATED_VOLTAGE_1 = 'RATED_VOLTAGE_1', - RATED_VOLTAGE_2 = 'RATED_VOLTAGE_2', - RATED_VOLTAGE_3 = 'RATED_VOLTAGE_3', - HAS_RATIO_TAP_CHANGER = 'HAS_RATIO_TAP_CHANGER', - HAS_RATIO_TAP_CHANGER_1 = 'HAS_RATIO_TAP_CHANGER_1', - HAS_RATIO_TAP_CHANGER_2 = 'HAS_RATIO_TAP_CHANGER_2', - HAS_RATIO_TAP_CHANGER_3 = 'HAS_RATIO_TAP_CHANGER_3', - LOAD_TAP_CHANGING_CAPABILITIES = 'LOAD_TAP_CHANGING_CAPABILITIES', - LOAD_TAP_CHANGING_CAPABILITIES_1 = 'LOAD_TAP_CHANGING_CAPABILITIES_1', - LOAD_TAP_CHANGING_CAPABILITIES_2 = 'LOAD_TAP_CHANGING_CAPABILITIES_2', - LOAD_TAP_CHANGING_CAPABILITIES_3 = 'LOAD_TAP_CHANGING_CAPABILITIES_3', - RATIO_REGULATION_MODE = 'RATIO_REGULATION_MODE', - RATIO_REGULATION_MODE_1 = 'RATIO_REGULATION_MODE_1', - RATIO_REGULATION_MODE_2 = 'RATIO_REGULATION_MODE_2', - RATIO_REGULATION_MODE_3 = 'RATIO_REGULATION_MODE_3', - RATIO_TARGET_V = 'RATIO_TARGET_V', - RATIO_TARGET_V1 = 'RATIO_TARGET_V1', - RATIO_TARGET_V2 = 'RATIO_TARGET_V2', - RATIO_TARGET_V3 = 'RATIO_TARGET_V3', - HAS_PHASE_TAP_CHANGER = 'HAS_PHASE_TAP_CHANGER', - HAS_PHASE_TAP_CHANGER_1 = 'HAS_PHASE_TAP_CHANGER_1', - HAS_PHASE_TAP_CHANGER_2 = 'HAS_PHASE_TAP_CHANGER_2', - HAS_PHASE_TAP_CHANGER_3 = 'HAS_PHASE_TAP_CHANGER_3', - PHASE_REGULATION_MODE = 'PHASE_REGULATION_MODE', - PHASE_REGULATION_MODE_1 = 'PHASE_REGULATION_MODE_1', - PHASE_REGULATION_MODE_2 = 'PHASE_REGULATION_MODE_2', - PHASE_REGULATION_MODE_3 = 'PHASE_REGULATION_MODE_3', - PHASE_REGULATION_VALUE = 'PHASE_REGULATION_VALUE', - PHASE_REGULATION_VALUE_1 = 'PHASE_REGULATION_VALUE_1', - PHASE_REGULATION_VALUE_2 = 'PHASE_REGULATION_VALUE_2', - PHASE_REGULATION_VALUE_3 = 'PHASE_REGULATION_VALUE_3', - PROPERTY = 'FREE_PROPERTIES', - SUBSTATION_PROPERTY = 'SUBSTATION_PROPERTIES', - SUBSTATION_PROPERTY_1 = 'SUBSTATION_PROPERTIES_1', - SUBSTATION_PROPERTY_2 = 'SUBSTATION_PROPERTIES_2', - VOLTAGE_LEVEL_PROPERTY = 'VOLTAGE_LEVEL_PROPERTIES', - VOLTAGE_LEVEL_PROPERTY_1 = 'VOLTAGE_LEVEL_PROPERTIES_1', - VOLTAGE_LEVEL_PROPERTY_2 = 'VOLTAGE_LEVEL_PROPERTIES_2', - VOLTAGE_LEVEL_PROPERTY_3 = 'VOLTAGE_LEVEL_PROPERTIES_3', - SVAR_REGULATION_MODE = 'SVAR_REGULATION_MODE', - VOLTAGE_SET_POINT = 'VOLTAGE_SET_POINT', - ACTIVE_POWER_SET_POINT = 'ACTIVE_POWER_SET_POINT', - REACTIVE_POWER_SET_POINT = 'REACTIVE_POWER_SET_POINT', - REMOTE_REGULATED_TERMINAL = 'REMOTE_REGULATED_TERMINAL', // composite rule of REGULATING_TERMINAL_VL_ID and/or REGULATING_TERMINAL_CONNECTABLE_ID - REGULATING_TERMINAL_VL_ID = 'REGULATING_TERMINAL_VL_ID', - REGULATING_TERMINAL_CONNECTABLE_ID = 'REGULATING_TERMINAL_CONNECTABLE_ID', - REGULATION_TYPE = 'REGULATION_TYPE', - AUTOMATE = 'AUTOMATE', - LOW_VOLTAGE_SET_POINT = 'LOW_VOLTAGE_SET_POINT', - HIGH_VOLTAGE_SET_POINT = 'HIGH_VOLTAGE_SET_POINT', - LOW_VOLTAGE_THRESHOLD = 'LOW_VOLTAGE_THRESHOLD', - HIGH_VOLTAGE_THRESHOLD = 'HIGH_VOLTAGE_THRESHOLD', - SUSCEPTANCE_FIX = 'SUSCEPTANCE_FIX', - PAIRED = 'PAIRED', - CONVERTERS_MODE = 'CONVERTERS_MODE', - CONVERTER_STATION_ID_1 = 'CONVERTER_STATION_ID_1', - CONVERTER_STATION_ID_2 = 'CONVERTER_STATION_ID_2', - CONVERTER_STATION_NOMINAL_VOLTAGE_1 = 'CONVERTER_STATION_NOMINAL_VOLTAGE_1', - CONVERTER_STATION_NOMINAL_VOLTAGE_2 = 'CONVERTER_STATION_NOMINAL_VOLTAGE_2', - DC_NOMINAL_VOLTAGE = 'DC_NOMINAL_VOLTAGE', - PAIRING_KEY = 'PAIRING_KEY', - TIE_LINE_ID = 'TIE_LINE_ID', - LOW_SHORT_CIRCUIT_CURRENT_LIMIT = 'LOW_SHORT_CIRCUIT_CURRENT_LIMIT', - HIGH_SHORT_CIRCUIT_CURRENT_LIMIT = 'HIGH_SHORT_CIRCUIT_CURRENT_LIMIT', -} - export enum DataType { STRING = 'STRING', ENUM = 'ENUM', diff --git a/src/components/filter/expert/expertFilterConstants.ts b/src/components/filter/expert/expertFilterConstants.ts index bbc815de..840f8e4d 100644 --- a/src/components/filter/expert/expertFilterConstants.ts +++ b/src/components/filter/expert/expertFilterConstants.ts @@ -6,7 +6,8 @@ */ import { Field } from 'react-querybuilder'; -import { CombinatorType, DataType, FieldType, OperatorType } from './expertFilter.type'; +import { CombinatorType, DataType, OperatorType } from './expertFilter.type'; +import { FieldType } from '../../../utils'; export enum RULES { EMPTY_RULE = 'emptyRule', diff --git a/src/components/filter/expert/expertFilterUtils.ts b/src/components/filter/expert/expertFilterUtils.ts index 64d8f1d5..63b5824d 100644 --- a/src/components/filter/expert/expertFilterUtils.ts +++ b/src/components/filter/expert/expertFilterUtils.ts @@ -24,29 +24,14 @@ import { CompositeField, CompositeGroup, DataType, - FieldType, OperatorOption, OperatorType, RuleGroupTypeExport, RuleTypeExport, } from './expertFilter.type'; import { FIELDS_OPTIONS, OPERATOR_OPTIONS, RULES } from './expertFilterConstants'; -import { - isBlankOrEmpty, - kiloUnitToUnit, - microUnitToUnit, - unitToKiloUnit, - unitToMicroUnit, -} from '../../../utils/conversionUtils'; - -const microUnits = [ - FieldType.SHUNT_CONDUCTANCE_1, - FieldType.SHUNT_CONDUCTANCE_2, - FieldType.SHUNT_SUSCEPTANCE_1, - FieldType.SHUNT_SUSCEPTANCE_2, -]; - -const kiloUnits = [FieldType.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT, FieldType.LOW_SHORT_CIRCUIT_CURRENT_LIMIT]; +import { convertInputValues, convertOutputValues, isBlankOrEmpty } from '../../../utils/conversionUtils'; +import { FieldType } from '../../../utils'; interface TreeNode { [key: string]: any; @@ -215,22 +200,6 @@ export const getOperators = (fieldName: string, intl: IntlShape) => { } }; -function changeValueUnit(value: any, field: FieldType) { - if (microUnits.includes(field)) { - if (!Array.isArray(value)) { - return microUnitToUnit(value); - } - return value.map((a: number) => microUnitToUnit(a)); - } - if (kiloUnits.includes(field)) { - if (!Array.isArray(value)) { - return kiloUnitToUnit(value); - } - return value.map((a: number) => kiloUnitToUnit(a)); - } - return value; -} - export function exportExpertRules(query: RuleGroupType): RuleGroupTypeExport { function transformRule(rule: RuleType): RuleTypeExport | RuleGroupTypeExport { const isValueAnArray = Array.isArray(rule.value); @@ -256,11 +225,11 @@ export function exportExpertRules(query: RuleGroupType): RuleGroupTypeExport { rule.operator !== OPERATOR_OPTIONS.EXISTS.name && rule.operator !== OPERATOR_OPTIONS.NOT_EXISTS.name && dataType !== DataType.PROPERTY - ? changeValueUnit(rule.value, rule.field as FieldType) + ? convertOutputValues(rule.field as FieldType, rule.value) : undefined, values: isValueAnArray && dataType !== DataType.PROPERTY - ? changeValueUnit(rule.value, rule.field as FieldType) + ? convertOutputValues(rule.field as FieldType, rule.value) : undefined, dataType, propertyName: dataType === DataType.PROPERTY ? rule.value.propertyName : undefined, @@ -325,22 +294,12 @@ export function importExpertRules(query: RuleGroupTypeExport): RuleGroupType { if (rule.dataType === DataType.NUMBER) { return rule.values .map((value) => parseFloat(value as string)) - .map((numberValue) => { - return microUnits.includes(rule.field) ? unitToMicroUnit(numberValue)! : numberValue; - }) - .map((numberValue) => { - return kiloUnits.includes(rule.field) ? unitToKiloUnit(numberValue)! : numberValue; - }) + .map((numberValue) => convertInputValues(rule.field, numberValue)) .sort((a, b) => a - b); } return rule.values.sort(); } - if (microUnits.includes(rule.field)) { - return unitToMicroUnit(parseFloat(rule.value as string)); - } - if (kiloUnits.includes(rule.field)) { - return unitToKiloUnit(parseFloat(rule.value as string)); - } + convertInputValues(rule.field, parseFloat(rule.value as string)); return rule.value; } diff --git a/src/components/inputs/reactQueryBuilder/ValueEditor.tsx b/src/components/inputs/reactQueryBuilder/ValueEditor.tsx index 3484bf1b..3245674f 100644 --- a/src/components/inputs/reactQueryBuilder/ValueEditor.tsx +++ b/src/components/inputs/reactQueryBuilder/ValueEditor.tsx @@ -14,7 +14,7 @@ import { CountryValueEditor } from './CountryValueEditor'; import { TranslatedValueEditor } from './TranslatedValueEditor'; import { TextValueEditor } from './TextValueEditor'; -import { DataType, FieldType } from '../../filter/expert/expertFilter.type'; +import { DataType } from '../../filter/expert/expertFilter.type'; import { FieldConstants } from '../../../utils/constants/fieldConstants'; import { Substation, VoltageLevel } from '../../../utils/types/equipmentTypes'; import { ElementValueEditor } from './ElementValueEditor'; @@ -23,6 +23,7 @@ import { PropertyValueEditor } from './PropertyValueEditor'; import { FilterType } from '../../filter/constants/FilterConstants'; import { GroupValueEditor } from './compositeRuleEditor/GroupValueEditor'; import { OPERATOR_OPTIONS } from '../../filter/expert/expertFilterConstants'; +import { FieldType } from '../../../utils'; const styles = { noArrows: { diff --git a/src/utils/constants/index.ts b/src/utils/constants/index.ts index 49d6858a..358427b1 100644 --- a/src/utils/constants/index.ts +++ b/src/utils/constants/index.ts @@ -7,3 +7,4 @@ export * from './browserConstants'; export * from './fetchStatus'; export * from './fieldConstants'; +export * from '../types/fieldType'; diff --git a/src/utils/conversionUtils.ts b/src/utils/conversionUtils.ts index e01c9099..5ebcf3b6 100644 --- a/src/utils/conversionUtils.ts +++ b/src/utils/conversionUtils.ts @@ -4,6 +4,7 @@ * 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 { FieldType } from './constants'; export const GRIDSUITE_DEFAULT_PRECISION: number = 13; @@ -21,10 +22,79 @@ export function isBlankOrEmpty(value: unknown) { return false; } -export const unitToMicroUnit = (num: number) => (isBlankOrEmpty(num) ? undefined : roundToDefaultPrecision(num * 1e6)); +export function unitToMicroUnit(num: number) { + return isBlankOrEmpty(num) ? undefined : roundToDefaultPrecision(num * 1e6); +} -export const microUnitToUnit = (num: number) => (isBlankOrEmpty(num) ? undefined : roundToDefaultPrecision(num / 1e6)); +export function microUnitToUnit(num: number) { + return isBlankOrEmpty(num) ? undefined : roundToDefaultPrecision(num / 1e6); +} -export const unitToKiloUnit = (num: number) => (isBlankOrEmpty(num) ? undefined : roundToDefaultPrecision(num / 1e3)); +export function unitToKiloUnit(num: number) { + return isBlankOrEmpty(num) ? undefined : roundToDefaultPrecision(num / 1e3); +} + +export function kiloUnitToUnit(num: number) { + return isBlankOrEmpty(num) ? undefined : roundToDefaultPrecision(num * 1e3); +} -export const kiloUnitToUnit = (num: number) => (isBlankOrEmpty(num) ? undefined : roundToDefaultPrecision(num * 1e3)); +const microToUnit = [ + FieldType.SHUNT_CONDUCTANCE_1, + FieldType.SHUNT_CONDUCTANCE_2, + FieldType.SHUNT_SUSCEPTANCE_1, + FieldType.SHUNT_SUSCEPTANCE_2, + FieldType.G, + FieldType.B, + FieldType.G1, + FieldType.B1, + FieldType.G2, + FieldType.B2, +]; + +const kiloToUnit = [FieldType.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT, FieldType.LOW_SHORT_CIRCUIT_CURRENT_LIMIT]; + +const unitToMicro = [FieldType.MAX_SUSCEPTANCE]; + +export function convertInputValues(field: FieldType, value: any) { + if (microToUnit.includes(field)) { + if (!Array.isArray(value)) { + return value ? unitToMicroUnit(value) : value; + } + return value.map((a: number) => unitToMicroUnit(a)); + } + if (kiloToUnit.includes(field)) { + if (!Array.isArray(value)) { + return value ? unitToKiloUnit(value) : value; + } + return value.map((a: number) => unitToKiloUnit(a)); + } + if (unitToMicro.includes(field)) { + if (!Array.isArray(value)) { + return value ? microUnitToUnit(value) : value; + } + return value.map((a: number) => microUnitToUnit(a)); + } + return value; +} + +export function convertOutputValues(field: FieldType, value: any) { + if (microToUnit.includes(field)) { + if (!Array.isArray(value)) { + return value ? microUnitToUnit(value) : value; + } + return value.map((a: number) => microUnitToUnit(a)); + } + if (kiloToUnit.includes(field)) { + if (!Array.isArray(value)) { + return value ? kiloUnitToUnit(value) : value; + } + return value.map((a: number) => kiloUnitToUnit(a)); + } + if (unitToMicro.includes(field)) { + if (!Array.isArray(value)) { + return value ? unitToMicroUnit(value) : value; + } + return value.map((a: number) => unitToMicroUnit(a)); + } + return value; +} diff --git a/src/utils/types/fieldType.ts b/src/utils/types/fieldType.ts new file mode 100644 index 00000000..62d26c05 --- /dev/null +++ b/src/utils/types/fieldType.ts @@ -0,0 +1,170 @@ +/** + * 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 enum FieldType { + ID = 'ID', + NAME = 'NAME', + PROPERTY = 'PROPERTY', + NOMINAL_VOLTAGE = 'NOMINAL_VOLTAGE', + MIN_P = 'MIN_P', + MAX_P = 'MAX_P', + TARGET_V = 'TARGET_V', + TARGET_P = 'TARGET_P', + TARGET_Q = 'TARGET_Q', + ENERGY_SOURCE = 'ENERGY_SOURCE', + COUNTRY = 'COUNTRY', + VOLTAGE_REGULATOR_ON = 'VOLTAGE_REGULATOR_ON', + PLANNED_ACTIVE_POWER_SET_POINT = 'PLANNED_ACTIVE_POWER_SET_POINT', + RATED_S = 'RATED_S', + RATED_S1 = 'RATED_S1', + RATED_S2 = 'RATED_S2', + RATED_S3 = 'RATED_S3', + MARGINAL_COST = 'MARGINAL_COST', + PLANNED_OUTAGE_RATE = 'PLANNED_OUTAGE_RATE', + FORCED_OUTAGE_RATE = 'FORCED_OUTAGE_RATE', + VOLTAGE_LEVEL_ID = 'VOLTAGE_LEVEL_ID', + P0 = 'P0', + Q0 = 'Q0', + LOW_VOLTAGE_LIMIT = 'LOW_VOLTAGE_LIMIT', + HIGH_VOLTAGE_LIMIT = 'HIGH_VOLTAGE_LIMIT', + SECTION_COUNT = 'SECTION_COUNT', + MAXIMUM_SECTION_COUNT = 'MAXIMUM_SECTION_COUNT', + SHUNT_COMPENSATOR_TYPE = 'SHUNT_COMPENSATOR_TYPE', + CONNECTED = 'CONNECTED', + MAX_Q_AT_NOMINAL_V = 'MAX_Q_AT_NOMINAL_V', + MIN_Q_AT_NOMINAL_V = 'MIN_Q_AT_NOMINAL_V', + FIX_Q_AT_NOMINAL_V = 'FIX_Q_AT_NOMINAL_V', + SWITCHED_ON_Q_AT_NOMINAL_V = 'SWITCHED_ON_Q_AT_NOMINAL_V', + MAX_SUSCEPTANCE = 'MAX_SUSCEPTANCE', + MIN_SUSCEPTANCE = 'MIN_SUSCEPTANCE', + SWITCHED_ON_SUSCEPTANCE = 'SWITCHED_ON_SUSCEPTANCE', + CONNECTED_1 = 'CONNECTED_1', + CONNECTED_2 = 'CONNECTED_2', + CONNECTED_3 = 'CONNECTED_3', + VOLTAGE_LEVEL_ID_1 = 'VOLTAGE_LEVEL_ID_1', + VOLTAGE_LEVEL_ID_2 = 'VOLTAGE_LEVEL_ID_2', + VOLTAGE_LEVEL_ID_3 = 'VOLTAGE_LEVEL_ID_3', + NOMINAL_VOLTAGE_1 = 'NOMINAL_VOLTAGE_1', + NOMINAL_VOLTAGE_2 = 'NOMINAL_VOLTAGE_2', + NOMINAL_VOLTAGE_3 = 'NOMINAL_VOLTAGE_3', + COUNTRY_1 = 'COUNTRY_1', + COUNTRY_2 = 'COUNTRY_2', + SERIE_RESISTANCE = 'SERIE_RESISTANCE', + SERIE_RESISTANCE_1 = 'SERIE_RESISTANCE_1', + SERIE_RESISTANCE_2 = 'SERIE_RESISTANCE_2', + SERIE_RESISTANCE_3 = 'SERIE_RESISTANCE_3', + SERIE_REACTANCE = 'SERIE_REACTANCE', + SERIE_REACTANCE_1 = 'SERIE_REACTANCE_1', + SERIE_REACTANCE_2 = 'SERIE_REACTANCE_2', + SERIE_REACTANCE_3 = 'SERIE_REACTANCE_3', + SHUNT_CONDUCTANCE = 'SHUNT_CONDUCTANCE', + SHUNT_CONDUCTANCE_1 = 'SHUNT_CONDUCTANCE_1', + SHUNT_CONDUCTANCE_2 = 'SHUNT_CONDUCTANCE_2', + SHUNT_SUSCEPTANCE = 'SHUNT_SUSCEPTANCE', + SHUNT_SUSCEPTANCE_1 = 'SHUNT_SUSCEPTANCE_1', + SHUNT_SUSCEPTANCE_2 = 'SHUNT_SUSCEPTANCE_2', + MAGNETIZING_CONDUCTANCE = 'MAGNETIZING_CONDUCTANCE', + MAGNETIZING_CONDUCTANCE_1 = 'MAGNETIZING_CONDUCTANCE_1', + MAGNETIZING_CONDUCTANCE_2 = 'MAGNETIZING_CONDUCTANCE_2', + MAGNETIZING_CONDUCTANCE_3 = 'MAGNETIZING_CONDUCTANCE_3', + MAGNETIZING_SUSCEPTANCE = 'MAGNETIZING_SUSCEPTANCE', + MAGNETIZING_SUSCEPTANCE_1 = 'MAGNETIZING_SUSCEPTANCE_1', + MAGNETIZING_SUSCEPTANCE_2 = 'MAGNETIZING_SUSCEPTANCE_2', + MAGNETIZING_SUSCEPTANCE_3 = 'MAGNETIZING_SUSCEPTANCE_3', + LOAD_TYPE = 'LOAD_TYPE', + RATED_VOLTAGE_0 = 'RATED_VOLTAGE_0', + RATED_VOLTAGE_1 = 'RATED_VOLTAGE_1', + RATED_VOLTAGE_2 = 'RATED_VOLTAGE_2', + RATED_VOLTAGE_3 = 'RATED_VOLTAGE_3', + HAS_RATIO_TAP_CHANGER = 'HAS_RATIO_TAP_CHANGER', + HAS_RATIO_TAP_CHANGER_1 = 'HAS_RATIO_TAP_CHANGER_1', + HAS_RATIO_TAP_CHANGER_2 = 'HAS_RATIO_TAP_CHANGER_2', + HAS_RATIO_TAP_CHANGER_3 = 'HAS_RATIO_TAP_CHANGER_3', + LOAD_TAP_CHANGING_CAPABILITIES = 'LOAD_TAP_CHANGING_CAPABILITIES', + LOAD_TAP_CHANGING_CAPABILITIES_1 = 'LOAD_TAP_CHANGING_CAPABILITIES_1', + LOAD_TAP_CHANGING_CAPABILITIES_2 = 'LOAD_TAP_CHANGING_CAPABILITIES_2', + LOAD_TAP_CHANGING_CAPABILITIES_3 = 'LOAD_TAP_CHANGING_CAPABILITIES_3', + RATIO_REGULATION_MODE = 'RATIO_REGULATION_MODE', + RATIO_REGULATION_MODE_1 = 'RATIO_REGULATION_MODE_1', + RATIO_REGULATION_MODE_2 = 'RATIO_REGULATION_MODE_2', + RATIO_REGULATION_MODE_3 = 'RATIO_REGULATION_MODE_3', + RATIO_TARGET_V = 'RATIO_TARGET_V', + RATIO_TARGET_V1 = 'RATIO_TARGET_V1', + RATIO_TARGET_V2 = 'RATIO_TARGET_V2', + RATIO_TARGET_V3 = 'RATIO_TARGET_V3', + HAS_PHASE_TAP_CHANGER = 'HAS_PHASE_TAP_CHANGER', + HAS_PHASE_TAP_CHANGER_1 = 'HAS_PHASE_TAP_CHANGER_1', + HAS_PHASE_TAP_CHANGER_2 = 'HAS_PHASE_TAP_CHANGER_2', + HAS_PHASE_TAP_CHANGER_3 = 'HAS_PHASE_TAP_CHANGER_3', + PHASE_REGULATION_MODE = 'PHASE_REGULATION_MODE', + PHASE_REGULATION_MODE_1 = 'PHASE_REGULATION_MODE_1', + PHASE_REGULATION_MODE_2 = 'PHASE_REGULATION_MODE_2', + PHASE_REGULATION_MODE_3 = 'PHASE_REGULATION_MODE_3', + PHASE_REGULATION_VALUE = 'PHASE_REGULATION_VALUE', + PHASE_REGULATION_VALUE_1 = 'PHASE_REGULATION_VALUE_1', + PHASE_REGULATION_VALUE_2 = 'PHASE_REGULATION_VALUE_2', + PHASE_REGULATION_VALUE_3 = 'PHASE_REGULATION_VALUE_3', + FREE_PROPERTIES = 'FREE_PROPERTIES', + SUBSTATION_PROPERTY = 'SUBSTATION_PROPERTY', + SUBSTATION_PROPERTY_1 = 'SUBSTATION_PROPERTY_1', + SUBSTATION_PROPERTY_2 = 'SUBSTATION_PROPERTY_2', + VOLTAGE_LEVEL_PROPERTY = 'VOLTAGE_LEVEL_PROPERTY', + VOLTAGE_LEVEL_PROPERTY_1 = 'VOLTAGE_LEVEL_PROPERTY_1', + VOLTAGE_LEVEL_PROPERTY_2 = 'VOLTAGE_LEVEL_PROPERTY_2', + VOLTAGE_LEVEL_PROPERTY_3 = 'VOLTAGE_LEVEL_PROPERTY_3', + SVAR_REGULATION_MODE = 'SVAR_REGULATION_MODE', + VOLTAGE_SET_POINT = 'VOLTAGE_SET_POINT', + ACTIVE_POWER_SET_POINT = 'ACTIVE_POWER_SET_POINT', + REACTIVE_POWER_SET_POINT = 'REACTIVE_POWER_SET_POINT', + REMOTE_REGULATED_TERMINAL = 'REMOTE_REGULATED_TERMINAL', + REGULATING_TERMINAL_VL_ID = 'REGULATING_TERMINAL_VL_ID', + REGULATING_TERMINAL_CONNECTABLE_ID = 'REGULATING_TERMINAL_CONNECTABLE_ID', + REGULATION_TYPE = 'REGULATION_TYPE', + AUTOMATE = 'AUTOMATE', + LOW_VOLTAGE_SET_POINT = 'LOW_VOLTAGE_SET_POINT', + HIGH_VOLTAGE_SET_POINT = 'HIGH_VOLTAGE_SET_POINT', + LOW_VOLTAGE_THRESHOLD = 'LOW_VOLTAGE_THRESHOLD', + HIGH_VOLTAGE_THRESHOLD = 'HIGH_VOLTAGE_THRESHOLD', + SUSCEPTANCE_FIX = 'SUSCEPTANCE_FIX', + PAIRED = 'PAIRED', + CONVERTERS_MODE = 'CONVERTERS_MODE', + CONVERTER_STATION_ID_1 = 'CONVERTER_STATION_ID_1', + CONVERTER_STATION_ID_2 = 'CONVERTER_STATION_ID_2', + CONVERTER_STATION_NOMINAL_VOLTAGE_1 = 'CONVERTER_STATION_NOMINAL_VOLTAGE_1', + CONVERTER_STATION_NOMINAL_VOLTAGE_2 = 'CONVERTER_STATION_NOMINAL_VOLTAGE_2', + DC_NOMINAL_VOLTAGE = 'DC_NOMINAL_VOLTAGE', + PAIRING_KEY = 'PAIRING_KEY', + TIE_LINE_ID = 'TIE_LINE_ID', + LOW_SHORT_CIRCUIT_CURRENT_LIMIT = 'LOW_SHORT_CIRCUIT_CURRENT_LIMIT', + HIGH_SHORT_CIRCUIT_CURRENT_LIMIT = 'HIGH_SHORT_CIRCUIT_CURRENT_LIMIT', + R = 'R', + X = 'X', + G = 'G', + G1 = 'G1', + G2 = 'G2', + B = 'B', + B1 = 'B1', + B2 = 'B2', + RATED_NOMINAL_POWER = 'RATED_NOMINAL_POWER', + MINIMUM_ACTIVE_POWER = 'MINIMUM_ACTIVE_POWER', + MAXIMUM_ACTIVE_POWER = 'MAXIMUM_ACTIVE_POWER', + DROOP = 'DROOP', + TRANSIENT_REACTANCE = 'TRANSIENT_REACTANCE', + STEP_UP_TRANSFORMER_REACTANCE = 'STEP_UP_TRANSFORMER_REACTANCE', + Q_PERCENT = 'Q_PERCENT', + ACTIVE_POWER = 'ACTIVE_POWER', + REACTIVE_POWER = 'REACTIVE_POWER', + RATED_U1 = 'RATED_U1', + RATED_U2 = 'RATED_U2', + RATIO_LOW_TAP_POSITION = 'RATIO_LOW_TAP_POSITION', + RATIO_TAP_POSITION = 'RATIO_TAP_POSITION', + RATIO_TARGET_DEADBAND = 'RATIO_TARGET_DEADBAND', + REGULATION_VALUE = 'REGULATION_VALUE', + PHASE_LOW_TAP_POSITION = 'PHASE_LOW_TAP_POSITION', + PHASE_TAP_POSITION = 'PHASE_TAP_POSITION', + PHASE_TARGET_DEADBAND = 'PHASE_TARGET_DEADBAND', +}