diff --git a/src/components/dialogs/filter/expert/expert-filter-constants.ts b/src/components/dialogs/filter/expert/expert-filter-constants.ts index 5764ac995..cc9362ced 100644 --- a/src/components/dialogs/filter/expert/expert-filter-constants.ts +++ b/src/components/dialogs/filter/expert/expert-filter-constants.ts @@ -22,6 +22,10 @@ export const EXPERT_FILTER_EQUIPMENTS = { id: 'LOAD', label: 'Loads', }, + SHUNT_COMPENSATOR: { + id: 'SHUNT_COMPENSATOR', + label: 'ShuntCompensators', + }, }; export const ENERGY_SOURCE_OPTIONS = [ @@ -33,6 +37,11 @@ export const ENERGY_SOURCE_OPTIONS = [ { name: 'OTHER', label: 'Other' }, ]; +export const SHUNT_COMPENSATOR_TYPE_OPTIONS = [ + { name: 'CAPACITOR', label: 'Capacitor' }, + { name: 'REACTOR', label: 'Reactor' }, +]; + // customName is used to export to the server export const OPERATOR_OPTIONS = { EQUALS: { name: '=', customName: OperatorType.EQUALS, label: 'equality' }, @@ -203,6 +212,50 @@ export const FIELDS_OPTIONS = { label: 'vlId', dataType: DataType.STRING, }, + MAXIMUM_SECTION_COUNT: { + name: FieldType.MAXIMUM_SECTION_COUNT, + label: 'maximumSectionCount', + dataType: DataType.NUMBER, + inputType: 'number', + }, + SECTION_COUNT: { + name: FieldType.SECTION_COUNT, + label: 'sectionCount', + dataType: DataType.NUMBER, + inputType: 'number', + }, + SHUNT_COMPENSATOR_TYPE: { + name: FieldType.SHUNT_COMPENSATOR_TYPE, + label: 'shuntCompensatorType', + dataType: DataType.ENUM, + values: SHUNT_COMPENSATOR_TYPE_OPTIONS, + valueEditorType: 'select', + defaultValue: 'CAPACITOR', + }, + MAX_Q_AT_NOMINAL_V: { + name: FieldType.MAX_Q_AT_NOMINAL_V, + label: 'maxQAtNominalV', + dataType: DataType.NUMBER, + inputType: 'number', + }, + SWITCHED_ON_Q_AT_NOMINAL_V: { + name: FieldType.SWITCHED_ON_Q_AT_NOMINAL_V, + label: 'SwitchedOnMaxQAtNominalV', + dataType: DataType.NUMBER, + inputType: 'number', + }, + MAX_SUSCEPTANCE: { + name: FieldType.MAX_SUSCEPTANCE, + label: 'maxSusceptance', + dataType: DataType.NUMBER, + inputType: 'number', + }, + SWITCHED_ON_MAX_SUSCEPTANCE: { + name: FieldType.SWITCHED_ON_MAX_SUSCEPTANCE, + label: 'SwitchedOnMaxSusceptance', + dataType: DataType.NUMBER, + inputType: 'number', + }, }; export const fields: Record = { @@ -227,4 +280,19 @@ export const fields: Record = { FIELDS_OPTIONS.VOLTAGE_LEVEL_ID, ], LOAD: [FIELDS_OPTIONS.ID], + SHUNT_COMPENSATOR: [ + FIELDS_OPTIONS.ID, + FIELDS_OPTIONS.NAME, + FIELDS_OPTIONS.VOLTAGE_LEVEL_ID, + FIELDS_OPTIONS.NOMINAL_VOLTAGE, + FIELDS_OPTIONS.COUNTRY, + FIELDS_OPTIONS.MAXIMUM_SECTION_COUNT, + FIELDS_OPTIONS.SECTION_COUNT, + FIELDS_OPTIONS.SHUNT_COMPENSATOR_TYPE, + FIELDS_OPTIONS.MAX_Q_AT_NOMINAL_V, + FIELDS_OPTIONS.SWITCHED_ON_Q_AT_NOMINAL_V, + FIELDS_OPTIONS.MAX_SUSCEPTANCE, + FIELDS_OPTIONS.SWITCHED_ON_MAX_SUSCEPTANCE, + FIELDS_OPTIONS.CONNECTED, + ], }; diff --git a/src/components/dialogs/filter/expert/expert-filter-form.tsx b/src/components/dialogs/filter/expert/expert-filter-form.tsx index c4162d454..0a2d00000 100644 --- a/src/components/dialogs/filter/expert/expert-filter-form.tsx +++ b/src/components/dialogs/filter/expert/expert-filter-form.tsx @@ -22,7 +22,11 @@ import InputWithPopupConfirmation from '../../../utils/rhf-inputs/select-inputs/ import { SelectInput } from '@gridsuite/commons-ui'; import { useFormContext, useWatch } from 'react-hook-form'; import { testQuery } from './expert-filter-utils'; -import { Generator, Load } from '../../../../utils/equipment-types'; +import { + Generator, + Load, + ShuntCompensator, +} from '../../../../utils/equipment-types'; import { COMBINATOR_OPTIONS, EXPERT_FILTER_EQUIPMENTS, @@ -76,7 +80,11 @@ export const expertFilterSchema = { }; function isSupportedEquipmentType(equipmentType: string): boolean { - return equipmentType === Generator.type || equipmentType === Load.type; + return ( + equipmentType === Generator.type || + equipmentType === Load.type || + equipmentType === ShuntCompensator.type + ); } const defaultQuery = { diff --git a/src/components/dialogs/filter/expert/expert-filter.type.ts b/src/components/dialogs/filter/expert/expert-filter.type.ts index c86f4397f..35df5b440 100644 --- a/src/components/dialogs/filter/expert/expert-filter.type.ts +++ b/src/components/dialogs/filter/expert/expert-filter.type.ts @@ -39,12 +39,19 @@ export enum FieldType { COUNTRY = 'COUNTRY', VOLTAGE_REGULATOR_ON = 'VOLTAGE_REGULATOR_ON', PLANNED_ACTIVE_POWER_SET_POINT = 'PLANNED_ACTIVE_POWER_SET_POINT', - CONNECTED = 'CONNECTED', RATED_S = 'RATED_S', MARGINAL_COST = 'MARGINAL_COST', PLANNED_OUTAGE_RATE = 'PLANNED_OUTAGE_RATE', FORCED_OUTAGE_RATE = 'FORCED_OUTAGE_RATE', VOLTAGE_LEVEL_ID = 'VOLTAGE_LEVEL_ID', + 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', + SWITCHED_ON_Q_AT_NOMINAL_V = 'SWITCHED_ON_Q_AT_NOMINAL_V', + MAX_SUSCEPTANCE = 'MAX_SUSCEPTANCE', + SWITCHED_ON_MAX_SUSCEPTANCE = 'SWITCHED_ON_MAX_SUSCEPTANCE', } export enum DataType { diff --git a/src/components/utils/rqb-inputs/value-editor.tsx b/src/components/utils/rqb-inputs/value-editor.tsx index b216c6ac5..2ef6adb9c 100644 --- a/src/components/utils/rqb-inputs/value-editor.tsx +++ b/src/components/utils/rqb-inputs/value-editor.tsx @@ -24,7 +24,10 @@ const ValueEditor = (props: ValueEditorProps) => { if (props.field === FieldType.COUNTRY) { return ; } - if (props.field === FieldType.ENERGY_SOURCE) { + if ( + props.field === FieldType.ENERGY_SOURCE || + props.field === FieldType.SHUNT_COMPENSATOR_TYPE + ) { return ; } if (props.field === FieldType.ID || props.field === FieldType.NAME) { diff --git a/src/translations/en.json b/src/translations/en.json index 8c7e1e0a0..f727ff3c6 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -258,6 +258,15 @@ "voltageRegulatorOn": "Voltage regulation", "PlannedActivePowerSetPoint": "Planning active power set point", "connected": "Connected", + "maximumSectionCount": "Maximum number of sections", + "sectionCount": "Current number of sections", + "shuntCompensatorType": "Type", + "Capacitor": "Capacitor", + "Reactor": "Reactor", + "maxQAtNominalV": "Qmax available at nominal voltage", + "SwitchedOnMaxQAtNominalV": "Switch-on Q at nominal voltage", + "maxSusceptance": "Maximal susceptance available", + "SwitchedOnMaxSusceptance": "Switch-on susceptance", "ratedS": "Rated nominal power", "marginalCost": "Cost", "plannedOutageRate": "Planning outage rate", diff --git a/src/translations/fr.json b/src/translations/fr.json index e11e0d922..bd6e79be7 100644 --- a/src/translations/fr.json +++ b/src/translations/fr.json @@ -273,6 +273,15 @@ "voltageRegulatorOn": "Réglage de tension", "PlannedActivePowerSetPoint": "Puissance imposée", "connected": "Connecté", + "maximumSectionCount": "Nombre de gradins", + "sectionCount": "Gradin courant", + "shuntCompensatorType": "Type", + "Capacitor": "Condensateur", + "Reactor": "Réactance", + "maxQAtNominalV": "Q installée à tension nominale", + "SwitchedOnMaxQAtNominalV": "Q enclenchée à tension nominale", + "maxSusceptance": "Susceptance installée", + "SwitchedOnMaxSusceptance": "Susceptance enclenchée", "ratedS": "Puissance nominale", "marginalCost": "Coût", "plannedOutageRate": "Indisponibilité programmée",