diff --git a/src/gdm/__init__.py b/src/gdm/__init__.py index c062bf6..5c4b209 100644 --- a/src/gdm/__init__.py +++ b/src/gdm/__init__.py @@ -165,3 +165,7 @@ from gdm.distribution.curve import Curve, TimeCurrentCurve from gdm.distribution.network.reducer import reduce_to_three_phase_system +from gdm.distribution.components.distribution_inverter import ( + DistributionInverter, +) +from gdm.distribution.catalog_system import CatalogSystem diff --git a/src/gdm/distribution/components/distribution_inverter.py b/src/gdm/distribution/components/distribution_inverter.py index 9f9c630..8700ff6 100644 --- a/src/gdm/distribution/components/distribution_inverter.py +++ b/src/gdm/distribution/components/distribution_inverter.py @@ -14,11 +14,11 @@ ) -class DistrbutionInverter(DistributionComponentBase): +class DistributionInverter(DistributionComponentBase): controller: Annotated[ InverterControllerBase, Field( - ..., + PowerfactorInverterController.example(), description="The controller which is used for the PV array.", ), ] @@ -27,10 +27,10 @@ class DistrbutionInverter(DistributionComponentBase): ] @classmethod - def example(cls) -> "DistrbutionInverter": + def example(cls) -> "DistributionInverter": """Example of a Distribution Inverter with a predefined controller and equipment.""" - return DistrbutionInverter( + return DistributionInverter( name="inverter1", controller=PowerfactorInverterController.example(), equipment=InverterEquipment.example(), diff --git a/src/gdm/distribution/components/distribution_solar.py b/src/gdm/distribution/components/distribution_solar.py index 9f1eb8c..130ab9e 100644 --- a/src/gdm/distribution/components/distribution_solar.py +++ b/src/gdm/distribution/components/distribution_solar.py @@ -4,7 +4,7 @@ from pydantic import Field -from gdm.distribution.components.distribution_inverter import DistrbutionInverter +from gdm.distribution.components.distribution_inverter import DistributionInverter from gdm.distribution.components.distribution_feeder import DistributionFeeder from gdm.distribution.components.base.distribution_component_base import ( DistributionComponentBase, @@ -42,7 +42,7 @@ class DistributionSolar(DistributionComponentBase): ), ] inverter: Annotated[ - DistrbutionInverter, + DistributionInverter, Field( ..., description="Inverter model for the Distribution Solar PV system.", @@ -86,7 +86,7 @@ def aggregate( for inst in instances ), ), - inverter=DistrbutionInverter( + inverter=DistributionInverter( name=f"{name}_inverter", equipment=InverterEquipment( capacity=sum(inst.inverter.equipment.capacity for inst in instances) @@ -122,5 +122,5 @@ def example(cls) -> "DistributionSolar": feeder=DistributionFeeder.example(), phases=[Phase.A, Phase.B, Phase.C], equipment=SolarEquipment.example(), - inverter=DistrbutionInverter.example(), + inverter=DistributionInverter.example(), ) diff --git a/src/gdm/version.py b/src/gdm/version.py index c9c77d7..7bf459b 100644 --- a/src/gdm/version.py +++ b/src/gdm/version.py @@ -3,7 +3,7 @@ import platform import sys -VERSION = "1.3.1" +VERSION = "1.3.2" def is_git_repo(dir: Path) -> bool: diff --git a/tests/conftest.py b/tests/conftest.py index 34e3685..50f14c6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,7 +1,6 @@ from datetime import datetime, timedelta from uuid import uuid4 -from gdm.distribution.components.distribution_inverter import DistrbutionInverter from gdm.distribution.equipment.inverter_equipment import InverterEquipment from gdm.distribution.equipment.solar_equipment import SolarEquipment from gdm.distribution.controllers.distribution_inverter_controller import ( @@ -17,6 +16,7 @@ MatrixImpedanceBranch, PositiveReactivePower, PositiveApparentPower, + DistributionInverter, PositiveActivePower, CapacitancePULength, DistributionSystem, @@ -87,7 +87,7 @@ def build_distribution_solar(bus: DistributionBus, bus_number: int): "uuid": uuid4(), "name": f"solar_{bus_number}", "bus": bus, - "inverter": DistrbutionInverter.example().model_copy( + "inverter": DistributionInverter.example().model_copy( update={ "uuid": uuid4(), "name": f"inverter_{bus_number}", @@ -323,7 +323,7 @@ def build_split_phase_solar(bus: DistributionBus, bus_number: int): resistance=1, reactance=1, ), - inverter=DistrbutionInverter( + inverter=DistributionInverter( name=f"pv_inverter_{bus_number}", controller=PowerfactorInverterController.example(), equipment=InverterEquipment(