diff --git a/pycgmes/resources/ACDCConverter.py b/pycgmes/resources/ACDCConverter.py index 39f8e93c..fb770935 100644 --- a/pycgmes/resources/ACDCConverter.py +++ b/pycgmes/resources/ACDCConverter.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ConductingEquipment import ConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class ACDCConverter(ConductingEquipment): """ A unit with valves for three phases, together with unit control equipment, essential protective and switching @@ -65,146 +64,186 @@ class ACDCConverter(ConductingEquipment): baseS: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) idleLoss: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) maxUdc: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) minUdc: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) numberOfValves: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ratedUdc: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) resistiveLoss: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) switchingLoss: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) valveU0: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) maxP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) minP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) PccTerminal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # DCTerminals : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # DCTerminals : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) idc: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) poleLossP: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) uc: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) udc: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) p: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) q: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) targetPpcc: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) targetUdc: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ACDCConverterDCTerminal.py b/pycgmes/resources/ACDCConverterDCTerminal.py index e4184af8..cd6d983f 100644 --- a/pycgmes/resources/ACDCConverterDCTerminal.py +++ b/pycgmes/resources/ACDCConverterDCTerminal.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DCBaseTerminal import DCBaseTerminal -@dataclass(config=DataclassConfig) +@dataclass class ACDCConverterDCTerminal(DCBaseTerminal): """ A DC electrical connection point at the AC/DC converter. The AC/DC converter is electrically connected also to the @@ -35,16 +34,20 @@ class ACDCConverterDCTerminal(DCBaseTerminal): DCConductingEquipment: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) polarity: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ACDCTerminal.py b/pycgmes/resources/ACDCTerminal.py index b8c2aaa9..4011baa4 100644 --- a/pycgmes/resources/ACDCTerminal.py +++ b/pycgmes/resources/ACDCTerminal.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class ACDCTerminal(IdentifiedObject): """ An electrical connection point (AC or DC) to a piece of conducting equipment. Terminals are connected at physical @@ -43,32 +42,38 @@ class ACDCTerminal(IdentifiedObject): sequenceNumber: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # OperationalLimitSet : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # OperationalLimitSet : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 BusNameMarker: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) connected: bool = Field( default=False, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Measurements : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # Measurements : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/ACLineSegment.py b/pycgmes/resources/ACLineSegment.py index 5eff7584..8cabdbed 100644 --- a/pycgmes/resources/ACLineSegment.py +++ b/pycgmes/resources/ACLineSegment.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Conductor import Conductor -@dataclass(config=DataclassConfig) +@dataclass class ACLineSegment(Conductor): """ A wire or combination of wires, with consistent electrical characteristics, building a single electrical system, @@ -44,73 +43,91 @@ class ACLineSegment(Conductor): bch: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) gch: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) x: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Clamp : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # Clamp : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Cut : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # Cut : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) b0ch: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) g0ch: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) r0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) shortCircuitEndTemperature: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) x0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Accumulator.py b/pycgmes/resources/Accumulator.py index a685f042..26550c79 100644 --- a/pycgmes/resources/Accumulator.py +++ b/pycgmes/resources/Accumulator.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Measurement import Measurement -@dataclass(config=DataclassConfig) +@dataclass class Accumulator(Measurement): """ Accumulator represents an accumulated (counted) Measurement, e.g. an energy value. @@ -25,12 +24,12 @@ class Accumulator(Measurement): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # AccumulatorValues : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # AccumulatorValues : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # LimitSets : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # LimitSets : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/AccumulatorLimit.py b/pycgmes/resources/AccumulatorLimit.py index a4dfa1ba..45ff9166 100644 --- a/pycgmes/resources/AccumulatorLimit.py +++ b/pycgmes/resources/AccumulatorLimit.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Limit import Limit -@dataclass(config=DataclassConfig) +@dataclass class AccumulatorLimit(Limit): """ Limit values for Accumulator measurements. @@ -28,16 +27,20 @@ class AccumulatorLimit(Limit): value: int = Field( default=0, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) LimitSet: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/AccumulatorLimitSet.py b/pycgmes/resources/AccumulatorLimitSet.py index cb47d892..d2eeb447 100644 --- a/pycgmes/resources/AccumulatorLimitSet.py +++ b/pycgmes/resources/AccumulatorLimitSet.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .LimitSet import LimitSet -@dataclass(config=DataclassConfig) +@dataclass class AccumulatorLimitSet(LimitSet): """ An AccumulatorLimitSet specifies a set of Limits that are associated with an Accumulator measurement. @@ -27,14 +26,16 @@ class AccumulatorLimitSet(LimitSet): Measurements: list = Field( default_factory=list, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # Limits : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:1..n in CIM + # Limits : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/AccumulatorReset.py b/pycgmes/resources/AccumulatorReset.py index d6feb91a..967a6b5c 100644 --- a/pycgmes/resources/AccumulatorReset.py +++ b/pycgmes/resources/AccumulatorReset.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Control import Control -@dataclass(config=DataclassConfig) +@dataclass class AccumulatorReset(Control): """ This command resets the counter value to zero. @@ -27,9 +26,11 @@ class AccumulatorReset(Control): AccumulatorValue: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/AccumulatorValue.py b/pycgmes/resources/AccumulatorValue.py index f8602b97..ec682714 100644 --- a/pycgmes/resources/AccumulatorValue.py +++ b/pycgmes/resources/AccumulatorValue.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .MeasurementValue import MeasurementValue -@dataclass(config=DataclassConfig) +@dataclass class AccumulatorValue(MeasurementValue): """ AccumulatorValue represents an accumulated (counted) MeasurementValue. @@ -28,14 +27,16 @@ class AccumulatorValue(MeasurementValue): Accumulator: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # AccumulatorReset : Optional[str] = Field(default=None, in_profiles = [Profile.OP, ]) + # Type M:0..1 in CIM + # AccumulatorReset : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.OP, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/ActivePower.py b/pycgmes/resources/ActivePower.py index d9a44714..22d5ac45 100644 --- a/pycgmes/resources/ActivePower.py +++ b/pycgmes/resources/ActivePower.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class ActivePower(Base): """ Product of RMS value of the voltage and the RMS value of the in-phase component of the current. @@ -29,35 +28,41 @@ class ActivePower(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.SV, - Profile.SSH, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.SV, + Profile.SSH, + Profile.DY, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.SV, - Profile.SSH, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.SV, + Profile.SSH, + Profile.DY, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.SV, - Profile.SSH, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.SV, + Profile.SSH, + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ActivePowerLimit.py b/pycgmes/resources/ActivePowerLimit.py index 871baf9d..06702ff5 100644 --- a/pycgmes/resources/ActivePowerLimit.py +++ b/pycgmes/resources/ActivePowerLimit.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .OperationalLimit import OperationalLimit -@dataclass(config=DataclassConfig) +@dataclass class ActivePowerLimit(OperationalLimit): """ Limit on active power flow. @@ -27,16 +26,20 @@ class ActivePowerLimit(OperationalLimit): normalValue: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) value: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ActivePowerPerCurrentFlow.py b/pycgmes/resources/ActivePowerPerCurrentFlow.py index a542308d..b3de3fa9 100644 --- a/pycgmes/resources/ActivePowerPerCurrentFlow.py +++ b/pycgmes/resources/ActivePowerPerCurrentFlow.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class ActivePowerPerCurrentFlow(Base): """ Active power variation with current flow. @@ -29,23 +28,29 @@ class ActivePowerPerCurrentFlow(Base): multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ActivePowerPerFrequency.py b/pycgmes/resources/ActivePowerPerFrequency.py index 35927d94..d9a680db 100644 --- a/pycgmes/resources/ActivePowerPerFrequency.py +++ b/pycgmes/resources/ActivePowerPerFrequency.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class ActivePowerPerFrequency(Base): """ Active power variation with frequency. @@ -29,23 +28,29 @@ class ActivePowerPerFrequency(Base): multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Analog.py b/pycgmes/resources/Analog.py index 16a9ca07..5be4aa08 100644 --- a/pycgmes/resources/Analog.py +++ b/pycgmes/resources/Analog.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Measurement import Measurement -@dataclass(config=DataclassConfig) +@dataclass class Analog(Measurement): """ Analog represents an analog Measurement. @@ -30,18 +29,20 @@ class Analog(Measurement): positiveFlowIn: bool = Field( default=False, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # AnalogValues : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # AnalogValues : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # LimitSets : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # LimitSets : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/AnalogControl.py b/pycgmes/resources/AnalogControl.py index e43dbd34..7955ef83 100644 --- a/pycgmes/resources/AnalogControl.py +++ b/pycgmes/resources/AnalogControl.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Control import Control -@dataclass(config=DataclassConfig) +@dataclass class AnalogControl(Control): """ An analog control used for supervisory control. @@ -29,23 +28,29 @@ class AnalogControl(Control): maxValue: float = Field( default=0.0, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) minValue: float = Field( default=0.0, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) AnalogValue: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/AnalogLimit.py b/pycgmes/resources/AnalogLimit.py index 2bdbe252..27e56da3 100644 --- a/pycgmes/resources/AnalogLimit.py +++ b/pycgmes/resources/AnalogLimit.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Limit import Limit -@dataclass(config=DataclassConfig) +@dataclass class AnalogLimit(Limit): """ Limit values for Analog measurements. @@ -28,16 +27,20 @@ class AnalogLimit(Limit): value: float = Field( default=0.0, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) LimitSet: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/AnalogLimitSet.py b/pycgmes/resources/AnalogLimitSet.py index 4647e88a..4046f97a 100644 --- a/pycgmes/resources/AnalogLimitSet.py +++ b/pycgmes/resources/AnalogLimitSet.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .LimitSet import LimitSet -@dataclass(config=DataclassConfig) +@dataclass class AnalogLimitSet(LimitSet): """ An AnalogLimitSet specifies a set of Limits that are associated with an Analog measurement. @@ -27,14 +26,16 @@ class AnalogLimitSet(LimitSet): Measurements: list = Field( default_factory=list, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Limits : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # Limits : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/AnalogValue.py b/pycgmes/resources/AnalogValue.py index 9b72c212..18897da9 100644 --- a/pycgmes/resources/AnalogValue.py +++ b/pycgmes/resources/AnalogValue.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .MeasurementValue import MeasurementValue -@dataclass(config=DataclassConfig) +@dataclass class AnalogValue(MeasurementValue): """ AnalogValue represents an analog MeasurementValue. @@ -28,14 +27,16 @@ class AnalogValue(MeasurementValue): Analog: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # AnalogControl : Optional[str] = Field(default=None, in_profiles = [Profile.OP, ]) + # Type M:0..1 in CIM + # AnalogControl : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.OP, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/AngleDegrees.py b/pycgmes/resources/AngleDegrees.py index 3dab2625..d5cf99bf 100644 --- a/pycgmes/resources/AngleDegrees.py +++ b/pycgmes/resources/AngleDegrees.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class AngleDegrees(Base): """ Measurement of angle in degrees. @@ -29,38 +28,44 @@ class AngleDegrees(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.DL, - Profile.EQ, - Profile.SC, - Profile.SV, - Profile.SSH, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + Profile.EQ, + Profile.SC, + Profile.SV, + Profile.SSH, + Profile.DY, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DL, - Profile.EQ, - Profile.SC, - Profile.SV, - Profile.SSH, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + Profile.EQ, + Profile.SC, + Profile.SV, + Profile.SSH, + Profile.DY, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DL, - Profile.EQ, - Profile.SC, - Profile.SV, - Profile.SSH, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + Profile.EQ, + Profile.SC, + Profile.SV, + Profile.SSH, + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/AngleRadians.py b/pycgmes/resources/AngleRadians.py index 5a768532..608373c4 100644 --- a/pycgmes/resources/AngleRadians.py +++ b/pycgmes/resources/AngleRadians.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class AngleRadians(Base): """ Phase angle in radians. @@ -29,23 +28,29 @@ class AngleRadians(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ApparentPower.py b/pycgmes/resources/ApparentPower.py index ec24adee..70c78867 100644 --- a/pycgmes/resources/ApparentPower.py +++ b/pycgmes/resources/ApparentPower.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class ApparentPower(Base): """ Product of the RMS value of the voltage and the RMS value of the current. @@ -29,29 +28,35 @@ class ApparentPower(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - Profile.SSH, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SSH, + Profile.DY, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SSH, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SSH, + Profile.DY, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SSH, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SSH, + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ApparentPowerLimit.py b/pycgmes/resources/ApparentPowerLimit.py index c6b6a203..99f92098 100644 --- a/pycgmes/resources/ApparentPowerLimit.py +++ b/pycgmes/resources/ApparentPowerLimit.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .OperationalLimit import OperationalLimit -@dataclass(config=DataclassConfig) +@dataclass class ApparentPowerLimit(OperationalLimit): """ Apparent power limit. @@ -27,16 +26,20 @@ class ApparentPowerLimit(OperationalLimit): normalValue: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) value: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Area.py b/pycgmes/resources/Area.py index 65fbbad3..acbdc88c 100644 --- a/pycgmes/resources/Area.py +++ b/pycgmes/resources/Area.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Area(Base): """ Area. @@ -29,23 +28,29 @@ class Area(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/AsynchronousMachine.py b/pycgmes/resources/AsynchronousMachine.py index 2f9f1f35..e43b5ee6 100644 --- a/pycgmes/resources/AsynchronousMachine.py +++ b/pycgmes/resources/AsynchronousMachine.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .RotatingMachine import RotatingMachine -@dataclass(config=DataclassConfig) +@dataclass class AsynchronousMachine(RotatingMachine): """ A rotating machine whose shaft rotates asynchronously with the electrical field. Also known as an induction machine @@ -44,77 +43,97 @@ class AsynchronousMachine(RotatingMachine): nominalFrequency: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) nominalSpeed: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) converterFedDrive: bool = Field( default=False, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) efficiency: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) iaIrRatio: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) polePairNumber: int = Field( default=0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) ratedMechanicalPower: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) reversible: bool = Field( default=False, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) rxLockedRotorRatio: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) asynchronousMachineType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # AsynchronousMachineDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # AsynchronousMachineDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/AsynchronousMachineDynamics.py b/pycgmes/resources/AsynchronousMachineDynamics.py index a9ef8b27..d63a0431 100644 --- a/pycgmes/resources/AsynchronousMachineDynamics.py +++ b/pycgmes/resources/AsynchronousMachineDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .RotatingMachineDynamics import RotatingMachineDynamics -@dataclass(config=DataclassConfig) +@dataclass class AsynchronousMachineDynamics(RotatingMachineDynamics): """ Asynchronous machine whose behaviour is described by reference to a standard model expressed in either time constant @@ -34,22 +33,24 @@ class AsynchronousMachineDynamics(RotatingMachineDynamics): AsynchronousMachine: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # TurbineGovernorDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # TurbineGovernorDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # MechanicalLoadDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # MechanicalLoadDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType1or2Dynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType1or2Dynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/AsynchronousMachineEquivalentCircuit.py b/pycgmes/resources/AsynchronousMachineEquivalentCircuit.py index dcb70734..44f423f0 100644 --- a/pycgmes/resources/AsynchronousMachineEquivalentCircuit.py +++ b/pycgmes/resources/AsynchronousMachineEquivalentCircuit.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .AsynchronousMachineDynamics import AsynchronousMachineDynamics -@dataclass(config=DataclassConfig) +@dataclass class AsynchronousMachineEquivalentCircuit(AsynchronousMachineDynamics): """ The electrical equations of all variations of the asynchronous model are based on the AsynchronousEquivalentCircuit @@ -40,37 +39,47 @@ class AsynchronousMachineEquivalentCircuit(AsynchronousMachineDynamics): xm: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rr1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xlr1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rr2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xlr2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/AsynchronousMachineKind.py b/pycgmes/resources/AsynchronousMachineKind.py index cfc7f002..cb9b49e6 100644 --- a/pycgmes/resources/AsynchronousMachineKind.py +++ b/pycgmes/resources/AsynchronousMachineKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class AsynchronousMachineKind(Base): """ Kind of Asynchronous Machine. diff --git a/pycgmes/resources/AsynchronousMachineTimeConstantReactance.py b/pycgmes/resources/AsynchronousMachineTimeConstantReactance.py index 7127bd90..4f90569b 100644 --- a/pycgmes/resources/AsynchronousMachineTimeConstantReactance.py +++ b/pycgmes/resources/AsynchronousMachineTimeConstantReactance.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .AsynchronousMachineDynamics import AsynchronousMachineDynamics -@dataclass(config=DataclassConfig) +@dataclass class AsynchronousMachineTimeConstantReactance(AsynchronousMachineDynamics): """ Parameter details: If X'' = X', a single cage (one equivalent rotor winding per axis) is modelled. The "p" in the @@ -37,37 +36,47 @@ class AsynchronousMachineTimeConstantReactance(AsynchronousMachineDynamics): xs: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xpp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpo: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tppo: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/AsynchronousMachineUserDefined.py b/pycgmes/resources/AsynchronousMachineUserDefined.py index 717db871..b83ce347 100644 --- a/pycgmes/resources/AsynchronousMachineUserDefined.py +++ b/pycgmes/resources/AsynchronousMachineUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .AsynchronousMachineDynamics import AsynchronousMachineDynamics -@dataclass(config=DataclassConfig) +@dataclass class AsynchronousMachineUserDefined(AsynchronousMachineDynamics): """ Asynchronous machine whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class AsynchronousMachineUserDefined(AsynchronousMachineDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/AuxiliaryEquipment.py b/pycgmes/resources/AuxiliaryEquipment.py index 08d4f40a..3f97a67f 100644 --- a/pycgmes/resources/AuxiliaryEquipment.py +++ b/pycgmes/resources/AuxiliaryEquipment.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Equipment import Equipment -@dataclass(config=DataclassConfig) +@dataclass class AuxiliaryEquipment(Equipment): """ AuxiliaryEquipment describe equipment that is not performing any primary functions but support for the equipment @@ -29,9 +28,11 @@ class AuxiliaryEquipment(Equipment): Terminal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/BaseVoltage.py b/pycgmes/resources/BaseVoltage.py index 3cf19c3b..d8972357 100644 --- a/pycgmes/resources/BaseVoltage.py +++ b/pycgmes/resources/BaseVoltage.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class BaseVoltage(IdentifiedObject): """ Defines a system base voltage which is referenced. @@ -31,28 +30,30 @@ class BaseVoltage(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # TopologicalNode : list = Field(default_factory=list, in_profiles = [Profile.TP, ]) + # Type M:0..n in CIM + # TopologicalNode : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.TP, ]}) # noqa: E501 nominalVoltage: float = Field( default=0.0, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # VoltageLevel : list = Field(default_factory=list, in_profiles = [Profile.EQBD, Profile.EQ, ]) + # Type M:0..n in CIM + # VoltageLevel : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQBD, Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ConductingEquipment : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # ConductingEquipment : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # TransformerEnds : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # TransformerEnds : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/BasicIntervalSchedule.py b/pycgmes/resources/BasicIntervalSchedule.py index 8e79f9c2..643771e8 100644 --- a/pycgmes/resources/BasicIntervalSchedule.py +++ b/pycgmes/resources/BasicIntervalSchedule.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class BasicIntervalSchedule(IdentifiedObject): """ Schedule of values at points in time. @@ -29,23 +28,29 @@ class BasicIntervalSchedule(IdentifiedObject): startTime: str = Field( default="", - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) value1Unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) value2Unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/BatteryStateKind.py b/pycgmes/resources/BatteryStateKind.py index c227788d..678d136e 100644 --- a/pycgmes/resources/BatteryStateKind.py +++ b/pycgmes/resources/BatteryStateKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class BatteryStateKind(Base): """ The state of the battery unit. diff --git a/pycgmes/resources/BatteryUnit.py b/pycgmes/resources/BatteryUnit.py index 157eaf77..8e12abe5 100644 --- a/pycgmes/resources/BatteryUnit.py +++ b/pycgmes/resources/BatteryUnit.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerElectronicsUnit import PowerElectronicsUnit -@dataclass(config=DataclassConfig) +@dataclass class BatteryUnit(PowerElectronicsUnit): """ An electrochemical energy storage device. @@ -30,23 +29,29 @@ class BatteryUnit(PowerElectronicsUnit): ratedE: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) batteryState: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) storedE: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Bay.py b/pycgmes/resources/Bay.py index ab850669..61f7cc79 100644 --- a/pycgmes/resources/Bay.py +++ b/pycgmes/resources/Bay.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EquipmentContainer import EquipmentContainer -@dataclass(config=DataclassConfig) +@dataclass class Bay(EquipmentContainer): """ A collection of power system resources (within a given substation) including conducting equipment, protection @@ -29,10 +28,12 @@ class Bay(EquipmentContainer): VoltageLevel: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Boolean.py b/pycgmes/resources/Boolean.py index 9192a06e..e83194d2 100644 --- a/pycgmes/resources/Boolean.py +++ b/pycgmes/resources/Boolean.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Boolean(Base): """ A type with the value space "true" and "false". diff --git a/pycgmes/resources/BoundaryPoint.py b/pycgmes/resources/BoundaryPoint.py index d33c296d..ed72f37c 100644 --- a/pycgmes/resources/BoundaryPoint.py +++ b/pycgmes/resources/BoundaryPoint.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemResource import PowerSystemResource -@dataclass(config=DataclassConfig) +@dataclass class BoundaryPoint(PowerSystemResource): """ Designates a connection point at which one or more model authority sets shall connect to. The location of the @@ -60,74 +59,92 @@ class BoundaryPoint(PowerSystemResource): fromEndIsoCode: str = Field( default="", - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) fromEndName: str = Field( default="", - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) fromEndNameTso: str = Field( default="", - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) toEndIsoCode: str = Field( default="", - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) toEndName: str = Field( default="", - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) toEndNameTso: str = Field( default="", - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) isDirectCurrent: bool = Field( default=False, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) isExcludedFromAreaInterchange: bool = Field( default=False, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) ConnectivityNode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Breaker.py b/pycgmes/resources/Breaker.py index d09b0121..5392783b 100644 --- a/pycgmes/resources/Breaker.py +++ b/pycgmes/resources/Breaker.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ProtectedSwitch import ProtectedSwitch -@dataclass(config=DataclassConfig) +@dataclass class Breaker(ProtectedSwitch): """ A mechanical switching device capable of making, carrying, and breaking currents under normal circuit conditions and diff --git a/pycgmes/resources/BusNameMarker.py b/pycgmes/resources/BusNameMarker.py index 12047d78..e4c1e7d1 100644 --- a/pycgmes/resources/BusNameMarker.py +++ b/pycgmes/resources/BusNameMarker.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class BusNameMarker(IdentifiedObject): """ Used to apply user standard names to TopologicalNodes. Associated with one or more terminals that are normally @@ -34,21 +33,25 @@ class BusNameMarker(IdentifiedObject): """ # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # Terminal : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:1..n in CIM + # Terminal : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) priority: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ReportingGroup: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/BusbarSection.py b/pycgmes/resources/BusbarSection.py index 8202fa5e..b25c7116 100644 --- a/pycgmes/resources/BusbarSection.py +++ b/pycgmes/resources/BusbarSection.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Connector import Connector -@dataclass(config=DataclassConfig) +@dataclass class BusbarSection(Connector): """ A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment @@ -30,9 +29,11 @@ class BusbarSection(Connector): ipMax: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/CAESPlant.py b/pycgmes/resources/CAESPlant.py index a30df54e..f4d48233 100644 --- a/pycgmes/resources/CAESPlant.py +++ b/pycgmes/resources/CAESPlant.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemResource import PowerSystemResource -@dataclass(config=DataclassConfig) +@dataclass class CAESPlant(PowerSystemResource): """ Compressed air energy storage plant. @@ -24,8 +23,8 @@ class CAESPlant(PowerSystemResource): """ # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # ThermalGeneratingUnit : Optional[str] = Field(default=None, in_profiles = [Profile.EQ, ]) + # Type M:0..1 in CIM + # ThermalGeneratingUnit : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/CSCDynamics.py b/pycgmes/resources/CSCDynamics.py index 3f7ada5c..951d1d11 100644 --- a/pycgmes/resources/CSCDynamics.py +++ b/pycgmes/resources/CSCDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .HVDCDynamics import HVDCDynamics -@dataclass(config=DataclassConfig) +@dataclass class CSCDynamics(HVDCDynamics): """ CSC function block whose behaviour is described by reference to a standard model or by definition of a user-defined @@ -28,9 +27,11 @@ class CSCDynamics(HVDCDynamics): CSConverter: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/CSCUserDefined.py b/pycgmes/resources/CSCUserDefined.py index cc44534f..98ed9ea2 100644 --- a/pycgmes/resources/CSCUserDefined.py +++ b/pycgmes/resources/CSCUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .CSCDynamics import CSCDynamics -@dataclass(config=DataclassConfig) +@dataclass class CSCUserDefined(CSCDynamics): """ Current source converter (CSC) function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class CSCUserDefined(CSCDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Capacitance.py b/pycgmes/resources/Capacitance.py index d3b003b1..038fce02 100644 --- a/pycgmes/resources/Capacitance.py +++ b/pycgmes/resources/Capacitance.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Capacitance(Base): """ Capacitive part of reactance (imaginary part of impedance), at rated frequency. @@ -29,23 +28,29 @@ class Capacitance(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Clamp.py b/pycgmes/resources/Clamp.py index 063c6cdf..995ff318 100644 --- a/pycgmes/resources/Clamp.py +++ b/pycgmes/resources/Clamp.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ConductingEquipment import ConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class Clamp(ConductingEquipment): """ A Clamp is a galvanic connection at a line segment where other equipment is connected. A Clamp does not cut the line @@ -31,16 +30,20 @@ class Clamp(ConductingEquipment): ACLineSegment: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) lengthFromTerminal1: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/CogenerationPlant.py b/pycgmes/resources/CogenerationPlant.py index bc8eb0db..6789a7cd 100644 --- a/pycgmes/resources/CogenerationPlant.py +++ b/pycgmes/resources/CogenerationPlant.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemResource import PowerSystemResource -@dataclass(config=DataclassConfig) +@dataclass class CogenerationPlant(PowerSystemResource): """ A set of thermal generating units for the production of electrical energy and process steam (usually from the output @@ -26,8 +25,8 @@ class CogenerationPlant(PowerSystemResource): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ThermalGeneratingUnits : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # ThermalGeneratingUnits : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/CombinedCyclePlant.py b/pycgmes/resources/CombinedCyclePlant.py index de4786bf..1ef40ae8 100644 --- a/pycgmes/resources/CombinedCyclePlant.py +++ b/pycgmes/resources/CombinedCyclePlant.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemResource import PowerSystemResource -@dataclass(config=DataclassConfig) +@dataclass class CombinedCyclePlant(PowerSystemResource): """ A set of combustion turbines and steam turbines where the exhaust heat from the combustion turbines is recovered to @@ -25,8 +24,8 @@ class CombinedCyclePlant(PowerSystemResource): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ThermalGeneratingUnits : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # ThermalGeneratingUnits : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Command.py b/pycgmes/resources/Command.py index 7c46ea20..de079bd6 100644 --- a/pycgmes/resources/Command.py +++ b/pycgmes/resources/Command.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Control import Control -@dataclass(config=DataclassConfig) +@dataclass class Command(Control): """ A Command is a discrete control used for supervisory control. @@ -30,30 +29,38 @@ class Command(Control): normalValue: int = Field( default=0, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) value: int = Field( default=0, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) ValueAliasSet: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) DiscreteValue: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Conductance.py b/pycgmes/resources/Conductance.py index 0dd7033e..4918402a 100644 --- a/pycgmes/resources/Conductance.py +++ b/pycgmes/resources/Conductance.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Conductance(Base): """ Factor by which voltage must be multiplied to give corresponding power lost from a circuit. Real part of admittance. @@ -29,26 +28,32 @@ class Conductance(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ConductingEquipment.py b/pycgmes/resources/ConductingEquipment.py index 04f78046..f5352e8f 100644 --- a/pycgmes/resources/ConductingEquipment.py +++ b/pycgmes/resources/ConductingEquipment.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Equipment import Equipment -@dataclass(config=DataclassConfig) +@dataclass class ConductingEquipment(Equipment): """ The parts of the AC power system that are designed to carry current or that are conductively connected through @@ -31,19 +30,21 @@ class ConductingEquipment(Equipment): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Terminals : list = Field(default_factory=list, in_profiles = [Profile.EQBD, Profile.EQ, Profile.DY, ]) # noqa: E501 + # Type M:0..n in CIM + # Terminals : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQBD, Profile.EQ, Profile.DY, ]}) # noqa: E501 BaseVoltage: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # SvStatus : Optional[str] = Field(default=None, in_profiles = [Profile.SV, ]) + # Type M:0..1 in CIM + # SvStatus : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.SV, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Conductor.py b/pycgmes/resources/Conductor.py index 878fd04e..df8349cd 100644 --- a/pycgmes/resources/Conductor.py +++ b/pycgmes/resources/Conductor.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ConductingEquipment import ConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class Conductor(ConductingEquipment): """ Combination of conducting material with consistent electrical characteristics, building a single electrical system, @@ -27,9 +26,11 @@ class Conductor(ConductingEquipment): length: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ConformLoad.py b/pycgmes/resources/ConformLoad.py index ccb477b7..4a68e4ee 100644 --- a/pycgmes/resources/ConformLoad.py +++ b/pycgmes/resources/ConformLoad.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EnergyConsumer import EnergyConsumer -@dataclass(config=DataclassConfig) +@dataclass class ConformLoad(EnergyConsumer): """ ConformLoad represent loads that follow a daily load change pattern where the pattern can be used to scale the load @@ -28,9 +27,11 @@ class ConformLoad(EnergyConsumer): LoadGroup: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ConformLoadGroup.py b/pycgmes/resources/ConformLoadGroup.py index 22a4af61..6cf89e13 100644 --- a/pycgmes/resources/ConformLoadGroup.py +++ b/pycgmes/resources/ConformLoadGroup.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .LoadGroup import LoadGroup -@dataclass(config=DataclassConfig) +@dataclass class ConformLoadGroup(LoadGroup): """ A group of loads conforming to an allocation pattern. @@ -25,12 +24,12 @@ class ConformLoadGroup(LoadGroup): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ConformLoadSchedules : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # ConformLoadSchedules : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # EnergyConsumers : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:1..n in CIM + # EnergyConsumers : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/ConformLoadSchedule.py b/pycgmes/resources/ConformLoadSchedule.py index b351ac3d..1a6fa50d 100644 --- a/pycgmes/resources/ConformLoadSchedule.py +++ b/pycgmes/resources/ConformLoadSchedule.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .SeasonDayTypeSchedule import SeasonDayTypeSchedule -@dataclass(config=DataclassConfig) +@dataclass class ConformLoadSchedule(SeasonDayTypeSchedule): """ A curve of load versus time (X-axis) showing the active power values (Y1-axis) and reactive power (Y2-axis) for @@ -29,9 +28,11 @@ class ConformLoadSchedule(SeasonDayTypeSchedule): ConformLoadGroup: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ConnectivityNode.py b/pycgmes/resources/ConnectivityNode.py index f94ba95a..fe7fb2e8 100644 --- a/pycgmes/resources/ConnectivityNode.py +++ b/pycgmes/resources/ConnectivityNode.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class ConnectivityNode(IdentifiedObject): """ Connectivity nodes are points where terminals of AC conducting equipment are connected together with zero impedance. @@ -31,25 +30,29 @@ class ConnectivityNode(IdentifiedObject): TopologicalNode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.TP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.TP, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # BoundaryPoint : Optional[str] = Field(default=None, in_profiles = [Profile.EQBD, Profile.EQ, ]) + # Type M:0..1 in CIM + # BoundaryPoint : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.EQBD, Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Terminals : list = Field(default_factory=list, in_profiles = [Profile.EQBD, Profile.EQ, ]) + # Type M:0..n in CIM + # Terminals : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQBD, Profile.EQ, ]}) # noqa: E501 ConnectivityNodeContainer: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ConnectivityNodeContainer.py b/pycgmes/resources/ConnectivityNodeContainer.py index 7cd830a5..cf438fbf 100644 --- a/pycgmes/resources/ConnectivityNodeContainer.py +++ b/pycgmes/resources/ConnectivityNodeContainer.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemResource import PowerSystemResource -@dataclass(config=DataclassConfig) +@dataclass class ConnectivityNodeContainer(PowerSystemResource): """ A base class for all objects that may contain connectivity nodes or topological nodes. @@ -25,12 +24,12 @@ class ConnectivityNodeContainer(PowerSystemResource): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # TopologicalNode : list = Field(default_factory=list, in_profiles = [Profile.TP, ]) + # Type M:0..n in CIM + # TopologicalNode : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.TP, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ConnectivityNodes : list = Field(default_factory=list, in_profiles = [Profile.EQBD, Profile.EQ, ]) + # Type M:0..n in CIM + # ConnectivityNodes : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQBD, Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Connector.py b/pycgmes/resources/Connector.py index a8dd5a52..6a9bc554 100644 --- a/pycgmes/resources/Connector.py +++ b/pycgmes/resources/Connector.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ConductingEquipment import ConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class Connector(ConductingEquipment): """ A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment diff --git a/pycgmes/resources/Control.py b/pycgmes/resources/Control.py index 03e00401..1690ecd9 100644 --- a/pycgmes/resources/Control.py +++ b/pycgmes/resources/Control.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IOPoint import IOPoint -@dataclass(config=DataclassConfig) +@dataclass class Control(IOPoint): """ Control is used for supervisory/device control. It represents control outputs that are used to change the state in a @@ -34,44 +33,56 @@ class Control(IOPoint): controlType: str = Field( default="", - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) operationInProgress: bool = Field( default=False, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) timeStamp: str = Field( default="", - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) unitMultiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) unitSymbol: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) PowerSystemResource: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ControlArea.py b/pycgmes/resources/ControlArea.py index 6714d779..bc9f4960 100644 --- a/pycgmes/resources/ControlArea.py +++ b/pycgmes/resources/ControlArea.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemResource import PowerSystemResource -@dataclass(config=DataclassConfig) +@dataclass class ControlArea(PowerSystemResource): """ A control area is a grouping of generating units and/or loads and a cutset of tie lines (as terminals) which may be @@ -51,38 +50,46 @@ class ControlArea(PowerSystemResource): type: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # TieFlow : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # TieFlow : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ControlAreaGeneratingUnit : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # ControlAreaGeneratingUnit : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 EnergyArea: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) netInterchange: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) pTolerance: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ControlAreaGeneratingUnit.py b/pycgmes/resources/ControlAreaGeneratingUnit.py index 5ed1cabf..0fd804fb 100644 --- a/pycgmes/resources/ControlAreaGeneratingUnit.py +++ b/pycgmes/resources/ControlAreaGeneratingUnit.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class ControlAreaGeneratingUnit(IdentifiedObject): """ A control area generating unit. This class is needed so that alternate control area definitions may include the same @@ -31,16 +30,20 @@ class ControlAreaGeneratingUnit(IdentifiedObject): ControlArea: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) GeneratingUnit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ControlAreaTypeKind.py b/pycgmes/resources/ControlAreaTypeKind.py index c1795411..29a17f46 100644 --- a/pycgmes/resources/ControlAreaTypeKind.py +++ b/pycgmes/resources/ControlAreaTypeKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class ControlAreaTypeKind(Base): """ The type of control area. diff --git a/pycgmes/resources/CoordinateSystem.py b/pycgmes/resources/CoordinateSystem.py index 7d67526d..278db89f 100644 --- a/pycgmes/resources/CoordinateSystem.py +++ b/pycgmes/resources/CoordinateSystem.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class CoordinateSystem(IdentifiedObject): """ Coordinate reference system. @@ -33,14 +32,16 @@ class CoordinateSystem(IdentifiedObject): crsUrn: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Locations : list = Field(default_factory=list, in_profiles = [Profile.GL, ]) + # Type M:0..n in CIM + # Locations : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.GL, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/CrossCompoundTurbineGovernorDynamics.py b/pycgmes/resources/CrossCompoundTurbineGovernorDynamics.py index 889848f0..3d9408e7 100644 --- a/pycgmes/resources/CrossCompoundTurbineGovernorDynamics.py +++ b/pycgmes/resources/CrossCompoundTurbineGovernorDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class CrossCompoundTurbineGovernorDynamics(DynamicsFunctionBlock): """ Turbine-governor cross-compound function block whose behaviour is described by reference to a standard model or by @@ -31,16 +30,20 @@ class CrossCompoundTurbineGovernorDynamics(DynamicsFunctionBlock): HighPressureSynchronousMachineDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) LowPressureSynchronousMachineDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/CsConverter.py b/pycgmes/resources/CsConverter.py index 9b18663d..4a92d07b 100644 --- a/pycgmes/resources/CsConverter.py +++ b/pycgmes/resources/CsConverter.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ACDCConverter import ACDCConverter -@dataclass(config=DataclassConfig) +@dataclass class CsConverter(ACDCConverter): """ DC side of the current source converter (CSC). The firing angle controls the dc voltage at the converter, both for @@ -72,105 +71,133 @@ class CsConverter(ACDCConverter): maxAlpha: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) maxGamma: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) maxIdc: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) minAlpha: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) minGamma: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) minIdc: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ratedIdc: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) alpha: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) gamma: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) operatingMode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) pPccControl: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) targetAlpha: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) targetGamma: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) targetIdc: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # CSCDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # CSCDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/CsOperatingModeKind.py b/pycgmes/resources/CsOperatingModeKind.py index 2b91d5e1..4eb94d71 100644 --- a/pycgmes/resources/CsOperatingModeKind.py +++ b/pycgmes/resources/CsOperatingModeKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class CsOperatingModeKind(Base): """ Operating mode for HVDC line operating as Current Source Converter. diff --git a/pycgmes/resources/CsPpccControlKind.py b/pycgmes/resources/CsPpccControlKind.py index a0812551..35e59064 100644 --- a/pycgmes/resources/CsPpccControlKind.py +++ b/pycgmes/resources/CsPpccControlKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class CsPpccControlKind(Base): """ Active power control modes for HVDC line operating as Current Source Converter. diff --git a/pycgmes/resources/Currency.py b/pycgmes/resources/Currency.py index e828e4f4..97a9f888 100644 --- a/pycgmes/resources/Currency.py +++ b/pycgmes/resources/Currency.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Currency(Base): """ Monetary currencies. ISO 4217 standard including 3-character currency code. diff --git a/pycgmes/resources/CurrentFlow.py b/pycgmes/resources/CurrentFlow.py index ee49f743..92922d46 100644 --- a/pycgmes/resources/CurrentFlow.py +++ b/pycgmes/resources/CurrentFlow.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class CurrentFlow(Base): """ Electrical current with sign convention: positive flow is out of the conducting equipment into the connectivity @@ -30,32 +29,38 @@ class CurrentFlow(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.SV, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.SV, + Profile.SSH, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.SV, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.SV, + Profile.SSH, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.SV, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.SV, + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/CurrentLimit.py b/pycgmes/resources/CurrentLimit.py index 5fb2fdb3..28bdce01 100644 --- a/pycgmes/resources/CurrentLimit.py +++ b/pycgmes/resources/CurrentLimit.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .OperationalLimit import OperationalLimit -@dataclass(config=DataclassConfig) +@dataclass class CurrentLimit(OperationalLimit): """ Operational limit on current. @@ -27,16 +26,20 @@ class CurrentLimit(OperationalLimit): normalValue: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) value: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/CurrentTransformer.py b/pycgmes/resources/CurrentTransformer.py index 118cc083..6de9e32e 100644 --- a/pycgmes/resources/CurrentTransformer.py +++ b/pycgmes/resources/CurrentTransformer.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Sensor import Sensor -@dataclass(config=DataclassConfig) +@dataclass class CurrentTransformer(Sensor): """ Instrument transformer used to measure electrical qualities of the circuit that is being protected and/or monitored. diff --git a/pycgmes/resources/Curve.py b/pycgmes/resources/Curve.py index ef8c63b0..0e026304 100644 --- a/pycgmes/resources/Curve.py +++ b/pycgmes/resources/Curve.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class Curve(IdentifiedObject): """ A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) @@ -32,35 +31,43 @@ class Curve(IdentifiedObject): curveStyle: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) xUnit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) y1Unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) y2Unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # CurveDatas : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:1..n in CIM + # CurveDatas : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/CurveData.py b/pycgmes/resources/CurveData.py index 1f14af1a..c7406491 100644 --- a/pycgmes/resources/CurveData.py +++ b/pycgmes/resources/CurveData.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class CurveData(Base): """ Multi-purpose data points for defining a curve. The use of this generic class is discouraged if a more specific @@ -31,30 +30,38 @@ class can be used to specify the X and Y axis values along with their specific d Curve: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) xvalue: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) y1value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) y2value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/CurveStyle.py b/pycgmes/resources/CurveStyle.py index 225e7933..0b5389b3 100644 --- a/pycgmes/resources/CurveStyle.py +++ b/pycgmes/resources/CurveStyle.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class CurveStyle(Base): """ Style or shape of curve. diff --git a/pycgmes/resources/Cut.py b/pycgmes/resources/Cut.py index a70c3fe5..d37e8904 100644 --- a/pycgmes/resources/Cut.py +++ b/pycgmes/resources/Cut.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Switch import Switch -@dataclass(config=DataclassConfig) +@dataclass class Cut(Switch): """ A cut separates a line segment into two parts. The cut appears as a switch inserted between these two parts and @@ -36,16 +35,20 @@ class Cut(Switch): ACLineSegment: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) lengthFromTerminal1: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DCBaseTerminal.py b/pycgmes/resources/DCBaseTerminal.py index 31efc358..c6322a5e 100644 --- a/pycgmes/resources/DCBaseTerminal.py +++ b/pycgmes/resources/DCBaseTerminal.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ACDCTerminal import ACDCTerminal -@dataclass(config=DataclassConfig) +@dataclass class DCBaseTerminal(ACDCTerminal): """ An electrical connection point at a piece of DC conducting equipment. DC terminals are connected at one physical DC @@ -30,16 +29,20 @@ class DCBaseTerminal(ACDCTerminal): DCTopologicalNode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.TP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.TP, + ] + }, ) DCNode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DCBreaker.py b/pycgmes/resources/DCBreaker.py index b16610df..fec695dd 100644 --- a/pycgmes/resources/DCBreaker.py +++ b/pycgmes/resources/DCBreaker.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DCSwitch import DCSwitch -@dataclass(config=DataclassConfig) +@dataclass class DCBreaker(DCSwitch): """ A breaker within a DC system. diff --git a/pycgmes/resources/DCBusbar.py b/pycgmes/resources/DCBusbar.py index 5b4f9381..16922e41 100644 --- a/pycgmes/resources/DCBusbar.py +++ b/pycgmes/resources/DCBusbar.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DCConductingEquipment import DCConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class DCBusbar(DCConductingEquipment): """ A busbar within a DC system. diff --git a/pycgmes/resources/DCChopper.py b/pycgmes/resources/DCChopper.py index f130fc9b..03b2609e 100644 --- a/pycgmes/resources/DCChopper.py +++ b/pycgmes/resources/DCChopper.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DCConductingEquipment import DCConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class DCChopper(DCConductingEquipment): """ Low resistance equipment used in the internal DC circuit to balance voltages. It has typically positive and negative diff --git a/pycgmes/resources/DCConductingEquipment.py b/pycgmes/resources/DCConductingEquipment.py index 1fcbafb2..c42ef239 100644 --- a/pycgmes/resources/DCConductingEquipment.py +++ b/pycgmes/resources/DCConductingEquipment.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Equipment import Equipment -@dataclass(config=DataclassConfig) +@dataclass class DCConductingEquipment(Equipment): """ The parts of the DC power system that are designed to carry current or that are conductively connected through DC @@ -29,14 +28,16 @@ class DCConductingEquipment(Equipment): ratedUdc: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # DCTerminals : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # DCTerminals : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/DCConverterOperatingModeKind.py b/pycgmes/resources/DCConverterOperatingModeKind.py index 89581c66..3e862c93 100644 --- a/pycgmes/resources/DCConverterOperatingModeKind.py +++ b/pycgmes/resources/DCConverterOperatingModeKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class DCConverterOperatingModeKind(Base): """ The operating mode of an HVDC bipole. diff --git a/pycgmes/resources/DCConverterUnit.py b/pycgmes/resources/DCConverterUnit.py index 72819632..2263b426 100644 --- a/pycgmes/resources/DCConverterUnit.py +++ b/pycgmes/resources/DCConverterUnit.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DCEquipmentContainer import DCEquipmentContainer -@dataclass(config=DataclassConfig) +@dataclass class DCConverterUnit(DCEquipmentContainer): """ Indivisible operative unit comprising all equipment between the point of common coupling on the AC side and the @@ -31,16 +30,20 @@ class DCConverterUnit(DCEquipmentContainer): operationMode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) Substation: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DCDisconnector.py b/pycgmes/resources/DCDisconnector.py index a3482cf0..af6bc8ce 100644 --- a/pycgmes/resources/DCDisconnector.py +++ b/pycgmes/resources/DCDisconnector.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DCSwitch import DCSwitch -@dataclass(config=DataclassConfig) +@dataclass class DCDisconnector(DCSwitch): """ A disconnector within a DC system. diff --git a/pycgmes/resources/DCEquipmentContainer.py b/pycgmes/resources/DCEquipmentContainer.py index 73785ca6..e4417494 100644 --- a/pycgmes/resources/DCEquipmentContainer.py +++ b/pycgmes/resources/DCEquipmentContainer.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EquipmentContainer import EquipmentContainer -@dataclass(config=DataclassConfig) +@dataclass class DCEquipmentContainer(EquipmentContainer): """ A modelling construct to provide a root class for containment of DC as well as AC equipment. The class differ from @@ -27,12 +26,12 @@ class DCEquipmentContainer(EquipmentContainer): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # DCTopologicalNode : list = Field(default_factory=list, in_profiles = [Profile.TP, ]) + # Type M:0..n in CIM + # DCTopologicalNode : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.TP, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # DCNodes : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # DCNodes : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/DCGround.py b/pycgmes/resources/DCGround.py index e5e567b1..5a60e74e 100644 --- a/pycgmes/resources/DCGround.py +++ b/pycgmes/resources/DCGround.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DCConductingEquipment import DCConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class DCGround(DCConductingEquipment): """ A ground within a DC system. @@ -27,16 +26,20 @@ class DCGround(DCConductingEquipment): inductance: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DCLine.py b/pycgmes/resources/DCLine.py index 57edfad7..24136fd9 100644 --- a/pycgmes/resources/DCLine.py +++ b/pycgmes/resources/DCLine.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DCEquipmentContainer import DCEquipmentContainer -@dataclass(config=DataclassConfig) +@dataclass class DCLine(DCEquipmentContainer): """ Overhead lines and/or cables connecting two or more HVDC substations. @@ -27,9 +26,11 @@ class DCLine(DCEquipmentContainer): Region: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DCLineSegment.py b/pycgmes/resources/DCLineSegment.py index bb3a376f..b3a3a538 100644 --- a/pycgmes/resources/DCLineSegment.py +++ b/pycgmes/resources/DCLineSegment.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DCConductingEquipment import DCConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class DCLineSegment(DCConductingEquipment): """ A wire or combination of wires not insulated from one another, with consistent electrical characteristics, used to @@ -30,30 +29,38 @@ class DCLineSegment(DCConductingEquipment): capacitance: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) inductance: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) resistance: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) length: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DCNode.py b/pycgmes/resources/DCNode.py index d4a20b41..06593f7e 100644 --- a/pycgmes/resources/DCNode.py +++ b/pycgmes/resources/DCNode.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class DCNode(IdentifiedObject): """ DC nodes are points where terminals of DC conducting equipment are connected together with zero impedance. @@ -30,20 +29,24 @@ class DCNode(IdentifiedObject): DCTopologicalNode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.TP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.TP, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # DCTerminals : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # DCTerminals : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) DCEquipmentContainer: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DCPolarityKind.py b/pycgmes/resources/DCPolarityKind.py index b7045b59..7519d34c 100644 --- a/pycgmes/resources/DCPolarityKind.py +++ b/pycgmes/resources/DCPolarityKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class DCPolarityKind(Base): """ Polarity for DC circuits. diff --git a/pycgmes/resources/DCSeriesDevice.py b/pycgmes/resources/DCSeriesDevice.py index e2e98546..2a2b24a5 100644 --- a/pycgmes/resources/DCSeriesDevice.py +++ b/pycgmes/resources/DCSeriesDevice.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DCConductingEquipment import DCConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class DCSeriesDevice(DCConductingEquipment): """ A series device within the DC system, typically a reactor used for filtering or smoothing. Needed for transient and @@ -28,16 +27,20 @@ class DCSeriesDevice(DCConductingEquipment): inductance: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) resistance: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DCShunt.py b/pycgmes/resources/DCShunt.py index 39b49bc8..7a621f75 100644 --- a/pycgmes/resources/DCShunt.py +++ b/pycgmes/resources/DCShunt.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DCConductingEquipment import DCConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class DCShunt(DCConductingEquipment): """ A shunt device within the DC system, typically used for filtering. Needed for transient and short circuit studies. @@ -27,16 +26,20 @@ class DCShunt(DCConductingEquipment): capacitance: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) resistance: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DCSwitch.py b/pycgmes/resources/DCSwitch.py index 4db3cf6c..c250529d 100644 --- a/pycgmes/resources/DCSwitch.py +++ b/pycgmes/resources/DCSwitch.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DCConductingEquipment import DCConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class DCSwitch(DCConductingEquipment): """ A switch within the DC system. diff --git a/pycgmes/resources/DCTerminal.py b/pycgmes/resources/DCTerminal.py index d3e91523..ba1149d9 100644 --- a/pycgmes/resources/DCTerminal.py +++ b/pycgmes/resources/DCTerminal.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DCBaseTerminal import DCBaseTerminal -@dataclass(config=DataclassConfig) +@dataclass class DCTerminal(DCBaseTerminal): """ An electrical connection point to generic DC conducting equipment. @@ -27,9 +26,11 @@ class DCTerminal(DCBaseTerminal): DCConductingEquipment: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DCTopologicalIsland.py b/pycgmes/resources/DCTopologicalIsland.py index a6638746..b3a965e4 100644 --- a/pycgmes/resources/DCTopologicalIsland.py +++ b/pycgmes/resources/DCTopologicalIsland.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class DCTopologicalIsland(IdentifiedObject): """ An electrically connected subset of the network. DC topological islands can change as the current network state @@ -29,9 +28,11 @@ class DCTopologicalIsland(IdentifiedObject): DCTopologicalNodes: list = Field( default_factory=list, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DCTopologicalNode.py b/pycgmes/resources/DCTopologicalNode.py index 4dfe519e..ff905b08 100644 --- a/pycgmes/resources/DCTopologicalNode.py +++ b/pycgmes/resources/DCTopologicalNode.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class DCTopologicalNode(IdentifiedObject): """ DC bus. @@ -30,23 +29,25 @@ class DCTopologicalNode(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # DCTerminals : list = Field(default_factory=list, in_profiles = [Profile.TP, ]) + # Type M:0..n in CIM + # DCTerminals : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.TP, ]}) DCEquipmentContainer: Optional[str] = Field( default=None, - in_profiles=[ - Profile.TP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.TP, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # DCNodes : list = Field(default_factory=list, in_profiles = [Profile.TP, ]) + # Type M:0..n in CIM + # DCNodes : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.TP, ]}) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # DCTopologicalIsland : Optional[str] = Field(default=None, in_profiles = [Profile.SV, ]) + # Type M:0..1 in CIM + # DCTopologicalIsland : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.SV, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Date.py b/pycgmes/resources/Date.py index 4f581ca9..e9f22bcf 100644 --- a/pycgmes/resources/Date.py +++ b/pycgmes/resources/Date.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Date(Base): """ Date as "yyyy-mm-dd", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddZ". A local timezone diff --git a/pycgmes/resources/DateTime.py b/pycgmes/resources/DateTime.py index 7d49cee0..d3a57b3b 100644 --- a/pycgmes/resources/DateTime.py +++ b/pycgmes/resources/DateTime.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class DateTime(Base): """ Date and time as "yyyy-mm-ddThh:mm:ss.sss", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm- diff --git a/pycgmes/resources/DayType.py b/pycgmes/resources/DayType.py index 221542aa..3cf5402f 100644 --- a/pycgmes/resources/DayType.py +++ b/pycgmes/resources/DayType.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class DayType(IdentifiedObject): """ Group of similar days. For example it could be used to represent weekdays, weekend, or holidays. @@ -24,8 +23,8 @@ class DayType(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # SeasonDayTypeSchedules : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # SeasonDayTypeSchedules : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Decimal.py b/pycgmes/resources/Decimal.py index 1bf6bbfe..8890d201 100644 --- a/pycgmes/resources/Decimal.py +++ b/pycgmes/resources/Decimal.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Decimal(Base): """ Decimal is the base-10 notational system for representing real numbers. diff --git a/pycgmes/resources/Diagram.py b/pycgmes/resources/Diagram.py index a74306f9..694a9d70 100644 --- a/pycgmes/resources/Diagram.py +++ b/pycgmes/resources/Diagram.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class Diagram(IdentifiedObject): """ The diagram being exchanged. The coordinate system is a standard Cartesian coordinate system and the orientation @@ -40,48 +39,60 @@ class Diagram(IdentifiedObject): orientation: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) x1InitialView: float = Field( default=0.0, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) x2InitialView: float = Field( default=0.0, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) y1InitialView: float = Field( default=0.0, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) y2InitialView: float = Field( default=0.0, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # DiagramElements : list = Field(default_factory=list, in_profiles = [Profile.DL, ]) + # Type M:0..n in CIM + # DiagramElements : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DL, ]}) # noqa: E501 DiagramStyle: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DiagramObject.py b/pycgmes/resources/DiagramObject.py index f99aaa5b..a4afd6a8 100644 --- a/pycgmes/resources/DiagramObject.py +++ b/pycgmes/resources/DiagramObject.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class DiagramObject(IdentifiedObject): """ An object that defines one or more points in a given space. This object can be associated with anything that @@ -57,66 +56,82 @@ class DiagramObject(IdentifiedObject): Diagram: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) drawingOrder: int = Field( default=0, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) isPolygon: bool = Field( default=False, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) offsetX: float = Field( default=0.0, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) offsetY: float = Field( default=0.0, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) rotation: float = Field( default=0.0, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) IdentifiedObject: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # DiagramObjectPoints : list = Field(default_factory=list, in_profiles = [Profile.DL, ]) + # Type M:0..n in CIM + # DiagramObjectPoints : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DL, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # VisibilityLayers : list = Field(default_factory=list, in_profiles = [Profile.DL, ]) + # Type M:0..n in CIM + # VisibilityLayers : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DL, ]}) # noqa: E501 DiagramObjectStyle: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DiagramObjectGluePoint.py b/pycgmes/resources/DiagramObjectGluePoint.py index 8bfbf86b..aba78283 100644 --- a/pycgmes/resources/DiagramObjectGluePoint.py +++ b/pycgmes/resources/DiagramObjectGluePoint.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class DiagramObjectGluePoint(Base): """ This is used for grouping diagram object points from different diagram objects that are considered to be glued @@ -26,8 +25,8 @@ class DiagramObjectGluePoint(Base): """ # *Association not used* - # Type M:2..n in CIM # pylint: disable-next=line-too-long - # DiagramObjectPoints : list = Field(default_factory=list, in_profiles = [Profile.DL, ]) + # Type M:2..n in CIM + # DiagramObjectPoints : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DL, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/DiagramObjectPoint.py b/pycgmes/resources/DiagramObjectPoint.py index 97db434b..a993103f 100644 --- a/pycgmes/resources/DiagramObjectPoint.py +++ b/pycgmes/resources/DiagramObjectPoint.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class DiagramObjectPoint(Base): """ A point in a given space defined by 3 coordinates and associated to a diagram object. The coordinates may be @@ -34,44 +33,56 @@ class DiagramObjectPoint(Base): DiagramObject: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) DiagramObjectGluePoint: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) sequenceNumber: int = Field( default=0, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) xPosition: float = Field( default=0.0, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) yPosition: float = Field( default=0.0, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) zPosition: float = Field( default=0.0, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DiagramObjectStyle.py b/pycgmes/resources/DiagramObjectStyle.py index f483b3d2..ab78dc82 100644 --- a/pycgmes/resources/DiagramObjectStyle.py +++ b/pycgmes/resources/DiagramObjectStyle.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class DiagramObjectStyle(IdentifiedObject): """ A reference to a style used by the originating system for a diagram object. A diagram object style describes @@ -25,8 +24,8 @@ class DiagramObjectStyle(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # StyledObjects : list = Field(default_factory=list, in_profiles = [Profile.DL, ]) + # Type M:0..n in CIM + # StyledObjects : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DL, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/DiagramStyle.py b/pycgmes/resources/DiagramStyle.py index 4e3aae01..84511143 100644 --- a/pycgmes/resources/DiagramStyle.py +++ b/pycgmes/resources/DiagramStyle.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class DiagramStyle(IdentifiedObject): """ The diagram style refers to a style used by the originating system for a diagram. A diagram style describes @@ -25,8 +24,8 @@ class DiagramStyle(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Diagram : list = Field(default_factory=list, in_profiles = [Profile.DL, ]) + # Type M:0..n in CIM + # Diagram : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DL, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/DiscExcContIEEEDEC1A.py b/pycgmes/resources/DiscExcContIEEEDEC1A.py index 616d8ece..9a088266 100644 --- a/pycgmes/resources/DiscExcContIEEEDEC1A.py +++ b/pycgmes/resources/DiscExcContIEEEDEC1A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DiscontinuousExcitationControlDynamics import DiscontinuousExcitationControlDynamics -@dataclass(config=DataclassConfig) +@dataclass class DiscExcContIEEEDEC1A(DiscontinuousExcitationControlDynamics): """ IEEE type DEC1A discontinuous excitation control model that boosts generator excitation to a level higher than that @@ -45,128 +44,164 @@ class DiscExcContIEEEDEC1A(DiscontinuousExcitationControlDynamics): vtlmt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vomax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vomin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ketl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vtc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) val: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) esc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kan: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tan: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vtm: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vtn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vanmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DiscExcContIEEEDEC2A.py b/pycgmes/resources/DiscExcContIEEEDEC2A.py index b22f77fd..4aa503ee 100644 --- a/pycgmes/resources/DiscExcContIEEEDEC2A.py +++ b/pycgmes/resources/DiscExcContIEEEDEC2A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DiscontinuousExcitationControlDynamics import DiscontinuousExcitationControlDynamics -@dataclass(config=DataclassConfig) +@dataclass class DiscExcContIEEEDEC2A(DiscontinuousExcitationControlDynamics): """ IEEE type DEC2A model for discontinuous excitation control. This system provides transient excitation boosting via @@ -31,37 +30,47 @@ class DiscExcContIEEEDEC2A(DiscontinuousExcitationControlDynamics): vk: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vdmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vdmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DiscExcContIEEEDEC3A.py b/pycgmes/resources/DiscExcContIEEEDEC3A.py index a8909f03..2f9dfc78 100644 --- a/pycgmes/resources/DiscExcContIEEEDEC3A.py +++ b/pycgmes/resources/DiscExcContIEEEDEC3A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DiscontinuousExcitationControlDynamics import DiscontinuousExcitationControlDynamics -@dataclass(config=DataclassConfig) +@dataclass class DiscExcContIEEEDEC3A(DiscontinuousExcitationControlDynamics): """ IEEE type DEC3A model. In some systems, the stabilizer output is disconnected from the regulator immediately @@ -29,16 +28,20 @@ class DiscExcContIEEEDEC3A(DiscontinuousExcitationControlDynamics): vtmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tdr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DisconnectingCircuitBreaker.py b/pycgmes/resources/DisconnectingCircuitBreaker.py index 884e018e..12782eef 100644 --- a/pycgmes/resources/DisconnectingCircuitBreaker.py +++ b/pycgmes/resources/DisconnectingCircuitBreaker.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Breaker import Breaker -@dataclass(config=DataclassConfig) +@dataclass class DisconnectingCircuitBreaker(Breaker): """ A circuit breaking device including disconnecting function, eliminating the need for separate disconnectors. diff --git a/pycgmes/resources/Disconnector.py b/pycgmes/resources/Disconnector.py index a99a9c1e..5313ae65 100644 --- a/pycgmes/resources/Disconnector.py +++ b/pycgmes/resources/Disconnector.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Switch import Switch -@dataclass(config=DataclassConfig) +@dataclass class Disconnector(Switch): """ A manually operated or motor operated mechanical switching device used for changing the connections in a circuit, or diff --git a/pycgmes/resources/DiscontinuousExcitationControlDynamics.py b/pycgmes/resources/DiscontinuousExcitationControlDynamics.py index 28b71449..34234c92 100644 --- a/pycgmes/resources/DiscontinuousExcitationControlDynamics.py +++ b/pycgmes/resources/DiscontinuousExcitationControlDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class DiscontinuousExcitationControlDynamics(DynamicsFunctionBlock): """ Discontinuous excitation control function block whose behaviour is described by reference to a standard model or by @@ -29,14 +28,16 @@ class DiscontinuousExcitationControlDynamics(DynamicsFunctionBlock): """ # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # RemoteInputSignal : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # RemoteInputSignal : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 ExcitationSystemDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DiscontinuousExcitationControlUserDefined.py b/pycgmes/resources/DiscontinuousExcitationControlUserDefined.py index ea91c23c..eb9ed2a7 100644 --- a/pycgmes/resources/DiscontinuousExcitationControlUserDefined.py +++ b/pycgmes/resources/DiscontinuousExcitationControlUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DiscontinuousExcitationControlDynamics import DiscontinuousExcitationControlDynamics -@dataclass(config=DataclassConfig) +@dataclass class DiscontinuousExcitationControlUserDefined(DiscontinuousExcitationControlDynamics): """ Discontinuous excitation control function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class DiscontinuousExcitationControlUserDefined(DiscontinuousExcitationControlDy proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Discrete.py b/pycgmes/resources/Discrete.py index 2b35aca5..e4a93f3b 100644 --- a/pycgmes/resources/Discrete.py +++ b/pycgmes/resources/Discrete.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Measurement import Measurement -@dataclass(config=DataclassConfig) +@dataclass class Discrete(Measurement): """ Discrete represents a discrete Measurement, i.e. a Measurement representing discrete values, e.g. a Breaker @@ -28,14 +27,16 @@ class Discrete(Measurement): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # DiscreteValues : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # DiscreteValues : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) ValueAliasSet: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DiscreteValue.py b/pycgmes/resources/DiscreteValue.py index 970c1ad6..0dc4e32f 100644 --- a/pycgmes/resources/DiscreteValue.py +++ b/pycgmes/resources/DiscreteValue.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .MeasurementValue import MeasurementValue -@dataclass(config=DataclassConfig) +@dataclass class DiscreteValue(MeasurementValue): """ DiscreteValue represents a discrete MeasurementValue. @@ -27,14 +26,16 @@ class DiscreteValue(MeasurementValue): """ # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # Command : Optional[str] = Field(default=None, in_profiles = [Profile.OP, ]) + # Type M:0..1 in CIM + # Command : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.OP, ]}) Discrete: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/DroopSignalFeedbackKind.py b/pycgmes/resources/DroopSignalFeedbackKind.py index de713172..28d85f26 100644 --- a/pycgmes/resources/DroopSignalFeedbackKind.py +++ b/pycgmes/resources/DroopSignalFeedbackKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class DroopSignalFeedbackKind(Base): """ Governor droop signal feedback source. diff --git a/pycgmes/resources/DynamicsFunctionBlock.py b/pycgmes/resources/DynamicsFunctionBlock.py index 994ceeaa..8289debb 100644 --- a/pycgmes/resources/DynamicsFunctionBlock.py +++ b/pycgmes/resources/DynamicsFunctionBlock.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class DynamicsFunctionBlock(IdentifiedObject): """ Abstract parent class for all Dynamics function blocks. @@ -27,9 +26,11 @@ class DynamicsFunctionBlock(IdentifiedObject): enabled: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/EarthFaultCompensator.py b/pycgmes/resources/EarthFaultCompensator.py index 89bab602..b859b9fb 100644 --- a/pycgmes/resources/EarthFaultCompensator.py +++ b/pycgmes/resources/EarthFaultCompensator.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ConductingEquipment import ConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class EarthFaultCompensator(ConductingEquipment): """ A conducting equipment used to represent a connection to ground which is typically used to compensate earth faults. @@ -28,9 +27,11 @@ class EarthFaultCompensator(ConductingEquipment): r: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/EnergyArea.py b/pycgmes/resources/EnergyArea.py index e0231b2d..c20c2ccb 100644 --- a/pycgmes/resources/EnergyArea.py +++ b/pycgmes/resources/EnergyArea.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class EnergyArea(IdentifiedObject): """ Describes an area having energy production or consumption. Specializations are intended to support the load @@ -27,8 +26,8 @@ class EnergyArea(IdentifiedObject): """ # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # ControlArea : Optional[str] = Field(default=None, in_profiles = [Profile.EQ, ]) + # Type M:0..1 in CIM + # ControlArea : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.EQ, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/EnergyConnection.py b/pycgmes/resources/EnergyConnection.py index 4d44430f..d6b48be2 100644 --- a/pycgmes/resources/EnergyConnection.py +++ b/pycgmes/resources/EnergyConnection.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ConductingEquipment import ConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class EnergyConnection(ConductingEquipment): """ A connection of energy generation or consumption on the power system model. diff --git a/pycgmes/resources/EnergyConsumer.py b/pycgmes/resources/EnergyConsumer.py index 7b5802e1..2d63f505 100644 --- a/pycgmes/resources/EnergyConsumer.py +++ b/pycgmes/resources/EnergyConsumer.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EnergyConnection import EnergyConnection -@dataclass(config=DataclassConfig) +@dataclass class EnergyConsumer(EnergyConnection): """ Generic user of energy - a point of consumption on the power system model. EnergyConsumer.pfixed, .qfixed, @@ -42,58 +41,74 @@ class EnergyConsumer(EnergyConnection): pfixed: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) pfixedPct: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) qfixed: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) qfixedPct: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) LoadResponse: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) p: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) q: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) LoadDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/EnergySchedulingType.py b/pycgmes/resources/EnergySchedulingType.py index e70b2ed2..528f858b 100644 --- a/pycgmes/resources/EnergySchedulingType.py +++ b/pycgmes/resources/EnergySchedulingType.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class EnergySchedulingType(IdentifiedObject): """ Used to define the type of generation for scheduling purposes. @@ -24,8 +23,8 @@ class EnergySchedulingType(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # EnergySource : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # EnergySource : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/EnergySource.py b/pycgmes/resources/EnergySource.py index 06d472be..279583c9 100644 --- a/pycgmes/resources/EnergySource.py +++ b/pycgmes/resources/EnergySource.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EnergyConnection import EnergyConnection -@dataclass(config=DataclassConfig) +@dataclass class EnergySource(EnergyConnection): """ A generic equivalent for an energy supplier on a transmission or distribution voltage level. @@ -50,100 +49,128 @@ class EnergySource(EnergyConnection): EnergySchedulingType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) nominalVoltage: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) pMin: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) pMax: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) r0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) rn: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) x: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) x0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) xn: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) activePower: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) reactivePower: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) voltageAngle: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) voltageMagnitude: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Equipment.py b/pycgmes/resources/Equipment.py index 7aeda7cc..0b101a48 100644 --- a/pycgmes/resources/Equipment.py +++ b/pycgmes/resources/Equipment.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemResource import PowerSystemResource -@dataclass(config=DataclassConfig) +@dataclass class Equipment(PowerSystemResource): """ The parts of a power system that are physical devices, electronic or mechanical. @@ -43,35 +42,43 @@ class Equipment(PowerSystemResource): EquipmentContainer: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) aggregate: bool = Field( default=False, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) normallyInService: bool = Field( default=False, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # OperationalLimitSet : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # OperationalLimitSet : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 inService: bool = Field( default=False, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/EquipmentContainer.py b/pycgmes/resources/EquipmentContainer.py index 2c7e212a..e67b24e2 100644 --- a/pycgmes/resources/EquipmentContainer.py +++ b/pycgmes/resources/EquipmentContainer.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ConnectivityNodeContainer import ConnectivityNodeContainer -@dataclass(config=DataclassConfig) +@dataclass class EquipmentContainer(ConnectivityNodeContainer): """ A modelling construct to provide a root class for containing equipment. @@ -24,8 +23,8 @@ class EquipmentContainer(ConnectivityNodeContainer): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Equipments : list = Field(default_factory=list, in_profiles = [Profile.EQBD, Profile.EQ, ]) + # Type M:0..n in CIM + # Equipments : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQBD, Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/EquivalentBranch.py b/pycgmes/resources/EquivalentBranch.py index d870540b..c7a00f16 100644 --- a/pycgmes/resources/EquivalentBranch.py +++ b/pycgmes/resources/EquivalentBranch.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EquivalentEquipment import EquivalentEquipment -@dataclass(config=DataclassConfig) +@dataclass class EquivalentBranch(EquivalentEquipment): """ The class represents equivalent branches. In cases where a transformer phase shift is modelled and the @@ -73,114 +72,146 @@ class EquivalentBranch(EquivalentEquipment): r: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) r21: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) x: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) x21: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) negativeR12: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) negativeR21: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) negativeX12: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) negativeX21: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) positiveR12: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) positiveR21: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) positiveX12: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) positiveX21: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) zeroR12: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) zeroR21: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) zeroX12: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) zeroX21: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/EquivalentEquipment.py b/pycgmes/resources/EquivalentEquipment.py index 21244d2a..98a93654 100644 --- a/pycgmes/resources/EquivalentEquipment.py +++ b/pycgmes/resources/EquivalentEquipment.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ConductingEquipment import ConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class EquivalentEquipment(ConductingEquipment): """ The class represents equivalent objects that are the result of a network reduction. The class is the base for @@ -28,9 +27,11 @@ class EquivalentEquipment(ConductingEquipment): EquivalentNetwork: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/EquivalentInjection.py b/pycgmes/resources/EquivalentInjection.py index 1fe78bc7..d28ef2a7 100644 --- a/pycgmes/resources/EquivalentInjection.py +++ b/pycgmes/resources/EquivalentInjection.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EquivalentEquipment import EquivalentEquipment -@dataclass(config=DataclassConfig) +@dataclass class EquivalentInjection(EquivalentEquipment): """ This class represents equivalent injections (generation or load). Voltage regulation is allowed only at the point @@ -57,114 +56,146 @@ class EquivalentInjection(EquivalentEquipment): maxP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) maxQ: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) minP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) minQ: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) regulationCapability: bool = Field( default=False, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ReactiveCapabilityCurve: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) r0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) r2: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) x: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) x0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) x2: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) regulationStatus: bool = Field( default=False, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) regulationTarget: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) p: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) q: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/EquivalentNetwork.py b/pycgmes/resources/EquivalentNetwork.py index 12b98617..2081e083 100644 --- a/pycgmes/resources/EquivalentNetwork.py +++ b/pycgmes/resources/EquivalentNetwork.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ConnectivityNodeContainer import ConnectivityNodeContainer -@dataclass(config=DataclassConfig) +@dataclass class EquivalentNetwork(ConnectivityNodeContainer): """ A class that groups electrical equivalents, including internal nodes, of a network that has been reduced. The @@ -26,8 +25,8 @@ class EquivalentNetwork(ConnectivityNodeContainer): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # EquivalentEquipments : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # EquivalentEquipments : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/EquivalentShunt.py b/pycgmes/resources/EquivalentShunt.py index 69f4ea7c..3b614cca 100644 --- a/pycgmes/resources/EquivalentShunt.py +++ b/pycgmes/resources/EquivalentShunt.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EquivalentEquipment import EquivalentEquipment -@dataclass(config=DataclassConfig) +@dataclass class EquivalentShunt(EquivalentEquipment): """ The class represents equivalent shunts. @@ -27,16 +26,20 @@ class EquivalentShunt(EquivalentEquipment): b: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) g: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcAC1A.py b/pycgmes/resources/ExcAC1A.py index 11c5dddc..2fbf2f69 100644 --- a/pycgmes/resources/ExcAC1A.py +++ b/pycgmes/resources/ExcAC1A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcAC1A(ExcitationSystemDynamics): """ Modified IEEE AC1A alternator-supplied rectifier excitation system with different rate feedback source. @@ -52,156 +51,200 @@ class ExcAC1A(ExcitationSystemDynamics): tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) hvlvgates: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcAC2A.py b/pycgmes/resources/ExcAC2A.py index 741251f8..c0d9b1ed 100644 --- a/pycgmes/resources/ExcAC2A.py +++ b/pycgmes/resources/ExcAC2A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcAC2A(ExcitationSystemDynamics): """ Modified IEEE AC2A alternator-supplied rectifier excitation system with different field current limit. @@ -58,198 +57,254 @@ class ExcAC2A(ExcitationSystemDynamics): tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kb1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vfemax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kh: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vlr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kl1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) hvgate: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lvgate: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcAC3A.py b/pycgmes/resources/ExcAC3A.py index 9e07294c..fcdcb0c7 100644 --- a/pycgmes/resources/ExcAC3A.py +++ b/pycgmes/resources/ExcAC3A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcAC3A(ExcitationSystemDynamics): """ Modified IEEE AC3A alternator-supplied rectifier excitation system with different field current limit. @@ -55,184 +54,236 @@ class ExcAC3A(ExcitationSystemDynamics): tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vemin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) klv: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vfemax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vlv: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcAC4A.py b/pycgmes/resources/ExcAC4A.py index bacde61b..3df7009a 100644 --- a/pycgmes/resources/ExcAC4A.py +++ b/pycgmes/resources/ExcAC4A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcAC4A(ExcitationSystemDynamics): """ Modified IEEE AC4A alternator-supplied rectifier excitation system with different minimum controller output. @@ -34,65 +33,83 @@ class ExcAC4A(ExcitationSystemDynamics): vimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcAC5A.py b/pycgmes/resources/ExcAC5A.py index ddd12ea2..7d2de02b 100644 --- a/pycgmes/resources/ExcAC5A.py +++ b/pycgmes/resources/ExcAC5A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcAC5A(ExcitationSystemDynamics): """ Modified IEEE AC5A alternator-supplied rectifier excitation system with different minimum controller output. @@ -45,128 +44,164 @@ class ExcAC5A(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcAC6A.py b/pycgmes/resources/ExcAC6A.py index d8c6c001..a2519ec3 100644 --- a/pycgmes/resources/ExcAC6A.py +++ b/pycgmes/resources/ExcAC6A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcAC6A(ExcitationSystemDynamics): """ Modified IEEE AC6A alternator-supplied rectifier excitation system with speed input. @@ -52,163 +51,209 @@ class ExcAC6A(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tk: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kh: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tj: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vfelim: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vhmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcAC8B.py b/pycgmes/resources/ExcAC8B.py index 1a29bb7f..ec8df1b0 100644 --- a/pycgmes/resources/ExcAC8B.py +++ b/pycgmes/resources/ExcAC8B.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcAC8B(ExcitationSystemDynamics): """ Modified IEEE AC8B alternator-supplied rectifier excitation system with speed input and input limiter. @@ -61,191 +60,245 @@ class ExcAC8B(ExcitationSystemDynamics): inlim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kdr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kir: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pidlim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tdr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) telim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vemin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vfemax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vpidmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vpidmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vtmult: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcANS.py b/pycgmes/resources/ExcANS.py index 45abddb2..230daa37 100644 --- a/pycgmes/resources/ExcANS.py +++ b/pycgmes/resources/ExcANS.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcANS(ExcitationSystemDynamics): """ Italian excitation system. It represents static field voltage or excitation current feedback excitation system. @@ -41,100 +40,128 @@ class ExcANS(ExcitationSystemDynamics): k3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kce: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) blint: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kvfif: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ifmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ifmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) krvecc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcAVR1.py b/pycgmes/resources/ExcAVR1.py index db09653b..22379148 100644 --- a/pycgmes/resources/ExcAVR1.py +++ b/pycgmes/resources/ExcAVR1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcAVR1(ExcitationSystemDynamics): """ Italian excitation system corresponding to IEEE (1968) type 1 model. It represents an exciter dynamo and @@ -38,86 +37,110 @@ class ExcAVR1(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) e1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) se1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) e2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) se2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcAVR2.py b/pycgmes/resources/ExcAVR2.py index cb718d43..533b09df 100644 --- a/pycgmes/resources/ExcAVR2.py +++ b/pycgmes/resources/ExcAVR2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcAVR2(ExcitationSystemDynamics): """ Italian excitation system corresponding to IEEE (1968) type 2 model. It represents an alternator and rotating diodes @@ -39,93 +38,119 @@ class ExcAVR2(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) e1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) se1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) e2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) se2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcAVR3.py b/pycgmes/resources/ExcAVR3.py index b68f9a20..186d7a55 100644 --- a/pycgmes/resources/ExcAVR3.py +++ b/pycgmes/resources/ExcAVR3.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcAVR3(ExcitationSystemDynamics): """ Italian excitation system. It represents an exciter dynamo and electric regulator. @@ -37,86 +36,110 @@ class ExcAVR3(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) e1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) se1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) e2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) se2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcAVR4.py b/pycgmes/resources/ExcAVR4.py index ff2991b2..c434ebf4 100644 --- a/pycgmes/resources/ExcAVR4.py +++ b/pycgmes/resources/ExcAVR4.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcAVR4(ExcitationSystemDynamics): """ Italian excitation system. It represents a static exciter and electric voltage regulator. @@ -40,100 +39,128 @@ class ExcAVR4(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vfmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vfmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kif: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tif: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1if: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) imul: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcAVR5.py b/pycgmes/resources/ExcAVR5.py index 1ace83e0..e15dc66a 100644 --- a/pycgmes/resources/ExcAVR5.py +++ b/pycgmes/resources/ExcAVR5.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcAVR5(ExcitationSystemDynamics): """ Manual excitation control with field circuit resistance. This model can be used as a very simple representation of @@ -30,23 +29,29 @@ class ExcAVR5(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rex: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcAVR7.py b/pycgmes/resources/ExcAVR7.py index 17e29775..7ba1a338 100644 --- a/pycgmes/resources/ExcAVR7.py +++ b/pycgmes/resources/ExcAVR7.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcAVR7(ExcitationSystemDynamics): """ IVO excitation system. @@ -46,149 +45,191 @@ class ExcAVR7(ExcitationSystemDynamics): k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmax1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmin1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmax3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmin3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmax5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmin5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcBBC.py b/pycgmes/resources/ExcBBC.py index 73b294d5..34f6f259 100644 --- a/pycgmes/resources/ExcBBC.py +++ b/pycgmes/resources/ExcBBC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcBBC(ExcitationSystemDynamics): """ Transformer fed static excitation system (static with ABB regulator). This model represents a static excitation @@ -40,79 +39,101 @@ class ExcBBC(ExcitationSystemDynamics): t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xe: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) switch: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcCZ.py b/pycgmes/resources/ExcCZ.py index 2d5b70e0..648e3cd2 100644 --- a/pycgmes/resources/ExcCZ.py +++ b/pycgmes/resources/ExcCZ.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcCZ(ExcitationSystemDynamics): """ Czech proportion/integral exciter. @@ -35,72 +34,92 @@ class ExcCZ(ExcitationSystemDynamics): kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcDC1A.py b/pycgmes/resources/ExcDC1A.py index e8c94af8..c25035dc 100644 --- a/pycgmes/resources/ExcDC1A.py +++ b/pycgmes/resources/ExcDC1A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcDC1A(ExcitationSystemDynamics): """ Modified IEEE DC1A direct current commutator exciter with speed input and without underexcitation limiters (UEL) @@ -48,128 +47,164 @@ class ExcDC1A(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) exclim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcDC2A.py b/pycgmes/resources/ExcDC2A.py index 00a245be..7e7a82de 100644 --- a/pycgmes/resources/ExcDC2A.py +++ b/pycgmes/resources/ExcDC2A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcDC2A(ExcitationSystemDynamics): """ Modified IEEE DC2A direct current commutator exciter with speed input, one more leg block in feedback loop and @@ -52,128 +51,164 @@ class ExcDC2A(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) exclim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vtlim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcDC3A.py b/pycgmes/resources/ExcDC3A.py index 7ed96891..f0f9c8f2 100644 --- a/pycgmes/resources/ExcDC3A.py +++ b/pycgmes/resources/ExcDC3A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcDC3A(ExcitationSystemDynamics): """ Modified IEEE DC3A direct current commutator exciter with speed input, and deadband. DC old type 4. @@ -46,114 +45,146 @@ class ExcDC3A(ExcitationSystemDynamics): trh: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kv: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) exclim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdlim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcDC3A1.py b/pycgmes/resources/ExcDC3A1.py index 44bad546..e96cf751 100644 --- a/pycgmes/resources/ExcDC3A1.py +++ b/pycgmes/resources/ExcDC3A1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcDC3A1(ExcitationSystemDynamics): """ Modified old IEEE type 3 excitation system. @@ -40,100 +39,128 @@ class ExcDC3A1(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vbmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) exclim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vb1max: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vblim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcELIN1.py b/pycgmes/resources/ExcELIN1.py index 0931eddb..b1cee8b4 100644 --- a/pycgmes/resources/ExcELIN1.py +++ b/pycgmes/resources/ExcELIN1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcELIN1(ExcitationSystemDynamics): """ Static PI transformer fed excitation system ELIN (VATECH) - simplified model. This model represents an all-static @@ -44,107 +43,137 @@ class ExcELIN1(ExcitationSystemDynamics): tfi: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tnu: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vpu: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vpi: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vpnf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dpnf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tsw: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xe: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ts1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ts2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) smax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcELIN2.py b/pycgmes/resources/ExcELIN2.py index 4026266f..9fd63298 100644 --- a/pycgmes/resources/ExcELIN2.py +++ b/pycgmes/resources/ExcELIN2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcELIN2(ExcitationSystemDynamics): """ Detailed excitation system ELIN (VATECH). This model represents an all-static excitation system. A PI voltage @@ -59,191 +58,245 @@ class ExcELIN2(ExcitationSystemDynamics): k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k1ec: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pid1max: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) iefmax2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ketb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) upmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) upmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tr4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) iefmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) iefmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdbas: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcHU.py b/pycgmes/resources/ExcHU.py index 180185c1..99cd1b93 100644 --- a/pycgmes/resources/ExcHU.py +++ b/pycgmes/resources/ExcHU.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcHU(ExcitationSystemDynamics): """ Hungarian excitation system, with built-in voltage transducer. @@ -38,86 +37,110 @@ class ExcHU(ExcitationSystemDynamics): tr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) imin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) imax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ae: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) emin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) emax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ai: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) atr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEAC1A.py b/pycgmes/resources/ExcIEEEAC1A.py index 088bed6d..9eb06616 100644 --- a/pycgmes/resources/ExcIEEEAC1A.py +++ b/pycgmes/resources/ExcIEEEAC1A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEAC1A(ExcitationSystemDynamics): """ IEEE 421.5-2005 type AC1A model. The model represents the field-controlled alternator-rectifier excitation systems @@ -49,128 +48,164 @@ class ExcIEEEAC1A(ExcitationSystemDynamics): tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEAC2A.py b/pycgmes/resources/ExcIEEEAC2A.py index 032342f6..0b03b354 100644 --- a/pycgmes/resources/ExcIEEEAC2A.py +++ b/pycgmes/resources/ExcIEEEAC2A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEAC2A(ExcitationSystemDynamics): """ IEEE 421.5-2005 type AC2A model. The model represents a high initial response field-controlled alternator-rectifier @@ -53,149 +52,191 @@ class ExcIEEEAC2A(ExcitationSystemDynamics): tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vfemax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kh: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEAC3A.py b/pycgmes/resources/ExcIEEEAC3A.py index 9892f37b..96239ed2 100644 --- a/pycgmes/resources/ExcIEEEAC3A.py +++ b/pycgmes/resources/ExcIEEEAC3A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEAC3A(ExcitationSystemDynamics): """ IEEE 421.5-2005 type AC3A model. The model represents the field-controlled alternator-rectifier excitation systems @@ -56,149 +55,191 @@ class ExcIEEEAC3A(ExcitationSystemDynamics): tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vemin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vfemax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEAC4A.py b/pycgmes/resources/ExcIEEEAC4A.py index e9ce4a2d..118c7926 100644 --- a/pycgmes/resources/ExcIEEEAC4A.py +++ b/pycgmes/resources/ExcIEEEAC4A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEAC4A(ExcitationSystemDynamics): """ IEEE 421.5-2005 type AC4A model. The model represents type AC4A alternator-supplied controlled-rectifier excitation @@ -39,65 +38,83 @@ class ExcIEEEAC4A(ExcitationSystemDynamics): vimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEAC5A.py b/pycgmes/resources/ExcIEEEAC5A.py index 36099303..4d5ee8cf 100644 --- a/pycgmes/resources/ExcIEEEAC5A.py +++ b/pycgmes/resources/ExcIEEEAC5A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEAC5A(ExcitationSystemDynamics): """ IEEE 421.5-2005 type AC5A model. The model represents a simplified model for brushless excitation systems. The @@ -46,100 +45,128 @@ class ExcIEEEAC5A(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEAC6A.py b/pycgmes/resources/ExcIEEEAC6A.py index 1e732f40..c7242156 100644 --- a/pycgmes/resources/ExcIEEEAC6A.py +++ b/pycgmes/resources/ExcIEEEAC6A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEAC6A(ExcitationSystemDynamics): """ IEEE 421.5-2005 type AC6A model. The model represents field-controlled alternator-rectifier excitation systems with @@ -54,156 +53,200 @@ class ExcIEEEAC6A(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tk: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kh: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tj: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vfelim: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vhmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEAC7B.py b/pycgmes/resources/ExcIEEEAC7B.py index 70590b16..02c187ca 100644 --- a/pycgmes/resources/ExcIEEEAC7B.py +++ b/pycgmes/resources/ExcIEEEAC7B.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEAC7B(ExcitationSystemDynamics): """ IEEE 421.5-2005 type AC7B model. The model represents excitation systems which consist of an AC alternator with @@ -59,184 +58,236 @@ class ExcIEEEAC7B(ExcitationSystemDynamics): kpr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kir: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kdr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tdr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpa: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kia: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vfemax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vemin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEAC8B.py b/pycgmes/resources/ExcIEEEAC8B.py index 332c7b89..3360caff 100644 --- a/pycgmes/resources/ExcIEEEAC8B.py +++ b/pycgmes/resources/ExcIEEEAC8B.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEAC8B(ExcitationSystemDynamics): """ IEEE 421.5-2005 type AC8B model. This model represents a PID voltage regulator with either a brushless exciter or DC @@ -54,128 +53,164 @@ class ExcIEEEAC8B(ExcitationSystemDynamics): kpr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kir: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kdr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tdr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vfemax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vemin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seve2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEDC1A.py b/pycgmes/resources/ExcIEEEDC1A.py index 1b734592..6d086d67 100644 --- a/pycgmes/resources/ExcIEEEDC1A.py +++ b/pycgmes/resources/ExcIEEEDC1A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEDC1A(ExcitationSystemDynamics): """ IEEE 421.5-2005 type DC1A model. This model represents field-controlled DC commutator exciters with continuously @@ -50,114 +49,146 @@ class ExcIEEEDC1A(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uelin: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) exclim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEDC2A.py b/pycgmes/resources/ExcIEEEDC2A.py index 39f4f7a2..e9d9ee88 100644 --- a/pycgmes/resources/ExcIEEEDC2A.py +++ b/pycgmes/resources/ExcIEEEDC2A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEDC2A(ExcitationSystemDynamics): """ IEEE 421.5-2005 type DC2A model. This model represents field-controlled DC commutator exciters with continuously @@ -49,114 +48,146 @@ class ExcIEEEDC2A(ExcitationSystemDynamics): efd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) exclim: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uelin: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEDC3A.py b/pycgmes/resources/ExcIEEEDC3A.py index c08b5469..a60a312a 100644 --- a/pycgmes/resources/ExcIEEEDC3A.py +++ b/pycgmes/resources/ExcIEEEDC3A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEDC3A(ExcitationSystemDynamics): """ IEEE 421.5-2005 type DC3A model. This model represents older systems, in particular those DC commutator exciters @@ -46,79 +45,101 @@ class ExcIEEEDC3A(ExcitationSystemDynamics): trh: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kv: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) exclim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEDC4B.py b/pycgmes/resources/ExcIEEEDC4B.py index b6d94e4d..67a5a738 100644 --- a/pycgmes/resources/ExcIEEEDC4B.py +++ b/pycgmes/resources/ExcIEEEDC4B.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEDC4B(ExcitationSystemDynamics): """ IEEE 421.5-2005 type DC4B model. These excitation systems utilize a field-controlled DC commutator exciter with a @@ -48,135 +47,173 @@ class ExcIEEEDC4B(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) seefd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vemin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) oelin: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uelin: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEST1A.py b/pycgmes/resources/ExcIEEEST1A.py index fe05b046..222ad89e 100644 --- a/pycgmes/resources/ExcIEEEST1A.py +++ b/pycgmes/resources/ExcIEEEST1A.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEST1A(ExcitationSystemDynamics): """ IEEE 421.5-2005 type ST1A model. This model represents systems in which excitation power is supplied through a @@ -49,135 +48,173 @@ class ExcIEEEST1A(ExcitationSystemDynamics): ilr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) klr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pssin: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uelin: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEST1AUELselectorKind.py b/pycgmes/resources/ExcIEEEST1AUELselectorKind.py index 9bd1a8c0..373d4346 100644 --- a/pycgmes/resources/ExcIEEEST1AUELselectorKind.py +++ b/pycgmes/resources/ExcIEEEST1AUELselectorKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEST1AUELselectorKind(Base): """ Types of connections for the UEL input used in ExcIEEEST1A. diff --git a/pycgmes/resources/ExcIEEEST2A.py b/pycgmes/resources/ExcIEEEST2A.py index ff4e2a4d..cd66f43c 100644 --- a/pycgmes/resources/ExcIEEEST2A.py +++ b/pycgmes/resources/ExcIEEEST2A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEST2A(ExcitationSystemDynamics): """ IEEE 421.5-2005 type ST2A model. Some static systems use both current and voltage sources (generator terminal @@ -41,93 +40,119 @@ class ExcIEEEST2A(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uelin: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEST3A.py b/pycgmes/resources/ExcIEEEST3A.py index 36aca277..bf45f931 100644 --- a/pycgmes/resources/ExcIEEEST3A.py +++ b/pycgmes/resources/ExcIEEEST3A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEST3A(ExcitationSystemDynamics): """ IEEE 421.5-2005 type ST3A model. Some static systems utilize a field voltage control loop to linearize the exciter @@ -52,142 +51,182 @@ class ExcIEEEST3A(ExcitationSystemDynamics): vimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) km: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tm: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) thetap: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vbmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vgmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEST4B.py b/pycgmes/resources/ExcIEEEST4B.py index 81cc7ebc..f1321046 100644 --- a/pycgmes/resources/ExcIEEEST4B.py +++ b/pycgmes/resources/ExcIEEEST4B.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEST4B(ExcitationSystemDynamics): """ IEEE 421.5-2005 type ST4B model. This model is a variation of the type ST3A model, with a proportional plus integral @@ -45,114 +44,146 @@ class ExcIEEEST4B(ExcitationSystemDynamics): kpr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kir: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpm: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kim: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) thetap: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vbmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEST5B.py b/pycgmes/resources/ExcIEEEST5B.py index ecf19668..4141ecf8 100644 --- a/pycgmes/resources/ExcIEEEST5B.py +++ b/pycgmes/resources/ExcIEEEST5B.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEST5B(ExcitationSystemDynamics): """ IEEE 421.5-2005 type ST5B model. The type ST5B excitation system is a variation of the type ST1A model, with @@ -45,121 +44,155 @@ class ExcIEEEST5B(ExcitationSystemDynamics): kr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) toc1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tob1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) toc2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tob2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tuc1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tub1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tuc2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tub2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEST6B.py b/pycgmes/resources/ExcIEEEST6B.py index fe202701..2a421e53 100644 --- a/pycgmes/resources/ExcIEEEST6B.py +++ b/pycgmes/resources/ExcIEEEST6B.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEST6B(ExcitationSystemDynamics): """ IEEE 421.5-2005 type ST6B model. This model consists of a PI voltage regulator with an inner loop field voltage @@ -42,100 +41,128 @@ class ExcIEEEST6B(ExcitationSystemDynamics): ilr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kci: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kff: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kia: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) klr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) km: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpa: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) oelin: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcIEEEST7B.py b/pycgmes/resources/ExcIEEEST7B.py index b9219ae9..78a32125 100644 --- a/pycgmes/resources/ExcIEEEST7B.py +++ b/pycgmes/resources/ExcIEEEST7B.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcIEEEST7B(ExcitationSystemDynamics): """ IEEE 421.5-2005 type ST7B model. This model is representative of static potential-source excitation systems. In this @@ -49,107 +48,137 @@ class ExcIEEEST7B(ExcitationSystemDynamics): kh: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kia: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpa: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) oelin: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tia: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uelin: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcNI.py b/pycgmes/resources/ExcNI.py index 6e154865..858ebe47 100644 --- a/pycgmes/resources/ExcNI.py +++ b/pycgmes/resources/ExcNI.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcNI(ExcitationSystemDynamics): """ Bus or solid fed SCR (silicon-controlled rectifier) bridge excitation system model type NI (NVE). @@ -37,72 +36,92 @@ class ExcNI(ExcitationSystemDynamics): busFedSelector: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcOEX3T.py b/pycgmes/resources/ExcOEX3T.py index fd141150..e2ecd97f 100644 --- a/pycgmes/resources/ExcOEX3T.py +++ b/pycgmes/resources/ExcOEX3T.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcOEX3T(ExcitationSystemDynamics): """ Modified IEEE type ST1 excitation system with semi-continuous and acting terminal voltage limiter. @@ -44,135 +43,173 @@ class ExcOEX3T(ExcitationSystemDynamics): t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) e1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) see1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) e2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) see2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcPIC.py b/pycgmes/resources/ExcPIC.py index dfa3bbc6..89fcb57c 100644 --- a/pycgmes/resources/ExcPIC.py +++ b/pycgmes/resources/ExcPIC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcPIC(ExcitationSystemDynamics): """ Proportional/integral regulator excitation system. This model can be used to represent excitation systems with a @@ -49,163 +48,209 @@ class ExcPIC(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vr1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vr2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) e1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) se1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) e2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) se2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcREXS.py b/pycgmes/resources/ExcREXS.py index c858dbc9..f5e2acc5 100644 --- a/pycgmes/resources/ExcREXS.py +++ b/pycgmes/resources/ExcREXS.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcREXS(ExcitationSystemDynamics): """ General purpose rotating excitation system. This model can be used to represent a wide range of excitation systems @@ -64,254 +63,326 @@ class ExcREXS(ExcitationSystemDynamics): e1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) e2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fbf: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) flimf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kefd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kh: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kii: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kip: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kvi: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kvp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kvphz: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) nvphz: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) se1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) se2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vcmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vfmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vfmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcREXSFeedbackSignalKind.py b/pycgmes/resources/ExcREXSFeedbackSignalKind.py index b9b9adb8..afd552f2 100644 --- a/pycgmes/resources/ExcREXSFeedbackSignalKind.py +++ b/pycgmes/resources/ExcREXSFeedbackSignalKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class ExcREXSFeedbackSignalKind(Base): """ Types of rate feedback signals. diff --git a/pycgmes/resources/ExcRQB.py b/pycgmes/resources/ExcRQB.py index 69d194b2..bab22102 100644 --- a/pycgmes/resources/ExcRQB.py +++ b/pycgmes/resources/ExcRQB.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcRQB(ExcitationSystemDynamics): """ Excitation system type RQB (four-loop regulator, r?gulateur quatre boucles, developed in France) primarily used in @@ -40,93 +39,119 @@ class ExcRQB(ExcitationSystemDynamics): ki0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) klir: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ucmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ucmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lus: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) klus: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) mesu: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4m: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lsat: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcSCRX.py b/pycgmes/resources/ExcSCRX.py index 88b37f93..d6bf2d09 100644 --- a/pycgmes/resources/ExcSCRX.py +++ b/pycgmes/resources/ExcSCRX.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcSCRX(ExcitationSystemDynamics): """ Simple excitation system with generic characteristics typical of many excitation systems; intended for use where @@ -35,58 +34,74 @@ class ExcSCRX(ExcitationSystemDynamics): tatb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) emin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) emax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) cswitch: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rcrfd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcSEXS.py b/pycgmes/resources/ExcSEXS.py index b51106f5..7df38954 100644 --- a/pycgmes/resources/ExcSEXS.py +++ b/pycgmes/resources/ExcSEXS.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcSEXS(ExcitationSystemDynamics): """ Simplified excitation system. @@ -35,72 +34,92 @@ class ExcSEXS(ExcitationSystemDynamics): tatb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) emin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) emax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcSK.py b/pycgmes/resources/ExcSK.py index 0b5359ab..7d055462 100644 --- a/pycgmes/resources/ExcSK.py +++ b/pycgmes/resources/ExcSK.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcSK(ExcitationSystemDynamics): """ Slovakian excitation system. UEL and secondary voltage control are included in this model. When this model is used, @@ -63,226 +62,290 @@ class ExcSK(ExcitationSystemDynamics): efdmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) emax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) emin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kce: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kgob: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kqi: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kqob: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kqp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) nq: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) qconoff: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) qz: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) remote: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) sbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) urmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) urmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vtmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vtmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) yp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcST1A.py b/pycgmes/resources/ExcST1A.py index 40bbe067..49679d7a 100644 --- a/pycgmes/resources/ExcST1A.py +++ b/pycgmes/resources/ExcST1A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcST1A(ExcitationSystemDynamics): """ Modification of an old IEEE ST1A static excitation system without overexcitation limiter (OEL) and underexcitation @@ -44,128 +43,164 @@ class ExcST1A(ExcitationSystemDynamics): vimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ilr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) klr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xe: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcST2A.py b/pycgmes/resources/ExcST2A.py index b0b00258..3498cd70 100644 --- a/pycgmes/resources/ExcST2A.py +++ b/pycgmes/resources/ExcST2A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcST2A(ExcitationSystemDynamics): """ Modified IEEE ST2A static excitation system with another lead-lag block added to match the model defined by WECC. @@ -40,107 +39,137 @@ class ExcST2A(ExcitationSystemDynamics): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uelin: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcST3A.py b/pycgmes/resources/ExcST3A.py index ab939936..025ea701 100644 --- a/pycgmes/resources/ExcST3A.py +++ b/pycgmes/resources/ExcST3A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcST3A(ExcitationSystemDynamics): """ Modified IEEE ST3A static excitation system with added speed multiplier. @@ -45,142 +44,182 @@ class ExcST3A(ExcitationSystemDynamics): vimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kj: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) km: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tm: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) thetap: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vbmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vgmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcST4B.py b/pycgmes/resources/ExcST4B.py index a663cba7..fae0facd 100644 --- a/pycgmes/resources/ExcST4B.py +++ b/pycgmes/resources/ExcST4B.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcST4B(ExcitationSystemDynamics): """ Modified IEEE ST4B static excitation system with maximum inner loop feedback gain Vgmax. @@ -46,135 +45,173 @@ class ExcST4B(ExcitationSystemDynamics): kpr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kir: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpm: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kim: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) thetap: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vbmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vgmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uel: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lvgate: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcST6B.py b/pycgmes/resources/ExcST6B.py index 3ded7c9f..19949367 100644 --- a/pycgmes/resources/ExcST6B.py +++ b/pycgmes/resources/ExcST6B.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcST6B(ExcitationSystemDynamics): """ Modified IEEE ST6B static excitation system with PID controller and optional inner feedback loop. @@ -51,163 +50,209 @@ class ExcST6B(ExcitationSystemDynamics): ilr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k1: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kcl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kff: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kia: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) klr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) km: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpa: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kvd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) oelin: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ts: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tvd: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vilim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmult: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcST6BOELselectorKind.py b/pycgmes/resources/ExcST6BOELselectorKind.py index 3afc987d..8e6a6eaa 100644 --- a/pycgmes/resources/ExcST6BOELselectorKind.py +++ b/pycgmes/resources/ExcST6BOELselectorKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class ExcST6BOELselectorKind(Base): """ Types of connections for the OEL input used for static excitation systems type 6B. diff --git a/pycgmes/resources/ExcST7B.py b/pycgmes/resources/ExcST7B.py index 74d3fc55..23eacee0 100644 --- a/pycgmes/resources/ExcST7B.py +++ b/pycgmes/resources/ExcST7B.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcST7B(ExcitationSystemDynamics): """ Modified IEEE ST7B static excitation system without stator current limiter (SCL) and current compensator (DROOP) @@ -43,114 +42,146 @@ class ExcST7B(ExcitationSystemDynamics): kh: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kia: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpa: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) oelin: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tia: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ts: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uelin: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ExcST7BOELselectorKind.py b/pycgmes/resources/ExcST7BOELselectorKind.py index 8279eaff..7fcc36fa 100644 --- a/pycgmes/resources/ExcST7BOELselectorKind.py +++ b/pycgmes/resources/ExcST7BOELselectorKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class ExcST7BOELselectorKind(Base): """ Types of connections for the OEL input used for static excitation systems type 7B. diff --git a/pycgmes/resources/ExcST7BUELselectorKind.py b/pycgmes/resources/ExcST7BUELselectorKind.py index 0a856784..65f1b616 100644 --- a/pycgmes/resources/ExcST7BUELselectorKind.py +++ b/pycgmes/resources/ExcST7BUELselectorKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class ExcST7BUELselectorKind(Base): """ Types of connections for the UEL input used for static excitation systems type 7B. diff --git a/pycgmes/resources/ExcitationSystemDynamics.py b/pycgmes/resources/ExcitationSystemDynamics.py index 85d584ea..236726d0 100644 --- a/pycgmes/resources/ExcitationSystemDynamics.py +++ b/pycgmes/resources/ExcitationSystemDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class ExcitationSystemDynamics(DynamicsFunctionBlock): """ Excitation system function block whose behaviour is described by reference to a standard model or by definition of a @@ -38,38 +37,40 @@ class ExcitationSystemDynamics(DynamicsFunctionBlock): SynchronousMachineDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # VoltageCompensatorDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # VoltageCompensatorDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # OverexcitationLimiterDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # OverexcitationLimiterDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # PFVArControllerType2Dynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # PFVArControllerType2Dynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # DiscontinuousExcitationControlDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) # noqa: E501 + # Type M:0..1 in CIM + # DiscontinuousExcitationControlDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # PowerSystemStabilizerDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # PowerSystemStabilizerDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # UnderexcitationLimiterDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # UnderexcitationLimiterDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # PFVArControllerType1Dynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # PFVArControllerType1Dynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/ExcitationSystemUserDefined.py b/pycgmes/resources/ExcitationSystemUserDefined.py index e7e9960e..aec02916 100644 --- a/pycgmes/resources/ExcitationSystemUserDefined.py +++ b/pycgmes/resources/ExcitationSystemUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ExcitationSystemDynamics import ExcitationSystemDynamics -@dataclass(config=DataclassConfig) +@dataclass class ExcitationSystemUserDefined(ExcitationSystemDynamics): """ Excitation system function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class ExcitationSystemUserDefined(ExcitationSystemDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/ExternalNetworkInjection.py b/pycgmes/resources/ExternalNetworkInjection.py index fd9c5708..1e096e2e 100644 --- a/pycgmes/resources/ExternalNetworkInjection.py +++ b/pycgmes/resources/ExternalNetworkInjection.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .RegulatingCondEq import RegulatingCondEq -@dataclass(config=DataclassConfig) +@dataclass class ExternalNetworkInjection(RegulatingCondEq): """ This class represents the external network and it is used for IEC 60909 calculations. @@ -60,128 +59,164 @@ class ExternalNetworkInjection(RegulatingCondEq): governorSCD: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) maxP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) maxQ: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) minP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) minQ: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ikSecond: bool = Field( default=False, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) maxInitialSymShCCurrent: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) maxR0ToX0Ratio: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) maxR1ToX1Ratio: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) maxZ0ToZ1Ratio: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) minInitialSymShCCurrent: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) minR0ToX0Ratio: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) minR1ToX1Ratio: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) minZ0ToZ1Ratio: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) voltageFactor: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) referencePriority: int = Field( default=0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) p: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) q: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/FaultIndicator.py b/pycgmes/resources/FaultIndicator.py index df81d953..249a4626 100644 --- a/pycgmes/resources/FaultIndicator.py +++ b/pycgmes/resources/FaultIndicator.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .AuxiliaryEquipment import AuxiliaryEquipment -@dataclass(config=DataclassConfig) +@dataclass class FaultIndicator(AuxiliaryEquipment): """ A FaultIndicator is typically only an indicator (which may or may not be remotely monitored), and not a piece of diff --git a/pycgmes/resources/Float.py b/pycgmes/resources/Float.py index e03bbe17..f883f427 100644 --- a/pycgmes/resources/Float.py +++ b/pycgmes/resources/Float.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Float(Base): """ A floating point number. The range is unspecified and not limited. diff --git a/pycgmes/resources/FossilFuel.py b/pycgmes/resources/FossilFuel.py index 6a86df77..1773b055 100644 --- a/pycgmes/resources/FossilFuel.py +++ b/pycgmes/resources/FossilFuel.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class FossilFuel(IdentifiedObject): """ The fossil fuel consumed by the non-nuclear thermal generating unit. For example, coal, oil, gas, etc. These are @@ -29,16 +28,20 @@ class FossilFuel(IdentifiedObject): fossilFuelType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ThermalGeneratingUnit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/FrancisGovernorControlKind.py b/pycgmes/resources/FrancisGovernorControlKind.py index 75d0dd4a..18f4d879 100644 --- a/pycgmes/resources/FrancisGovernorControlKind.py +++ b/pycgmes/resources/FrancisGovernorControlKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class FrancisGovernorControlKind(Base): """ Governor control flag for Francis hydro model. diff --git a/pycgmes/resources/Frequency.py b/pycgmes/resources/Frequency.py index 55244712..bd911a3e 100644 --- a/pycgmes/resources/Frequency.py +++ b/pycgmes/resources/Frequency.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Frequency(Base): """ Cycles per second. @@ -29,26 +28,32 @@ class Frequency(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.DY, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.DY, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/FuelType.py b/pycgmes/resources/FuelType.py index 2a0ac763..c1e65981 100644 --- a/pycgmes/resources/FuelType.py +++ b/pycgmes/resources/FuelType.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class FuelType(Base): """ Type of fuel. diff --git a/pycgmes/resources/Fuse.py b/pycgmes/resources/Fuse.py index 4fcbb934..409fe6b6 100644 --- a/pycgmes/resources/Fuse.py +++ b/pycgmes/resources/Fuse.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Switch import Switch -@dataclass(config=DataclassConfig) +@dataclass class Fuse(Switch): """ An overcurrent protective device with a circuit opening fusible part that is heated and severed by the passage of diff --git a/pycgmes/resources/GenICompensationForGenJ.py b/pycgmes/resources/GenICompensationForGenJ.py index 8d373c50..b85201bf 100644 --- a/pycgmes/resources/GenICompensationForGenJ.py +++ b/pycgmes/resources/GenICompensationForGenJ.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class GenICompensationForGenJ(IdentifiedObject): """ Resistive and reactive components of compensation for generator associated with IEEE type 2 voltage compensator for @@ -33,30 +32,38 @@ class GenICompensationForGenJ(IdentifiedObject): SynchronousMachineDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) VcompIEEEType2: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rcij: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xcij: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GeneratingUnit.py b/pycgmes/resources/GeneratingUnit.py index 68b36856..d110a6bb 100644 --- a/pycgmes/resources/GeneratingUnit.py +++ b/pycgmes/resources/GeneratingUnit.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Equipment import Equipment -@dataclass(config=DataclassConfig) +@dataclass class GeneratingUnit(Equipment): """ A single or set of synchronous machines for converting mechanical power into alternating-current power. For example, @@ -59,127 +58,159 @@ class GeneratingUnit(Equipment): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ControlAreaGeneratingUnit : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # ControlAreaGeneratingUnit : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 genControlSource: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) governorSCD: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) longPF: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) maximumAllowableSpinningReserve: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) maxOperatingP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) minOperatingP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) nominalP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ratedGrossMaxP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ratedGrossMinP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ratedNetMaxP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) shortPF: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) startupCost: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) variableCost: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) startupTime: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) totalEfficiency: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # GrossToNetActivePowerCurves : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # GrossToNetActivePowerCurves : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # RotatingMachine : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:1..n in CIM + # RotatingMachine : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 normalPF: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GeneratorControlSource.py b/pycgmes/resources/GeneratorControlSource.py index 4bd6bf91..6d2bbf7e 100644 --- a/pycgmes/resources/GeneratorControlSource.py +++ b/pycgmes/resources/GeneratorControlSource.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class GeneratorControlSource(Base): """ The source of controls for a generating unit. diff --git a/pycgmes/resources/GenericNonLinearLoadModelKind.py b/pycgmes/resources/GenericNonLinearLoadModelKind.py index 910de114..b7bdc13a 100644 --- a/pycgmes/resources/GenericNonLinearLoadModelKind.py +++ b/pycgmes/resources/GenericNonLinearLoadModelKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class GenericNonLinearLoadModelKind(Base): """ Type of generic non-linear load model. diff --git a/pycgmes/resources/GeographicalRegion.py b/pycgmes/resources/GeographicalRegion.py index ba7b6f3a..2204833c 100644 --- a/pycgmes/resources/GeographicalRegion.py +++ b/pycgmes/resources/GeographicalRegion.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class GeographicalRegion(IdentifiedObject): """ A geographical region of a power system network model. @@ -24,8 +23,8 @@ class GeographicalRegion(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Regions : list = Field(default_factory=list, in_profiles = [Profile.EQBD, Profile.EQ, ]) + # Type M:0..n in CIM + # Regions : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQBD, Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/GovCT1.py b/pycgmes/resources/GovCT1.py index 80e826c4..c36d4702 100644 --- a/pycgmes/resources/GovCT1.py +++ b/pycgmes/resources/GovCT1.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovCT1(TurbineGovernorDynamics): """ General model for any prime mover with a PID governor, used primarily for combustion turbine and combined cycle @@ -82,247 +81,317 @@ class GovCT1(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rselect: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpelec: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) maxerr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) minerr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpgov: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kigov: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kdgov: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tdgov: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tact: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) wfnl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) wfspd: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) teng: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tfload: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpload: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kiload: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ldref: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dm: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ropen: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rclose: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kimw: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) aset: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tsa: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tsb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rup: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rdown: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovCT2.py b/pycgmes/resources/GovCT2.py index 5eebba21..ca452072 100644 --- a/pycgmes/resources/GovCT2.py +++ b/pycgmes/resources/GovCT2.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovCT2(TurbineGovernorDynamics): """ General governor with frequency-dependent fuel flow limit. This model is a modification of the GovCT1 model in @@ -97,394 +96,506 @@ class GovCT2(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rselect: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpelec: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) maxerr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) minerr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpgov: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kigov: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kdgov: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tdgov: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tact: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) wfnl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) wfspd: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) teng: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tfload: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpload: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kiload: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ldref: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dm: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ropen: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rclose: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kimw: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) aset: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tsa: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tsb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rup: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rdown: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) prate: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) flim1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) plim1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) flim2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) plim2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) flim3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) plim3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) flim4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) plim4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) flim5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) plim5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) flim6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) plim6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) flim7: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) plim7: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) flim8: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) plim8: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) flim9: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) plim9: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) flim10: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) plim10: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovGAST.py b/pycgmes/resources/GovGAST.py index 93db2401..6ab1f276 100644 --- a/pycgmes/resources/GovGAST.py +++ b/pycgmes/resources/GovGAST.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovGAST(TurbineGovernorDynamics): """ Single shaft gas turbine. @@ -39,72 +38,92 @@ class GovGAST(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) at: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovGAST1.py b/pycgmes/resources/GovGAST1.py index dfd98f9a..639c4a3d 100644 --- a/pycgmes/resources/GovGAST1.py +++ b/pycgmes/resources/GovGAST1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovGAST1(TurbineGovernorDynamics): """ Modified single shaft gas turbine. @@ -65,240 +64,308 @@ class GovGAST1(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fidle: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) loadinc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tltr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ltrate: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) b: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eps: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovGAST2.py b/pycgmes/resources/GovGAST2.py index 2cf2e4a6..c549777e 100644 --- a/pycgmes/resources/GovGAST2.py +++ b/pycgmes/resources/GovGAST2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovGAST2(TurbineGovernorDynamics): """ Gas turbine. @@ -59,226 +58,290 @@ class GovGAST2(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) w: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) x: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) y: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) z: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) etd: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tcd: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) trate: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ecr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) b: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) c: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tt: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) af1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bf1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) af2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bf2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) cf2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovGAST3.py b/pycgmes/resources/GovGAST3.py index 63bff322..16b36105 100644 --- a/pycgmes/resources/GovGAST3.py +++ b/pycgmes/resources/GovGAST3.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovGAST3(TurbineGovernorDynamics): """ Generic turbogas with acceleration and temperature controller. @@ -46,149 +45,191 @@ class GovGAST3(TurbineGovernorDynamics): bp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rcmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rcmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ky: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ty: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tac: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kac: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bca: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kca: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dtc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tsi: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ksi: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ttc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tfen: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) mxef: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) mnef: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovGAST4.py b/pycgmes/resources/GovGAST4.py index 82601645..f07db5f5 100644 --- a/pycgmes/resources/GovGAST4.py +++ b/pycgmes/resources/GovGAST4.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovGAST4(TurbineGovernorDynamics): """ Generic turbogas. @@ -36,79 +35,101 @@ class GovGAST4(TurbineGovernorDynamics): bp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ty: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tcm: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ktm: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tm: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rymx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rymn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) mxef: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) mnef: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovGASTWD.py b/pycgmes/resources/GovGASTWD.py index 5776c00a..418123c1 100644 --- a/pycgmes/resources/GovGASTWD.py +++ b/pycgmes/resources/GovGASTWD.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovGASTWD(TurbineGovernorDynamics): """ Woodwardâ„¢ gas turbine governor. [Footnote: Woodward gas turbines are an example of suitable products available @@ -61,233 +60,299 @@ class GovGASTWD(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kdroop: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) etd: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tcd: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) trate: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ecr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) b: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) c: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tt: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) af1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bf1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) af2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bf2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) cf2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydro1.py b/pycgmes/resources/GovHydro1.py index 2679093c..98bafe84 100644 --- a/pycgmes/resources/GovHydro1.py +++ b/pycgmes/resources/GovHydro1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydro1(TurbineGovernorDynamics): """ Basic hydro turbine governor. @@ -39,100 +38,128 @@ class GovHydro1(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rperm: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rtemp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) velm: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) at: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) qnl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) hdam: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydro2.py b/pycgmes/resources/GovHydro2.py index 0ee1e3bd..c881f160 100644 --- a/pycgmes/resources/GovHydro2.py +++ b/pycgmes/resources/GovHydro2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydro2(TurbineGovernorDynamics): """ IEEE hydro turbine governor with straightforward penstock configuration and hydraulic-dashpot governor. @@ -54,205 +53,263 @@ class GovHydro2(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uo: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rperm: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rtemp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) aturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eps: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydro3.py b/pycgmes/resources/GovHydro3.py index 7dd77c28..adeab46f 100644 --- a/pycgmes/resources/GovHydro3.py +++ b/pycgmes/resources/GovHydro3.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydro3(TurbineGovernorDynamics): """ Modified IEEE hydro governor-turbine. This model differs from that defined in the IEEE modelling guideline paper in @@ -63,254 +62,326 @@ class GovHydro3(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) governorControl: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rgate: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) relec: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) velop: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) velcl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tt: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eps: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) at: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) qnl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) h0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydro4.py b/pycgmes/resources/GovHydro4.py index 361b4363..c9038c0b 100644 --- a/pycgmes/resources/GovHydro4.py +++ b/pycgmes/resources/GovHydro4.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydro4(TurbineGovernorDynamics): """ Hydro turbine and governor. Represents plants with straight-forward penstock configurations and hydraulic governors @@ -79,275 +78,353 @@ class GovHydro4(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uo: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rperm: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rtemp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) at: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) hdam: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) qnl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eps: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bgv0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bgv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bgv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bgv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bgv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bgv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tblade: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) model: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydro4ModelKind.py b/pycgmes/resources/GovHydro4ModelKind.py index 7b017bb9..6881d752 100644 --- a/pycgmes/resources/GovHydro4ModelKind.py +++ b/pycgmes/resources/GovHydro4ModelKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class GovHydro4ModelKind(Base): """ Possible types of GovHydro4 models. diff --git a/pycgmes/resources/GovHydroDD.py b/pycgmes/resources/GovHydroDD.py index 2a2df93c..e687150a 100644 --- a/pycgmes/resources/GovHydroDD.py +++ b/pycgmes/resources/GovHydroDD.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydroDD(TurbineGovernorDynamics): """ Double derivative hydro governor and turbine. @@ -62,247 +61,317 @@ class GovHydroDD(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) velop: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) velcl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tturb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) aturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tt: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eps: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) inputSignal: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydroFrancis.py b/pycgmes/resources/GovHydroFrancis.py index 3bc08241..e2fbee90 100644 --- a/pycgmes/resources/GovHydroFrancis.py +++ b/pycgmes/resources/GovHydroFrancis.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydroFrancis(TurbineGovernorDynamics): """ Detailed hydro unit - Francis model. This model can be used to represent three types of governors. A schematic of @@ -58,191 +57,245 @@ class GovHydroFrancis(TurbineGovernorDynamics): am: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) av0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) av1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) etamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) governorControl: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) h1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) h2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) hn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) qc0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) qn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ts: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) twnc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) twng: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tx: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) va: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) valvmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) valvmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) waterTunnelSurgeChamberSimulation: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) zsfc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydroIEEE0.py b/pycgmes/resources/GovHydroIEEE0.py index f971feb7..dd158f87 100644 --- a/pycgmes/resources/GovHydroIEEE0.py +++ b/pycgmes/resources/GovHydroIEEE0.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydroIEEE0(TurbineGovernorDynamics): """ IEEE simplified hydro governor-turbine model. Used for mechanical-hydraulic and electro-hydraulic turbine @@ -36,58 +35,74 @@ class GovHydroIEEE0(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydroIEEE2.py b/pycgmes/resources/GovHydroIEEE2.py index 1007b9f0..5508669b 100644 --- a/pycgmes/resources/GovHydroIEEE2.py +++ b/pycgmes/resources/GovHydroIEEE2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydroIEEE2(TurbineGovernorDynamics): """ IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic- @@ -53,184 +52,236 @@ class GovHydroIEEE2(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uo: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rperm: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rtemp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) aturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydroPID.py b/pycgmes/resources/GovHydroPID.py index 7882b9b3..67fb4d37 100644 --- a/pycgmes/resources/GovHydroPID.py +++ b/pycgmes/resources/GovHydroPID.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydroPID(TurbineGovernorDynamics): """ PID governor and turbine. @@ -60,233 +59,299 @@ class GovHydroPID(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) velop: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) velcl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tturb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) aturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tt: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) inputSignal: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eps: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydroPID2.py b/pycgmes/resources/GovHydroPID2.py index 5fc1eafd..8d062322 100644 --- a/pycgmes/resources/GovHydroPID2.py +++ b/pycgmes/resources/GovHydroPID2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydroPID2(TurbineGovernorDynamics): """ Hydro turbine and governor. Represents plants with straightforward penstock configurations and "three term" electro- @@ -50,156 +49,200 @@ class GovHydroPID2(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) treg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rperm: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) velmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) velmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) d: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) g0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) g1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) g2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) atw: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) feedbackSignal: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydroPelton.py b/pycgmes/resources/GovHydroPelton.py index b769987a..90760872 100644 --- a/pycgmes/resources/GovHydroPelton.py +++ b/pycgmes/resources/GovHydroPelton.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydroPelton(TurbineGovernorDynamics): """ Detailed hydro unit - Pelton model. This model can be used to represent the dynamic related to water tunnel and @@ -61,198 +60,254 @@ class GovHydroPelton(TurbineGovernorDynamics): av0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) av1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) h1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) h2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) hn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) qc0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) qn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) simplifiedPelton: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) staticCompensating: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ts: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tv: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) twnc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) twng: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tx: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) va: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) valvmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) valvmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vav: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vcv: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) waterTunnelSurgeChamberSimulation: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) zsfc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydroR.py b/pycgmes/resources/GovHydroR.py index 2bd4fb94..d2d37875 100644 --- a/pycgmes/resources/GovHydroR.py +++ b/pycgmes/resources/GovHydroR.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydroR(TurbineGovernorDynamics): """ Fourth order lead-lag governor and hydro turbine. @@ -69,296 +68,380 @@ class GovHydroR(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t7: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t8: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) velop: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) velcl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tt: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) inputSignal: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eps: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) at: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) qnl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) h0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydroWEH.py b/pycgmes/resources/GovHydroWEH.py index 0ba023e6..ecae1446 100644 --- a/pycgmes/resources/GovHydroWEH.py +++ b/pycgmes/resources/GovHydroWEH.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydroWEH(TurbineGovernorDynamics): """ WoodwardTM electric hydro governor. [Footnote: Woodward electric hydro governors are an example of suitable @@ -111,359 +110,461 @@ class GovHydroWEH(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rpg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rpp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpe: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tdv: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gtmxop: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gtmxcl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dturb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dpv: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dicn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) feedbackSignal: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fl1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fl2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fl3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fl4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fl5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fp1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fp2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fp3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fp4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fp5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fp6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fp7: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fp8: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fp9: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fp10: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmss1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmss2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmss3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmss4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmss5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmss6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmss7: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmss8: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmss9: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmss10: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovHydroWPID.py b/pycgmes/resources/GovHydroWPID.py index 6e4adbef..e387a956 100644 --- a/pycgmes/resources/GovHydroWPID.py +++ b/pycgmes/resources/GovHydroWPID.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovHydroWPID(TurbineGovernorDynamics): """ WoodwardTM PID hydro governor. [Footnote: Woodward PID hydro governors are an example of suitable products available @@ -49,156 +48,200 @@ class GovHydroWPID(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) treg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) reg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) velmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) velmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gatmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gatmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) d: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovSteam0.py b/pycgmes/resources/GovSteam0.py index 2e1636d7..ce2d5179 100644 --- a/pycgmes/resources/GovSteam0.py +++ b/pycgmes/resources/GovSteam0.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovSteam0(TurbineGovernorDynamics): """ A simplified steam turbine governor. @@ -33,58 +32,74 @@ class GovSteam0(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovSteam1.py b/pycgmes/resources/GovSteam1.py index 047adc28..2b69d55c 100644 --- a/pycgmes/resources/GovSteam1.py +++ b/pycgmes/resources/GovSteam1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovSteam1(TurbineGovernorDynamics): """ Steam turbine governor, based on the GovSteamIEEE1 (with optional deadband and nonlinear valve gain added). @@ -67,275 +66,353 @@ class GovSteam1(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uo: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t7: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k7: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k8: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eps: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) sdb1: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) sdb2: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) valve: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovSteam2.py b/pycgmes/resources/GovSteam2.py index aa61583c..a278629f 100644 --- a/pycgmes/resources/GovSteam2.py +++ b/pycgmes/resources/GovSteam2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovSteam2(TurbineGovernorDynamics): """ Simplified governor. @@ -33,58 +32,74 @@ class GovSteam2(TurbineGovernorDynamics): k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dbf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) mxef: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) mnef: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovSteamBB.py b/pycgmes/resources/GovSteamBB.py index 7159ea96..2a21c7ae 100644 --- a/pycgmes/resources/GovSteamBB.py +++ b/pycgmes/resources/GovSteamBB.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovSteamBB(TurbineGovernorDynamics): """ European governor model. @@ -43,121 +42,155 @@ class GovSteamBB(TurbineGovernorDynamics): fcut: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kls: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kg: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tn: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) peflag: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovSteamCC.py b/pycgmes/resources/GovSteamCC.py index d75d50e8..69135755 100644 --- a/pycgmes/resources/GovSteamCC.py +++ b/pycgmes/resources/GovSteamCC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .CrossCompoundTurbineGovernorDynamics import CrossCompoundTurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovSteamCC(CrossCompoundTurbineGovernorDynamics): """ Cross compound turbine governor. Unlike tandem compound units, cross compound units are not on the same shaft. @@ -42,121 +41,155 @@ class GovSteamCC(CrossCompoundTurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmaxhp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rhp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1hp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3hp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4hp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5hp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fhp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dhp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmaxlp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rlp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1lp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3lp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4lp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5lp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) flp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dlp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovSteamEU.py b/pycgmes/resources/GovSteamEU.py index 11cc0557..11afe8c2 100644 --- a/pycgmes/resources/GovSteamEU.py +++ b/pycgmes/resources/GovSteamEU.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovSteamEU(TurbineGovernorDynamics): """ Simplified boiler and steam turbine with PID governor. @@ -60,247 +59,317 @@ class GovSteamEU(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ke: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tip: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tdp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tfp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kfcor: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) wfmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) wfmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ten: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) komegacor: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) wwmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) wwmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) wmax1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) wmax2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tvhp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) cho: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) chc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) hhpmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tvip: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) cio: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) cic: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) simx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) thp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) trh: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tlp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) prhmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) khp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) klp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovSteamFV2.py b/pycgmes/resources/GovSteamFV2.py index e86c26ee..40ac2679 100644 --- a/pycgmes/resources/GovSteamFV2.py +++ b/pycgmes/resources/GovSteamFV2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovSteamFV2(TurbineGovernorDynamics): """ Steam turbine governor with reheat time constants and modelling of the effects of fast valve closing to reduce @@ -38,86 +37,110 @@ class GovSteamFV2(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tt: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovSteamFV3.py b/pycgmes/resources/GovSteamFV3.py index c8cb7001..791925e1 100644 --- a/pycgmes/resources/GovSteamFV3.py +++ b/pycgmes/resources/GovSteamFV3.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovSteamFV3(TurbineGovernorDynamics): """ Simplified GovSteamIEEE1 steam turbine governor with Prmax limit and fast valving. @@ -57,219 +56,281 @@ class GovSteamFV3(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uo: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) prmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) gv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pgv6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovSteamFV4.py b/pycgmes/resources/GovSteamFV4.py index 20d6ae5a..cc6f736c 100644 --- a/pycgmes/resources/GovSteamFV4.py +++ b/pycgmes/resources/GovSteamFV4.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovSteamFV4(TurbineGovernorDynamics): """ Detailed electro-hydraulic governor for steam unit. @@ -77,359 +76,461 @@ class GovSteamFV4(TurbineGovernorDynamics): kf1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lps: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lpi: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) mxef: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) mnef: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) crmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) crmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kit: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rvgmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rvgmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) svmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) svmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) srmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) srmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kip: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rsmimx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rsmimn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kmp1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kmp2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) srsmp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ty: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) yhpmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) yhpmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tam: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tcm: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ympmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ympmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) y: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) thp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) trh: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tmp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) khp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pr1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pr2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) psmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kic: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kdc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tdc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) cpsmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) cpsmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) krc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tv: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ksh: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovSteamIEEE1.py b/pycgmes/resources/GovSteamIEEE1.py index a3a643cb..379b6ee5 100644 --- a/pycgmes/resources/GovSteamIEEE1.py +++ b/pycgmes/resources/GovSteamIEEE1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovSteamIEEE1(TurbineGovernorDynamics): """ IEEE steam turbine governor model. Reference: IEEE Transactions on Power Apparatus and Systems, November/December @@ -47,149 +46,191 @@ class GovSteamIEEE1(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uo: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t7: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k7: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k8: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GovSteamSGO.py b/pycgmes/resources/GovSteamSGO.py index 3243527d..d268bb0f 100644 --- a/pycgmes/resources/GovSteamSGO.py +++ b/pycgmes/resources/GovSteamSGO.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class GovSteamSGO(TurbineGovernorDynamics): """ Simplified steam turbine governor. @@ -37,86 +36,110 @@ class GovSteamSGO(TurbineGovernorDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/GrossToNetActivePowerCurve.py b/pycgmes/resources/GrossToNetActivePowerCurve.py index 79bf95d4..e9ac0861 100644 --- a/pycgmes/resources/GrossToNetActivePowerCurve.py +++ b/pycgmes/resources/GrossToNetActivePowerCurve.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Curve import Curve -@dataclass(config=DataclassConfig) +@dataclass class GrossToNetActivePowerCurve(Curve): """ Relationship between the generating unit's gross active power output on the X-axis (measured at the terminals of the @@ -31,9 +30,11 @@ class GrossToNetActivePowerCurve(Curve): GeneratingUnit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Ground.py b/pycgmes/resources/Ground.py index 78d2ebf7..e50295d8 100644 --- a/pycgmes/resources/Ground.py +++ b/pycgmes/resources/Ground.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ConductingEquipment import ConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class Ground(ConductingEquipment): """ A point where the system is grounded used for connecting conducting equipment to ground. The power system model can diff --git a/pycgmes/resources/GroundDisconnector.py b/pycgmes/resources/GroundDisconnector.py index 578faf02..cc87e84b 100644 --- a/pycgmes/resources/GroundDisconnector.py +++ b/pycgmes/resources/GroundDisconnector.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Switch import Switch -@dataclass(config=DataclassConfig) +@dataclass class GroundDisconnector(Switch): """ A manually operated or motor operated mechanical switching device used for isolating a circuit or equipment from diff --git a/pycgmes/resources/GroundingImpedance.py b/pycgmes/resources/GroundingImpedance.py index dba20f02..e01919ff 100644 --- a/pycgmes/resources/GroundingImpedance.py +++ b/pycgmes/resources/GroundingImpedance.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EarthFaultCompensator import EarthFaultCompensator -@dataclass(config=DataclassConfig) +@dataclass class GroundingImpedance(EarthFaultCompensator): """ A fixed impedance device used for grounding. @@ -26,9 +25,11 @@ class GroundingImpedance(EarthFaultCompensator): x: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/HVDCDynamics.py b/pycgmes/resources/HVDCDynamics.py index dd083e90..fdf37f6f 100644 --- a/pycgmes/resources/HVDCDynamics.py +++ b/pycgmes/resources/HVDCDynamics.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class HVDCDynamics(DynamicsFunctionBlock): """ HVDC whose behaviour is described by reference to a standard model or by definition of a user-defined model. diff --git a/pycgmes/resources/HydroEnergyConversionKind.py b/pycgmes/resources/HydroEnergyConversionKind.py index 39da9db7..53da0ea1 100644 --- a/pycgmes/resources/HydroEnergyConversionKind.py +++ b/pycgmes/resources/HydroEnergyConversionKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class HydroEnergyConversionKind(Base): """ Specifies the capability of the hydro generating unit to convert energy as a generator or pump. diff --git a/pycgmes/resources/HydroGeneratingUnit.py b/pycgmes/resources/HydroGeneratingUnit.py index 665cc0a4..56fb1279 100644 --- a/pycgmes/resources/HydroGeneratingUnit.py +++ b/pycgmes/resources/HydroGeneratingUnit.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .GeneratingUnit import GeneratingUnit -@dataclass(config=DataclassConfig) +@dataclass class HydroGeneratingUnit(GeneratingUnit): """ A generating unit whose prime mover is a hydraulic turbine (e.g., Francis, Pelton, Kaplan). @@ -30,30 +29,38 @@ class HydroGeneratingUnit(GeneratingUnit): energyConversionCapability: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) dropHeight: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) turbineType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) HydroPowerPlant: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/HydroPlantStorageKind.py b/pycgmes/resources/HydroPlantStorageKind.py index 9a75be5a..701aff47 100644 --- a/pycgmes/resources/HydroPlantStorageKind.py +++ b/pycgmes/resources/HydroPlantStorageKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class HydroPlantStorageKind(Base): """ The type of hydro power plant. diff --git a/pycgmes/resources/HydroPowerPlant.py b/pycgmes/resources/HydroPowerPlant.py index 48f996b4..210c408c 100644 --- a/pycgmes/resources/HydroPowerPlant.py +++ b/pycgmes/resources/HydroPowerPlant.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemResource import PowerSystemResource -@dataclass(config=DataclassConfig) +@dataclass class HydroPowerPlant(PowerSystemResource): """ A hydro power station which can generate or pump. When generating, the generator turbines receive water from an @@ -29,19 +28,21 @@ class HydroPowerPlant(PowerSystemResource): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # HydroGeneratingUnits : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # HydroGeneratingUnits : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 hydroPlantStorageType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # HydroPumps : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # HydroPumps : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/HydroPump.py b/pycgmes/resources/HydroPump.py index 7e0ee3fd..36d1d5ca 100644 --- a/pycgmes/resources/HydroPump.py +++ b/pycgmes/resources/HydroPump.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Equipment import Equipment -@dataclass(config=DataclassConfig) +@dataclass class HydroPump(Equipment): """ A synchronous motor-driven pump, typically associated with a pumped storage plant. @@ -30,16 +29,20 @@ class HydroPump(Equipment): HydroPowerPlant: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) RotatingMachine: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/HydroTurbineKind.py b/pycgmes/resources/HydroTurbineKind.py index cd75415e..ede14ce1 100644 --- a/pycgmes/resources/HydroTurbineKind.py +++ b/pycgmes/resources/HydroTurbineKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class HydroTurbineKind(Base): """ Type of turbine. diff --git a/pycgmes/resources/IOPoint.py b/pycgmes/resources/IOPoint.py index fca93a3b..8d0a70ba 100644 --- a/pycgmes/resources/IOPoint.py +++ b/pycgmes/resources/IOPoint.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class IOPoint(IdentifiedObject): """ The class describe a measurement or control value. The purpose is to enable having attributes and associations diff --git a/pycgmes/resources/IdentifiedObject.py b/pycgmes/resources/IdentifiedObject.py index 7f190c69..90261f52 100644 --- a/pycgmes/resources/IdentifiedObject.py +++ b/pycgmes/resources/IdentifiedObject.py @@ -12,11 +12,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class IdentifiedObject(Base): """ This is a root class to provide common identification for all classes needing identification and naming attributes. @@ -38,67 +37,77 @@ class IdentifiedObject(Base): description: str = Field( default="", - in_profiles=[ - Profile.TP, - Profile.DL, - Profile.EQBD, - Profile.EQ, - Profile.DY, - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.TP, + Profile.DL, + Profile.EQBD, + Profile.EQ, + Profile.DY, + Profile.OP, + ] + }, ) energyIdentCodeEic: str = Field( default="", - in_profiles=[ - Profile.TP, - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.TP, + Profile.EQBD, + Profile.EQ, + ] + }, ) mRID: str = Field( default="", - in_profiles=[ - Profile.TP, - Profile.GL, - Profile.DL, - Profile.EQBD, - Profile.EQ, - Profile.SC, - Profile.SV, - Profile.SSH, - Profile.DY, - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.TP, + Profile.GL, + Profile.DL, + Profile.EQBD, + Profile.EQ, + Profile.SC, + Profile.SV, + Profile.SSH, + Profile.DY, + Profile.OP, + ] + }, ) name: str = Field( default="", - in_profiles=[ - Profile.TP, - Profile.GL, - Profile.DL, - Profile.EQBD, - Profile.EQ, - Profile.SV, - Profile.DY, - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.TP, + Profile.GL, + Profile.DL, + Profile.EQBD, + Profile.EQ, + Profile.SV, + Profile.DY, + Profile.OP, + ] + }, ) shortName: str = Field( default="", - in_profiles=[ - Profile.TP, - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.TP, + Profile.EQBD, + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # DiagramObjects : list = Field(default_factory=list, in_profiles = [Profile.DL, ]) + # Type M:0..n in CIM + # DiagramObjects : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DL, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/IfdBaseKind.py b/pycgmes/resources/IfdBaseKind.py index c85ecca4..1666088c 100644 --- a/pycgmes/resources/IfdBaseKind.py +++ b/pycgmes/resources/IfdBaseKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class IfdBaseKind(Base): """ Excitation base system mode. diff --git a/pycgmes/resources/Inductance.py b/pycgmes/resources/Inductance.py index c73ef9b8..3ce1a3e2 100644 --- a/pycgmes/resources/Inductance.py +++ b/pycgmes/resources/Inductance.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Inductance(Base): """ Inductive part of reactance (imaginary part of impedance), at rated frequency. @@ -29,23 +28,29 @@ class Inductance(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/InputSignalKind.py b/pycgmes/resources/InputSignalKind.py index db9decf4..9201ee64 100644 --- a/pycgmes/resources/InputSignalKind.py +++ b/pycgmes/resources/InputSignalKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class InputSignalKind(Base): """ Types of input signals. In dynamics modelling, commonly represented by the j parameter. diff --git a/pycgmes/resources/Integer.py b/pycgmes/resources/Integer.py index 50fb64e9..cfa14d0d 100644 --- a/pycgmes/resources/Integer.py +++ b/pycgmes/resources/Integer.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Integer(Base): """ An integer number. The range is unspecified and not limited. diff --git a/pycgmes/resources/Jumper.py b/pycgmes/resources/Jumper.py index cd84c8cd..764ea391 100644 --- a/pycgmes/resources/Jumper.py +++ b/pycgmes/resources/Jumper.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Switch import Switch -@dataclass(config=DataclassConfig) +@dataclass class Jumper(Switch): """ A short section of conductor with negligible impedance which can be manually removed and replaced if the circuit is diff --git a/pycgmes/resources/Junction.py b/pycgmes/resources/Junction.py index 0c89a99a..5265ed72 100644 --- a/pycgmes/resources/Junction.py +++ b/pycgmes/resources/Junction.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Connector import Connector -@dataclass(config=DataclassConfig) +@dataclass class Junction(Connector): """ A point where one or more conducting equipments are connected with zero resistance. diff --git a/pycgmes/resources/Length.py b/pycgmes/resources/Length.py index 6401500e..be36508a 100644 --- a/pycgmes/resources/Length.py +++ b/pycgmes/resources/Length.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Length(Base): """ Unit of length. It shall be a positive value or zero. @@ -29,29 +28,35 @@ class Length(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.DY, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.DY, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Limit.py b/pycgmes/resources/Limit.py index 1c94df0f..c3b601ef 100644 --- a/pycgmes/resources/Limit.py +++ b/pycgmes/resources/Limit.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class Limit(IdentifiedObject): """ Specifies one limit value for a Measurement. A Measurement typically has several limits that are kept together by diff --git a/pycgmes/resources/LimitKind.py b/pycgmes/resources/LimitKind.py index c9bff1dc..4108694d 100644 --- a/pycgmes/resources/LimitKind.py +++ b/pycgmes/resources/LimitKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class LimitKind(Base): """ Limit kinds. diff --git a/pycgmes/resources/LimitSet.py b/pycgmes/resources/LimitSet.py index fb7370f8..d9c43bea 100644 --- a/pycgmes/resources/LimitSet.py +++ b/pycgmes/resources/LimitSet.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class LimitSet(IdentifiedObject): """ Specifies a set of Limits that are associated with a Measurement. A Measurement may have several LimitSets @@ -30,9 +29,11 @@ class LimitSet(IdentifiedObject): isPercentageLimits: bool = Field( default=False, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Line.py b/pycgmes/resources/Line.py index 68e9ddd8..7d65a800 100644 --- a/pycgmes/resources/Line.py +++ b/pycgmes/resources/Line.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EquipmentContainer import EquipmentContainer -@dataclass(config=DataclassConfig) +@dataclass class Line(EquipmentContainer): """ Contains equipment beyond a substation belonging to a power transmission line. @@ -27,10 +26,12 @@ class Line(EquipmentContainer): Region: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/LinearShuntCompensator.py b/pycgmes/resources/LinearShuntCompensator.py index fd1f206b..0b3d5f65 100644 --- a/pycgmes/resources/LinearShuntCompensator.py +++ b/pycgmes/resources/LinearShuntCompensator.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ShuntCompensator import ShuntCompensator -@dataclass(config=DataclassConfig) +@dataclass class LinearShuntCompensator(ShuntCompensator): """ A linear shunt compensator has banks or sections with equal admittance values. @@ -29,30 +28,38 @@ class LinearShuntCompensator(ShuntCompensator): bPerSection: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) gPerSection: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) b0PerSection: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) g0PerSection: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/LoadAggregate.py b/pycgmes/resources/LoadAggregate.py index cf215a29..79f31ff0 100644 --- a/pycgmes/resources/LoadAggregate.py +++ b/pycgmes/resources/LoadAggregate.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .LoadDynamics import LoadDynamics -@dataclass(config=DataclassConfig) +@dataclass class LoadAggregate(LoadDynamics): """ Aggregate loads are used to represent all or part of the real and reactive load from one or more loads in the static @@ -31,12 +30,12 @@ class LoadAggregate(LoadDynamics): """ # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # LoadMotor : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # LoadMotor : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # LoadStatic : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # LoadStatic : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/LoadArea.py b/pycgmes/resources/LoadArea.py index ec9764d6..4afadf41 100644 --- a/pycgmes/resources/LoadArea.py +++ b/pycgmes/resources/LoadArea.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EnergyArea import EnergyArea -@dataclass(config=DataclassConfig) +@dataclass class LoadArea(EnergyArea): """ The class is the root or first level in a hierarchical structure for grouping of loads for the purpose of load flow @@ -25,8 +24,8 @@ class LoadArea(EnergyArea): """ # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # SubLoadAreas : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:1..n in CIM + # SubLoadAreas : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/LoadBreakSwitch.py b/pycgmes/resources/LoadBreakSwitch.py index 9f9bff5c..808cb5e5 100644 --- a/pycgmes/resources/LoadBreakSwitch.py +++ b/pycgmes/resources/LoadBreakSwitch.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ProtectedSwitch import ProtectedSwitch -@dataclass(config=DataclassConfig) +@dataclass class LoadBreakSwitch(ProtectedSwitch): """ A mechanical switching device capable of making, carrying, and breaking currents under normal operating conditions. diff --git a/pycgmes/resources/LoadComposite.py b/pycgmes/resources/LoadComposite.py index 36ae218b..732dcc79 100644 --- a/pycgmes/resources/LoadComposite.py +++ b/pycgmes/resources/LoadComposite.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .LoadDynamics import LoadDynamics -@dataclass(config=DataclassConfig) +@dataclass class LoadComposite(LoadDynamics): """ Combined static load and induction motor load effects. The dynamics of the motor are simplified by linearizing the @@ -38,79 +37,101 @@ class LoadComposite(LoadDynamics): epvs: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) epfs: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eqvs: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eqfs: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) epvd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) epfd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eqvd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eqfd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lfac: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) h: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pfrac: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/LoadDynamics.py b/pycgmes/resources/LoadDynamics.py index 533a6fa9..ab5d8165 100644 --- a/pycgmes/resources/LoadDynamics.py +++ b/pycgmes/resources/LoadDynamics.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class LoadDynamics(IdentifiedObject): """ Load whose behaviour is described by reference to a standard model or by definition of a user-defined model. A @@ -27,8 +26,8 @@ class LoadDynamics(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # EnergyConsumer : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # EnergyConsumer : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/LoadGenericNonLinear.py b/pycgmes/resources/LoadGenericNonLinear.py index de6f6f73..b36d0af0 100644 --- a/pycgmes/resources/LoadGenericNonLinear.py +++ b/pycgmes/resources/LoadGenericNonLinear.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .LoadDynamics import LoadDynamics -@dataclass(config=DataclassConfig) +@dataclass class LoadGenericNonLinear(LoadDynamics): """ Generic non-linear dynamic (GNLD) load. This model can be used in mid-term and long-term voltage stability @@ -35,51 +34,65 @@ class LoadGenericNonLinear(LoadDynamics): genericNonLinearLoadModelType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tq: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ls: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bs: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/LoadGroup.py b/pycgmes/resources/LoadGroup.py index 49314284..e6dd538b 100644 --- a/pycgmes/resources/LoadGroup.py +++ b/pycgmes/resources/LoadGroup.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class LoadGroup(IdentifiedObject): """ The class is the third level in a hierarchical structure for grouping of loads for the purpose of load flow load @@ -28,9 +27,11 @@ class LoadGroup(IdentifiedObject): SubLoadArea: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/LoadMotor.py b/pycgmes/resources/LoadMotor.py index 656692ec..c8880cc4 100644 --- a/pycgmes/resources/LoadMotor.py +++ b/pycgmes/resources/LoadMotor.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class LoadMotor(IdentifiedObject): """ Aggregate induction motor load. This model is used to represent a fraction of an ordinary load as "induction motor @@ -55,100 +54,128 @@ class LoadMotor(IdentifiedObject): LoadAggregate: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pfrac: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lfac: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ls: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lpp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ra: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpo: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tppo: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) h: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) d: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tv: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tbkr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/LoadResponseCharacteristic.py b/pycgmes/resources/LoadResponseCharacteristic.py index 398abc09..38f713f4 100644 --- a/pycgmes/resources/LoadResponseCharacteristic.py +++ b/pycgmes/resources/LoadResponseCharacteristic.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class LoadResponseCharacteristic(IdentifiedObject): """ Models the characteristic response of the load demand due to changes in system conditions such as voltage and @@ -55,84 +54,106 @@ class LoadResponseCharacteristic(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # EnergyConsumer : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # EnergyConsumer : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) exponentModel: bool = Field( default=False, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) pConstantCurrent: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) pConstantImpedance: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) pConstantPower: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) pFrequencyExponent: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) pVoltageExponent: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) qConstantCurrent: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) qConstantImpedance: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) qConstantPower: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) qFrequencyExponent: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) qVoltageExponent: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/LoadStatic.py b/pycgmes/resources/LoadStatic.py index 85ea5150..07ad4c7a 100644 --- a/pycgmes/resources/LoadStatic.py +++ b/pycgmes/resources/LoadStatic.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class LoadStatic(IdentifiedObject): """ General static load. This model represents the sensitivity of the real and reactive power consumed by the load to @@ -47,128 +46,164 @@ class LoadStatic(IdentifiedObject): LoadAggregate: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) staticLoadModelType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ep1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ep2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ep3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kq1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kq2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kq3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kq4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eq1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eq2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) eq3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kqf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/LoadUserDefined.py b/pycgmes/resources/LoadUserDefined.py index 8e41bb63..3289b162 100644 --- a/pycgmes/resources/LoadUserDefined.py +++ b/pycgmes/resources/LoadUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .LoadDynamics import LoadDynamics -@dataclass(config=DataclassConfig) +@dataclass class LoadUserDefined(LoadDynamics): """ Load whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class LoadUserDefined(LoadDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Location.py b/pycgmes/resources/Location.py index 12b574f6..ede77d4a 100644 --- a/pycgmes/resources/Location.py +++ b/pycgmes/resources/Location.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class Location(IdentifiedObject): """ The place, scene, or point of something where someone or something has been, is, and/or will be at a given moment in @@ -32,28 +31,34 @@ class Location(IdentifiedObject): CoordinateSystem: Optional[str] = Field( default=None, - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) mainAddress: float = Field( default=0.0, - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) PowerSystemResources: Optional[str] = Field( default=None, - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # PositionPoints : list = Field(default_factory=list, in_profiles = [Profile.GL, ]) + # Type M:0..n in CIM + # PositionPoints : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.GL, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Measurement.py b/pycgmes/resources/Measurement.py index c724a060..0cf20817 100644 --- a/pycgmes/resources/Measurement.py +++ b/pycgmes/resources/Measurement.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class Measurement(IdentifiedObject): """ A Measurement represents any measured, calculated or non-measured non-calculated quantity. Any piece of equipment @@ -53,44 +52,56 @@ class Measurement(IdentifiedObject): Terminal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) measurementType: str = Field( default="", - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) phases: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) unitMultiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) unitSymbol: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) PowerSystemResource: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/MeasurementValue.py b/pycgmes/resources/MeasurementValue.py index e0a7e457..ec4917d8 100644 --- a/pycgmes/resources/MeasurementValue.py +++ b/pycgmes/resources/MeasurementValue.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IOPoint import IOPoint -@dataclass(config=DataclassConfig) +@dataclass class MeasurementValue(IOPoint): """ The current state for a measurement. A state value is an instance of a measurement from a specific source. @@ -35,27 +34,33 @@ class MeasurementValue(IOPoint): timeStamp: str = Field( default="", - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) sensorAccuracy: float = Field( default=0.0, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # MeasurementValueQuality : Optional[str] = Field(default=None, in_profiles = [Profile.OP, ]) + # Type M:0..1 in CIM + # MeasurementValueQuality : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.OP, ]}) # noqa: E501 MeasurementValueSource: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/MeasurementValueQuality.py b/pycgmes/resources/MeasurementValueQuality.py index dd696530..6869331c 100644 --- a/pycgmes/resources/MeasurementValueQuality.py +++ b/pycgmes/resources/MeasurementValueQuality.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Quality61850 import Quality61850 -@dataclass(config=DataclassConfig) +@dataclass class MeasurementValueQuality(Quality61850): """ Measurement quality flags. Bits 0-10 are defined for substation automation in IEC 61850-7-3. Bits 11-15 are reserved @@ -28,9 +27,11 @@ class MeasurementValueQuality(Quality61850): MeasurementValue: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/MeasurementValueSource.py b/pycgmes/resources/MeasurementValueSource.py index 8754be66..6d93d36c 100644 --- a/pycgmes/resources/MeasurementValueSource.py +++ b/pycgmes/resources/MeasurementValueSource.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class MeasurementValueSource(IdentifiedObject): """ MeasurementValueSource describes the alternative sources updating a MeasurementValue. User conventions for how to @@ -25,8 +24,8 @@ class MeasurementValueSource(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # MeasurementValues : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # MeasurementValues : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/MechLoad1.py b/pycgmes/resources/MechLoad1.py index f852cc5a..ab7edd41 100644 --- a/pycgmes/resources/MechLoad1.py +++ b/pycgmes/resources/MechLoad1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .MechanicalLoadDynamics import MechanicalLoadDynamics -@dataclass(config=DataclassConfig) +@dataclass class MechLoad1(MechanicalLoadDynamics): """ Mechanical load model type 1. @@ -29,30 +28,38 @@ class MechLoad1(MechanicalLoadDynamics): a: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) b: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) d: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) e: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/MechanicalLoadDynamics.py b/pycgmes/resources/MechanicalLoadDynamics.py index 8ff4b108..a8c796da 100644 --- a/pycgmes/resources/MechanicalLoadDynamics.py +++ b/pycgmes/resources/MechanicalLoadDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class MechanicalLoadDynamics(DynamicsFunctionBlock): """ Mechanical load function block whose behaviour is described by reference to a standard model or by definition of a @@ -33,16 +32,20 @@ class MechanicalLoadDynamics(DynamicsFunctionBlock): SynchronousMachineDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) AsynchronousMachineDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/MechanicalLoadUserDefined.py b/pycgmes/resources/MechanicalLoadUserDefined.py index 25e05fea..f604ced1 100644 --- a/pycgmes/resources/MechanicalLoadUserDefined.py +++ b/pycgmes/resources/MechanicalLoadUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .MechanicalLoadDynamics import MechanicalLoadDynamics -@dataclass(config=DataclassConfig) +@dataclass class MechanicalLoadUserDefined(MechanicalLoadDynamics): """ Mechanical load function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class MechanicalLoadUserDefined(MechanicalLoadDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Money.py b/pycgmes/resources/Money.py index fc87ac84..3f12a486 100644 --- a/pycgmes/resources/Money.py +++ b/pycgmes/resources/Money.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Money(Base): """ Amount of money. @@ -29,23 +28,29 @@ class Money(Base): unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/MonthDay.py b/pycgmes/resources/MonthDay.py index 9286d80c..feacfef6 100644 --- a/pycgmes/resources/MonthDay.py +++ b/pycgmes/resources/MonthDay.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class MonthDay(Base): """ MonthDay format as "--mm-dd", which conforms with XSD data type gMonthDay. diff --git a/pycgmes/resources/MutualCoupling.py b/pycgmes/resources/MutualCoupling.py index e48b0ff3..12cc1b0e 100644 --- a/pycgmes/resources/MutualCoupling.py +++ b/pycgmes/resources/MutualCoupling.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class MutualCoupling(IdentifiedObject): """ This class represents the zero sequence line mutual coupling. @@ -41,72 +40,92 @@ class MutualCoupling(IdentifiedObject): b0ch: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) distance11: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) distance12: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) distance21: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) distance22: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) g0ch: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) r0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) x0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) Second_Terminal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) First_Terminal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/NonConformLoad.py b/pycgmes/resources/NonConformLoad.py index e3378858..a01df6dc 100644 --- a/pycgmes/resources/NonConformLoad.py +++ b/pycgmes/resources/NonConformLoad.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EnergyConsumer import EnergyConsumer -@dataclass(config=DataclassConfig) +@dataclass class NonConformLoad(EnergyConsumer): """ NonConformLoad represents loads that do not follow a daily load change pattern and whose changes are not correlated @@ -28,9 +27,11 @@ class NonConformLoad(EnergyConsumer): LoadGroup: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/NonConformLoadGroup.py b/pycgmes/resources/NonConformLoadGroup.py index 0f34afb0..48b500d6 100644 --- a/pycgmes/resources/NonConformLoadGroup.py +++ b/pycgmes/resources/NonConformLoadGroup.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .LoadGroup import LoadGroup -@dataclass(config=DataclassConfig) +@dataclass class NonConformLoadGroup(LoadGroup): """ Loads that do not follow a daily and seasonal load variation pattern. @@ -25,12 +24,12 @@ class NonConformLoadGroup(LoadGroup): """ # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # EnergyConsumers : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:1..n in CIM + # EnergyConsumers : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # NonConformLoadSchedules : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # NonConformLoadSchedules : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/NonConformLoadSchedule.py b/pycgmes/resources/NonConformLoadSchedule.py index 25175a67..b88cf87d 100644 --- a/pycgmes/resources/NonConformLoadSchedule.py +++ b/pycgmes/resources/NonConformLoadSchedule.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .SeasonDayTypeSchedule import SeasonDayTypeSchedule -@dataclass(config=DataclassConfig) +@dataclass class NonConformLoadSchedule(SeasonDayTypeSchedule): """ An active power (Y1-axis) and reactive power (Y2-axis) schedule (curves) versus time (X-axis) for non-conforming @@ -28,9 +27,11 @@ class NonConformLoadSchedule(SeasonDayTypeSchedule): NonConformLoadGroup: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/NonlinearShuntCompensator.py b/pycgmes/resources/NonlinearShuntCompensator.py index 38596026..1cc1da90 100644 --- a/pycgmes/resources/NonlinearShuntCompensator.py +++ b/pycgmes/resources/NonlinearShuntCompensator.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ShuntCompensator import ShuntCompensator -@dataclass(config=DataclassConfig) +@dataclass class NonlinearShuntCompensator(ShuntCompensator): """ A non linear shunt compensator has bank or section admittance values that differ. The attributes g, b, g0 and b0 of @@ -26,8 +25,8 @@ class NonlinearShuntCompensator(ShuntCompensator): """ # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # NonlinearShuntCompensatorPoints : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:1..n in CIM + # NonlinearShuntCompensatorPoints : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/NonlinearShuntCompensatorPoint.py b/pycgmes/resources/NonlinearShuntCompensatorPoint.py index cd5c1bd6..f640899b 100644 --- a/pycgmes/resources/NonlinearShuntCompensatorPoint.py +++ b/pycgmes/resources/NonlinearShuntCompensatorPoint.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class NonlinearShuntCompensatorPoint(Base): """ A non linear shunt compensator bank or section admittance value. The number of NonlinearShuntCompenstorPoint @@ -35,44 +34,56 @@ class NonlinearShuntCompensatorPoint(Base): NonlinearShuntCompensator: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) b: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) g: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) sectionNumber: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) b0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) g0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/NuclearGeneratingUnit.py b/pycgmes/resources/NuclearGeneratingUnit.py index 64a04f14..2315b258 100644 --- a/pycgmes/resources/NuclearGeneratingUnit.py +++ b/pycgmes/resources/NuclearGeneratingUnit.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .GeneratingUnit import GeneratingUnit -@dataclass(config=DataclassConfig) +@dataclass class NuclearGeneratingUnit(GeneratingUnit): """ A nuclear generating unit. diff --git a/pycgmes/resources/OperationalLimit.py b/pycgmes/resources/OperationalLimit.py index 934a56ba..98f88bd2 100644 --- a/pycgmes/resources/OperationalLimit.py +++ b/pycgmes/resources/OperationalLimit.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class OperationalLimit(IdentifiedObject): """ A value and normal value associated with a specific kind of limit. The sub class value and normalValue attributes @@ -34,16 +33,20 @@ class OperationalLimit(IdentifiedObject): OperationalLimitSet: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) OperationalLimitType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/OperationalLimitDirectionKind.py b/pycgmes/resources/OperationalLimitDirectionKind.py index c6d90c6b..8fa0ca67 100644 --- a/pycgmes/resources/OperationalLimitDirectionKind.py +++ b/pycgmes/resources/OperationalLimitDirectionKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class OperationalLimitDirectionKind(Base): """ The direction attribute describes the side of a limit that is a violation. diff --git a/pycgmes/resources/OperationalLimitSet.py b/pycgmes/resources/OperationalLimitSet.py index ed59c5e1..b55b515a 100644 --- a/pycgmes/resources/OperationalLimitSet.py +++ b/pycgmes/resources/OperationalLimitSet.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class OperationalLimitSet(IdentifiedObject): """ A set of limits associated with equipment. Sets of limits might apply to a specific temperature, or season for @@ -32,21 +31,25 @@ class OperationalLimitSet(IdentifiedObject): Terminal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) Equipment: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # OperationalLimitValue : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # OperationalLimitValue : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/OperationalLimitType.py b/pycgmes/resources/OperationalLimitType.py index 4eefdf02..35ffdebb 100644 --- a/pycgmes/resources/OperationalLimitType.py +++ b/pycgmes/resources/OperationalLimitType.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class OperationalLimitType(IdentifiedObject): """ The operational meaning of a category of limits. @@ -36,35 +35,43 @@ class OperationalLimitType(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # OperationalLimit : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # OperationalLimit : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 acceptableDuration: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) direction: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) isInfiniteDuration: bool = Field( default=False, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) kind: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/OrientationKind.py b/pycgmes/resources/OrientationKind.py index 631df8d1..78069cc5 100644 --- a/pycgmes/resources/OrientationKind.py +++ b/pycgmes/resources/OrientationKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class OrientationKind(Base): """ The orientation of the coordinate system with respect to top, left, and the coordinate number system. diff --git a/pycgmes/resources/OverexcLim2.py b/pycgmes/resources/OverexcLim2.py index 9931874f..a431b442 100644 --- a/pycgmes/resources/OverexcLim2.py +++ b/pycgmes/resources/OverexcLim2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .OverexcitationLimiterDynamics import OverexcitationLimiterDynamics -@dataclass(config=DataclassConfig) +@dataclass class OverexcLim2(OverexcitationLimiterDynamics): """ Different from LimIEEEOEL, LimOEL2 has a fixed pickup threshold and reduces the excitation set-point by means of a @@ -31,30 +30,38 @@ class OverexcLim2(OverexcitationLimiterDynamics): koi: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) voimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) voimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ifdlim: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/OverexcLimIEEE.py b/pycgmes/resources/OverexcLimIEEE.py index 4a308f68..8d05929e 100644 --- a/pycgmes/resources/OverexcLimIEEE.py +++ b/pycgmes/resources/OverexcLimIEEE.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .OverexcitationLimiterDynamics import OverexcitationLimiterDynamics -@dataclass(config=DataclassConfig) +@dataclass class OverexcLimIEEE(OverexcitationLimiterDynamics): """ The over excitation limiter model is intended to represent the significant features of OELs necessary for some @@ -35,44 +34,56 @@ class OverexcLimIEEE(OverexcitationLimiterDynamics): itfpu: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ifdmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ifdlim: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) hyst: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kcd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kramp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/OverexcLimX1.py b/pycgmes/resources/OverexcLimX1.py index 6e2209b3..42c5bc2c 100644 --- a/pycgmes/resources/OverexcLimX1.py +++ b/pycgmes/resources/OverexcLimX1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .OverexcitationLimiterDynamics import OverexcitationLimiterDynamics -@dataclass(config=DataclassConfig) +@dataclass class OverexcLimX1(OverexcitationLimiterDynamics): """ Field voltage over excitation limiter. @@ -38,72 +37,92 @@ class OverexcLimX1(OverexcitationLimiterDynamics): efdrated: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efddes: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vlow: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/OverexcLimX2.py b/pycgmes/resources/OverexcLimX2.py index 979c42c1..c3413277 100644 --- a/pycgmes/resources/OverexcLimX2.py +++ b/pycgmes/resources/OverexcLimX2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .OverexcitationLimiterDynamics import OverexcitationLimiterDynamics -@dataclass(config=DataclassConfig) +@dataclass class OverexcLimX2(OverexcitationLimiterDynamics): """ Field voltage or current overexcitation limiter designed to protect the generator field of an AC machine with @@ -40,79 +39,101 @@ class OverexcLimX2(OverexcitationLimiterDynamics): m: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdrated: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efd3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efddes: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vlow: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/OverexcitationLimiterDynamics.py b/pycgmes/resources/OverexcitationLimiterDynamics.py index a0558ca4..41371bd0 100644 --- a/pycgmes/resources/OverexcitationLimiterDynamics.py +++ b/pycgmes/resources/OverexcitationLimiterDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class OverexcitationLimiterDynamics(DynamicsFunctionBlock): """ Overexcitation limiter function block whose behaviour is described by reference to a standard model or by definition @@ -28,9 +27,11 @@ class OverexcitationLimiterDynamics(DynamicsFunctionBlock): ExcitationSystemDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/OverexcitationLimiterUserDefined.py b/pycgmes/resources/OverexcitationLimiterUserDefined.py index 8002ed13..f139e399 100644 --- a/pycgmes/resources/OverexcitationLimiterUserDefined.py +++ b/pycgmes/resources/OverexcitationLimiterUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .OverexcitationLimiterDynamics import OverexcitationLimiterDynamics -@dataclass(config=DataclassConfig) +@dataclass class OverexcitationLimiterUserDefined(OverexcitationLimiterDynamics): """ Overexcitation limiter system function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class OverexcitationLimiterUserDefined(OverexcitationLimiterDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/PFVArControllerType1Dynamics.py b/pycgmes/resources/PFVArControllerType1Dynamics.py index 417d7a40..75178e3d 100644 --- a/pycgmes/resources/PFVArControllerType1Dynamics.py +++ b/pycgmes/resources/PFVArControllerType1Dynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class PFVArControllerType1Dynamics(DynamicsFunctionBlock): """ Power factor or VAr controller type 1 function block whose behaviour is described by reference to a standard model @@ -30,19 +29,21 @@ class PFVArControllerType1Dynamics(DynamicsFunctionBlock): """ # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # RemoteInputSignal : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # RemoteInputSignal : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 ExcitationSystemDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # VoltageAdjusterDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # VoltageAdjusterDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/PFVArControllerType1UserDefined.py b/pycgmes/resources/PFVArControllerType1UserDefined.py index 8e5eb4b6..d00d751d 100644 --- a/pycgmes/resources/PFVArControllerType1UserDefined.py +++ b/pycgmes/resources/PFVArControllerType1UserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PFVArControllerType1Dynamics import PFVArControllerType1Dynamics -@dataclass(config=DataclassConfig) +@dataclass class PFVArControllerType1UserDefined(PFVArControllerType1Dynamics): """ Power factor or VAr controller type 1 function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class PFVArControllerType1UserDefined(PFVArControllerType1Dynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/PFVArControllerType2Dynamics.py b/pycgmes/resources/PFVArControllerType2Dynamics.py index 674a059a..bea8be92 100644 --- a/pycgmes/resources/PFVArControllerType2Dynamics.py +++ b/pycgmes/resources/PFVArControllerType2Dynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class PFVArControllerType2Dynamics(DynamicsFunctionBlock): """ Power factor or VAr controller type 2 function block whose behaviour is described by reference to a standard model @@ -29,9 +28,11 @@ class PFVArControllerType2Dynamics(DynamicsFunctionBlock): ExcitationSystemDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PFVArControllerType2UserDefined.py b/pycgmes/resources/PFVArControllerType2UserDefined.py index 7236a9d3..efa5116c 100644 --- a/pycgmes/resources/PFVArControllerType2UserDefined.py +++ b/pycgmes/resources/PFVArControllerType2UserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PFVArControllerType2Dynamics import PFVArControllerType2Dynamics -@dataclass(config=DataclassConfig) +@dataclass class PFVArControllerType2UserDefined(PFVArControllerType2Dynamics): """ Power factor or VAr controller type 2 function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class PFVArControllerType2UserDefined(PFVArControllerType2Dynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/PFVArType1IEEEPFController.py b/pycgmes/resources/PFVArType1IEEEPFController.py index 42d75a97..30b4e8a9 100644 --- a/pycgmes/resources/PFVArType1IEEEPFController.py +++ b/pycgmes/resources/PFVArType1IEEEPFController.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PFVArControllerType1Dynamics import PFVArControllerType1Dynamics -@dataclass(config=DataclassConfig) +@dataclass class PFVArType1IEEEPFController(PFVArControllerType1Dynamics): """ IEEE PF controller type 1 which operates by moving the voltage reference directly. Reference: IEEE 421.5-2005, 11.2. @@ -35,58 +34,74 @@ class PFVArType1IEEEPFController(PFVArControllerType1Dynamics): ovex: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpfc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vitmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vpf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vpfcbw: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vpfref: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vvtmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vvtmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PFVArType1IEEEVArController.py b/pycgmes/resources/PFVArType1IEEEVArController.py index 7e9ce503..230776e8 100644 --- a/pycgmes/resources/PFVArType1IEEEVArController.py +++ b/pycgmes/resources/PFVArType1IEEEVArController.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PFVArControllerType1Dynamics import PFVArControllerType1Dynamics -@dataclass(config=DataclassConfig) +@dataclass class PFVArType1IEEEVArController(PFVArControllerType1Dynamics): """ IEEE VAR controller type 1 which operates by moving the voltage reference directly. Reference: IEEE 421.5-2005, @@ -34,44 +33,56 @@ class PFVArType1IEEEVArController(PFVArControllerType1Dynamics): tvarc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vvar: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vvarcbw: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vvarref: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vvtmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vvtmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PFVArType2Common1.py b/pycgmes/resources/PFVArType2Common1.py index df282703..c96a810d 100644 --- a/pycgmes/resources/PFVArType2Common1.py +++ b/pycgmes/resources/PFVArType2Common1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PFVArControllerType2Dynamics import PFVArControllerType2Dynamics -@dataclass(config=DataclassConfig) +@dataclass class PFVArType2Common1(PFVArControllerType2Dynamics): """ Power factor / reactive power regulator. This model represents the power factor or reactive power controller such as @@ -36,37 +35,47 @@ class PFVArType2Common1(PFVArControllerType2Dynamics): j: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) max: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ref: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PFVArType2IEEEPFController.py b/pycgmes/resources/PFVArType2IEEEPFController.py index a395257d..2f7627b4 100644 --- a/pycgmes/resources/PFVArType2IEEEPFController.py +++ b/pycgmes/resources/PFVArType2IEEEPFController.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PFVArControllerType2Dynamics import PFVArControllerType2Dynamics -@dataclass(config=DataclassConfig) +@dataclass class PFVArType2IEEEPFController(PFVArControllerType2Dynamics): """ IEEE PF controller type 2 which is a summing point type controller making up the outside loop of a two-loop system. @@ -36,51 +35,65 @@ class PFVArType2IEEEPFController(PFVArControllerType2Dynamics): pfref: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vref: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vclmt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vs: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) exlon: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PFVArType2IEEEVArController.py b/pycgmes/resources/PFVArType2IEEEVArController.py index 4aabfc06..c1c70f7c 100644 --- a/pycgmes/resources/PFVArType2IEEEVArController.py +++ b/pycgmes/resources/PFVArType2IEEEVArController.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PFVArControllerType2Dynamics import PFVArControllerType2Dynamics -@dataclass(config=DataclassConfig) +@dataclass class PFVArType2IEEEVArController(PFVArControllerType2Dynamics): """ IEEE VAR controller type 2 which is a summing point type controller. It makes up the outside loop of a two-loop @@ -36,51 +35,65 @@ class PFVArType2IEEEVArController(PFVArControllerType2Dynamics): qref: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vref: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vclmt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vs: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) exlon: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PU.py b/pycgmes/resources/PU.py index cd34701b..8d4aefab 100644 --- a/pycgmes/resources/PU.py +++ b/pycgmes/resources/PU.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class PU(Base): """ Per Unit - a positive or negative value referred to a defined base. Values typically range from -10 to +10. @@ -29,29 +28,35 @@ class PU(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - Profile.SSH, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + Profile.SSH, + Profile.DY, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SC, - Profile.SSH, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + Profile.SSH, + Profile.DY, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SC, - Profile.SSH, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + Profile.SSH, + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PerCent.py b/pycgmes/resources/PerCent.py index 32bc100b..66bb0f0b 100644 --- a/pycgmes/resources/PerCent.py +++ b/pycgmes/resources/PerCent.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class PerCent(Base): """ Percentage on a defined base. For example, specify as 100 to indicate at the defined base. @@ -29,32 +28,38 @@ class PerCent(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.SSH, - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.SSH, + Profile.OP, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.SSH, - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.SSH, + Profile.OP, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.SSH, - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.SSH, + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PetersenCoil.py b/pycgmes/resources/PetersenCoil.py index e654a455..c3ea09d5 100644 --- a/pycgmes/resources/PetersenCoil.py +++ b/pycgmes/resources/PetersenCoil.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EarthFaultCompensator import EarthFaultCompensator -@dataclass(config=DataclassConfig) +@dataclass class PetersenCoil(EarthFaultCompensator): """ A variable impedance device normally used to offset line charging during single line faults in an ungrounded section @@ -39,51 +38,65 @@ class PetersenCoil(EarthFaultCompensator): mode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) nominalU: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) offsetCurrent: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) positionCurrent: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) xGroundMax: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) xGroundMin: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) xGroundNominal: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PetersenCoilModeKind.py b/pycgmes/resources/PetersenCoilModeKind.py index 7ea832ad..4a49664d 100644 --- a/pycgmes/resources/PetersenCoilModeKind.py +++ b/pycgmes/resources/PetersenCoilModeKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class PetersenCoilModeKind(Base): """ The mode of operation for a Petersen coil. diff --git a/pycgmes/resources/PhaseCode.py b/pycgmes/resources/PhaseCode.py index 5a863a90..e3f4de98 100644 --- a/pycgmes/resources/PhaseCode.py +++ b/pycgmes/resources/PhaseCode.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class PhaseCode(Base): """ An unordered enumeration of phase identifiers. Allows designation of phases for both transmission and distribution diff --git a/pycgmes/resources/PhaseTapChanger.py b/pycgmes/resources/PhaseTapChanger.py index c2098f77..ee01dd49 100644 --- a/pycgmes/resources/PhaseTapChanger.py +++ b/pycgmes/resources/PhaseTapChanger.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TapChanger import TapChanger -@dataclass(config=DataclassConfig) +@dataclass class PhaseTapChanger(TapChanger): """ A transformer phase shifting tap model that controls the phase angle difference across the power transformer and @@ -29,9 +28,11 @@ class PhaseTapChanger(TapChanger): TransformerEnd: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PhaseTapChangerAsymmetrical.py b/pycgmes/resources/PhaseTapChangerAsymmetrical.py index 6d93643a..aae7c1d6 100644 --- a/pycgmes/resources/PhaseTapChangerAsymmetrical.py +++ b/pycgmes/resources/PhaseTapChangerAsymmetrical.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PhaseTapChangerNonLinear import PhaseTapChangerNonLinear -@dataclass(config=DataclassConfig) +@dataclass class PhaseTapChangerAsymmetrical(PhaseTapChangerNonLinear): """ Describes the tap model for an asymmetrical phase shifting transformer in which the difference voltage vector adds @@ -33,9 +32,11 @@ class PhaseTapChangerAsymmetrical(PhaseTapChangerNonLinear): windingConnectionAngle: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PhaseTapChangerLinear.py b/pycgmes/resources/PhaseTapChangerLinear.py index b6e0c89c..130bf9a6 100644 --- a/pycgmes/resources/PhaseTapChangerLinear.py +++ b/pycgmes/resources/PhaseTapChangerLinear.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PhaseTapChanger import PhaseTapChanger -@dataclass(config=DataclassConfig) +@dataclass class PhaseTapChangerLinear(PhaseTapChanger): """ Describes a tap changer with a linear relation between the tap step and the phase angle difference across the @@ -40,23 +39,29 @@ class PhaseTapChangerLinear(PhaseTapChanger): stepPhaseShiftIncrement: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) xMax: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) xMin: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PhaseTapChangerNonLinear.py b/pycgmes/resources/PhaseTapChangerNonLinear.py index ccc730bc..3a98e783 100644 --- a/pycgmes/resources/PhaseTapChangerNonLinear.py +++ b/pycgmes/resources/PhaseTapChangerNonLinear.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PhaseTapChanger import PhaseTapChanger -@dataclass(config=DataclassConfig) +@dataclass class PhaseTapChangerNonLinear(PhaseTapChanger): """ The non-linear phase tap changer describes the non-linear behaviour of a phase tap changer. This is a base class for @@ -38,23 +37,29 @@ class PhaseTapChangerNonLinear(PhaseTapChanger): voltageStepIncrement: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) xMax: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) xMin: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PhaseTapChangerSymmetrical.py b/pycgmes/resources/PhaseTapChangerSymmetrical.py index eafb0dcd..4a90c54c 100644 --- a/pycgmes/resources/PhaseTapChangerSymmetrical.py +++ b/pycgmes/resources/PhaseTapChangerSymmetrical.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PhaseTapChangerNonLinear import PhaseTapChangerNonLinear -@dataclass(config=DataclassConfig) +@dataclass class PhaseTapChangerSymmetrical(PhaseTapChangerNonLinear): """ Describes a symmetrical phase shifting transformer tap model in which the voltage magnitude of both sides is the diff --git a/pycgmes/resources/PhaseTapChangerTable.py b/pycgmes/resources/PhaseTapChangerTable.py index d509fe4e..d9888a5e 100644 --- a/pycgmes/resources/PhaseTapChangerTable.py +++ b/pycgmes/resources/PhaseTapChangerTable.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class PhaseTapChangerTable(IdentifiedObject): """ Describes a tabular curve for how the phase angle difference and impedance varies with the tap step. @@ -25,12 +24,12 @@ class PhaseTapChangerTable(IdentifiedObject): """ # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # PhaseTapChangerTablePoint : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:1..n in CIM + # PhaseTapChangerTablePoint : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # PhaseTapChangerTabular : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # PhaseTapChangerTabular : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/PhaseTapChangerTablePoint.py b/pycgmes/resources/PhaseTapChangerTablePoint.py index 44df0777..c0bf90a7 100644 --- a/pycgmes/resources/PhaseTapChangerTablePoint.py +++ b/pycgmes/resources/PhaseTapChangerTablePoint.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TapChangerTablePoint import TapChangerTablePoint -@dataclass(config=DataclassConfig) +@dataclass class PhaseTapChangerTablePoint(TapChangerTablePoint): """ Describes each tap step in the phase tap changer tabular curve. @@ -29,16 +28,20 @@ class PhaseTapChangerTablePoint(TapChangerTablePoint): PhaseTapChangerTable: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) angle: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PhaseTapChangerTabular.py b/pycgmes/resources/PhaseTapChangerTabular.py index 78a6f149..97a084b8 100644 --- a/pycgmes/resources/PhaseTapChangerTabular.py +++ b/pycgmes/resources/PhaseTapChangerTabular.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PhaseTapChanger import PhaseTapChanger -@dataclass(config=DataclassConfig) +@dataclass class PhaseTapChangerTabular(PhaseTapChanger): """ Describes a tap changer with a table defining the relation between the tap step and the phase angle difference @@ -28,9 +27,11 @@ class PhaseTapChangerTabular(PhaseTapChanger): PhaseTapChangerTable: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PhotoVoltaicUnit.py b/pycgmes/resources/PhotoVoltaicUnit.py index 5692368b..2747842e 100644 --- a/pycgmes/resources/PhotoVoltaicUnit.py +++ b/pycgmes/resources/PhotoVoltaicUnit.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerElectronicsUnit import PowerElectronicsUnit -@dataclass(config=DataclassConfig) +@dataclass class PhotoVoltaicUnit(PowerElectronicsUnit): """ A photovoltaic device or an aggregation of such devices. diff --git a/pycgmes/resources/PositionPoint.py b/pycgmes/resources/PositionPoint.py index d064789a..c1aaed2e 100644 --- a/pycgmes/resources/PositionPoint.py +++ b/pycgmes/resources/PositionPoint.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class PositionPoint(Base): """ Set of spatial coordinates that determine a point, defined in the coordinate system specified in @@ -35,37 +34,47 @@ class PositionPoint(Base): Location: Optional[str] = Field( default=None, - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) sequenceNumber: int = Field( default=0, - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) xPosition: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) yPosition: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) zPosition: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PostLineSensor.py b/pycgmes/resources/PostLineSensor.py index e740d0f8..351f5e2c 100644 --- a/pycgmes/resources/PostLineSensor.py +++ b/pycgmes/resources/PostLineSensor.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Sensor import Sensor -@dataclass(config=DataclassConfig) +@dataclass class PostLineSensor(Sensor): """ A sensor used mainly in overhead distribution networks as the source of both current and voltage measurements. diff --git a/pycgmes/resources/PotentialTransformer.py b/pycgmes/resources/PotentialTransformer.py index 865a31ba..31258a32 100644 --- a/pycgmes/resources/PotentialTransformer.py +++ b/pycgmes/resources/PotentialTransformer.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Sensor import Sensor -@dataclass(config=DataclassConfig) +@dataclass class PotentialTransformer(Sensor): """ Instrument transformer (also known as Voltage Transformer) used to measure electrical qualities of the circuit that diff --git a/pycgmes/resources/PowerElectronicsConnection.py b/pycgmes/resources/PowerElectronicsConnection.py index 3742f918..15d29d05 100644 --- a/pycgmes/resources/PowerElectronicsConnection.py +++ b/pycgmes/resources/PowerElectronicsConnection.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .RegulatingCondEq import RegulatingCondEq -@dataclass(config=DataclassConfig) +@dataclass class PowerElectronicsConnection(RegulatingCondEq): """ A connection to the AC network for energy production or consumption that uses power electronics rather than rotating @@ -39,56 +38,70 @@ class PowerElectronicsConnection(RegulatingCondEq): maxQ: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) minQ: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ratedS: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ratedU: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) PowerElectronicsUnit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) p: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) q: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3or4Dynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType3or4Dynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/PowerElectronicsUnit.py b/pycgmes/resources/PowerElectronicsUnit.py index f533507b..58636a7b 100644 --- a/pycgmes/resources/PowerElectronicsUnit.py +++ b/pycgmes/resources/PowerElectronicsUnit.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Equipment import Equipment -@dataclass(config=DataclassConfig) +@dataclass class PowerElectronicsUnit(Equipment): """ A generating unit or battery or aggregation that connects to the AC network using power electronics rather than @@ -28,21 +27,25 @@ class PowerElectronicsUnit(Equipment): """ # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # PowerElectronicsConnection : Optional[str] = Field(default=None, in_profiles = [Profile.EQ, ]) + # Type M:1 in CIM + # PowerElectronicsConnection : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 maxP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) minP: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PowerElectronicsWindUnit.py b/pycgmes/resources/PowerElectronicsWindUnit.py index f531a96e..db080073 100644 --- a/pycgmes/resources/PowerElectronicsWindUnit.py +++ b/pycgmes/resources/PowerElectronicsWindUnit.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerElectronicsUnit import PowerElectronicsUnit -@dataclass(config=DataclassConfig) +@dataclass class PowerElectronicsWindUnit(PowerElectronicsUnit): """ A wind generating unit that connects to the AC network with power electronics rather than rotating machines or an diff --git a/pycgmes/resources/PowerSystemResource.py b/pycgmes/resources/PowerSystemResource.py index fd715069..c2c3cb4a 100644 --- a/pycgmes/resources/PowerSystemResource.py +++ b/pycgmes/resources/PowerSystemResource.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class PowerSystemResource(IdentifiedObject): """ A power system resource (PSR) can be an item of equipment such as a switch, an equipment container containing many @@ -29,16 +28,16 @@ class PowerSystemResource(IdentifiedObject): """ # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # Location : Optional[str] = Field(default=None, in_profiles = [Profile.GL, ]) + # Type M:0..1 in CIM + # Location : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.GL, ]}) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Controls : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # Controls : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Measurements : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # Measurements : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/PowerSystemStabilizerDynamics.py b/pycgmes/resources/PowerSystemStabilizerDynamics.py index ab6e7afe..1e595922 100644 --- a/pycgmes/resources/PowerSystemStabilizerDynamics.py +++ b/pycgmes/resources/PowerSystemStabilizerDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class PowerSystemStabilizerDynamics(DynamicsFunctionBlock): """ Power system stabilizer function block whose behaviour is described by reference to a standard model or by @@ -28,14 +27,16 @@ class PowerSystemStabilizerDynamics(DynamicsFunctionBlock): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # RemoteInputSignal : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # RemoteInputSignal : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 ExcitationSystemDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PowerSystemStabilizerUserDefined.py b/pycgmes/resources/PowerSystemStabilizerUserDefined.py index 4cb89aac..b504d71c 100644 --- a/pycgmes/resources/PowerSystemStabilizerUserDefined.py +++ b/pycgmes/resources/PowerSystemStabilizerUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PowerSystemStabilizerUserDefined(PowerSystemStabilizerDynamics): """ Power system stabilizer function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class PowerSystemStabilizerUserDefined(PowerSystemStabilizerDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/PowerTransformer.py b/pycgmes/resources/PowerTransformer.py index 5d55bf24..d4cd1b99 100644 --- a/pycgmes/resources/PowerTransformer.py +++ b/pycgmes/resources/PowerTransformer.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ConductingEquipment import ConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class PowerTransformer(ConductingEquipment): """ An electrical device consisting of two or more coupled windings, with or without a magnetic core, for introducing @@ -54,49 +53,61 @@ class PowerTransformer(ConductingEquipment): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # PowerTransformerEnd : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # PowerTransformerEnd : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 beforeShCircuitHighestOperatingCurrent: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) beforeShCircuitHighestOperatingVoltage: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) beforeShortCircuitAnglePf: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) highSideMinOperatingU: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) isPartOfGeneratorUnit: bool = Field( default=False, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) operationalValuesConsidered: bool = Field( default=False, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PowerTransformerEnd.py b/pycgmes/resources/PowerTransformerEnd.py index 8998e56f..b629c131 100644 --- a/pycgmes/resources/PowerTransformerEnd.py +++ b/pycgmes/resources/PowerTransformerEnd.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TransformerEnd import TransformerEnd -@dataclass(config=DataclassConfig) +@dataclass class PowerTransformerEnd(TransformerEnd): """ A PowerTransformerEnd is associated with each Terminal of a PowerTransformer. The impedance values r, r0, x, and x0 @@ -63,93 +62,119 @@ class PowerTransformerEnd(TransformerEnd): PowerTransformer: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) b: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) connectionKind: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ratedS: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) g: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ratedU: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) x: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) b0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) phaseAngleClock: int = Field( default=0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) g0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) r0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) x0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ProprietaryParameterDynamics.py b/pycgmes/resources/ProprietaryParameterDynamics.py index edcc9400..bf9f1da0 100644 --- a/pycgmes/resources/ProprietaryParameterDynamics.py +++ b/pycgmes/resources/ProprietaryParameterDynamics.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class ProprietaryParameterDynamics(Base): """ Supports definition of one or more parameters of several different datatypes for use by proprietary user-defined @@ -57,177 +56,227 @@ class ProprietaryParameterDynamics(Base): CSCUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) SVCUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) VSCUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindPlantUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindType1or2UserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindType3or4UserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) SynchronousMachineUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) AsynchronousMachineUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) TurbineGovernorUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) TurbineLoadControllerUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) MechanicalLoadUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ExcitationSystemUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) OverexcitationLimiterUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) UnderexcitationLimiterUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) PowerSystemStabilizerUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) DiscontinuousExcitationControlUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) PFVArControllerType1UserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) VoltageAdjusterUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) PFVArControllerType2UserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) VoltageCompensatorUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) LoadUserDefined: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) parameterNumber: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) booleanParameterValue: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) integerParameterValue: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) floatParameterValue: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ProtectedSwitch.py b/pycgmes/resources/ProtectedSwitch.py index d7520f70..6daa6ec3 100644 --- a/pycgmes/resources/ProtectedSwitch.py +++ b/pycgmes/resources/ProtectedSwitch.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Switch import Switch -@dataclass(config=DataclassConfig) +@dataclass class ProtectedSwitch(Switch): """ A ProtectedSwitch is a switching device that can be operated by ProtectionEquipment. diff --git a/pycgmes/resources/Pss1.py b/pycgmes/resources/Pss1.py index 1fbdcd45..0dfcc936 100644 --- a/pycgmes/resources/Pss1.py +++ b/pycgmes/resources/Pss1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class Pss1(PowerSystemStabilizerDynamics): """ Italian PSS with three inputs (speed, frequency, power). @@ -41,107 +40,137 @@ class Pss1(PowerSystemStabilizerDynamics): komega: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpe: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpe: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t7: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t8: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t9: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t10: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vadat: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Pss1A.py b/pycgmes/resources/Pss1A.py index 2425de91..1a1fdc38 100644 --- a/pycgmes/resources/Pss1A.py +++ b/pycgmes/resources/Pss1A.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class Pss1A(PowerSystemStabilizerDynamics): """ Single input power system stabilizer. It is a modified version in order to allow representation of various vendors' @@ -50,156 +49,200 @@ class Pss1A(PowerSystemStabilizerDynamics): inputSignalType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vcu: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vcl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a7: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a8: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kd: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tdelay: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Pss2B.py b/pycgmes/resources/Pss2B.py index 3182adf9..d7082530 100644 --- a/pycgmes/resources/Pss2B.py +++ b/pycgmes/resources/Pss2B.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class Pss2B(PowerSystemStabilizerDynamics): """ Modified IEEE PSS2B. Extra lead/lag (or rate) block added at end (up to 4 lead/lags total). @@ -54,205 +53,263 @@ class Pss2B(PowerSystemStabilizerDynamics): vsi1max: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsi1min: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsi2max: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsi2min: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t7: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t8: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t9: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t10: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t11: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) n: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) m: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vstmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vstmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Pss2ST.py b/pycgmes/resources/Pss2ST.py index 7e9f84b2..8d86916f 100644 --- a/pycgmes/resources/Pss2ST.py +++ b/pycgmes/resources/Pss2ST.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class Pss2ST(PowerSystemStabilizerDynamics): """ PTI microprocessor-based stabilizer type 1. @@ -49,128 +48,164 @@ class Pss2ST(PowerSystemStabilizerDynamics): inputSignal1Type: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) inputSignal2Type: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t7: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t8: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t9: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t10: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lsmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lsmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vcu: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vcl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Pss5.py b/pycgmes/resources/Pss5.py index 657a6b39..4d65158a 100644 --- a/pycgmes/resources/Pss5.py +++ b/pycgmes/resources/Pss5.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class Pss5(PowerSystemStabilizerDynamics): """ Detailed Italian PSS. @@ -46,121 +45,155 @@ class Pss5(PowerSystemStabilizerDynamics): kpe: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) isfreq: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpss: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ctw2: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmn: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpe: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) deadband: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vadat: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PssELIN2.py b/pycgmes/resources/PssELIN2.py index e5a67705..2fd3044a 100644 --- a/pycgmes/resources/PssELIN2.py +++ b/pycgmes/resources/PssELIN2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PssELIN2(PowerSystemStabilizerDynamics): """ Power system stabilizer typically associated with ExcELIN2 (though PssIEEE2B or Pss2B can also be used). @@ -36,79 +35,101 @@ class PssELIN2(PowerSystemStabilizerDynamics): ts1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ts2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ts3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ts4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ts5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ts6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ppss: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) apss: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) psslim: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PssIEEE1A.py b/pycgmes/resources/PssIEEE1A.py index 02a9f22a..a1bcba5c 100644 --- a/pycgmes/resources/PssIEEE1A.py +++ b/pycgmes/resources/PssIEEE1A.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PssIEEE1A(PowerSystemStabilizerDynamics): """ IEEE 421.5-2005 type PSS1A power system stabilizer model. PSS1A is the generalized form of a PSS with a single input @@ -40,86 +39,110 @@ class PssIEEE1A(PowerSystemStabilizerDynamics): inputSignalType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vrmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PssIEEE2B.py b/pycgmes/resources/PssIEEE2B.py index 9d9d6b7d..6580363a 100644 --- a/pycgmes/resources/PssIEEE2B.py +++ b/pycgmes/resources/PssIEEE2B.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PssIEEE2B(PowerSystemStabilizerDynamics): """ IEEE 421.5-2005 type PSS2B power system stabilizer model. This stabilizer model is designed to represent a variety @@ -56,191 +55,245 @@ class PssIEEE2B(PowerSystemStabilizerDynamics): inputSignal1Type: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) inputSignal2Type: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsi1max: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsi1min: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsi2max: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsi2min: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t7: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t8: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t9: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t10: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t11: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) n: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) m: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vstmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vstmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PssIEEE3B.py b/pycgmes/resources/PssIEEE3B.py index a8338f23..ec67bdba 100644 --- a/pycgmes/resources/PssIEEE3B.py +++ b/pycgmes/resources/PssIEEE3B.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PssIEEE3B(PowerSystemStabilizerDynamics): """ IEEE 421.5-2005 type PSS3B power system stabilizer model. The PSS model PSS3B has dual inputs of electrical power @@ -46,121 +45,155 @@ class PssIEEE3B(PowerSystemStabilizerDynamics): t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tw3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a7: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a8: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vstmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vstmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PssIEEE4B.py b/pycgmes/resources/PssIEEE4B.py index 8d7dea72..4f368992 100644 --- a/pycgmes/resources/PssIEEE4B.py +++ b/pycgmes/resources/PssIEEE4B.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PssIEEE4B(PowerSystemStabilizerDynamics): """ IEEE 421.5-2005 type PSS4B power system stabilizer. The PSS4B model represents a structure based on multiple working @@ -98,471 +97,605 @@ class PssIEEE4B(PowerSystemStabilizerDynamics): bwh1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bwh2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bwl1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) bwl2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kh: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kh1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kh11: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kh17: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kh2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki11: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki17: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kl1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kl11: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kl17: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kl2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) omeganh1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) omeganh2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) omeganl1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) omeganl2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th10: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th11: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th12: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th7: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th8: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) th9: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti10: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti11: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti12: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti7: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti8: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ti9: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl10: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl11: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl12: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl7: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl8: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tl9: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vhmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vhmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vlmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vlmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vstmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vstmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PssPTIST1.py b/pycgmes/resources/PssPTIST1.py index cf4b3e38..f9346e14 100644 --- a/pycgmes/resources/PssPTIST1.py +++ b/pycgmes/resources/PssPTIST1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PssPTIST1(PowerSystemStabilizerDynamics): """ PTI microprocessor-based stabilizer type 1. @@ -36,79 +35,101 @@ class PssPTIST1(PowerSystemStabilizerDynamics): m: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dtf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dtc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dtp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PssPTIST3.py b/pycgmes/resources/PssPTIST3.py index 89dca839..58377199 100644 --- a/pycgmes/resources/PssPTIST3.py +++ b/pycgmes/resources/PssPTIST3.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PssPTIST3(PowerSystemStabilizerDynamics): """ PTI microprocessor-based stabilizer type 3. @@ -60,240 +59,308 @@ class PssPTIST3(PowerSystemStabilizerDynamics): m: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dtf: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dtc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dtp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) b0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) b1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) b2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) a5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) b3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) b4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) b5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) athres: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) al: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lthres: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) isw: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) nav: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ncl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ncr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PssRQB.py b/pycgmes/resources/PssRQB.py index c1cea151..601729e3 100644 --- a/pycgmes/resources/PssRQB.py +++ b/pycgmes/resources/PssRQB.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PssRQB(PowerSystemStabilizerDynamics): """ Power system stabilizer type RQB. This power system stabilizer is intended to be used together with excitation @@ -36,72 +35,92 @@ class PssRQB(PowerSystemStabilizerDynamics): ki2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4m: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tomd: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tomsl: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4mom: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) sibv: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kdpm: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4f: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PssSB4.py b/pycgmes/resources/PssSB4.py index 1032c5c9..405bb192 100644 --- a/pycgmes/resources/PssSB4.py +++ b/pycgmes/resources/PssSB4.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PssSB4(PowerSystemStabilizerDynamics): """ Power sensitive stabilizer model. @@ -36,79 +35,101 @@ class PssSB4(PowerSystemStabilizerDynamics): tt: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tx2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tx1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tb: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) te: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PssSH.py b/pycgmes/resources/PssSH.py index aba569f5..925b0460 100644 --- a/pycgmes/resources/PssSH.py +++ b/pycgmes/resources/PssSH.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PssSH(PowerSystemStabilizerDynamics): """ SiemensTM "H infinity" power system stabilizer with generator electrical power input. [Footnote: Siemens "H @@ -41,93 +40,119 @@ class PssSH(PowerSystemStabilizerDynamics): k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) td: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PssSK.py b/pycgmes/resources/PssSK.py index 7aa5d6ec..e45e91cc 100644 --- a/pycgmes/resources/PssSK.py +++ b/pycgmes/resources/PssSK.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PssSK(PowerSystemStabilizerDynamics): """ Slovakian PSS with three inputs. @@ -36,79 +35,101 @@ class PssSK(PowerSystemStabilizerDynamics): k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PssSTAB2A.py b/pycgmes/resources/PssSTAB2A.py index 219872da..a9a437e4 100644 --- a/pycgmes/resources/PssSTAB2A.py +++ b/pycgmes/resources/PssSTAB2A.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PssSTAB2A(PowerSystemStabilizerDynamics): """ Power system stabilizer part of an ABB excitation system. [Footnote: ABB excitation systems are an example of @@ -35,58 +34,74 @@ class PssSTAB2A(PowerSystemStabilizerDynamics): k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) hlim: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/PssWECC.py b/pycgmes/resources/PssWECC.py index 7b37ab4b..d0d5ea00 100644 --- a/pycgmes/resources/PssWECC.py +++ b/pycgmes/resources/PssWECC.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemStabilizerDynamics import PowerSystemStabilizerDynamics -@dataclass(config=DataclassConfig) +@dataclass class PssWECC(PowerSystemStabilizerDynamics): """ Dual input power system stabilizer, based on IEEE type 2, with modified output limiter defined by WECC (Western @@ -50,128 +49,164 @@ class PssWECC(PowerSystemStabilizerDynamics): inputSignal1Type: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) inputSignal2Type: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t5: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t6: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t7: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t8: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t10: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t9: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vsmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vcu: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vcl: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Quality61850.py b/pycgmes/resources/Quality61850.py index 5a7597a3..d4d88f2d 100644 --- a/pycgmes/resources/Quality61850.py +++ b/pycgmes/resources/Quality61850.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Quality61850(Base): """ Quality flags in this class are as defined in IEC 61850, except for estimatorReplaced, which has been included in @@ -55,86 +54,110 @@ class Quality61850(Base): badReference: bool = Field( default=False, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) estimatorReplaced: bool = Field( default=False, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) failure: bool = Field( default=False, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) oldData: bool = Field( default=False, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) operatorBlocked: bool = Field( default=False, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) oscillatory: bool = Field( default=False, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) outOfRange: bool = Field( default=False, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) overFlow: bool = Field( default=False, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) source: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) suspect: bool = Field( default=False, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) test: bool = Field( default=False, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) validity: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RaiseLowerCommand.py b/pycgmes/resources/RaiseLowerCommand.py index a2c91670..dbdc072f 100644 --- a/pycgmes/resources/RaiseLowerCommand.py +++ b/pycgmes/resources/RaiseLowerCommand.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .AnalogControl import AnalogControl -@dataclass(config=DataclassConfig) +@dataclass class RaiseLowerCommand(AnalogControl): """ An analog control that increases or decreases a set point value with pulses. Unless otherwise specified, one pulse @@ -28,9 +27,11 @@ class RaiseLowerCommand(AnalogControl): ValueAliasSet: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RatioTapChanger.py b/pycgmes/resources/RatioTapChanger.py index acd771ab..101eac42 100644 --- a/pycgmes/resources/RatioTapChanger.py +++ b/pycgmes/resources/RatioTapChanger.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TapChanger import TapChanger -@dataclass(config=DataclassConfig) +@dataclass class RatioTapChanger(TapChanger): """ A tap changer that changes the voltage ratio impacting the voltage magnitude but not the phase angle across the @@ -33,23 +32,29 @@ class RatioTapChanger(TapChanger): stepVoltageIncrement: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) RatioTapChangerTable: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) TransformerEnd: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RatioTapChangerTable.py b/pycgmes/resources/RatioTapChangerTable.py index 9b13d137..e90e9e48 100644 --- a/pycgmes/resources/RatioTapChangerTable.py +++ b/pycgmes/resources/RatioTapChangerTable.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class RatioTapChangerTable(IdentifiedObject): """ Describes a curve for how the voltage magnitude and impedance varies with the tap step. @@ -25,12 +24,12 @@ class RatioTapChangerTable(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # RatioTapChanger : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # RatioTapChanger : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # RatioTapChangerTablePoint : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:1..n in CIM + # RatioTapChangerTablePoint : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/RatioTapChangerTablePoint.py b/pycgmes/resources/RatioTapChangerTablePoint.py index edcdb32e..d82c10ff 100644 --- a/pycgmes/resources/RatioTapChangerTablePoint.py +++ b/pycgmes/resources/RatioTapChangerTablePoint.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TapChangerTablePoint import TapChangerTablePoint -@dataclass(config=DataclassConfig) +@dataclass class RatioTapChangerTablePoint(TapChangerTablePoint): """ Describes each tap step in the ratio tap changer tabular curve. @@ -27,9 +26,11 @@ class RatioTapChangerTablePoint(TapChangerTablePoint): RatioTapChangerTable: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Reactance.py b/pycgmes/resources/Reactance.py index 2acf6ba5..15d1d573 100644 --- a/pycgmes/resources/Reactance.py +++ b/pycgmes/resources/Reactance.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Reactance(Base): """ Reactance (imaginary part of impedance), at rated frequency. @@ -29,26 +28,32 @@ class Reactance(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ReactiveCapabilityCurve.py b/pycgmes/resources/ReactiveCapabilityCurve.py index 13c584ff..913c95ba 100644 --- a/pycgmes/resources/ReactiveCapabilityCurve.py +++ b/pycgmes/resources/ReactiveCapabilityCurve.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Curve import Curve -@dataclass(config=DataclassConfig) +@dataclass class ReactiveCapabilityCurve(Curve): """ Reactive power rating envelope versus the synchronous machine's active power, in both the generating and motoring @@ -28,12 +27,12 @@ class ReactiveCapabilityCurve(Curve): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # EquivalentInjection : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # EquivalentInjection : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # InitiallyUsedBySynchronousMachines : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:1..n in CIM + # InitiallyUsedBySynchronousMachines : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/ReactivePower.py b/pycgmes/resources/ReactivePower.py index 46a6bed4..91151900 100644 --- a/pycgmes/resources/ReactivePower.py +++ b/pycgmes/resources/ReactivePower.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class ReactivePower(Base): """ Product of RMS value of the voltage and the RMS value of the quadrature component of the current. @@ -29,29 +28,35 @@ class ReactivePower(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - Profile.SV, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SV, + Profile.SSH, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SV, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SV, + Profile.SSH, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SV, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SV, + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RealEnergy.py b/pycgmes/resources/RealEnergy.py index f08eeb3e..ab5c2323 100644 --- a/pycgmes/resources/RealEnergy.py +++ b/pycgmes/resources/RealEnergy.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class RealEnergy(Base): """ Real electrical energy. @@ -29,26 +28,32 @@ class RealEnergy(Base): multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SSH, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SSH, + ] + }, ) value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RegularIntervalSchedule.py b/pycgmes/resources/RegularIntervalSchedule.py index a6ece7fc..2c5da857 100644 --- a/pycgmes/resources/RegularIntervalSchedule.py +++ b/pycgmes/resources/RegularIntervalSchedule.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .BasicIntervalSchedule import BasicIntervalSchedule -@dataclass(config=DataclassConfig) +@dataclass class RegularIntervalSchedule(BasicIntervalSchedule): """ The schedule has time points where the time between them is constant. @@ -27,21 +26,25 @@ class RegularIntervalSchedule(BasicIntervalSchedule): """ # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # TimePoints : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:1..n in CIM + # TimePoints : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) timeStep: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) endTime: str = Field( default="", - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RegularTimePoint.py b/pycgmes/resources/RegularTimePoint.py index 846ff916..94b58193 100644 --- a/pycgmes/resources/RegularTimePoint.py +++ b/pycgmes/resources/RegularTimePoint.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class RegularTimePoint(Base): """ Time point for a schedule where the time between the consecutive points is constant. @@ -36,30 +35,38 @@ class RegularTimePoint(Base): sequenceNumber: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) value1: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) value2: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) IntervalSchedule: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RegulatingCondEq.py b/pycgmes/resources/RegulatingCondEq.py index 84906764..a7039575 100644 --- a/pycgmes/resources/RegulatingCondEq.py +++ b/pycgmes/resources/RegulatingCondEq.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EnergyConnection import EnergyConnection -@dataclass(config=DataclassConfig) +@dataclass class RegulatingCondEq(EnergyConnection): """ A type of conducting equipment that can regulate a quantity (i.e. voltage or flow) at a specific point in the @@ -29,16 +28,20 @@ class RegulatingCondEq(EnergyConnection): RegulatingControl: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) controlEnabled: bool = Field( default=False, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RegulatingControl.py b/pycgmes/resources/RegulatingControl.py index dad18920..ca8d100e 100644 --- a/pycgmes/resources/RegulatingControl.py +++ b/pycgmes/resources/RegulatingControl.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemResource import PowerSystemResource -@dataclass(config=DataclassConfig) +@dataclass class RegulatingControl(PowerSystemResource): """ Specifies a set of equipment that works together to control a power system quantity such as voltage or flow. Remote @@ -62,74 +61,92 @@ class RegulatingControl(PowerSystemResource): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # RegulationSchedule : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # RegulationSchedule : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # RegulatingCondEq : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # RegulatingCondEq : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 mode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) Terminal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) discrete: bool = Field( default=False, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) enabled: bool = Field( default=False, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) targetDeadband: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) targetValue: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) targetValueUnitMultiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) maxAllowedTargetValue: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) minAllowedTargetValue: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RegulatingControlModeKind.py b/pycgmes/resources/RegulatingControlModeKind.py index 571ce8fc..7369734e 100644 --- a/pycgmes/resources/RegulatingControlModeKind.py +++ b/pycgmes/resources/RegulatingControlModeKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class RegulatingControlModeKind(Base): """ The kind of regulation model. For example regulating voltage, reactive power, active power, etc. diff --git a/pycgmes/resources/RegulationSchedule.py b/pycgmes/resources/RegulationSchedule.py index 34b8f0fa..819bc988 100644 --- a/pycgmes/resources/RegulationSchedule.py +++ b/pycgmes/resources/RegulationSchedule.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .SeasonDayTypeSchedule import SeasonDayTypeSchedule -@dataclass(config=DataclassConfig) +@dataclass class RegulationSchedule(SeasonDayTypeSchedule): """ A pre-established pattern over time for a controlled variable, e.g., busbar voltage. @@ -27,9 +26,11 @@ class RegulationSchedule(SeasonDayTypeSchedule): RegulatingControl: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RemoteInputSignal.py b/pycgmes/resources/RemoteInputSignal.py index b36dcfde..076b9eb6 100644 --- a/pycgmes/resources/RemoteInputSignal.py +++ b/pycgmes/resources/RemoteInputSignal.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class RemoteInputSignal(IdentifiedObject): """ Supports connection to a terminal associated with a remote bus from which an input signal of a specific type is @@ -37,64 +36,78 @@ class RemoteInputSignal(IdentifiedObject): Terminal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) remoteSignalType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) DiscontinuousExcitationControlDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType1or2Dynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType1or2Dynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 PowerSystemStabilizerDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) UnderexcitationLimiterDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) PFVArControllerType1Dynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) VoltageCompensatorDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindPlantDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindPlantDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3or4Dynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType3or4Dynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/RemoteSignalKind.py b/pycgmes/resources/RemoteSignalKind.py index bd9f8fbc..99a8a614 100644 --- a/pycgmes/resources/RemoteSignalKind.py +++ b/pycgmes/resources/RemoteSignalKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class RemoteSignalKind(Base): """ Type of input signal coming from remote bus. diff --git a/pycgmes/resources/ReportingGroup.py b/pycgmes/resources/ReportingGroup.py index 3839572d..b24aeebe 100644 --- a/pycgmes/resources/ReportingGroup.py +++ b/pycgmes/resources/ReportingGroup.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class ReportingGroup(IdentifiedObject): """ A reporting group is used for various ad-hoc groupings used for reporting. @@ -25,12 +24,12 @@ class ReportingGroup(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # TopologicalNode : list = Field(default_factory=list, in_profiles = [Profile.TP, ]) + # Type M:0..n in CIM + # TopologicalNode : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.TP, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # BusNameMarker : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # BusNameMarker : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Resistance.py b/pycgmes/resources/Resistance.py index 56607760..24080aab 100644 --- a/pycgmes/resources/Resistance.py +++ b/pycgmes/resources/Resistance.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Resistance(Base): """ Resistance (real part of impedance). @@ -29,29 +28,35 @@ class Resistance(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.SSH, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.SSH, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RotatingMachine.py b/pycgmes/resources/RotatingMachine.py index 540ff356..2bdbd775 100644 --- a/pycgmes/resources/RotatingMachine.py +++ b/pycgmes/resources/RotatingMachine.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .RegulatingCondEq import RegulatingCondEq -@dataclass(config=DataclassConfig) +@dataclass class RotatingMachine(RegulatingCondEq): """ A rotating machine which may be used as a generator or motor. @@ -39,48 +38,60 @@ class RotatingMachine(RegulatingCondEq): GeneratingUnit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # HydroPump : Optional[str] = Field(default=None, in_profiles = [Profile.EQ, ]) + # Type M:0..1 in CIM + # HydroPump : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.EQ, ]}) ratedPowerFactor: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ratedS: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ratedU: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) p: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) q: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RotatingMachineDynamics.py b/pycgmes/resources/RotatingMachineDynamics.py index 8a3a21ca..c1b870d9 100644 --- a/pycgmes/resources/RotatingMachineDynamics.py +++ b/pycgmes/resources/RotatingMachineDynamics.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class RotatingMachineDynamics(DynamicsFunctionBlock): """ Abstract parent class for all synchronous and asynchronous machine standard models. @@ -43,44 +42,56 @@ class RotatingMachineDynamics(DynamicsFunctionBlock): damping: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) inertia: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) saturationFactor: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) saturationFactor120: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) statorLeakageReactance: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) statorResistance: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RotationSpeed.py b/pycgmes/resources/RotationSpeed.py index c077fc29..1b3f44e2 100644 --- a/pycgmes/resources/RotationSpeed.py +++ b/pycgmes/resources/RotationSpeed.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class RotationSpeed(Base): """ Number of revolutions per second. @@ -29,23 +28,29 @@ class RotationSpeed(Base): multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/RotorKind.py b/pycgmes/resources/RotorKind.py index 443db909..2b437a2e 100644 --- a/pycgmes/resources/RotorKind.py +++ b/pycgmes/resources/RotorKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class RotorKind(Base): """ Type of rotor on physical machine. diff --git a/pycgmes/resources/SVCControlMode.py b/pycgmes/resources/SVCControlMode.py index 16f201a3..97fe8bc8 100644 --- a/pycgmes/resources/SVCControlMode.py +++ b/pycgmes/resources/SVCControlMode.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class SVCControlMode(Base): """ Static VAr Compensator control mode. diff --git a/pycgmes/resources/SVCUserDefined.py b/pycgmes/resources/SVCUserDefined.py index 105796f1..40c9560b 100644 --- a/pycgmes/resources/SVCUserDefined.py +++ b/pycgmes/resources/SVCUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .StaticVarCompensatorDynamics import StaticVarCompensatorDynamics -@dataclass(config=DataclassConfig) +@dataclass class SVCUserDefined(StaticVarCompensatorDynamics): """ Static var compensator (SVC) function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class SVCUserDefined(StaticVarCompensatorDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Season.py b/pycgmes/resources/Season.py index 6a14d678..723287af 100644 --- a/pycgmes/resources/Season.py +++ b/pycgmes/resources/Season.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class Season(IdentifiedObject): """ A specified time period of the year. @@ -28,21 +27,25 @@ class Season(IdentifiedObject): endDate: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) startDate: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # SeasonDayTypeSchedules : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # SeasonDayTypeSchedules : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/SeasonDayTypeSchedule.py b/pycgmes/resources/SeasonDayTypeSchedule.py index 986f16be..b3f73154 100644 --- a/pycgmes/resources/SeasonDayTypeSchedule.py +++ b/pycgmes/resources/SeasonDayTypeSchedule.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .RegularIntervalSchedule import RegularIntervalSchedule -@dataclass(config=DataclassConfig) +@dataclass class SeasonDayTypeSchedule(RegularIntervalSchedule): """ A time schedule covering a 24 hour period, with curve data for a specific type of season and day. @@ -28,16 +27,20 @@ class SeasonDayTypeSchedule(RegularIntervalSchedule): DayType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) Season: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Seconds.py b/pycgmes/resources/Seconds.py index c537a330..2ca427fb 100644 --- a/pycgmes/resources/Seconds.py +++ b/pycgmes/resources/Seconds.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Seconds(Base): """ Time, in seconds. @@ -29,26 +28,32 @@ class Seconds(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.DY, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.DY, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Sensor.py b/pycgmes/resources/Sensor.py index 6d709404..c0e79d1b 100644 --- a/pycgmes/resources/Sensor.py +++ b/pycgmes/resources/Sensor.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .AuxiliaryEquipment import AuxiliaryEquipment -@dataclass(config=DataclassConfig) +@dataclass class Sensor(AuxiliaryEquipment): """ This class describe devices that transform a measured quantity into signals that can be presented at displays, used diff --git a/pycgmes/resources/SeriesCompensator.py b/pycgmes/resources/SeriesCompensator.py index bc284f76..fbc723d2 100644 --- a/pycgmes/resources/SeriesCompensator.py +++ b/pycgmes/resources/SeriesCompensator.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ConductingEquipment import ConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class SeriesCompensator(ConductingEquipment): """ A Series Compensator is a series capacitor or reactor or an AC transmission line without charging susceptance. It @@ -37,51 +36,65 @@ class SeriesCompensator(ConductingEquipment): r: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) x: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) r0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) x0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) varistorPresent: bool = Field( default=False, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) varistorRatedCurrent: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) varistorVoltageThreshold: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ServiceLocation.py b/pycgmes/resources/ServiceLocation.py index b03f1203..89cf53d4 100644 --- a/pycgmes/resources/ServiceLocation.py +++ b/pycgmes/resources/ServiceLocation.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WorkLocation import WorkLocation -@dataclass(config=DataclassConfig) +@dataclass class ServiceLocation(WorkLocation): """ A real estate location, commonly referred to as premises. diff --git a/pycgmes/resources/SetPoint.py b/pycgmes/resources/SetPoint.py index 9fbc0fb2..07bba88b 100644 --- a/pycgmes/resources/SetPoint.py +++ b/pycgmes/resources/SetPoint.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .AnalogControl import AnalogControl -@dataclass(config=DataclassConfig) +@dataclass class SetPoint(AnalogControl): """ An analog control that issues a set point value. @@ -27,16 +26,20 @@ class SetPoint(AnalogControl): normalValue: float = Field( default=0.0, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) value: float = Field( default=0.0, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ShortCircuitRotorKind.py b/pycgmes/resources/ShortCircuitRotorKind.py index 1369e150..688f5cbb 100644 --- a/pycgmes/resources/ShortCircuitRotorKind.py +++ b/pycgmes/resources/ShortCircuitRotorKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class ShortCircuitRotorKind(Base): """ Type of rotor, used by short circuit applications. diff --git a/pycgmes/resources/ShuntCompensator.py b/pycgmes/resources/ShuntCompensator.py index 2b33334c..0980ca52 100644 --- a/pycgmes/resources/ShuntCompensator.py +++ b/pycgmes/resources/ShuntCompensator.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .RegulatingCondEq import RegulatingCondEq -@dataclass(config=DataclassConfig) +@dataclass class ShuntCompensator(RegulatingCondEq): """ A shunt capacitor or reactor or switchable bank of shunt capacitors or reactors. A section of a shunt compensator is @@ -48,55 +47,69 @@ class ShuntCompensator(RegulatingCondEq): aVRDelay: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) grounded: bool = Field( default=False, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) maximumSections: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) nomU: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) normalSections: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) voltageSensitivity: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # SvShuntCompensatorSections : Optional[str] = Field(default=None, in_profiles = [Profile.SV, ]) + # Type M:0..1 in CIM + # SvShuntCompensatorSections : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.SV, ]}) # noqa: E501 sections: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SolarGeneratingUnit.py b/pycgmes/resources/SolarGeneratingUnit.py index 00b07212..b608be66 100644 --- a/pycgmes/resources/SolarGeneratingUnit.py +++ b/pycgmes/resources/SolarGeneratingUnit.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .GeneratingUnit import GeneratingUnit -@dataclass(config=DataclassConfig) +@dataclass class SolarGeneratingUnit(GeneratingUnit): """ A solar thermal generating unit, connected to the grid by means of a rotating machine. This class does not @@ -28,9 +27,11 @@ class SolarGeneratingUnit(GeneratingUnit): SolarPowerPlant: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SolarPowerPlant.py b/pycgmes/resources/SolarPowerPlant.py index a0ffd709..76ff403b 100644 --- a/pycgmes/resources/SolarPowerPlant.py +++ b/pycgmes/resources/SolarPowerPlant.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemResource import PowerSystemResource -@dataclass(config=DataclassConfig) +@dataclass class SolarPowerPlant(PowerSystemResource): """ Solar power plant. @@ -24,8 +23,8 @@ class SolarPowerPlant(PowerSystemResource): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # SolarGeneratingUnits : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # SolarGeneratingUnits : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Source.py b/pycgmes/resources/Source.py index 5d31c9ad..70ab7a69 100644 --- a/pycgmes/resources/Source.py +++ b/pycgmes/resources/Source.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Source(Base): """ Source gives information related to the origin of a value. diff --git a/pycgmes/resources/StaticLoadModelKind.py b/pycgmes/resources/StaticLoadModelKind.py index 0a410635..e9f1f0aa 100644 --- a/pycgmes/resources/StaticLoadModelKind.py +++ b/pycgmes/resources/StaticLoadModelKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class StaticLoadModelKind(Base): """ Type of static load model. diff --git a/pycgmes/resources/StaticVarCompensator.py b/pycgmes/resources/StaticVarCompensator.py index 9e106830..532fb203 100644 --- a/pycgmes/resources/StaticVarCompensator.py +++ b/pycgmes/resources/StaticVarCompensator.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .RegulatingCondEq import RegulatingCondEq -@dataclass(config=DataclassConfig) +@dataclass class StaticVarCompensator(RegulatingCondEq): """ A facility for providing variable and controllable shunt reactive power. The SVC typically consists of a stepdown @@ -44,49 +43,61 @@ class StaticVarCompensator(RegulatingCondEq): capacitiveRating: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) inductiveRating: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) slope: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) sVCControlMode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) voltageSetPoint: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) q: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # StaticVarCompensatorDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # StaticVarCompensatorDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/StaticVarCompensatorDynamics.py b/pycgmes/resources/StaticVarCompensatorDynamics.py index 239562cc..2d3b86f3 100644 --- a/pycgmes/resources/StaticVarCompensatorDynamics.py +++ b/pycgmes/resources/StaticVarCompensatorDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class StaticVarCompensatorDynamics(DynamicsFunctionBlock): """ Static var compensator whose behaviour is described by reference to a standard model or by definition of a user- @@ -28,9 +27,11 @@ class StaticVarCompensatorDynamics(DynamicsFunctionBlock): StaticVarCompensator: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/StationSupply.py b/pycgmes/resources/StationSupply.py index bd71a3db..83376d15 100644 --- a/pycgmes/resources/StationSupply.py +++ b/pycgmes/resources/StationSupply.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EnergyConsumer import EnergyConsumer -@dataclass(config=DataclassConfig) +@dataclass class StationSupply(EnergyConsumer): """ Station supply with load derived from the station output. diff --git a/pycgmes/resources/Status.py b/pycgmes/resources/Status.py index b4f7b678..402e0e36 100644 --- a/pycgmes/resources/Status.py +++ b/pycgmes/resources/Status.py @@ -12,11 +12,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Status(Base): """ Current status information relevant to an entity. @@ -30,30 +29,38 @@ class Status(Base): value: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) dateTime: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) remark: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) reason: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) @cached_property diff --git a/pycgmes/resources/StreetAddress.py b/pycgmes/resources/StreetAddress.py index 750e8da6..4f8aa66d 100644 --- a/pycgmes/resources/StreetAddress.py +++ b/pycgmes/resources/StreetAddress.py @@ -12,11 +12,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class StreetAddress(Base): """ General purpose street and postal address information. @@ -31,44 +30,56 @@ class StreetAddress(Base): streetDetail: float = Field( default=0.0, - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) townDetail: float = Field( default=0.0, - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) status: float = Field( default=0.0, - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) postalCode: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) poBox: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) language: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) @cached_property diff --git a/pycgmes/resources/StreetDetail.py b/pycgmes/resources/StreetDetail.py index 19ac5a74..8de87d55 100644 --- a/pycgmes/resources/StreetDetail.py +++ b/pycgmes/resources/StreetDetail.py @@ -12,11 +12,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class StreetDetail(Base): """ Street details, in the context of address. @@ -42,93 +41,119 @@ class StreetDetail(Base): number: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) name: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) suffix: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) prefix: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) type: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) code: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) buildingName: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) suiteNumber: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) addressGeneral: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) addressGeneral2: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) addressGeneral3: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) withinTownLimits: bool = Field( default=False, - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) floorIdentification: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) @cached_property diff --git a/pycgmes/resources/StringMeasurement.py b/pycgmes/resources/StringMeasurement.py index 061b49e1..7dc1dbb1 100644 --- a/pycgmes/resources/StringMeasurement.py +++ b/pycgmes/resources/StringMeasurement.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Measurement import Measurement -@dataclass(config=DataclassConfig) +@dataclass class StringMeasurement(Measurement): """ StringMeasurement represents a measurement with values of type string. @@ -24,8 +23,8 @@ class StringMeasurement(Measurement): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # StringMeasurementValues : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # StringMeasurementValues : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/StringMeasurementValue.py b/pycgmes/resources/StringMeasurementValue.py index f44d3409..ce739845 100644 --- a/pycgmes/resources/StringMeasurementValue.py +++ b/pycgmes/resources/StringMeasurementValue.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .MeasurementValue import MeasurementValue -@dataclass(config=DataclassConfig) +@dataclass class StringMeasurementValue(MeasurementValue): """ StringMeasurementValue represents a measurement value of type string. @@ -27,9 +26,11 @@ class StringMeasurementValue(MeasurementValue): StringMeasurement: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SubGeographicalRegion.py b/pycgmes/resources/SubGeographicalRegion.py index 9bddcbe3..5c21f44a 100644 --- a/pycgmes/resources/SubGeographicalRegion.py +++ b/pycgmes/resources/SubGeographicalRegion.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class SubGeographicalRegion(IdentifiedObject): """ A subset of a geographical region of a power system network model. @@ -30,23 +29,25 @@ class SubGeographicalRegion(IdentifiedObject): Region: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Lines : list = Field(default_factory=list, in_profiles = [Profile.EQBD, Profile.EQ, ]) + # Type M:0..n in CIM + # Lines : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQBD, Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Substations : list = Field(default_factory=list, in_profiles = [Profile.EQBD, Profile.EQ, ]) + # Type M:0..n in CIM + # Substations : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQBD, Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # DCLines : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # DCLines : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/SubLoadArea.py b/pycgmes/resources/SubLoadArea.py index 9ed0fa86..02bf46ec 100644 --- a/pycgmes/resources/SubLoadArea.py +++ b/pycgmes/resources/SubLoadArea.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EnergyArea import EnergyArea -@dataclass(config=DataclassConfig) +@dataclass class SubLoadArea(EnergyArea): """ The class is the second level in a hierarchical structure for grouping of loads for the purpose of load flow load @@ -29,14 +28,16 @@ class SubLoadArea(EnergyArea): LoadArea: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # LoadGroups : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:1..n in CIM + # LoadGroups : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Substation.py b/pycgmes/resources/Substation.py index 0cc5109a..d065b8be 100644 --- a/pycgmes/resources/Substation.py +++ b/pycgmes/resources/Substation.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EquipmentContainer import EquipmentContainer -@dataclass(config=DataclassConfig) +@dataclass class Substation(EquipmentContainer): """ A collection of equipment for purposes other than generation or utilization, through which electric energy in bulk @@ -30,19 +29,21 @@ class Substation(EquipmentContainer): Region: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # VoltageLevels : list = Field(default_factory=list, in_profiles = [Profile.EQBD, Profile.EQ, ]) + # Type M:0..n in CIM + # VoltageLevels : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQBD, Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # DCConverterUnit : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # DCConverterUnit : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/SurgeArrester.py b/pycgmes/resources/SurgeArrester.py index 163a658c..9f8a3d85 100644 --- a/pycgmes/resources/SurgeArrester.py +++ b/pycgmes/resources/SurgeArrester.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .AuxiliaryEquipment import AuxiliaryEquipment -@dataclass(config=DataclassConfig) +@dataclass class SurgeArrester(AuxiliaryEquipment): """ Shunt device, installed on the network, usually in the proximity of electrical equipment in order to protect the diff --git a/pycgmes/resources/Susceptance.py b/pycgmes/resources/Susceptance.py index 91385b2d..eea3d9a5 100644 --- a/pycgmes/resources/Susceptance.py +++ b/pycgmes/resources/Susceptance.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Susceptance(Base): """ Imaginary part of admittance. @@ -29,26 +28,32 @@ class Susceptance(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SvInjection.py b/pycgmes/resources/SvInjection.py index d1785aec..81169726 100644 --- a/pycgmes/resources/SvInjection.py +++ b/pycgmes/resources/SvInjection.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class SvInjection(Base): """ The SvInjection reports the calculated bus injection minus the sum of the terminal flows. The terminal flow is @@ -33,23 +32,29 @@ class SvInjection(Base): pInjection: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) qInjection: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) TopologicalNode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SvPowerFlow.py b/pycgmes/resources/SvPowerFlow.py index 6701ec21..2026630d 100644 --- a/pycgmes/resources/SvPowerFlow.py +++ b/pycgmes/resources/SvPowerFlow.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class SvPowerFlow(Base): """ State variable for power flow. Load convention is used for flow direction. This means flow out from the @@ -32,23 +31,29 @@ class SvPowerFlow(Base): p: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) q: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) Terminal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SvShuntCompensatorSections.py b/pycgmes/resources/SvShuntCompensatorSections.py index ef20816c..55aa7dd9 100644 --- a/pycgmes/resources/SvShuntCompensatorSections.py +++ b/pycgmes/resources/SvShuntCompensatorSections.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class SvShuntCompensatorSections(Base): """ State variable for the number of sections in service for a shunt compensator. @@ -29,16 +28,20 @@ class SvShuntCompensatorSections(Base): ShuntCompensator: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) sections: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SvStatus.py b/pycgmes/resources/SvStatus.py index 7e474a7e..440ec4a5 100644 --- a/pycgmes/resources/SvStatus.py +++ b/pycgmes/resources/SvStatus.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class SvStatus(Base): """ State variable for status. @@ -30,16 +29,20 @@ class SvStatus(Base): ConductingEquipment: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) inService: bool = Field( default=False, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SvSwitch.py b/pycgmes/resources/SvSwitch.py index 3aeb9677..d44f2f1b 100644 --- a/pycgmes/resources/SvSwitch.py +++ b/pycgmes/resources/SvSwitch.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class SvSwitch(Base): """ State variable for switch. @@ -28,16 +27,20 @@ class SvSwitch(Base): open: bool = Field( default=False, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) Switch: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SvTapStep.py b/pycgmes/resources/SvTapStep.py index d05dbff4..6d0e7fd5 100644 --- a/pycgmes/resources/SvTapStep.py +++ b/pycgmes/resources/SvTapStep.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class SvTapStep(Base): """ State variable for transformer tap step. @@ -30,16 +29,20 @@ class SvTapStep(Base): position: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) TapChanger: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SvVoltage.py b/pycgmes/resources/SvVoltage.py index 96850999..c8dc7f7f 100644 --- a/pycgmes/resources/SvVoltage.py +++ b/pycgmes/resources/SvVoltage.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class SvVoltage(Base): """ State variable for voltage. @@ -29,23 +28,29 @@ class SvVoltage(Base): angle: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) v: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) TopologicalNode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Switch.py b/pycgmes/resources/Switch.py index 1f705dda..7812570c 100644 --- a/pycgmes/resources/Switch.py +++ b/pycgmes/resources/Switch.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ConductingEquipment import ConductingEquipment -@dataclass(config=DataclassConfig) +@dataclass class Switch(ConductingEquipment): """ A generic device designed to close, or open, or both, one or more electric circuits. All switches are two terminal @@ -40,45 +39,55 @@ class Switch(ConductingEquipment): normalOpen: bool = Field( default=False, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ratedCurrent: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) retained: bool = Field( default=False, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # SwitchSchedules : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # SwitchSchedules : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # SvSwitch : list = Field(default_factory=list, in_profiles = [Profile.SV, ]) + # Type M:0..n in CIM + # SvSwitch : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.SV, ]}) open: bool = Field( default=False, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) locked: bool = Field( default=False, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SwitchSchedule.py b/pycgmes/resources/SwitchSchedule.py index 652551ee..3ac6f860 100644 --- a/pycgmes/resources/SwitchSchedule.py +++ b/pycgmes/resources/SwitchSchedule.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .SeasonDayTypeSchedule import SeasonDayTypeSchedule -@dataclass(config=DataclassConfig) +@dataclass class SwitchSchedule(SeasonDayTypeSchedule): """ A schedule of switch positions. If RegularTimePoint.value1 is 0, the switch is open. If 1, the switch is closed. @@ -27,9 +26,11 @@ class SwitchSchedule(SeasonDayTypeSchedule): Switch: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SynchronousMachine.py b/pycgmes/resources/SynchronousMachine.py index b8997baa..d6fc7262 100644 --- a/pycgmes/resources/SynchronousMachine.py +++ b/pycgmes/resources/SynchronousMachine.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .RotatingMachine import RotatingMachine -@dataclass(config=DataclassConfig) +@dataclass class SynchronousMachine(RotatingMachine): """ An electromechanical device that operates with shaft rotating synchronously with the network. It is a single machine @@ -69,161 +68,205 @@ class SynchronousMachine(RotatingMachine): InitialReactiveCapabilityCurve: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) maxQ: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) minQ: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) qPercent: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) type: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) earthing: bool = Field( default=False, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) earthingStarPointR: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) earthingStarPointX: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) ikk: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) mu: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) x0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) r0: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) x2: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) r2: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) satDirectSubtransX: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) satDirectSyncX: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) satDirectTransX: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) shortCircuitRotorType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) voltageRegulationRange: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) operatingMode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) referencePriority: int = Field( default=0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # SynchronousMachineDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # SynchronousMachineDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/SynchronousMachineDetailed.py b/pycgmes/resources/SynchronousMachineDetailed.py index e2f3126b..53104d2a 100644 --- a/pycgmes/resources/SynchronousMachineDetailed.py +++ b/pycgmes/resources/SynchronousMachineDetailed.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .SynchronousMachineDynamics import SynchronousMachineDynamics -@dataclass(config=DataclassConfig) +@dataclass class SynchronousMachineDetailed(SynchronousMachineDynamics): """ All synchronous machine detailed types use a subset of the same data parameters and input/output variables. The @@ -41,30 +40,38 @@ class SynchronousMachineDetailed(SynchronousMachineDynamics): saturationFactorQAxis: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) saturationFactor120QAxis: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) efdBaseRatio: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ifdBaseType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SynchronousMachineDynamics.py b/pycgmes/resources/SynchronousMachineDynamics.py index 2ed5f5d3..48697761 100644 --- a/pycgmes/resources/SynchronousMachineDynamics.py +++ b/pycgmes/resources/SynchronousMachineDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .RotatingMachineDynamics import RotatingMachineDynamics -@dataclass(config=DataclassConfig) +@dataclass class SynchronousMachineDynamics(RotatingMachineDynamics): """ Synchronous machine whose behaviour is described by reference to a standard model expressed in one of the following @@ -45,34 +44,36 @@ class SynchronousMachineDynamics(RotatingMachineDynamics): SynchronousMachine: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # CrossCompoundTurbineGovernorDyanmics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) # noqa: E501 + # Type M:0..1 in CIM + # CrossCompoundTurbineGovernorDyanmics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # CrossCompoundTurbineGovernorDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) # noqa: E501 + # Type M:0..1 in CIM + # CrossCompoundTurbineGovernorDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # MechanicalLoadDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # MechanicalLoadDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # ExcitationSystemDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # ExcitationSystemDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # TurbineGovernorDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # TurbineGovernorDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # GenICompensationForGenJ : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # GenICompensationForGenJ : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/SynchronousMachineEquivalentCircuit.py b/pycgmes/resources/SynchronousMachineEquivalentCircuit.py index eb5f52ef..9a554c39 100644 --- a/pycgmes/resources/SynchronousMachineEquivalentCircuit.py +++ b/pycgmes/resources/SynchronousMachineEquivalentCircuit.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .SynchronousMachineDetailed import SynchronousMachineDetailed -@dataclass(config=DataclassConfig) +@dataclass class SynchronousMachineEquivalentCircuit(SynchronousMachineDetailed): """ The electrical equations for all variations of the synchronous models are based on the SynchronousEquivalentCircuit @@ -53,79 +52,101 @@ class SynchronousMachineEquivalentCircuit(SynchronousMachineDetailed): xad: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rfd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xfd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r1d: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) x1d: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xf1d: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xaq: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r1q: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) x1q: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r2q: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) x2q: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SynchronousMachineKind.py b/pycgmes/resources/SynchronousMachineKind.py index 314a1877..b729f899 100644 --- a/pycgmes/resources/SynchronousMachineKind.py +++ b/pycgmes/resources/SynchronousMachineKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class SynchronousMachineKind(Base): """ Synchronous machine type. diff --git a/pycgmes/resources/SynchronousMachineModelKind.py b/pycgmes/resources/SynchronousMachineModelKind.py index e7d6d242..2e3760b9 100644 --- a/pycgmes/resources/SynchronousMachineModelKind.py +++ b/pycgmes/resources/SynchronousMachineModelKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class SynchronousMachineModelKind(Base): """ Type of synchronous machine model used in dynamic simulation applications. diff --git a/pycgmes/resources/SynchronousMachineOperatingMode.py b/pycgmes/resources/SynchronousMachineOperatingMode.py index 3efbd8f4..8d8bac1e 100644 --- a/pycgmes/resources/SynchronousMachineOperatingMode.py +++ b/pycgmes/resources/SynchronousMachineOperatingMode.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class SynchronousMachineOperatingMode(Base): """ Synchronous machine operating mode. diff --git a/pycgmes/resources/SynchronousMachineSimplified.py b/pycgmes/resources/SynchronousMachineSimplified.py index f39de6df..63e6004c 100644 --- a/pycgmes/resources/SynchronousMachineSimplified.py +++ b/pycgmes/resources/SynchronousMachineSimplified.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .SynchronousMachineDynamics import SynchronousMachineDynamics -@dataclass(config=DataclassConfig) +@dataclass class SynchronousMachineSimplified(SynchronousMachineDynamics): """ The simplified model represents a synchronous generator as a constant internal voltage behind an impedance (Rs + diff --git a/pycgmes/resources/SynchronousMachineTimeConstantReactance.py b/pycgmes/resources/SynchronousMachineTimeConstantReactance.py index 281c1646..ccee9ce0 100644 --- a/pycgmes/resources/SynchronousMachineTimeConstantReactance.py +++ b/pycgmes/resources/SynchronousMachineTimeConstantReactance.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .SynchronousMachineDetailed import SynchronousMachineDetailed -@dataclass(config=DataclassConfig) +@dataclass class SynchronousMachineTimeConstantReactance(SynchronousMachineDetailed): """ Synchronous machine detailed modelling types are defined by the combination of the attributes @@ -63,100 +62,128 @@ class SynchronousMachineTimeConstantReactance(SynchronousMachineDetailed): rotorType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) modelType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ks: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xDirectSync: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xDirectTrans: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xDirectSubtrans: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xQuadSync: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xQuadTrans: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xQuadSubtrans: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpdo: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tppdo: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpqo: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tppqo: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tc: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/SynchronousMachineUserDefined.py b/pycgmes/resources/SynchronousMachineUserDefined.py index 6e698268..3470717f 100644 --- a/pycgmes/resources/SynchronousMachineUserDefined.py +++ b/pycgmes/resources/SynchronousMachineUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .SynchronousMachineDynamics import SynchronousMachineDynamics -@dataclass(config=DataclassConfig) +@dataclass class SynchronousMachineUserDefined(SynchronousMachineDynamics): """ Synchronous machine whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class SynchronousMachineUserDefined(SynchronousMachineDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/TapChanger.py b/pycgmes/resources/TapChanger.py index 21c3a652..a3b7734f 100644 --- a/pycgmes/resources/TapChanger.py +++ b/pycgmes/resources/TapChanger.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemResource import PowerSystemResource -@dataclass(config=DataclassConfig) +@dataclass class TapChanger(PowerSystemResource): """ Mechanism for changing transformer winding tap positions. @@ -50,74 +49,92 @@ class TapChanger(PowerSystemResource): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # TapSchedules : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # TapSchedules : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) highStep: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) lowStep: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ltcFlag: bool = Field( default=False, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) neutralStep: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) neutralU: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) normalStep: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) TapChangerControl: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # SvTapStep : Optional[str] = Field(default=None, in_profiles = [Profile.SV, ]) + # Type M:0..1 in CIM + # SvTapStep : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.SV, ]}) controlEnabled: bool = Field( default=False, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) step: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/TapChangerControl.py b/pycgmes/resources/TapChangerControl.py index 61f5f746..a8a470c6 100644 --- a/pycgmes/resources/TapChangerControl.py +++ b/pycgmes/resources/TapChangerControl.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .RegulatingControl import RegulatingControl -@dataclass(config=DataclassConfig) +@dataclass class TapChangerControl(RegulatingControl): """ Describes behaviour specific to tap changers, e.g. how the voltage at the end of a line varies with the load level @@ -25,8 +24,8 @@ class TapChangerControl(RegulatingControl): """ # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # TapChanger : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:1..n in CIM + # TapChanger : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/TapChangerTablePoint.py b/pycgmes/resources/TapChangerTablePoint.py index c61cde04..92747b03 100644 --- a/pycgmes/resources/TapChangerTablePoint.py +++ b/pycgmes/resources/TapChangerTablePoint.py @@ -12,11 +12,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class TapChangerTablePoint(Base): """ Describes each tap step in the tabular curve. @@ -45,44 +44,56 @@ class TapChangerTablePoint(Base): b: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) g: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) ratio: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) step: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) x: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/TapSchedule.py b/pycgmes/resources/TapSchedule.py index c715a1f1..fe371d20 100644 --- a/pycgmes/resources/TapSchedule.py +++ b/pycgmes/resources/TapSchedule.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .SeasonDayTypeSchedule import SeasonDayTypeSchedule -@dataclass(config=DataclassConfig) +@dataclass class TapSchedule(SeasonDayTypeSchedule): """ A pre-established pattern over time for a tap step. @@ -27,9 +26,11 @@ class TapSchedule(SeasonDayTypeSchedule): TapChanger: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Temperature.py b/pycgmes/resources/Temperature.py index 8ccebcd1..343a16e1 100644 --- a/pycgmes/resources/Temperature.py +++ b/pycgmes/resources/Temperature.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Temperature(Base): """ Value of temperature in degrees Celsius. @@ -29,26 +28,32 @@ class Temperature(Base): multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SC, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + Profile.DY, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SC, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + Profile.DY, + ] + }, ) value: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Terminal.py b/pycgmes/resources/Terminal.py index cf37f55c..f5f526b3 100644 --- a/pycgmes/resources/Terminal.py +++ b/pycgmes/resources/Terminal.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ACDCTerminal import ACDCTerminal -@dataclass(config=DataclassConfig) +@dataclass class Terminal(ACDCTerminal): """ An AC electrical connection point to a piece of conducting equipment. Terminals are connected at physical connection @@ -50,70 +49,78 @@ class Terminal(ACDCTerminal): TopologicalNode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.TP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.TP, + ] + }, ) ConductingEquipment: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + Profile.DY, + ] + }, ) ConnectivityNode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ConverterDCSides : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # ConverterDCSides : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # AuxiliaryEquipment : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # AuxiliaryEquipment : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # RegulatingControl : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # RegulatingControl : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 phases: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # TransformerEnd : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # TransformerEnd : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # *Association not used* - # Type M:0..2 in CIM # pylint: disable-next=line-too-long - # TieFlow : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..2 in CIM + # TieFlow : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # HasSecondMutualCoupling : list = Field(default_factory=list, in_profiles = [Profile.SC, ]) + # Type M:0..n in CIM + # HasSecondMutualCoupling : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.SC, ]}) # noqa: E501 # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # HasFirstMutualCoupling : list = Field(default_factory=list, in_profiles = [Profile.SC, ]) + # Type M:0..n in CIM + # HasFirstMutualCoupling : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.SC, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # SvPowerFlow : Optional[str] = Field(default=None, in_profiles = [Profile.SV, ]) + # Type M:0..1 in CIM + # SvPowerFlow : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.SV, ]}) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # RemoteInputSignal : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # RemoteInputSignal : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/TextDiagramObject.py b/pycgmes/resources/TextDiagramObject.py index e59d5b97..3a488c25 100644 --- a/pycgmes/resources/TextDiagramObject.py +++ b/pycgmes/resources/TextDiagramObject.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DiagramObject import DiagramObject -@dataclass(config=DataclassConfig) +@dataclass class TextDiagramObject(DiagramObject): """ A diagram object for placing free-text or text derived from an associated domain object. @@ -26,9 +25,11 @@ class TextDiagramObject(DiagramObject): text: str = Field( default="", - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) @cached_property diff --git a/pycgmes/resources/ThermalGeneratingUnit.py b/pycgmes/resources/ThermalGeneratingUnit.py index e06a91ee..fe204544 100644 --- a/pycgmes/resources/ThermalGeneratingUnit.py +++ b/pycgmes/resources/ThermalGeneratingUnit.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .GeneratingUnit import GeneratingUnit -@dataclass(config=DataclassConfig) +@dataclass class ThermalGeneratingUnit(GeneratingUnit): """ A generating unit whose prime mover could be a steam turbine, combustion turbine, or diesel engine. @@ -30,28 +29,34 @@ class ThermalGeneratingUnit(GeneratingUnit): CAESPlant: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) CogenerationPlant: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) CombinedCyclePlant: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # FossilFuels : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # FossilFuels : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/TieFlow.py b/pycgmes/resources/TieFlow.py index b26f6f04..580cad92 100644 --- a/pycgmes/resources/TieFlow.py +++ b/pycgmes/resources/TieFlow.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class TieFlow(IdentifiedObject): """ Defines the structure (in terms of location and direction) of the net interchange constraint for a control area. @@ -32,23 +31,29 @@ class TieFlow(IdentifiedObject): ControlArea: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) Terminal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) positiveFlowIn: bool = Field( default=False, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/TopologicalIsland.py b/pycgmes/resources/TopologicalIsland.py index bf4962f0..15d68d0b 100644 --- a/pycgmes/resources/TopologicalIsland.py +++ b/pycgmes/resources/TopologicalIsland.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class TopologicalIsland(IdentifiedObject): """ An electrically connected subset of the network. Topological islands can change as the current network state @@ -33,16 +32,20 @@ class TopologicalIsland(IdentifiedObject): AngleRefTopologicalNode: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) TopologicalNodes: list = Field( default_factory=list, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) @cached_property diff --git a/pycgmes/resources/TopologicalNode.py b/pycgmes/resources/TopologicalNode.py index ba5b0da2..baf0483a 100644 --- a/pycgmes/resources/TopologicalNode.py +++ b/pycgmes/resources/TopologicalNode.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class TopologicalNode(IdentifiedObject): """ For a detailed substation model a topological node is a set of connectivity nodes that, in the current network @@ -44,48 +43,54 @@ class TopologicalNode(IdentifiedObject): BaseVoltage: Optional[str] = Field( default=None, - in_profiles=[ - Profile.TP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.TP, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ConnectivityNodes : list = Field(default_factory=list, in_profiles = [Profile.TP, ]) + # Type M:0..n in CIM + # ConnectivityNodes : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.TP, ]}) # noqa: E501 ConnectivityNodeContainer: Optional[str] = Field( default=None, - in_profiles=[ - Profile.TP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.TP, + ] + }, ) # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # Terminal : list = Field(default_factory=list, in_profiles = [Profile.TP, ]) + # Type M:1..n in CIM + # Terminal : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.TP, ]}) ReportingGroup: Optional[str] = Field( default=None, - in_profiles=[ - Profile.TP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.TP, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # SvInjection : Optional[str] = Field(default=None, in_profiles = [Profile.SV, ]) + # Type M:0..1 in CIM + # SvInjection : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.SV, ]}) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # SvVoltage : Optional[str] = Field(default=None, in_profiles = [Profile.SV, ]) + # Type M:0..1 in CIM + # SvVoltage : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.SV, ]}) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # AngleRefTopologicalIsland : Optional[str] = Field(default=None, in_profiles = [Profile.SV, ]) + # Type M:0..1 in CIM + # AngleRefTopologicalIsland : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.SV, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # TopologicalIsland : Optional[str] = Field(default=None, in_profiles = [Profile.SV, ]) + # Type M:0..1 in CIM + # TopologicalIsland : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.SV, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/TownDetail.py b/pycgmes/resources/TownDetail.py index 7f1d3bab..e90494da 100644 --- a/pycgmes/resources/TownDetail.py +++ b/pycgmes/resources/TownDetail.py @@ -12,11 +12,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class TownDetail(Base): """ Town details, in the context of address. @@ -30,37 +29,47 @@ class TownDetail(Base): code: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) section: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) name: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) stateOrProvince: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) country: str = Field( default="", - in_profiles=[ - Profile.GL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.GL, + ] + }, ) @cached_property diff --git a/pycgmes/resources/TransformerEnd.py b/pycgmes/resources/TransformerEnd.py index 1bd9ca48..d46edcc7 100644 --- a/pycgmes/resources/TransformerEnd.py +++ b/pycgmes/resources/TransformerEnd.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class TransformerEnd(IdentifiedObject): """ A conducting connection point of a power transformer. It corresponds to a physical transformer winding terminal. In @@ -39,52 +38,64 @@ class TransformerEnd(IdentifiedObject): BaseVoltage: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # PhaseTapChanger : Optional[str] = Field(default=None, in_profiles = [Profile.EQ, ]) + # Type M:0..1 in CIM + # PhaseTapChanger : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # RatioTapChanger : Optional[str] = Field(default=None, in_profiles = [Profile.EQ, ]) + # Type M:0..1 in CIM + # RatioTapChanger : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 Terminal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) endNumber: int = Field( default=0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) rground: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) grounded: bool = Field( default=False, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) xground: float = Field( default=0.0, - in_profiles=[ - Profile.SC, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SC, + ] + }, ) @cached_property diff --git a/pycgmes/resources/TurbLCFB1.py b/pycgmes/resources/TurbLCFB1.py index 28605195..b4cca129 100644 --- a/pycgmes/resources/TurbLCFB1.py +++ b/pycgmes/resources/TurbLCFB1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineLoadControllerDynamics import TurbineLoadControllerDynamics -@dataclass(config=DataclassConfig) +@dataclass class TurbLCFB1(TurbineLoadControllerDynamics): """ Turbine load controller model developed by WECC. This model represents a supervisory turbine load controller that @@ -42,86 +41,110 @@ class TurbLCFB1(TurbineLoadControllerDynamics): mwbase: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) speedReferenceGovernor: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) db: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) emax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ki: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fbf: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pbf: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpelec: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) irmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmwset: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/TurbineGovernorDynamics.py b/pycgmes/resources/TurbineGovernorDynamics.py index 845ef319..8b192735 100644 --- a/pycgmes/resources/TurbineGovernorDynamics.py +++ b/pycgmes/resources/TurbineGovernorDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class TurbineGovernorDynamics(DynamicsFunctionBlock): """ Turbine-governor function block whose behaviour is described by reference to a standard model or by definition of a @@ -34,21 +33,25 @@ class TurbineGovernorDynamics(DynamicsFunctionBlock): SynchronousMachineDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) AsynchronousMachineDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # TurbineLoadControllerDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # TurbineLoadControllerDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/TurbineGovernorUserDefined.py b/pycgmes/resources/TurbineGovernorUserDefined.py index 0367b94a..c0e5e65b 100644 --- a/pycgmes/resources/TurbineGovernorUserDefined.py +++ b/pycgmes/resources/TurbineGovernorUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineGovernorDynamics import TurbineGovernorDynamics -@dataclass(config=DataclassConfig) +@dataclass class TurbineGovernorUserDefined(TurbineGovernorDynamics): """ Turbine-governor function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class TurbineGovernorUserDefined(TurbineGovernorDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/TurbineLoadControllerDynamics.py b/pycgmes/resources/TurbineLoadControllerDynamics.py index f51ac2d2..2f3ef3dc 100644 --- a/pycgmes/resources/TurbineLoadControllerDynamics.py +++ b/pycgmes/resources/TurbineLoadControllerDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class TurbineLoadControllerDynamics(DynamicsFunctionBlock): """ Turbine load controller function block whose behaviour is described by reference to a standard model or by @@ -28,9 +27,11 @@ class TurbineLoadControllerDynamics(DynamicsFunctionBlock): TurbineGovernorDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/TurbineLoadControllerUserDefined.py b/pycgmes/resources/TurbineLoadControllerUserDefined.py index 0d912740..2bba1950 100644 --- a/pycgmes/resources/TurbineLoadControllerUserDefined.py +++ b/pycgmes/resources/TurbineLoadControllerUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .TurbineLoadControllerDynamics import TurbineLoadControllerDynamics -@dataclass(config=DataclassConfig) +@dataclass class TurbineLoadControllerUserDefined(TurbineLoadControllerDynamics): """ Turbine load controller function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class TurbineLoadControllerUserDefined(TurbineLoadControllerDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/UnderexcLim2Simplified.py b/pycgmes/resources/UnderexcLim2Simplified.py index 6abf79a1..dc2686cd 100644 --- a/pycgmes/resources/UnderexcLim2Simplified.py +++ b/pycgmes/resources/UnderexcLim2Simplified.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .UnderexcitationLimiterDynamics import UnderexcitationLimiterDynamics -@dataclass(config=DataclassConfig) +@dataclass class UnderexcLim2Simplified(UnderexcitationLimiterDynamics): """ Simplified type UEL2 underexcitation limiter. This model can be derived from UnderexcLimIEEE2. The limit @@ -34,51 +33,65 @@ class UnderexcLim2Simplified(UnderexcitationLimiterDynamics): q0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) q1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kui: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vuimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vuimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/UnderexcLimIEEE1.py b/pycgmes/resources/UnderexcLimIEEE1.py index d61392b4..c4087030 100644 --- a/pycgmes/resources/UnderexcLimIEEE1.py +++ b/pycgmes/resources/UnderexcLimIEEE1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .UnderexcitationLimiterDynamics import UnderexcitationLimiterDynamics -@dataclass(config=DataclassConfig) +@dataclass class UnderexcLimIEEE1(UnderexcitationLimiterDynamics): """ Type UEL1 model which has a circular limit boundary when plotted in terms of machine reactive power vs. real power @@ -41,107 +40,137 @@ class UnderexcLimIEEE1(UnderexcitationLimiterDynamics): kur: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kuc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kuf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vurmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vucmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kui: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kul: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vuimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vuimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tu1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tu2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tu3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tu4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vulmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vulmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/UnderexcLimIEEE2.py b/pycgmes/resources/UnderexcLimIEEE2.py index 29f686ca..818481c1 100644 --- a/pycgmes/resources/UnderexcLimIEEE2.py +++ b/pycgmes/resources/UnderexcLimIEEE2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .UnderexcitationLimiterDynamics import UnderexcitationLimiterDynamics -@dataclass(config=DataclassConfig) +@dataclass class UnderexcLimIEEE2(UnderexcitationLimiterDynamics): """ Type UEL2 underexcitation limiter which has either a straight-line or multi-segment characteristic when plotted in @@ -69,282 +68,362 @@ class UnderexcLimIEEE2(UnderexcitationLimiterDynamics): tuv: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tup: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tuq: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kui: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kul: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vuimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vuimin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kuf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kfb: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tul: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tu1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tu2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tu3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tu4: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vulmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vulmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) q0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) q1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) q2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) q3: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) q4: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) q5: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) q6: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p7: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) q7: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p8: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) q8: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p9: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) q9: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) p10: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) q10: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/UnderexcLimX1.py b/pycgmes/resources/UnderexcLimX1.py index a0ba7fcf..551a87ac 100644 --- a/pycgmes/resources/UnderexcLimX1.py +++ b/pycgmes/resources/UnderexcLimX1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .UnderexcitationLimiterDynamics import UnderexcitationLimiterDynamics -@dataclass(config=DataclassConfig) +@dataclass class UnderexcLimX1(UnderexcitationLimiterDynamics): """ Allis-Chalmers minimum excitation limiter. @@ -31,44 +30,56 @@ class UnderexcLimX1(UnderexcitationLimiterDynamics): kf2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) km: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tm: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) melmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) k: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/UnderexcLimX2.py b/pycgmes/resources/UnderexcLimX2.py index 6a51f316..05d05cac 100644 --- a/pycgmes/resources/UnderexcLimX2.py +++ b/pycgmes/resources/UnderexcLimX2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .UnderexcitationLimiterDynamics import UnderexcitationLimiterDynamics -@dataclass(config=DataclassConfig) +@dataclass class UnderexcLimX2(UnderexcitationLimiterDynamics): """ Westinghouse minimum excitation limiter. @@ -32,51 +31,65 @@ class UnderexcLimX2(UnderexcitationLimiterDynamics): kf2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tf2: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) km: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tm: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) melmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) qo: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) r: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/UnderexcitationLimiterDynamics.py b/pycgmes/resources/UnderexcitationLimiterDynamics.py index 4e69252b..d516ea83 100644 --- a/pycgmes/resources/UnderexcitationLimiterDynamics.py +++ b/pycgmes/resources/UnderexcitationLimiterDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class UnderexcitationLimiterDynamics(DynamicsFunctionBlock): """ Underexcitation limiter function block whose behaviour is described by reference to a standard model or by @@ -28,14 +27,16 @@ class UnderexcitationLimiterDynamics(DynamicsFunctionBlock): """ # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # RemoteInputSignal : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # RemoteInputSignal : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 ExcitationSystemDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/UnderexcitationLimiterUserDefined.py b/pycgmes/resources/UnderexcitationLimiterUserDefined.py index 71a90a7a..6c3eed95 100644 --- a/pycgmes/resources/UnderexcitationLimiterUserDefined.py +++ b/pycgmes/resources/UnderexcitationLimiterUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .UnderexcitationLimiterDynamics import UnderexcitationLimiterDynamics -@dataclass(config=DataclassConfig) +@dataclass class UnderexcitationLimiterUserDefined(UnderexcitationLimiterDynamics): """ Underexcitation limiter function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class UnderexcitationLimiterUserDefined(UnderexcitationLimiterDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/UnitMultiplier.py b/pycgmes/resources/UnitMultiplier.py index e903ee11..b94d0817 100644 --- a/pycgmes/resources/UnitMultiplier.py +++ b/pycgmes/resources/UnitMultiplier.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class UnitMultiplier(Base): """ The unit multipliers defined for the CIM. When applied to unit symbols, the unit symbol is treated as a derived diff --git a/pycgmes/resources/UnitSymbol.py b/pycgmes/resources/UnitSymbol.py index 10d0bdcd..7a6b1efd 100644 --- a/pycgmes/resources/UnitSymbol.py +++ b/pycgmes/resources/UnitSymbol.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class UnitSymbol(Base): """ The derived units defined for usage in the CIM. In some cases, the derived unit is equal to an SI unit. Whenever diff --git a/pycgmes/resources/VAdjIEEE.py b/pycgmes/resources/VAdjIEEE.py index 070c2f1f..dddf4a66 100644 --- a/pycgmes/resources/VAdjIEEE.py +++ b/pycgmes/resources/VAdjIEEE.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .VoltageAdjusterDynamics import VoltageAdjusterDynamics -@dataclass(config=DataclassConfig) +@dataclass class VAdjIEEE(VoltageAdjusterDynamics): """ IEEE voltage adjuster which is used to represent the voltage adjuster in either a power factor or VAr control @@ -32,44 +31,56 @@ class VAdjIEEE(VoltageAdjusterDynamics): vadjf: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) adjslew: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vadjmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) vadjmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) taon: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) taoff: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/VCompIEEEType1.py b/pycgmes/resources/VCompIEEEType1.py index 101e577f..a49f4bb0 100644 --- a/pycgmes/resources/VCompIEEEType1.py +++ b/pycgmes/resources/VCompIEEEType1.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .VoltageCompensatorDynamics import VoltageCompensatorDynamics -@dataclass(config=DataclassConfig) +@dataclass class VCompIEEEType1(VoltageCompensatorDynamics): """ Terminal voltage transducer and load compensator as defined in IEEE 421.5-2005, 4. This model is common to all @@ -31,23 +30,29 @@ class VCompIEEEType1(VoltageCompensatorDynamics): rc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/VCompIEEEType2.py b/pycgmes/resources/VCompIEEEType2.py index 6acf4b83..824d9d84 100644 --- a/pycgmes/resources/VCompIEEEType2.py +++ b/pycgmes/resources/VCompIEEEType2.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .VoltageCompensatorDynamics import VoltageCompensatorDynamics -@dataclass(config=DataclassConfig) +@dataclass class VCompIEEEType2(VoltageCompensatorDynamics): """ Terminal voltage transducer and load compensator as defined in IEEE 421.5-2005, 4. This model is designed to cover @@ -30,14 +29,16 @@ class VCompIEEEType2(VoltageCompensatorDynamics): tr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:2..n in CIM # pylint: disable-next=line-too-long - # GenICompensationForGenJ : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:2..n in CIM + # GenICompensationForGenJ : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/VSCDynamics.py b/pycgmes/resources/VSCDynamics.py index bfd55b85..5667e5fe 100644 --- a/pycgmes/resources/VSCDynamics.py +++ b/pycgmes/resources/VSCDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .HVDCDynamics import HVDCDynamics -@dataclass(config=DataclassConfig) +@dataclass class VSCDynamics(HVDCDynamics): """ VSC function block whose behaviour is described by reference to a standard model or by definition of a user-defined @@ -28,9 +27,11 @@ class VSCDynamics(HVDCDynamics): VsConverter: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/VSCUserDefined.py b/pycgmes/resources/VSCUserDefined.py index fd26f59e..c8ce7d38 100644 --- a/pycgmes/resources/VSCUserDefined.py +++ b/pycgmes/resources/VSCUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .VSCDynamics import VSCDynamics -@dataclass(config=DataclassConfig) +@dataclass class VSCUserDefined(VSCDynamics): """ Voltage source converter (VSC) function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class VSCUserDefined(VSCDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/Validity.py b/pycgmes/resources/Validity.py index ba904ca1..e353743d 100644 --- a/pycgmes/resources/Validity.py +++ b/pycgmes/resources/Validity.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Validity(Base): """ Validity for MeasurementValue. diff --git a/pycgmes/resources/ValueAliasSet.py b/pycgmes/resources/ValueAliasSet.py index 45f605d4..ff25ac50 100644 --- a/pycgmes/resources/ValueAliasSet.py +++ b/pycgmes/resources/ValueAliasSet.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class ValueAliasSet(IdentifiedObject): """ Describes the translation of a set of values into a name and is intendend to facilitate custom translations. Each @@ -31,20 +30,20 @@ class ValueAliasSet(IdentifiedObject): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Commands : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # Commands : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Discretes : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # Discretes : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # RaiseLowerCommands : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:0..n in CIM + # RaiseLowerCommands : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) # noqa: E501 # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # Values : list = Field(default_factory=list, in_profiles = [Profile.OP, ]) + # Type M:1..n in CIM + # Values : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.OP, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/ValueToAlias.py b/pycgmes/resources/ValueToAlias.py index 29adff6c..bc962d62 100644 --- a/pycgmes/resources/ValueToAlias.py +++ b/pycgmes/resources/ValueToAlias.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class ValueToAlias(IdentifiedObject): """ Describes the translation of one particular value into a name, e.g. 1 as "Open". @@ -28,16 +27,20 @@ class ValueToAlias(IdentifiedObject): ValueAliasSet: Optional[str] = Field( default=None, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) value: int = Field( default=0, - in_profiles=[ - Profile.OP, - ], + json_schema_extra={ + "in_profiles": [ + Profile.OP, + ] + }, ) @cached_property diff --git a/pycgmes/resources/VisibilityLayer.py b/pycgmes/resources/VisibilityLayer.py index 17ecc56a..a1f5495f 100644 --- a/pycgmes/resources/VisibilityLayer.py +++ b/pycgmes/resources/VisibilityLayer.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class VisibilityLayer(IdentifiedObject): """ Layers are typically used for grouping diagram objects according to themes and scales. Themes are used to display or @@ -33,16 +32,20 @@ class VisibilityLayer(IdentifiedObject): VisibleObjects: list = Field( default_factory=list, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) drawingOrder: int = Field( default=0, - in_profiles=[ - Profile.DL, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DL, + ] + }, ) @cached_property diff --git a/pycgmes/resources/Voltage.py b/pycgmes/resources/Voltage.py index 5c30badb..c352892e 100644 --- a/pycgmes/resources/Voltage.py +++ b/pycgmes/resources/Voltage.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class Voltage(Base): """ Electrical voltage, can be both AC and DC. @@ -29,35 +28,41 @@ class Voltage(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - Profile.SC, - Profile.SV, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + Profile.SC, + Profile.SV, + Profile.SSH, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - Profile.SC, - Profile.SV, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + Profile.SC, + Profile.SV, + Profile.SSH, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - Profile.SC, - Profile.SV, - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + Profile.SC, + Profile.SV, + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/VoltageAdjusterDynamics.py b/pycgmes/resources/VoltageAdjusterDynamics.py index 51a8a2b8..00594e2b 100644 --- a/pycgmes/resources/VoltageAdjusterDynamics.py +++ b/pycgmes/resources/VoltageAdjusterDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class VoltageAdjusterDynamics(DynamicsFunctionBlock): """ Voltage adjuster function block whose behaviour is described by reference to a standard model or by definition of a @@ -29,9 +28,11 @@ class VoltageAdjusterDynamics(DynamicsFunctionBlock): PFVArControllerType1Dynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/VoltageAdjusterUserDefined.py b/pycgmes/resources/VoltageAdjusterUserDefined.py index 700d2f93..a471a234 100644 --- a/pycgmes/resources/VoltageAdjusterUserDefined.py +++ b/pycgmes/resources/VoltageAdjusterUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .VoltageAdjusterDynamics import VoltageAdjusterDynamics -@dataclass(config=DataclassConfig) +@dataclass class VoltageAdjusterUserDefined(VoltageAdjusterDynamics): """ Voltage adjuster function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class VoltageAdjusterUserDefined(VoltageAdjusterDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/VoltageCompensatorDynamics.py b/pycgmes/resources/VoltageCompensatorDynamics.py index 91e28e6d..ed25df0a 100644 --- a/pycgmes/resources/VoltageCompensatorDynamics.py +++ b/pycgmes/resources/VoltageCompensatorDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class VoltageCompensatorDynamics(DynamicsFunctionBlock): """ Voltage compensator function block whose behaviour is described by reference to a standard model or by definition of @@ -28,14 +27,16 @@ class VoltageCompensatorDynamics(DynamicsFunctionBlock): """ # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # RemoteInputSignal : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # RemoteInputSignal : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 ExcitationSystemDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/VoltageCompensatorUserDefined.py b/pycgmes/resources/VoltageCompensatorUserDefined.py index 754f6ada..c568c144 100644 --- a/pycgmes/resources/VoltageCompensatorUserDefined.py +++ b/pycgmes/resources/VoltageCompensatorUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .VoltageCompensatorDynamics import VoltageCompensatorDynamics -@dataclass(config=DataclassConfig) +@dataclass class VoltageCompensatorUserDefined(VoltageCompensatorDynamics): """ Voltage compensator function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class VoltageCompensatorUserDefined(VoltageCompensatorDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/VoltageLevel.py b/pycgmes/resources/VoltageLevel.py index 166f9049..73843384 100644 --- a/pycgmes/resources/VoltageLevel.py +++ b/pycgmes/resources/VoltageLevel.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .EquipmentContainer import EquipmentContainer -@dataclass(config=DataclassConfig) +@dataclass class VoltageLevel(EquipmentContainer): """ A collection of equipment at one common system voltage forming a switchgear. The equipment typically consists of @@ -37,38 +36,46 @@ class VoltageLevel(EquipmentContainer): BaseVoltage: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # Bays : list = Field(default_factory=list, in_profiles = [Profile.EQBD, Profile.EQ, ]) + # Type M:0..n in CIM + # Bays : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQBD, Profile.EQ, ]}) # noqa: E501 Substation: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) highVoltageLimit: float = Field( default=0.0, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) lowVoltageLimit: float = Field( default=0.0, - in_profiles=[ - Profile.EQBD, - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQBD, + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/VoltageLimit.py b/pycgmes/resources/VoltageLimit.py index 6dc0bfb6..e9c167bb 100644 --- a/pycgmes/resources/VoltageLimit.py +++ b/pycgmes/resources/VoltageLimit.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .OperationalLimit import OperationalLimit -@dataclass(config=DataclassConfig) +@dataclass class VoltageLimit(OperationalLimit): """ Operational limit applied to voltage. The use of operational VoltageLimit is preferred instead of limits defined at @@ -30,16 +29,20 @@ class VoltageLimit(OperationalLimit): normalValue: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) value: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) @cached_property diff --git a/pycgmes/resources/VoltagePerReactivePower.py b/pycgmes/resources/VoltagePerReactivePower.py index 96799a7c..60f25c36 100644 --- a/pycgmes/resources/VoltagePerReactivePower.py +++ b/pycgmes/resources/VoltagePerReactivePower.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class VoltagePerReactivePower(Base): """ Voltage variation with reactive power. @@ -29,23 +28,29 @@ class VoltagePerReactivePower(Base): value: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/VolumeFlowRate.py b/pycgmes/resources/VolumeFlowRate.py index 97f9dbd2..0973f8ad 100644 --- a/pycgmes/resources/VolumeFlowRate.py +++ b/pycgmes/resources/VolumeFlowRate.py @@ -13,11 +13,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class VolumeFlowRate(Base): """ Volume per time. @@ -29,23 +28,29 @@ class VolumeFlowRate(Base): multiplier: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) unit: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) value: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/VsCapabilityCurve.py b/pycgmes/resources/VsCapabilityCurve.py index 60f8c82a..043a4b68 100644 --- a/pycgmes/resources/VsCapabilityCurve.py +++ b/pycgmes/resources/VsCapabilityCurve.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Curve import Curve -@dataclass(config=DataclassConfig) +@dataclass class VsCapabilityCurve(Curve): """ The P-Q capability curve for a voltage source converter, with P on X-axis and Qmin and Qmax on Y1-axis and Y2-axis. @@ -24,8 +23,8 @@ class VsCapabilityCurve(Curve): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # VsConverterDCSides : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # VsConverterDCSides : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/VsConverter.py b/pycgmes/resources/VsConverter.py index 9ad8f855..eddc606a 100644 --- a/pycgmes/resources/VsConverter.py +++ b/pycgmes/resources/VsConverter.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .ACDCConverter import ACDCConverter -@dataclass(config=DataclassConfig) +@dataclass class VsConverter(ACDCConverter): """ DC side of the voltage source converter (VSC). @@ -48,105 +47,133 @@ class VsConverter(ACDCConverter): CapabilityCurve: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) maxModulationIndex: float = Field( default=0.0, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) delta: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) uv: float = Field( default=0.0, - in_profiles=[ - Profile.SV, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SV, + ] + }, ) droop: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) droopCompensation: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) pPccControl: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) qPccControl: Optional[str] = Field( default=None, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) qShare: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) targetQpcc: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) targetUpcc: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) targetPowerFactorPcc: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) targetPhasePcc: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) targetPWMfactor: float = Field( default=0.0, - in_profiles=[ - Profile.SSH, - ], + json_schema_extra={ + "in_profiles": [ + Profile.SSH, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # VSCDynamics : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # VSCDynamics : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/VsPpccControlKind.py b/pycgmes/resources/VsPpccControlKind.py index 1ffbc082..232bb97b 100644 --- a/pycgmes/resources/VsPpccControlKind.py +++ b/pycgmes/resources/VsPpccControlKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class VsPpccControlKind(Base): """ Types applicable to the control of real power and/or DC voltage by voltage source converter. diff --git a/pycgmes/resources/VsQpccControlKind.py b/pycgmes/resources/VsQpccControlKind.py index 1070719c..6398ecaf 100644 --- a/pycgmes/resources/VsQpccControlKind.py +++ b/pycgmes/resources/VsQpccControlKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class VsQpccControlKind(Base): """ Kind of reactive power control at point of common coupling for a voltage source converter. diff --git a/pycgmes/resources/WaveTrap.py b/pycgmes/resources/WaveTrap.py index 790be982..b359d849 100644 --- a/pycgmes/resources/WaveTrap.py +++ b/pycgmes/resources/WaveTrap.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .AuxiliaryEquipment import AuxiliaryEquipment -@dataclass(config=DataclassConfig) +@dataclass class WaveTrap(AuxiliaryEquipment): """ Line traps are devices that impede high frequency power line carrier signals yet present a negligible impedance at diff --git a/pycgmes/resources/WindAeroConstIEC.py b/pycgmes/resources/WindAeroConstIEC.py index 10ba02bb..9dabe495 100644 --- a/pycgmes/resources/WindAeroConstIEC.py +++ b/pycgmes/resources/WindAeroConstIEC.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindAeroConstIEC(IdentifiedObject): """ Constant aerodynamic torque model which assumes that the aerodynamic torque is constant. Reference: IEC @@ -25,8 +24,8 @@ class WindAeroConstIEC(IdentifiedObject): """ # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # WindGenTurbineType1aIEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # WindGenTurbineType1aIEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindAeroOneDimIEC.py b/pycgmes/resources/WindAeroOneDimIEC.py index 2cfb8254..a92cd745 100644 --- a/pycgmes/resources/WindAeroOneDimIEC.py +++ b/pycgmes/resources/WindAeroOneDimIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindAeroOneDimIEC(IdentifiedObject): """ One-dimensional aerodynamic model. Reference: IEC 61400-27-1:2015, 5.6.1.2. @@ -28,21 +27,25 @@ class WindAeroOneDimIEC(IdentifiedObject): ka: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) thetaomega: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # WindTurbineType3IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindAeroTwoDimIEC.py b/pycgmes/resources/WindAeroTwoDimIEC.py index d26cdcc5..c3686adf 100644 --- a/pycgmes/resources/WindAeroTwoDimIEC.py +++ b/pycgmes/resources/WindAeroTwoDimIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindAeroTwoDimIEC(IdentifiedObject): """ Two-dimensional aerodynamic model. Reference: IEC 61400-27-1:2015, 5.6.1.3. @@ -35,56 +34,70 @@ class WindAeroTwoDimIEC(IdentifiedObject): dpomega: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dptheta: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dpv1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) omegazero: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pavail: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) thetazero: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) thetav2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # WindTurbineType3IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindContCurrLimIEC.py b/pycgmes/resources/WindContCurrLimIEC.py index d6a217a3..bc98bed5 100644 --- a/pycgmes/resources/WindContCurrLimIEC.py +++ b/pycgmes/resources/WindContCurrLimIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindContCurrLimIEC(IdentifiedObject): """ Current limitation model. The current limitation model combines the physical limits and the control limits. @@ -41,60 +40,74 @@ class WindContCurrLimIEC(IdentifiedObject): imax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) imaxdip: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpqu: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) mdfslim: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) mqpri: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tufiltcl: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) upqumax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3or4IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # WindTurbineType3or4IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # WindDynamicsLookupTable : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:1..n in CIM + # WindDynamicsLookupTable : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindContPType3IEC.py b/pycgmes/resources/WindContPType3IEC.py index 7d62b360..53decb36 100644 --- a/pycgmes/resources/WindContPType3IEC.py +++ b/pycgmes/resources/WindContPType3IEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindContPType3IEC(IdentifiedObject): """ P control model type 3. Reference: IEC 61400-27-1:2015, 5.6.5.4. @@ -55,172 +54,218 @@ class WindContPType3IEC(IdentifiedObject): dpmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dprefmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dprefmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dthetamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dthetamaxuvrt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kdtd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kip: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) mpuvrt: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) omegaoffset: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pdtdmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tdvs: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) thetaemin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) thetauscale: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tomegafiltp3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpfiltp3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpord: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tufiltp3: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tomegaref: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) udvs: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) updip: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) omegadtd: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) zeta: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # WindTurbineType3IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # WindDynamicsLookupTable : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:1..n in CIM + # WindDynamicsLookupTable : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindContPType4aIEC.py b/pycgmes/resources/WindContPType4aIEC.py index 8c46b248..931db2ac 100644 --- a/pycgmes/resources/WindContPType4aIEC.py +++ b/pycgmes/resources/WindContPType4aIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindContPType4aIEC(IdentifiedObject): """ P control model type 4A. Reference: IEC 61400-27-1:2015, 5.6.5.5. @@ -29,28 +28,34 @@ class WindContPType4aIEC(IdentifiedObject): dpmaxp4a: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpordp4a: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tufiltp4a: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType4aIEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # WindTurbineType4aIEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindContPType4bIEC.py b/pycgmes/resources/WindContPType4bIEC.py index 887a7334..8175e086 100644 --- a/pycgmes/resources/WindContPType4bIEC.py +++ b/pycgmes/resources/WindContPType4bIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindContPType4bIEC(IdentifiedObject): """ P control model type 4B. Reference: IEC 61400-27-1:2015, 5.6.5.6. @@ -30,35 +29,43 @@ class WindContPType4bIEC(IdentifiedObject): dpmaxp4b: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpaero: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpordp4b: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tufiltp4b: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType4bIEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # WindTurbineType4bIEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindContPitchAngleIEC.py b/pycgmes/resources/WindContPitchAngleIEC.py index 2fa72a8a..c39afb25 100644 --- a/pycgmes/resources/WindContPitchAngleIEC.py +++ b/pycgmes/resources/WindContPitchAngleIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindContPitchAngleIEC(IdentifiedObject): """ Pitch angle control model. Reference: IEC 61400-27-1:2015, 5.6.5.2. @@ -38,77 +37,97 @@ class WindContPitchAngleIEC(IdentifiedObject): dthetamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dthetamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kic: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kiomega: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpomega: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) thetamax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) thetamin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) ttheta: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # WindTurbineType3IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindContQIEC.py b/pycgmes/resources/WindContQIEC.py index f360f66c..fb9992f9 100644 --- a/pycgmes/resources/WindContQIEC.py +++ b/pycgmes/resources/WindContQIEC.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindContQIEC(IdentifiedObject): """ Q control model. Reference: IEC 61400-27-1:2015, 5.6.5.7. @@ -53,168 +52,214 @@ class WindContQIEC(IdentifiedObject): iqh1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) iqmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) iqmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) iqpost: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kiq: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kiu: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpq: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpu: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kqv: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpfiltq: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rdroop: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tufiltq: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpost: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tqord: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) udb1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) udb2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) umax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) umin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uqdip: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uref0: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) windQcontrolModesType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) windUVRTQcontrolModesType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xdroop: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3or4IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # WindTurbineType3or4IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindContQLimIEC.py b/pycgmes/resources/WindContQLimIEC.py index 5f400ea5..bd9956d9 100644 --- a/pycgmes/resources/WindContQLimIEC.py +++ b/pycgmes/resources/WindContQLimIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindContQLimIEC(IdentifiedObject): """ Constant Q limitation model. Reference: IEC 61400-27-1:2015, 5.6.5.9. @@ -29,21 +28,25 @@ class WindContQLimIEC(IdentifiedObject): qmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) qmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3or4IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType3or4IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindContQPQULimIEC.py b/pycgmes/resources/WindContQPQULimIEC.py index 7a740f78..afe7a293 100644 --- a/pycgmes/resources/WindContQPQULimIEC.py +++ b/pycgmes/resources/WindContQPQULimIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindContQPQULimIEC(IdentifiedObject): """ QP and QU limitation model. Reference: IEC 61400-27-1:2015, 5.6.5.10. @@ -31,25 +30,29 @@ class WindContQPQULimIEC(IdentifiedObject): tpfiltql: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tufiltql: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3or4IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType3or4IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # WindDynamicsLookupTable : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:1..n in CIM + # WindDynamicsLookupTable : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindContRotorRIEC.py b/pycgmes/resources/WindContRotorRIEC.py index 1ddc8e47..2c118d1a 100644 --- a/pycgmes/resources/WindContRotorRIEC.py +++ b/pycgmes/resources/WindContRotorRIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindContRotorRIEC(IdentifiedObject): """ Rotor resistance control model. Reference: IEC 61400-27-1:2015, 5.6.5.3. @@ -37,67 +36,83 @@ class WindContRotorRIEC(IdentifiedObject): kirr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) komegafilt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpfilt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kprr: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) rmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tomegafiltrr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpfiltrr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # WindDynamicsLookupTable : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:1..n in CIM + # WindDynamicsLookupTable : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # WindGenTurbineType2IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # WindGenTurbineType2IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindDynamicsLookupTable.py b/pycgmes/resources/WindDynamicsLookupTable.py index 101a6175..8c57ca61 100644 --- a/pycgmes/resources/WindDynamicsLookupTable.py +++ b/pycgmes/resources/WindDynamicsLookupTable.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindDynamicsLookupTable(IdentifiedObject): """ Look up table for the purpose of wind standard models. @@ -41,93 +40,119 @@ class WindDynamicsLookupTable(IdentifiedObject): WindContCurrLimIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindContPType3IEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindContQPQULimIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindContRotorRIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) input: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) lookupTableFunctionType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) output: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) sequence: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindPlantFreqPcontrolIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindProtectionIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindPlantReactiveControlIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindGenType3bIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindPitchContPowerIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindGenTurbineType1aIEC.py b/pycgmes/resources/WindGenTurbineType1aIEC.py index e01006e7..47830b31 100644 --- a/pycgmes/resources/WindGenTurbineType1aIEC.py +++ b/pycgmes/resources/WindGenTurbineType1aIEC.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindTurbineType1or2IEC import WindTurbineType1or2IEC -@dataclass(config=DataclassConfig) +@dataclass class WindGenTurbineType1aIEC(WindTurbineType1or2IEC): """ Wind turbine IEC type 1A. Reference: IEC 61400-27-1:2015, 5.5.2.2. @@ -27,9 +26,11 @@ class WindGenTurbineType1aIEC(WindTurbineType1or2IEC): WindAeroConstIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindGenTurbineType1bIEC.py b/pycgmes/resources/WindGenTurbineType1bIEC.py index 4b35365f..6928f585 100644 --- a/pycgmes/resources/WindGenTurbineType1bIEC.py +++ b/pycgmes/resources/WindGenTurbineType1bIEC.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindTurbineType1or2IEC import WindTurbineType1or2IEC -@dataclass(config=DataclassConfig) +@dataclass class WindGenTurbineType1bIEC(WindTurbineType1or2IEC): """ Wind turbine IEC type 1B. Reference: IEC 61400-27-1:2015, 5.5.2.3. @@ -27,9 +26,11 @@ class WindGenTurbineType1bIEC(WindTurbineType1or2IEC): WindPitchContPowerIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindGenTurbineType2IEC.py b/pycgmes/resources/WindGenTurbineType2IEC.py index 564e6c10..4dfc4323 100644 --- a/pycgmes/resources/WindGenTurbineType2IEC.py +++ b/pycgmes/resources/WindGenTurbineType2IEC.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindTurbineType1or2IEC import WindTurbineType1or2IEC -@dataclass(config=DataclassConfig) +@dataclass class WindGenTurbineType2IEC(WindTurbineType1or2IEC): """ Wind turbine IEC type 2. Reference: IEC 61400-27-1:2015, 5.5.3. @@ -28,16 +27,20 @@ class WindGenTurbineType2IEC(WindTurbineType1or2IEC): WindContRotorRIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindPitchContPowerIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindGenType3IEC.py b/pycgmes/resources/WindGenType3IEC.py index 142cedf5..1ffda3db 100644 --- a/pycgmes/resources/WindGenType3IEC.py +++ b/pycgmes/resources/WindGenType3IEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindGenType3IEC(IdentifiedObject): """ Parent class supporting relationships to IEC wind turbines type 3 generator models of IEC type 3A and 3B. @@ -29,28 +28,34 @@ class WindGenType3IEC(IdentifiedObject): dipmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) diqmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xs: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType3IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindGenType3aIEC.py b/pycgmes/resources/WindGenType3aIEC.py index 53064888..43cd205f 100644 --- a/pycgmes/resources/WindGenType3aIEC.py +++ b/pycgmes/resources/WindGenType3aIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindGenType3IEC import WindGenType3IEC -@dataclass(config=DataclassConfig) +@dataclass class WindGenType3aIEC(WindGenType3IEC): """ IEC type 3A generator set model. Reference: IEC 61400-27-1:2015, 5.6.3.2. @@ -28,21 +27,25 @@ class WindGenType3aIEC(WindGenType3IEC): kpc: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tic: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType4IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType4IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindGenType3bIEC.py b/pycgmes/resources/WindGenType3bIEC.py index 99fba148..a5664f63 100644 --- a/pycgmes/resources/WindGenType3bIEC.py +++ b/pycgmes/resources/WindGenType3bIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindGenType3IEC import WindGenType3IEC -@dataclass(config=DataclassConfig) +@dataclass class WindGenType3bIEC(WindGenType3IEC): """ IEC type 3B generator set model. Reference: IEC 61400-27-1:2015, 5.6.3.3. @@ -29,28 +28,34 @@ class WindGenType3bIEC(WindGenType3IEC): """ # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # WindDynamicsLookupTable : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:1..n in CIM + # WindDynamicsLookupTable : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 mwtcwp: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) two: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindGenType4IEC.py b/pycgmes/resources/WindGenType4IEC.py index 17a037af..10f939f2 100644 --- a/pycgmes/resources/WindGenType4IEC.py +++ b/pycgmes/resources/WindGenType4IEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindGenType4IEC(IdentifiedObject): """ IEC type 4 generator set model. Reference: IEC 61400-27-1:2015, 5.6.3.4. @@ -31,39 +30,47 @@ class WindGenType4IEC(IdentifiedObject): dipmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) diqmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) diqmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tg: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType4aIEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType4aIEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType4bIEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType4bIEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindGenUnitKind.py b/pycgmes/resources/WindGenUnitKind.py index cc98a286..017ea589 100644 --- a/pycgmes/resources/WindGenUnitKind.py +++ b/pycgmes/resources/WindGenUnitKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class WindGenUnitKind(Base): """ Kind of wind generating unit. diff --git a/pycgmes/resources/WindGeneratingUnit.py b/pycgmes/resources/WindGeneratingUnit.py index 93f1517c..620a2f93 100644 --- a/pycgmes/resources/WindGeneratingUnit.py +++ b/pycgmes/resources/WindGeneratingUnit.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .GeneratingUnit import GeneratingUnit -@dataclass(config=DataclassConfig) +@dataclass class WindGeneratingUnit(GeneratingUnit): """ A wind driven generating unit, connected to the grid by means of a rotating machine. May be used to represent a @@ -29,16 +28,20 @@ class WindGeneratingUnit(GeneratingUnit): windGenUnitType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) WindPowerPlant: Optional[str] = Field( default=None, - in_profiles=[ - Profile.EQ, - ], + json_schema_extra={ + "in_profiles": [ + Profile.EQ, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindLookupTableFunctionKind.py b/pycgmes/resources/WindLookupTableFunctionKind.py index 40384bd7..3747442a 100644 --- a/pycgmes/resources/WindLookupTableFunctionKind.py +++ b/pycgmes/resources/WindLookupTableFunctionKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class WindLookupTableFunctionKind(Base): """ Function of the lookup table. diff --git a/pycgmes/resources/WindMechIEC.py b/pycgmes/resources/WindMechIEC.py index 8d83df82..ae5db491 100644 --- a/pycgmes/resources/WindMechIEC.py +++ b/pycgmes/resources/WindMechIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindMechIEC(IdentifiedObject): """ Two mass model. Reference: IEC 61400-27-1:2015, 5.6.2.1. @@ -32,43 +31,51 @@ class WindMechIEC(IdentifiedObject): cdrt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) hgen: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) hwtr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kdrt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType3IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType1or2IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType1or2IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType4bIEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType4bIEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindPitchContPowerIEC.py b/pycgmes/resources/WindPitchContPowerIEC.py index 5930ba82..76b8cd48 100644 --- a/pycgmes/resources/WindPitchContPowerIEC.py +++ b/pycgmes/resources/WindPitchContPowerIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindPitchContPowerIEC(IdentifiedObject): """ Pitch control power model. Reference: IEC 61400-27-1:2015, 5.6.5.1. @@ -35,64 +34,78 @@ class WindPitchContPowerIEC(IdentifiedObject): """ # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # WindDynamicsLookupTable : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:1..n in CIM + # WindDynamicsLookupTable : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindGenTurbineType1bIEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindGenTurbineType1bIEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindGenTurbineType2IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindGenTurbineType2IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 dpmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dpmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) pset: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) t1: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tr: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uuvrt: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindPlantDynamics.py b/pycgmes/resources/WindPlantDynamics.py index c4748314..9629dbc7 100644 --- a/pycgmes/resources/WindPlantDynamics.py +++ b/pycgmes/resources/WindPlantDynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class WindPlantDynamics(DynamicsFunctionBlock): """ Parent class supporting relationships to wind turbines type 3 and type 4 and wind plant IEC and user-defined wind @@ -29,14 +28,16 @@ class WindPlantDynamics(DynamicsFunctionBlock): RemoteInputSignal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # WindTurbineType3or4Dynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:1..n in CIM + # WindTurbineType3or4Dynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindPlantFreqPcontrolIEC.py b/pycgmes/resources/WindPlantFreqPcontrolIEC.py index f85abbf8..04d0ca09 100644 --- a/pycgmes/resources/WindPlantFreqPcontrolIEC.py +++ b/pycgmes/resources/WindPlantFreqPcontrolIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindPlantFreqPcontrolIEC(IdentifiedObject): """ Frequency and active power controller model. Reference: IEC 61400-27-1:2015, Annex D. @@ -51,117 +50,147 @@ class WindPlantFreqPcontrolIEC(IdentifiedObject): """ # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # WindDynamicsLookupTable : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:1..n in CIM + # WindDynamicsLookupTable : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 dprefmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dprefmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dpwprefmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dpwprefmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) prefmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) prefmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kiwpp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kiwppmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kiwppmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpwpp: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kwppref: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpft: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tpfv: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) twpffiltp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) twppfiltp: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # WindPlantIEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # WindPlantIEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindPlantIEC.py b/pycgmes/resources/WindPlantIEC.py index 3031abd7..1ceb1681 100644 --- a/pycgmes/resources/WindPlantIEC.py +++ b/pycgmes/resources/WindPlantIEC.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindPlantDynamics import WindPlantDynamics -@dataclass(config=DataclassConfig) +@dataclass class WindPlantIEC(WindPlantDynamics): """ Simplified IEC type plant level model. Reference: IEC 61400-27-1:2015, Annex D. @@ -28,16 +27,20 @@ class WindPlantIEC(WindPlantDynamics): WindPlantFreqPcontrolIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindPlantReactiveControlIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindPlantQcontrolModeKind.py b/pycgmes/resources/WindPlantQcontrolModeKind.py index 8b09118c..4e73267d 100644 --- a/pycgmes/resources/WindPlantQcontrolModeKind.py +++ b/pycgmes/resources/WindPlantQcontrolModeKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class WindPlantQcontrolModeKind(Base): """ Reactive power/voltage controller mode. diff --git a/pycgmes/resources/WindPlantReactiveControlIEC.py b/pycgmes/resources/WindPlantReactiveControlIEC.py index d5a9d6b5..2bd226da 100644 --- a/pycgmes/resources/WindPlantReactiveControlIEC.py +++ b/pycgmes/resources/WindPlantReactiveControlIEC.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindPlantReactiveControlIEC(IdentifiedObject): """ Simplified plant voltage and reactive power control model for use with type 3 and type 4 wind turbine models. @@ -56,137 +55,173 @@ class WindPlantReactiveControlIEC(IdentifiedObject): """ # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # WindDynamicsLookupTable : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:1..n in CIM + # WindDynamicsLookupTable : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # WindPlantIEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # WindPlantIEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) dxrefmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) dxrefmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kiwpx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kiwpxmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kiwpxmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kpwpx: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kwpqref: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) kwpqu: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tuqfilt: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) twppfiltq: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) twpqfiltq: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) twpufiltq: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) txft: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) txfv: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uwpqdip: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) windPlantQcontrolModesType: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xrefmax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) xrefmin: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindPlantUserDefined.py b/pycgmes/resources/WindPlantUserDefined.py index 27246c2a..77101275 100644 --- a/pycgmes/resources/WindPlantUserDefined.py +++ b/pycgmes/resources/WindPlantUserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindPlantDynamics import WindPlantDynamics -@dataclass(config=DataclassConfig) +@dataclass class WindPlantUserDefined(WindPlantDynamics): """ Wind plant function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class WindPlantUserDefined(WindPlantDynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindPowerPlant.py b/pycgmes/resources/WindPowerPlant.py index fa47d6f1..f837ac59 100644 --- a/pycgmes/resources/WindPowerPlant.py +++ b/pycgmes/resources/WindPowerPlant.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .PowerSystemResource import PowerSystemResource -@dataclass(config=DataclassConfig) +@dataclass class WindPowerPlant(PowerSystemResource): """ Wind power plant. @@ -24,8 +23,8 @@ class WindPowerPlant(PowerSystemResource): """ # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # WindGeneratingUnits : list = Field(default_factory=list, in_profiles = [Profile.EQ, ]) + # Type M:0..n in CIM + # WindGeneratingUnits : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.EQ, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindProtectionIEC.py b/pycgmes/resources/WindProtectionIEC.py index 650ec6e0..4d4c8305 100644 --- a/pycgmes/resources/WindProtectionIEC.py +++ b/pycgmes/resources/WindProtectionIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindProtectionIEC(IdentifiedObject): """ The grid protection model includes protection against over- and under-voltage, and against over- and under- @@ -39,65 +38,79 @@ class WindProtectionIEC(IdentifiedObject): """ # *Association not used* - # Type M:1..n in CIM # pylint: disable-next=line-too-long - # WindDynamicsLookupTable : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:1..n in CIM + # WindDynamicsLookupTable : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 dfimax: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) fover: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) funder: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) mzc: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) tfma: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uover: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) uunder: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3or4IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType3or4IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 # *Association not used* - # Type M:0..1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType1or2IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:0..1 in CIM + # WindTurbineType1or2IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindQcontrolModeKind.py b/pycgmes/resources/WindQcontrolModeKind.py index 5423bcd7..94648998 100644 --- a/pycgmes/resources/WindQcontrolModeKind.py +++ b/pycgmes/resources/WindQcontrolModeKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class WindQcontrolModeKind(Base): """ General wind turbine Q control modes MqG. diff --git a/pycgmes/resources/WindRefFrameRotIEC.py b/pycgmes/resources/WindRefFrameRotIEC.py index b433e89d..bab2666e 100644 --- a/pycgmes/resources/WindRefFrameRotIEC.py +++ b/pycgmes/resources/WindRefFrameRotIEC.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .IdentifiedObject import IdentifiedObject -@dataclass(config=DataclassConfig) +@dataclass class WindRefFrameRotIEC(IdentifiedObject): """ Reference frame rotation model. Reference: IEC 61400-27-1:2015, 5.6.3.5. @@ -32,28 +31,34 @@ class WindRefFrameRotIEC(IdentifiedObject): tpll: int = Field( default=0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) upll1: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) upll2: float = Field( default=0.0, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:1 in CIM # pylint: disable-next=line-too-long - # WindTurbineType3or4IEC : Optional[str] = Field(default=None, in_profiles = [Profile.DY, ]) + # Type M:1 in CIM + # WindTurbineType3or4IEC : Optional[str] = Field(default=None, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindTurbineType1or2Dynamics.py b/pycgmes/resources/WindTurbineType1or2Dynamics.py index d968c766..d9faf79f 100644 --- a/pycgmes/resources/WindTurbineType1or2Dynamics.py +++ b/pycgmes/resources/WindTurbineType1or2Dynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class WindTurbineType1or2Dynamics(DynamicsFunctionBlock): """ Parent class supporting relationships to wind turbines type 1 and type 2 and their control models. Generator model @@ -30,16 +29,20 @@ class WindTurbineType1or2Dynamics(DynamicsFunctionBlock): RemoteInputSignal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) AsynchronousMachineDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindTurbineType1or2IEC.py b/pycgmes/resources/WindTurbineType1or2IEC.py index 13fb1a06..4844872f 100644 --- a/pycgmes/resources/WindTurbineType1or2IEC.py +++ b/pycgmes/resources/WindTurbineType1or2IEC.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindTurbineType1or2Dynamics import WindTurbineType1or2Dynamics -@dataclass(config=DataclassConfig) +@dataclass class WindTurbineType1or2IEC(WindTurbineType1or2Dynamics): """ Parent class supporting relationships to IEC wind turbines type 1 and type 2 including their control models. @@ -30,16 +29,20 @@ class WindTurbineType1or2IEC(WindTurbineType1or2Dynamics): WindMechIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindProtectionIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindTurbineType3IEC.py b/pycgmes/resources/WindTurbineType3IEC.py index 5cda2161..559eb042 100644 --- a/pycgmes/resources/WindTurbineType3IEC.py +++ b/pycgmes/resources/WindTurbineType3IEC.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindTurbineType3or4IEC import WindTurbineType3or4IEC -@dataclass(config=DataclassConfig) +@dataclass class WindTurbineType3IEC(WindTurbineType3or4IEC): """ Parent class supporting relationships to IEC wind turbines type 3 including their control models. @@ -32,44 +31,56 @@ class WindTurbineType3IEC(WindTurbineType3or4IEC): WindAeroOneDimIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindAeroTwoDimIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindContPitchAngleIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindContPType3IEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindGenType3IEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindMechIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindTurbineType3or4Dynamics.py b/pycgmes/resources/WindTurbineType3or4Dynamics.py index 013f2b87..bc9e1b34 100644 --- a/pycgmes/resources/WindTurbineType3or4Dynamics.py +++ b/pycgmes/resources/WindTurbineType3or4Dynamics.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .DynamicsFunctionBlock import DynamicsFunctionBlock -@dataclass(config=DataclassConfig) +@dataclass class WindTurbineType3or4Dynamics(DynamicsFunctionBlock): """ Parent class supporting relationships to wind turbines type 3 and type 4 and wind plant including their control @@ -31,23 +30,29 @@ class WindTurbineType3or4Dynamics(DynamicsFunctionBlock): PowerElectronicsConnection: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) RemoteInputSignal: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindPlantDynamics: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindTurbineType3or4IEC.py b/pycgmes/resources/WindTurbineType3or4IEC.py index 68cc2ddb..682eac46 100644 --- a/pycgmes/resources/WindTurbineType3or4IEC.py +++ b/pycgmes/resources/WindTurbineType3or4IEC.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindTurbineType3or4Dynamics import WindTurbineType3or4Dynamics -@dataclass(config=DataclassConfig) +@dataclass class WindTurbineType3or4IEC(WindTurbineType3or4Dynamics): """ Parent class supporting relationships to IEC wind turbines type 3 and type 4 including their control models. @@ -32,44 +31,56 @@ class WindTurbineType3or4IEC(WindTurbineType3or4Dynamics): WindContCurrLimIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WIndContQIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindContQLimIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindContQPQULimIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindProtectionIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindRefFrameRotIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindTurbineType4IEC.py b/pycgmes/resources/WindTurbineType4IEC.py index b36eb869..2cdd4041 100644 --- a/pycgmes/resources/WindTurbineType4IEC.py +++ b/pycgmes/resources/WindTurbineType4IEC.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindTurbineType3or4IEC import WindTurbineType3or4IEC -@dataclass(config=DataclassConfig) +@dataclass class WindTurbineType4IEC(WindTurbineType3or4IEC): """ Parent class supporting relationships to IEC wind turbines type 4 including their control models. @@ -27,9 +26,11 @@ class WindTurbineType4IEC(WindTurbineType3or4IEC): WindGenType3aIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindTurbineType4aIEC.py b/pycgmes/resources/WindTurbineType4aIEC.py index af2d72a5..23b6035c 100644 --- a/pycgmes/resources/WindTurbineType4aIEC.py +++ b/pycgmes/resources/WindTurbineType4aIEC.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindTurbineType4IEC import WindTurbineType4IEC -@dataclass(config=DataclassConfig) +@dataclass class WindTurbineType4aIEC(WindTurbineType4IEC): """ Wind turbine IEC type 4A. Reference: IEC 61400-27-1:2015, 5.5.5.2. @@ -28,16 +27,20 @@ class WindTurbineType4aIEC(WindTurbineType4IEC): WindContPType4aIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindGenType4IEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindTurbineType4bIEC.py b/pycgmes/resources/WindTurbineType4bIEC.py index 09ec8959..235cd02c 100644 --- a/pycgmes/resources/WindTurbineType4bIEC.py +++ b/pycgmes/resources/WindTurbineType4bIEC.py @@ -12,12 +12,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindTurbineType4IEC import WindTurbineType4IEC -@dataclass(config=DataclassConfig) +@dataclass class WindTurbineType4bIEC(WindTurbineType4IEC): """ Wind turbine IEC type 4B. Reference: IEC 61400-27-1:2015, 5.5.5.3. @@ -29,23 +28,29 @@ class WindTurbineType4bIEC(WindTurbineType4IEC): WindContPType4bIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindGenType4IEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) WindMechIEC: Optional[str] = Field( default=None, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) @cached_property diff --git a/pycgmes/resources/WindType1or2UserDefined.py b/pycgmes/resources/WindType1or2UserDefined.py index 3f33c668..c082f84a 100644 --- a/pycgmes/resources/WindType1or2UserDefined.py +++ b/pycgmes/resources/WindType1or2UserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindTurbineType1or2Dynamics import WindTurbineType1or2Dynamics -@dataclass(config=DataclassConfig) +@dataclass class WindType1or2UserDefined(WindTurbineType1or2Dynamics): """ Wind type 1 or type 2 function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class WindType1or2UserDefined(WindTurbineType1or2Dynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindType3or4UserDefined.py b/pycgmes/resources/WindType3or4UserDefined.py index d96d5168..8e0f99f0 100644 --- a/pycgmes/resources/WindType3or4UserDefined.py +++ b/pycgmes/resources/WindType3or4UserDefined.py @@ -11,12 +11,11 @@ from pydantic import Field from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .WindTurbineType3or4Dynamics import WindTurbineType3or4Dynamics -@dataclass(config=DataclassConfig) +@dataclass class WindType3or4UserDefined(WindTurbineType3or4Dynamics): """ Wind type 3 or type 4 function block whose dynamic behaviour is described by a user-defined model. @@ -30,14 +29,16 @@ class WindType3or4UserDefined(WindTurbineType3or4Dynamics): proprietary: bool = Field( default=False, - in_profiles=[ - Profile.DY, - ], + json_schema_extra={ + "in_profiles": [ + Profile.DY, + ] + }, ) # *Association not used* - # Type M:0..n in CIM # pylint: disable-next=line-too-long - # ProprietaryParameterDynamics : list = Field(default_factory=list, in_profiles = [Profile.DY, ]) + # Type M:0..n in CIM + # ProprietaryParameterDynamics : list = Field(default_factory=list, json_schema_extra={"in_profiles":[Profile.DY, ]}) # noqa: E501 @cached_property def possible_profiles(self) -> set[BaseProfile]: diff --git a/pycgmes/resources/WindUVRTQcontrolModeKind.py b/pycgmes/resources/WindUVRTQcontrolModeKind.py index e823b3e6..0cb4eaeb 100644 --- a/pycgmes/resources/WindUVRTQcontrolModeKind.py +++ b/pycgmes/resources/WindUVRTQcontrolModeKind.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class WindUVRTQcontrolModeKind(Base): """ UVRT Q control modes MqUVRT. diff --git a/pycgmes/resources/WindingConnection.py b/pycgmes/resources/WindingConnection.py index 9197a24b..97ca1e5f 100644 --- a/pycgmes/resources/WindingConnection.py +++ b/pycgmes/resources/WindingConnection.py @@ -11,11 +11,10 @@ from pydantic.dataclasses import dataclass from ..utils.base import Base -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile -@dataclass(config=DataclassConfig) +@dataclass class WindingConnection(Base): """ Winding connection type. diff --git a/pycgmes/resources/WorkLocation.py b/pycgmes/resources/WorkLocation.py index 0b0ea997..cab7a7de 100644 --- a/pycgmes/resources/WorkLocation.py +++ b/pycgmes/resources/WorkLocation.py @@ -10,12 +10,11 @@ from pydantic.dataclasses import dataclass -from ..utils.dataclassconfig import DataclassConfig from ..utils.profile import BaseProfile, Profile from .Location import Location -@dataclass(config=DataclassConfig) +@dataclass class WorkLocation(Location): """ Information about a particular location for various forms of work. diff --git a/pycgmes/resources/__init__.py b/pycgmes/resources/__init__.py index d28faf66..cf18305e 100644 --- a/pycgmes/resources/__init__.py +++ b/pycgmes/resources/__init__.py @@ -2,5 +2,4 @@ # # SPDX-License-Identifier: Apache-2.0 -# pylint: disable=too-many-lines,missing-module-docstring CGMES_VERSION = "3.0.0"