From 3e61840ef81945d3a2f48832aa2af926cd88a50a Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Tue, 23 Jun 2026 23:37:28 +0200 Subject: [PATCH 1/7] Enhance data model by cable type information --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01a0f960c..0672e882c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] ### Added - +- Enhance data model by cable type information [#1665](https://github.com/ie3-institute/PowerSystemDataModel/issues/1665) ### Fixed - Fixed issues regarding determination of additional parameters [#1661](https://github.com/ie3-institute/PowerSystemDataModel/issues/1661) From 1e3ac9b7454e1391aa310d8e6acec8670875d0fa Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Tue, 23 Jun 2026 23:48:25 +0200 Subject: [PATCH 2/7] introduce layer inputs and tests for them --- .../input/connector/type/CableMaterial.java | 202 +++++++ .../input/connector/type/CableTypeInput.java | 446 ++++++++++++++ .../input/connector/type/ConductorInput.java | 140 +++++ .../input/connector/type/LayerInput.java | 143 +++++ .../connector/type/ScreenLayerInput.java | 184 ++++++ .../connector/CableDeploymentInputTest.java | 148 +++++ .../connector/type/CableMaterialTest.java | 154 +++++ .../connector/type/CableTypeInputTest.java | 551 ++++++++++++++++++ .../connector/type/ConductorInputTest.java | 360 ++++++++++++ .../input/connector/type/LayerInputTest.java | 322 ++++++++++ .../type/LineTypeInputCableExtensionTest.java | 173 ++++++ .../connector/type/ScreenLayerInputTest.java | 430 ++++++++++++++ 12 files changed, 3253 insertions(+) create mode 100644 src/main/java/edu/ie3/datamodel/models/input/connector/type/CableMaterial.java create mode 100644 src/main/java/edu/ie3/datamodel/models/input/connector/type/CableTypeInput.java create mode 100644 src/main/java/edu/ie3/datamodel/models/input/connector/type/ConductorInput.java create mode 100644 src/main/java/edu/ie3/datamodel/models/input/connector/type/LayerInput.java create mode 100644 src/main/java/edu/ie3/datamodel/models/input/connector/type/ScreenLayerInput.java create mode 100644 src/test/java/edu/ie3/datamodel/models/input/connector/CableDeploymentInputTest.java create mode 100644 src/test/java/edu/ie3/datamodel/models/input/connector/type/CableMaterialTest.java create mode 100644 src/test/java/edu/ie3/datamodel/models/input/connector/type/CableTypeInputTest.java create mode 100644 src/test/java/edu/ie3/datamodel/models/input/connector/type/ConductorInputTest.java create mode 100644 src/test/java/edu/ie3/datamodel/models/input/connector/type/LayerInputTest.java create mode 100644 src/test/java/edu/ie3/datamodel/models/input/connector/type/LineTypeInputCableExtensionTest.java create mode 100644 src/test/java/edu/ie3/datamodel/models/input/connector/type/ScreenLayerInputTest.java diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/type/CableMaterial.java b/src/main/java/edu/ie3/datamodel/models/input/connector/type/CableMaterial.java new file mode 100644 index 000000000..5fc86daa6 --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/type/CableMaterial.java @@ -0,0 +1,202 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.connector.type; + +import static edu.ie3.util.quantities.PowerSystemUnits.*; + +import edu.ie3.util.quantities.interfaces.ThermalCapacitance; +import edu.ie3.util.quantities.interfaces.ThermalResistivity; +import tech.units.indriya.ComparableQuantity; +import tech.units.indriya.quantity.Quantities; + +/** + * Enumeration of cable materials with their default thermal and electrical properties. Provides + * default values based on physical material properties. + */ +public enum CableMaterial { + /** Copper conductor material */ + COPPER, + /** Aluminium conductor material */ + ALUMINIUM, + /** Cross-linked polyethylene (XLPE) insulation */ + XLPE, + /** Polyethylene (PE) insulation */ + PE, + /** Polyvinyl chloride (PVC) insulation */ + PVC, + /** Semi-conductive screen material */ + SEMI_COND_SCREEN, + /** Screening tape material */ + SC_TAPE, + /** Lead sheathing material */ + LEAD, + /** Steel armoring material */ + STEEL, + /** Polypropylene material */ + POLYPROPYLEN, + /** Unknown material type */ + UNKNOWN; + + /** + * Parses a material string into a Cable Material. + * + * @return An enum of the cable material if it can be parsed. + */ + public static CableMaterial fromString(String s) { + if (s == null) return UNKNOWN; + switch (s.trim().toLowerCase()) { + case "copper": + case "copperwoventape": + case "sc_tape": + return COPPER; + case "aluminium": + return ALUMINIUM; + case "xlpe": + return XLPE; + case "pe": + return PE; + case "pvc": + return PVC; + case "semicondscreen": + case "semi_cond_screen": + return SEMI_COND_SCREEN; + case "lead": + return LEAD; + case "steel": + return STEEL; + case "polypropylen": + case "pp": + return POLYPROPYLEN; + default: + return UNKNOWN; + } + } + + /** + * Get the default thermal properties resistivity and capacitance for this material. + * + * @return A pair of thermal resistivity and thermal capacitance + * @throws IllegalArgumentException if the material type is unknown + */ + public ThermalProperties getThermalProperties() { + return switch (this) { + case COPPER -> + new ThermalProperties( + Quantities.getQuantity(1.0 / 384.0, KELVIN_METRE_PER_WATT), + Quantities.getQuantity(3449600.0, JOULE_PER_CUBIC_METRE_KELVIN)); + case ALUMINIUM -> + new ThermalProperties( + Quantities.getQuantity(1.0 / 237.0, KELVIN_METRE_PER_WATT), + Quantities.getQuantity(2420913.3, JOULE_PER_CUBIC_METRE_KELVIN)); + case XLPE, PE -> + new ThermalProperties( + Quantities.getQuantity(3.5, KELVIN_METRE_PER_WATT), + Quantities.getQuantity(2.4, JOULE_PER_CUBIC_METRE_KELVIN)); + case PVC -> + new ThermalProperties( + Quantities.getQuantity(5.0, KELVIN_METRE_PER_WATT), + Quantities.getQuantity(1.7, JOULE_PER_CUBIC_METRE_KELVIN)); + case SEMI_COND_SCREEN -> + new ThermalProperties( + Quantities.getQuantity(2.5, KELVIN_METRE_PER_WATT), + Quantities.getQuantity(2.4, JOULE_PER_CUBIC_METRE_KELVIN)); + case SC_TAPE -> + new ThermalProperties( + Quantities.getQuantity(6.0, KELVIN_METRE_PER_WATT), + Quantities.getQuantity(2.4, JOULE_PER_CUBIC_METRE_KELVIN)); + case LEAD -> + new ThermalProperties( + Quantities.getQuantity(1.0 / 35.0, KELVIN_METRE_PER_WATT), + Quantities.getQuantity(1463892.0, JOULE_PER_CUBIC_METRE_KELVIN)); + case STEEL -> + new ThermalProperties( + Quantities.getQuantity(1.0 / 45.0, KELVIN_METRE_PER_WATT), + Quantities.getQuantity(3756000.0, JOULE_PER_CUBIC_METRE_KELVIN)); + case POLYPROPYLEN -> + new ThermalProperties( + Quantities.getQuantity(6.0, KELVIN_METRE_PER_WATT), + Quantities.getQuantity(2.0, JOULE_PER_CUBIC_METRE_KELVIN)); + case UNKNOWN -> + throw new IllegalArgumentException( + "Cannot provide thermal properties for unknown material"); + }; + } + + /** + * Get the default electrical resistivity for this material at reference conditions. + * + * @return Electrical resistivity + * @throws IllegalArgumentException if the material type is unknown + */ + public ComparableQuantity getElectricalResistivity() { + return switch (this) { + case COPPER -> Quantities.getQuantity(1.7241e-8, OHM_METRE); + case ALUMINIUM -> Quantities.getQuantity(2.8264e-8, OHM_METRE); + case STEEL -> Quantities.getQuantity(13.8e-8, OHM_METRE); + case LEAD -> Quantities.getQuantity(21.4e-8, OHM_METRE); + case UNKNOWN -> + throw new IllegalArgumentException( + "Cannot provide electrical resistivity for unknown material"); + default -> + throw new IllegalArgumentException( + "No electrical resistivity data available for material: " + this); + }; + } + + /** + * Get the temperature coefficient for electrical resistivity of this material. + * + * @return Temperature coefficient + * @throws IllegalArgumentException if the material type is unknown + */ + public double getElectricalResistivityTemperatureCoefficient() { + return switch (this) { + case COPPER -> 3.93e-3; + case ALUMINIUM -> 4.03e-3; + case LEAD -> 4.0e-3; + case STEEL -> 4.5e-3; + case UNKNOWN -> + throw new IllegalArgumentException( + "Cannot provide temperature coefficient for unknown material"); + default -> + throw new IllegalArgumentException( + "No temperature coefficient data available for material: " + this); + }; + } + + /** Container class for thermal properties of a cable material. */ + public record ThermalProperties( + ComparableQuantity resistivity, + ComparableQuantity capacitance) { + /** + * Create thermal properties. + * + * @param resistivity Thermal resistivity + * @param capacitance Thermal capacitance + */ + public ThermalProperties {} + + /** + * Get the thermal resistivity. + * + * @return Thermal resistivity + */ + @Override + public ComparableQuantity resistivity() { + return resistivity; + } + + /** + * Get the thermal capacitance. + * + * @return Thermal capacitance + */ + @Override + public ComparableQuantity capacitance() { + return capacitance; + } + } +} diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/type/CableTypeInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/type/CableTypeInput.java new file mode 100644 index 000000000..44f3e0c6f --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/type/CableTypeInput.java @@ -0,0 +1,446 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.connector.type; + +import edu.ie3.datamodel.models.input.AssetTypeInput; +import edu.ie3.datamodel.models.input.InputEntity; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.UUID; +import javax.measure.quantity.ElectricCapacitance; +import javax.measure.quantity.Frequency; +import javax.measure.quantity.Temperature; +import org.jspecify.annotations.NonNull; +import tech.units.indriya.ComparableQuantity; + +/** + * Represents detailed cable construction data at the type/catalog level. This class contains the + * complete specification of a cable type including conductors, insulation layers, screens, armor, + * and jacket elements, as well as electrical and thermal parameters. + */ +public class CableTypeInput extends AssetTypeInput implements InputEntity { + + private final int coreNumber; + private final ConductorInput conductor; + private final List isolation; + private final Optional screen; + private final List filler; + private final List armor; + private final List jack; + private final ComparableQuantity limitTemperature; + private final ComparableQuantity frequency; + private final double skinEffectCoefficient; + private final double proximityEffectCoefficient; + private final ComparableQuantity electricalCapacitance; + private final double tanDelta; + private final double circulatingLossFactor; + private final double eddyCurrentLossFactor; + + /** + * Represents detailed cable construction data at the type/catalog level. This class contains the + * complete specification of a cable type including conductors, insulation layers, screens, armor, + * and jacket elements, as well as electrical and thermal parameters. + * + * @param uuid Unique identifier for this cable type + * @param id Human-readable identifier/name for this cable type (e.g., "NA2XS2Y 1x120 RM/25 12/20 + * kV") + * @param coreNumber Number of cores/conductors in the cable (e.g., 1 for single-core, 3 for + * three-phase) + * @param conductor The innermost conductor/core + * @param isolation List of insulation layers (from inner to outer) + * @param screen Optional cable screen layer + * @param filler List of filler layers (from inner to outer) + * @param armor List of armor layers (from inner to outer) + * @param jack List of jacket/outer sheath layers (from inner to outer) + * @param limitTemperature Maximum permissible operating temperature (°C) + * @param frequency Rated frequency + * @param skinEffectCoefficient Skin effect coefficient + * @param proximityEffectCoefficient Proximity effect coefficient + * @param electricalCapacitance Capacitance per unit length + * @param tanDelta Dielectric loss factor tan(δ) + * @param circulatingLossFactor Circulating loss factor + * @param eddyCurrentLossFactor Eddy current loss factor + */ + public CableTypeInput( + UUID uuid, + String id, + int coreNumber, + ConductorInput conductor, + List isolation, + Optional screen, + List filler, + List armor, + List jack, + ComparableQuantity limitTemperature, + ComparableQuantity frequency, + double skinEffectCoefficient, + double proximityEffectCoefficient, + ComparableQuantity electricalCapacitance, + double tanDelta, + double circulatingLossFactor, + double eddyCurrentLossFactor) { + + super(uuid, id); + + Objects.requireNonNull(conductor, "Conductor cannot be null"); + Objects.requireNonNull(isolation, "Isolation elements list cannot be null"); + Objects.requireNonNull(screen, "Screen layer Optional cannot be null"); + Objects.requireNonNull(filler, "Filler elements list cannot be null"); + Objects.requireNonNull(armor, "Armor elements list cannot be null"); + Objects.requireNonNull(jack, "Jack elements list cannot be null"); + Objects.requireNonNull(limitTemperature, "Limit temperature cannot be null"); + Objects.requireNonNull(frequency, "Frequency cannot be null"); + Objects.requireNonNull(electricalCapacitance, "Electric capacitance cannot be null"); + + if (id.isEmpty()) { + throw new IllegalArgumentException("ID cannot be empty"); + } + + if (coreNumber < 1) { + throw new IllegalArgumentException("Core number must be >= 1"); + } + + if (limitTemperature.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Limit temperature must be >= 0"); + } + if (frequency.getValue().doubleValue() <= 0) { + throw new IllegalArgumentException("Frequency must be > 0"); + } + if (electricalCapacitance.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Electric capacitance must be >= 0"); + } + if (skinEffectCoefficient < 0) { + throw new IllegalArgumentException("Skin effect coefficient must be >= 0"); + } + if (proximityEffectCoefficient < 0) { + throw new IllegalArgumentException("Proximity effect coefficient must be >= 0"); + } + if (tanDelta < 0) { + throw new IllegalArgumentException("Tan delta must be >= 0"); + } + if (circulatingLossFactor < 0) { + throw new IllegalArgumentException("Circulating loss factor must be >= 0"); + } + if (eddyCurrentLossFactor < 0) { + throw new IllegalArgumentException("Eddy current loss factor must be >= 0"); + } + + this.coreNumber = coreNumber; + this.conductor = conductor; + this.isolation = Collections.unmodifiableList(isolation); + this.screen = screen; + this.filler = Collections.unmodifiableList(filler); + this.armor = Collections.unmodifiableList(armor); + this.jack = Collections.unmodifiableList(jack); + this.limitTemperature = limitTemperature; + this.frequency = frequency; + this.skinEffectCoefficient = skinEffectCoefficient; + this.proximityEffectCoefficient = proximityEffectCoefficient; + this.electricalCapacitance = electricalCapacitance; + this.tanDelta = tanDelta; + this.circulatingLossFactor = circulatingLossFactor; + this.eddyCurrentLossFactor = eddyCurrentLossFactor; + } + + @com.fasterxml.jackson.annotation.JsonProperty("core_number") + public int getCoreNumber() { + return coreNumber; + } + + public ConductorInput getConductor() { + return conductor; + } + + public List getIsolation() { + return isolation; + } + + public Optional getScreen() { + return screen; + } + + public List getFiller() { + return filler; + } + + public List getArmor() { + return armor; + } + + public List getJack() { + return jack; + } + + public ComparableQuantity getLimitTemperature() { + return limitTemperature; + } + + public ComparableQuantity getFrequency() { + return frequency; + } + + public double getSkinEffectCoefficient() { + return skinEffectCoefficient; + } + + public double getProximityEffectCoefficient() { + return proximityEffectCoefficient; + } + + public ComparableQuantity getElectricalCapacitance() { + return electricalCapacitance; + } + + public double getTanDelta() { + return tanDelta; + } + + public double getCirculatingLossFactor() { + return circulatingLossFactor; + } + + public double getEddyCurrentLossFactor() { + return eddyCurrentLossFactor; + } + + @Override + public CableTypeInputCopyBuilder copy() { + return new CableTypeInputCopyBuilder(this); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof CableTypeInput that)) return false; + if (!super.equals(o)) return false; + + return coreNumber == that.coreNumber + && Double.compare(that.skinEffectCoefficient, skinEffectCoefficient) == 0 + && Double.compare(that.proximityEffectCoefficient, proximityEffectCoefficient) == 0 + && Double.compare(that.tanDelta, tanDelta) == 0 + && Double.compare(that.circulatingLossFactor, circulatingLossFactor) == 0 + && Double.compare(that.eddyCurrentLossFactor, eddyCurrentLossFactor) == 0 + && conductor.equals(that.conductor) + && isolation.equals(that.isolation) + && screen.equals(that.screen) + && filler.equals(that.filler) + && armor.equals(that.armor) + && jack.equals(that.jack) + && limitTemperature.equals(that.limitTemperature) + && frequency.equals(that.frequency) + && electricalCapacitance.equals(that.electricalCapacitance); + } + + @Override + public int hashCode() { + return Objects.hash( + super.hashCode(), + coreNumber, + conductor, + isolation, + screen, + filler, + armor, + jack, + limitTemperature, + frequency, + skinEffectCoefficient, + proximityEffectCoefficient, + electricalCapacitance, + tanDelta, + circulatingLossFactor, + eddyCurrentLossFactor); + } + + @Override + public @NonNull String toString() { + return "CableTypeInput{" + + "uuid=" + + getUuid() + + ", id=" + + getId() + + ", coreNumber=" + + coreNumber + + ", conductor=" + + conductor + + ", isolation=" + + isolation + + ", screen=" + + screen + + ", filler=" + + filler + + ", armor=" + + armor + + ", jack=" + + jack + + ", limitTemperature=" + + limitTemperature + + ", frequency=" + + frequency + + ", skinEffectCoefficient=" + + skinEffectCoefficient + + ", proximityEffectCoeff=" + + proximityEffectCoefficient + + ", electricalCapacitance=" + + electricalCapacitance + + ", tanDelta=" + + tanDelta + + ", circulatingLossFactor=" + + circulatingLossFactor + + ", eddyCurrentLossFactor=" + + eddyCurrentLossFactor + + '}'; + } + + /** + * Abstract class for all builder that build child entities of abstract class {@link + * CableTypeInput} + */ + public static final class CableTypeInputCopyBuilder + extends AssetTypeInput.AssetTypeInputCopyBuilder { + + private int coreNumber; + private ConductorInput conductor; + private List isolation; + private Optional screen; + private List filler; + private List armor; + private List jack; + private ComparableQuantity limitTemperature; + private ComparableQuantity frequency; + private double skinEffectCoefficient; + private double proximityEffectCoefficient; + private ComparableQuantity electricalCapacitance; + private double tanDelta; + private double circulatingLossFactor; + private double eddyCurrentLossFactor; + + protected CableTypeInputCopyBuilder(CableTypeInput entity) { + super(entity); + this.coreNumber = entity.coreNumber; + this.conductor = entity.conductor; + this.isolation = entity.isolation; + this.screen = entity.screen; + this.filler = entity.filler; + this.armor = entity.armor; + this.jack = entity.jack; + this.limitTemperature = entity.limitTemperature; + this.frequency = entity.frequency; + this.skinEffectCoefficient = entity.skinEffectCoefficient; + this.proximityEffectCoefficient = entity.proximityEffectCoefficient; + this.electricalCapacitance = entity.electricalCapacitance; + this.tanDelta = entity.tanDelta; + this.circulatingLossFactor = entity.circulatingLossFactor; + this.eddyCurrentLossFactor = entity.eddyCurrentLossFactor; + } + + public CableTypeInputCopyBuilder coreNumber(int coreNumber) { + this.coreNumber = coreNumber; + return thisInstance(); + } + + public CableTypeInputCopyBuilder conductor(ConductorInput conductor) { + this.conductor = conductor; + return thisInstance(); + } + + public CableTypeInputCopyBuilder isolation(List isolation) { + this.isolation = isolation; + return thisInstance(); + } + + public CableTypeInputCopyBuilder screen(Optional screen) { + this.screen = screen; + return thisInstance(); + } + + public CableTypeInputCopyBuilder filler(List filler) { + this.filler = filler; + return thisInstance(); + } + + public CableTypeInputCopyBuilder armor(List armor) { + this.armor = armor; + return thisInstance(); + } + + public CableTypeInputCopyBuilder jack(List jack) { + this.jack = jack; + return thisInstance(); + } + + public CableTypeInputCopyBuilder limitTemperature( + ComparableQuantity limitTemperature) { + this.limitTemperature = limitTemperature; + return thisInstance(); + } + + public CableTypeInputCopyBuilder frequency(ComparableQuantity frequency) { + this.frequency = frequency; + return thisInstance(); + } + + public CableTypeInputCopyBuilder skinEffectCoefficient(double value) { + this.skinEffectCoefficient = value; + return thisInstance(); + } + + public CableTypeInputCopyBuilder proximityEffectCoefficient(double value) { + this.proximityEffectCoefficient = value; + return thisInstance(); + } + + public CableTypeInputCopyBuilder electricalCapacitance( + ComparableQuantity value) { + this.electricalCapacitance = value; + return thisInstance(); + } + + public CableTypeInputCopyBuilder tanDelta(double value) { + this.tanDelta = value; + return thisInstance(); + } + + public CableTypeInputCopyBuilder circulatingLossFactor(double value) { + this.circulatingLossFactor = value; + return thisInstance(); + } + + public CableTypeInputCopyBuilder eddyCurrentLossFactor(double value) { + this.eddyCurrentLossFactor = value; + return thisInstance(); + } + + @Override + public CableTypeInput build() { + return new CableTypeInput( + getUuid(), + getId(), + coreNumber, + conductor, + isolation, + screen, + filler, + armor, + jack, + limitTemperature, + frequency, + skinEffectCoefficient, + proximityEffectCoefficient, + electricalCapacitance, + tanDelta, + circulatingLossFactor, + eddyCurrentLossFactor); + } + + @Override + protected CableTypeInputCopyBuilder thisInstance() { + return this; + } + } +} diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/type/ConductorInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/type/ConductorInput.java new file mode 100644 index 000000000..30f9368a3 --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/type/ConductorInput.java @@ -0,0 +1,140 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.connector.type; + +import edu.ie3.datamodel.models.input.InputEntity; +import edu.ie3.util.quantities.interfaces.ThermalCapacitance; +import edu.ie3.util.quantities.interfaces.ThermalResistivity; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.UUID; +import javax.measure.quantity.Area; +import javax.measure.quantity.Length; +import org.jspecify.annotations.NonNull; +import tech.units.indriya.ComparableQuantity; + +/** + * Represents the conducting core of a cable with its specific geometric and thermal properties. + * Unlike [[LayerInput]] layers, the conductor has no inner diameter and includes compaction + * information. + * + * @param uuid UUID of the ConductorInput + * @param name Human-readable id + * @param material Material of the conductor (e.g., copper or aluminium) + * @param crossSection Real nominal cross-sectional area (electrically effective) + * @param diameter Geometric outer diameter of the conductor + * @param isCompacted Whether the conductor is compacted + * @param thermalResistivity Thermal resistivity of the conductor material + * @param thermalCapacitance Thermal capacitance of the conductor material + * @param area Optional real cross-sectional area (if different from geometric calculation) + */ +public record ConductorInput( + UUID uuid, + String name, + CableMaterial material, + ComparableQuantity crossSection, + ComparableQuantity diameter, + boolean isCompacted, + ComparableQuantity thermalResistivity, + ComparableQuantity thermalCapacitance, + Optional> area) + implements InputEntity { + /** + * Create a new conductor with all required parameters. + * + * @param uuid UUID of the ConductorInput + * @param name Human-readable id + * @param material Material of the conductor + * @param crossSection Real nominal cross-sectional area (electrically effective) + * @param diameter Geometric outer diameter + * @param isCompacted Whether the conductor is compacted + * @param thermalResistivity Thermal resistivity + * @param thermalCapacitance Thermal capacitance + * @param area Optional real cross-sectional area + * @throws IllegalArgumentException if validation constraints are violated + */ + public ConductorInput { + // Validation + Objects.requireNonNull(uuid, "Conductor UUID cannot be null"); + Objects.requireNonNull(name, "Conductor name cannot be null"); + Objects.requireNonNull(material, "Conductor material cannot be null"); + Objects.requireNonNull(crossSection, "Cross section cannot be null"); + Objects.requireNonNull(diameter, "Diameter cannot be null"); + Objects.requireNonNull(thermalResistivity, "Thermal resistivity cannot be null"); + Objects.requireNonNull(thermalCapacitance, "Thermal capacitance cannot be null"); + Objects.requireNonNull(area, "Area Optional cannot be null"); + + // Positive values check + if (crossSection.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Cross section must be >= 0"); + } + if (diameter.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Diameter must be >= 0"); + } + if (thermalResistivity.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Thermal resistivity must be >= 0"); + } + if (thermalCapacitance.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Thermal capacitance must be >= 0"); + } + } + + @Override + public Map getAdditionalInformation() { + return Map.of(); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o + instanceof + ConductorInput( + UUID uuid1, + String name1, + CableMaterial material1, + ComparableQuantity section, + ComparableQuantity diameter1, + boolean compacted, + ComparableQuantity resistivity, + ComparableQuantity capacitance, + Optional> area1))) return false; + return uuid.equals(uuid1) + && name.equals(name1) + && isCompacted == compacted + && material == material1 + && crossSection.equals(section) + && diameter.equals(diameter1) + && thermalResistivity.equals(resistivity) + && thermalCapacitance.equals(capacitance) + && area.equals(area1); + } + + @Override + public @NonNull String toString() { + return "ConductorInput{" + + "uuid='" + + uuid + + "name='" + + name + + "material=" + + material + + ", crossSection=" + + crossSection + + ", diameter=" + + diameter + + ", isCompacted=" + + isCompacted + + ", thermalResistivity=" + + thermalResistivity + + ", thermalCapacitance=" + + thermalCapacitance + + ", area=" + + area + + '}'; + } +} diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/type/LayerInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/type/LayerInput.java new file mode 100644 index 000000000..26eee1d82 --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/type/LayerInput.java @@ -0,0 +1,143 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.connector.type; + +import edu.ie3.datamodel.models.input.InputEntity; +import edu.ie3.util.quantities.interfaces.ThermalCapacitance; +import edu.ie3.util.quantities.interfaces.ThermalResistivity; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.UUID; +import javax.measure.quantity.Area; +import javax.measure.quantity.Length; +import org.jspecify.annotations.NonNull; +import tech.units.indriya.ComparableQuantity; + +/** + * Represents a concentric layer of a cable, including insulation, filler, armor, and jacket layers. + * + * @param uuid UUID of this layer + * @param name Name/designation of this layer + * @param material Material of this layer + * @param innerDiameter Inner diameter of this layer + * @param outerDiameter Outer diameter of this layer + * @param thermalResistivity Thermal resistivity of the material + * @param thermalCapacitance Thermal capacitance of the material + * @param area Optional real cross-sectional area (if different from geometry) + */ +public record LayerInput( + UUID uuid, + String name, + CableMaterial material, + ComparableQuantity innerDiameter, + ComparableQuantity outerDiameter, + ComparableQuantity thermalResistivity, + ComparableQuantity thermalCapacitance, + Optional> area) + implements InputEntity { + /** + * Create a new layer with all required parameters. + * + * @param name Designation of this layer + * @param material Material of this layer + * @param innerDiameter Inner diameter + * @param outerDiameter Outer diameter + * @param thermalResistivity Thermal resistivity + * @param thermalCapacitance Thermal capacitance + * @param area Optional real cross-sectional area + * @throws IllegalArgumentException if validation constraints are violated + */ + public LayerInput { + // Validation + Objects.requireNonNull(uuid, "Layer UUID cannot be null"); + Objects.requireNonNull(name, "Layer name cannot be null"); + Objects.requireNonNull(material, "Layer material cannot be null"); + Objects.requireNonNull(innerDiameter, "Inner diameter cannot be null"); + Objects.requireNonNull(outerDiameter, "Outer diameter cannot be null"); + Objects.requireNonNull(thermalResistivity, "Thermal resistivity cannot be null"); + Objects.requireNonNull(thermalCapacitance, "Thermal capacitance cannot be null"); + Objects.requireNonNull(area, "Area Optional cannot be null"); + + if (name.isEmpty()) { + throw new IllegalArgumentException("Layer name cannot be empty"); + } + + // Geometry consistency: outerDiameter >= innerDiameter + if (outerDiameter.getValue().doubleValue() < innerDiameter.getValue().doubleValue()) { + throw new IllegalArgumentException( + String.format( + "Outer diameter (%.6f) must be >= inner diameter (%.6f)", + outerDiameter.getValue().doubleValue(), innerDiameter.getValue().doubleValue())); + } + + // Positive values check + if (innerDiameter.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Inner diameter must be >= 0"); + } + if (outerDiameter.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Outer diameter must be >= 0"); + } + if (thermalResistivity.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Thermal resistivity must be >= 0"); + } + if (thermalCapacitance.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Thermal capacitance must be >= 0"); + } + } + + @Override + public Map getAdditionalInformation() { + return Map.of(); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o + instanceof + LayerInput( + UUID uuid1, + String name1, + CableMaterial material1, + ComparableQuantity diameter, + ComparableQuantity outerDiameter1, + ComparableQuantity resistivity, + ComparableQuantity capacitance, + Optional> area1))) return false; + return uuid.equals(uuid1) + && name.equals(name1) + && material == material1 + && innerDiameter.equals(diameter) + && outerDiameter.equals(outerDiameter1) + && thermalResistivity.equals(resistivity) + && thermalCapacitance.equals(capacitance) + && area.equals(area1); + } + + @Override + public @NonNull String toString() { + return "LayerInput{" + + "uuid='" + + uuid + + "name='" + + name + + '\'' + + ", material=" + + material + + ", innerDiameter=" + + innerDiameter + + ", outerDiameter=" + + outerDiameter + + ", thermalResistivity=" + + thermalResistivity + + ", thermalCapacitance=" + + thermalCapacitance + + ", area=" + + area + + '}'; + } +} diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/type/ScreenLayerInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/type/ScreenLayerInput.java new file mode 100644 index 000000000..3091eb273 --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/type/ScreenLayerInput.java @@ -0,0 +1,184 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.connector.type; + +import edu.ie3.datamodel.models.input.InputEntity; +import edu.ie3.util.quantities.interfaces.ThermalCapacitance; +import edu.ie3.util.quantities.interfaces.ThermalResistivity; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.UUID; +import javax.measure.quantity.Area; +import javax.measure.quantity.Length; +import org.jspecify.annotations.NonNull; +import tech.units.indriya.ComparableQuantity; + +/** + * Represents a cable screen layer with specific parameters for conductor shielding. Extends the + * properties of a standard layer with wire-specific parameters. + * + * @param uuid UUID of the screen layer + * @param name Name/designation of this screen layer + * @param material Material of the screen + * @param innerDiameter Inner diameter of the screen layer + * @param outerDiameter Outer diameter of the screen layer + * @param thermalResistivity Thermal resistivity of the material + * @param thermalCapacitance Thermal capacitance of the material + * @param area Optional real cross-sectional area (e.g. if different from geometry) + * @param wiresNumber Number of individual wires in the screen + * @param wireDiameter Diameter of an individual wire in the screen + * @param lengthOfLay Optional length of lay (pitch) of the screen winding + * @param electricalResistivity Electrical resistivity specific to the screen material + */ +public record ScreenLayerInput( + UUID uuid, + String name, + CableMaterial material, + ComparableQuantity innerDiameter, + ComparableQuantity outerDiameter, + ComparableQuantity thermalResistivity, + ComparableQuantity thermalCapacitance, + Optional> area, + int wiresNumber, + ComparableQuantity wireDiameter, + Optional> lengthOfLay, + ComparableQuantity electricalResistivity) + implements InputEntity { + /** + * Create a new screen layer with all required parameters. + * + * @param uuid UUID of the screen layer + * @param name Designation of this screen layer + * @param material Material of the screen + * @param innerDiameter Inner diameter + * @param outerDiameter Outer diameter + * @param thermalResistivity Thermal resistivity + * @param thermalCapacitance Thermal capacitance + * @param area Optional real cross-sectional area + * @param wiresNumber Number of individual wires + * @param wireDiameter Diameter of individual wire + * @param lengthOfLay Optional length of lay (pitch) + * @param electricalResistivity Electrical resistivity of the screen material + */ + public ScreenLayerInput { + // Validation + Objects.requireNonNull(uuid, "Layer UUID cannot be null"); + Objects.requireNonNull(name, "Screen layer name cannot be null"); + Objects.requireNonNull(material, "Screen material cannot be null"); + Objects.requireNonNull(innerDiameter, "Inner diameter cannot be null"); + Objects.requireNonNull(outerDiameter, "Outer diameter cannot be null"); + Objects.requireNonNull(thermalResistivity, "Thermal resistivity cannot be null"); + Objects.requireNonNull(thermalCapacitance, "Thermal capacitance cannot be null"); + Objects.requireNonNull(area, "Area Optional cannot be null"); + Objects.requireNonNull(wireDiameter, "Wire diameter cannot be null"); + Objects.requireNonNull(lengthOfLay, "Length of lay Optional cannot be null"); + Objects.requireNonNull(electricalResistivity, "Material resistivity cannot be null"); + + if (name.isEmpty()) { + throw new IllegalArgumentException("Screen layer name cannot be empty"); + } + + // Geometry consistency: outerDiameter >= innerDiameter + if (outerDiameter.getValue().doubleValue() < innerDiameter.getValue().doubleValue()) { + throw new IllegalArgumentException( + String.format( + "Outer diameter (%.6f) must be >= inner diameter (%.6f)", + outerDiameter.getValue().doubleValue(), innerDiameter.getValue().doubleValue())); + } + + // Positive values check + if (innerDiameter.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Inner diameter must be >= 0"); + } + if (outerDiameter.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Outer diameter must be >= 0"); + } + if (thermalResistivity.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Thermal resistivity must be >= 0"); + } + if (thermalCapacitance.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Thermal capacitance must be >= 0"); + } + if (wiresNumber < 1) { + throw new IllegalArgumentException("Number of wires must be >= 1"); + } + if (wireDiameter.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Wire diameter must be >= 0"); + } + if (electricalResistivity.getValue().doubleValue() < 0) { + throw new IllegalArgumentException("Material resistivity must be >= 0"); + } + } + + @Override + public Map getAdditionalInformation() { + return Map.of(); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o + instanceof + ScreenLayerInput( + UUID uuid1, + String name1, + CableMaterial material1, + ComparableQuantity diameter, + ComparableQuantity outerDiameter1, + ComparableQuantity resistivity, + ComparableQuantity capacitance, + Optional> area1, + int number, + ComparableQuantity wireDiameter1, + Optional> ofLay, + ComparableQuantity materialResistivity1))) return false; + return uuid.equals(uuid1) + && wiresNumber == number + && name.equals(name1) + && material == material1 + && innerDiameter.equals(diameter) + && outerDiameter.equals(outerDiameter1) + && thermalResistivity.equals(resistivity) + && thermalCapacitance.equals(capacitance) + && area.equals(area1) + && wireDiameter.equals(wireDiameter1) + && lengthOfLay.equals(ofLay) + && electricalResistivity.equals(materialResistivity1); + } + + @Override + public @NonNull String toString() { + return "ScreenLayerInput{" + + "uuid='" + + uuid + + "name='" + + name + + '\'' + + ", material=" + + material + + ", innerDiameter=" + + innerDiameter + + ", outerDiameter=" + + outerDiameter + + ", thermalResistivity=" + + thermalResistivity + + ", thermalCapacitance=" + + thermalCapacitance + + ", area=" + + area + + ", wiresNumber=" + + wiresNumber + + ", wireDiameter=" + + wireDiameter + + ", lengthOfLay=" + + lengthOfLay + + ", electricalResistivity=" + + electricalResistivity + + '}'; + } +} diff --git a/src/test/java/edu/ie3/datamodel/models/input/connector/CableDeploymentInputTest.java b/src/test/java/edu/ie3/datamodel/models/input/connector/CableDeploymentInputTest.java new file mode 100644 index 000000000..fa9fc4a23 --- /dev/null +++ b/src/test/java/edu/ie3/datamodel/models/input/connector/CableDeploymentInputTest.java @@ -0,0 +1,148 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.connector; + +import static org.junit.jupiter.api.Assertions.*; + +import javax.measure.quantity.Length; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import tech.units.indriya.ComparableQuantity; +import tech.units.indriya.quantity.Quantities; +import tech.units.indriya.unit.Units; + +/** Unit tests for CableDeploymentInput class. */ +@DisplayName("CableDeploymentInput Tests") +class CableDeploymentInputTest { + + private ComparableQuantity depthCables; + private ComparableQuantity distanceCables; + + @BeforeEach + void setUp() { + depthCables = Quantities.getQuantity(-1.0, Units.METRE); + distanceCables = Quantities.getQuantity(0.3, Units.METRE); + } + + @Test + @DisplayName("Test CableDeploymentInput creation with valid parameters") + void testCableDeploymentInputCreation() { + CableDeploymentInput env = new CableDeploymentInput("TREFOIL", depthCables, distanceCables); + assertNotNull(env); + assertEquals("TREFOIL", env.layoutFormation()); + assertEquals(depthCables, env.depthCables()); + assertEquals(distanceCables, env.distanceCables()); + } + + @Test + @DisplayName("Test CableDeploymentInput with FLAT layout") + void testCableDeploymentInputFlat() { + CableDeploymentInput env = new CableDeploymentInput("FLAT", depthCables, distanceCables); + assertEquals("FLAT", env.layoutFormation()); + } + + @Test + @DisplayName("Test CableDeploymentInput null layoutFormation validation") + void testCableDeploymentInputNullLayoutFormation() { + assertThrows( + NullPointerException.class, + () -> new CableDeploymentInput(null, depthCables, distanceCables)); + } + + @Test + @DisplayName("Test CableDeploymentInput empty layoutFormation validation") + void testCableDeploymentInputEmptyLayoutFormation() { + assertThrows( + IllegalArgumentException.class, + () -> new CableDeploymentInput("", depthCables, distanceCables)); + } + + @Test + @DisplayName("Test CableDeploymentInput positive depthCables validation") + void testCableDeploymentInputNegativeDepth() { + ComparableQuantity positiveDepth = Quantities.getQuantity(1.0, Units.METRE); + assertThrows( + IllegalArgumentException.class, + () -> new CableDeploymentInput("TREFOIL", positiveDepth, distanceCables)); + } + + @Test + @DisplayName("Test CableDeploymentInput zero distanceCables validation") + void testCableDeploymentInputNegativeDistance() { + ComparableQuantity zeroDistance = Quantities.getQuantity(0.0, Units.METRE); + assertThrows( + IllegalArgumentException.class, + () -> new CableDeploymentInput("TREFOIL", depthCables, zeroDistance)); + } + + @Test + @DisplayName("Test CableDeploymentInput equals method") + void testCableDeploymentInputEquals() { + CableDeploymentInput env1 = new CableDeploymentInput("TREFOIL", depthCables, distanceCables); + CableDeploymentInput env2 = new CableDeploymentInput("TREFOIL", depthCables, distanceCables); + assertEquals(env1, env2); + } + + @Test + @DisplayName("Test CableDeploymentInput hashCode consistency") + void testCableDeploymentInputHashCode() { + CableDeploymentInput env1 = new CableDeploymentInput("TREFOIL", depthCables, distanceCables); + CableDeploymentInput env2 = new CableDeploymentInput("TREFOIL", depthCables, distanceCables); + assertEquals(env1.hashCode(), env2.hashCode()); + } + + @Test + @DisplayName("Test CableDeploymentInput toString") + void testCableDeploymentInputToString() { + CableDeploymentInput env = new CableDeploymentInput("TREFOIL", depthCables, distanceCables); + String str = env.toString(); + assertNotNull(str); + assertTrue(str.contains("TREFOIL")); + } + + @Test + @DisplayName("Test CableDeploymentInput null depthCables validation") + void testCableDeploymentInputNullDepth() { + assertThrows( + NullPointerException.class, + () -> new CableDeploymentInput("TREFOIL", null, distanceCables)); + } + + @Test + @DisplayName("Test CableDeploymentInput null distanceCables validation") + void testCableDeploymentInputNullDistance() { + assertThrows( + NullPointerException.class, () -> new CableDeploymentInput("TREFOIL", depthCables, null)); + } + + @Test + @DisplayName("Test CableDeploymentInput not equals for different layouts") + void testCableDeploymentInputNotEqualsLayout() { + CableDeploymentInput env1 = new CableDeploymentInput("TREFOIL", depthCables, distanceCables); + CableDeploymentInput env2 = new CableDeploymentInput("FLAT", depthCables, distanceCables); + assertNotEquals(env1, env2); + } + + @Test + @DisplayName("Test CableDeploymentInput with zero depths") + void testCableDeploymentInputZeroDepths() { + ComparableQuantity zeroDepth = Quantities.getQuantity(0.0, Units.METRE); + ComparableQuantity zeroDistance = Quantities.getQuantity(0.0, Units.METRE); + assertThrows( + IllegalArgumentException.class, + () -> new CableDeploymentInput("TREFOIL", zeroDepth, zeroDistance)); + } + + @Test + @DisplayName("Test CableDeploymentInput getters") + void testCableDeploymentInputGetters() { + CableDeploymentInput env = new CableDeploymentInput("TREFOIL", depthCables, distanceCables); + assertEquals("TREFOIL", env.layoutFormation()); + assertEquals(depthCables, env.depthCables()); + assertEquals(distanceCables, env.distanceCables()); + } +} diff --git a/src/test/java/edu/ie3/datamodel/models/input/connector/type/CableMaterialTest.java b/src/test/java/edu/ie3/datamodel/models/input/connector/type/CableMaterialTest.java new file mode 100644 index 000000000..ba401d385 --- /dev/null +++ b/src/test/java/edu/ie3/datamodel/models/input/connector/type/CableMaterialTest.java @@ -0,0 +1,154 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.connector.type; + +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +/** Unit tests for CableMaterial enum and its thermal/electrical property methods. */ +@DisplayName("CableMaterial Tests") +class CableMaterialTest { + + @Test + @DisplayName("Test COPPER thermal properties") + void testCopperThermalProperties() { + CableMaterial.ThermalProperties props = CableMaterial.COPPER.getThermalProperties(); + assertNotNull(props); + assertNotNull(props.resistivity()); + assertNotNull(props.capacitance()); + assertEquals(0.002604166667, props.resistivity().getValue().doubleValue(), 1e-12); + assertEquals(3449600.0, props.capacitance().getValue().doubleValue(), 1e-5); + } + + @Test + @DisplayName("Test ALUMINIUM thermal properties") + void testAluminiumThermalProperties() { + CableMaterial.ThermalProperties props = CableMaterial.ALUMINIUM.getThermalProperties(); + assertNotNull(props); + assertEquals(0.0042194092827, props.resistivity().getValue().doubleValue(), 1e-12); + assertEquals(2420913.3, props.capacitance().getValue().doubleValue(), 1e-5); + } + + @Test + @DisplayName("Test XLPE thermal properties") + void testXlpeThermalProperties() { + CableMaterial.ThermalProperties props = CableMaterial.XLPE.getThermalProperties(); + assertNotNull(props); + assertEquals(3.5, props.resistivity().getValue().doubleValue(), 1e-3); + assertEquals(2.4, props.capacitance().getValue().doubleValue(), 1e-3); + } + + @Test + @DisplayName("Test UNKNOWN material throws exception for thermal properties") + void testUnknownThermalProperties() { + assertThrows(IllegalArgumentException.class, CableMaterial.UNKNOWN::getThermalProperties); + } + + @Test + @DisplayName("Test COPPER electrical resistivity") + void testCopperElectricalResistivity() { + var resistivity = CableMaterial.COPPER.getElectricalResistivity(); + assertNotNull(resistivity); + assertEquals(1.7241e-8, resistivity.getValue().doubleValue(), 1e-12); + } + + @Test + @DisplayName("Test ALUMINIUM electrical resistivity") + void testAluminiumElectricalResistivity() { + var resistivity = CableMaterial.ALUMINIUM.getElectricalResistivity(); + assertNotNull(resistivity); + assertEquals(2.8264e-8, resistivity.getValue().doubleValue(), 1e-12); + } + + @Test + @DisplayName("Test STEEL electrical resistivity") + void testSteelElectricalResistivity() { + var resistivity = CableMaterial.STEEL.getElectricalResistivity(); + assertNotNull(resistivity); + assertEquals(13.8e-8, resistivity.getValue().doubleValue(), 1e-12); + } + + @Test + @DisplayName("Test UNKNOWN material throws exception for electrical resistivity") + void testUnknownElectricalResistivity() { + assertThrows(IllegalArgumentException.class, CableMaterial.UNKNOWN::getElectricalResistivity); + } + + @Test + @DisplayName("Test COPPER temperature coefficient") + void testCopperTemperatureCoefficient() { + double coeff = CableMaterial.COPPER.getElectricalResistivityTemperatureCoefficient(); + assertEquals(3.93e-3, coeff, 1e-8); + } + + @Test + @DisplayName("Test ALUMINIUM temperature coefficient") + void testAluminiumTemperatureCoefficient() { + double coeff = CableMaterial.ALUMINIUM.getElectricalResistivityTemperatureCoefficient(); + assertEquals(4.03e-3, coeff, 1e-8); + } + + @Test + @DisplayName("Test LEAD temperature coefficient") + void testLeadTemperatureCoefficient() { + double coeff = CableMaterial.LEAD.getElectricalResistivityTemperatureCoefficient(); + assertEquals(4.0e-3, coeff, 1e-8); + } + + @Test + @DisplayName("Test STEEL temperature coefficient") + void testSteelTemperatureCoefficient() { + double coeff = CableMaterial.STEEL.getElectricalResistivityTemperatureCoefficient(); + assertEquals(4.5e-3, coeff, 1e-8); + } + + @Test + @DisplayName("Test UNKNOWN material throws exception for temperature coefficient") + void testUnknownTemperatureCoefficient() { + assertThrows( + IllegalArgumentException.class, + CableMaterial.UNKNOWN::getElectricalResistivityTemperatureCoefficient); + } + + @Test + @DisplayName("Test all non-UNKNOWN materials have thermal properties") + void testAllMaterialsHaveThermalProperties() { + for (CableMaterial material : CableMaterial.values()) { + if (material != CableMaterial.UNKNOWN) { + assertDoesNotThrow(material::getThermalProperties); + } + } + } + + @Test + @DisplayName("Test PVC thermal properties") + void testPvcThermalProperties() { + CableMaterial.ThermalProperties props = CableMaterial.PVC.getThermalProperties(); + assertNotNull(props); + assertEquals(5.0, props.resistivity().getValue().doubleValue(), 1e-3); + assertEquals(1.7, props.capacitance().getValue().doubleValue(), 1e-3); + } + + @Test + @DisplayName("Test SEMI_COND_SCREEN thermal properties") + void testSemiCondScreenThermalProperties() { + CableMaterial.ThermalProperties props = CableMaterial.SEMI_COND_SCREEN.getThermalProperties(); + assertNotNull(props); + assertEquals(2.5, props.resistivity().getValue().doubleValue(), 1e-3); + assertEquals(2.4, props.capacitance().getValue().doubleValue(), 1e-3); + } + + @Test + @DisplayName("Test SC_TAPE thermal properties") + void testScTapeThermalProperties() { + CableMaterial.ThermalProperties props = CableMaterial.SC_TAPE.getThermalProperties(); + assertNotNull(props); + assertEquals(6.0, props.resistivity().getValue().doubleValue(), 1e-3); + assertEquals(2.4, props.capacitance().getValue().doubleValue(), 1e-3); + } +} diff --git a/src/test/java/edu/ie3/datamodel/models/input/connector/type/CableTypeInputTest.java b/src/test/java/edu/ie3/datamodel/models/input/connector/type/CableTypeInputTest.java new file mode 100644 index 000000000..2d24a2518 --- /dev/null +++ b/src/test/java/edu/ie3/datamodel/models/input/connector/type/CableTypeInputTest.java @@ -0,0 +1,551 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.connector.type; + +import static edu.ie3.util.quantities.PowerSystemUnits.*; +import static org.junit.jupiter.api.Assertions.*; + +import edu.ie3.util.quantities.interfaces.ThermalCapacitance; +import edu.ie3.util.quantities.interfaces.ThermalResistivity; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.UUID; +import javax.measure.quantity.*; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import tech.units.indriya.ComparableQuantity; +import tech.units.indriya.quantity.Quantities; +import tech.units.indriya.unit.Units; + +/** Unit tests for CableTypeInput class. */ +@DisplayName("CableTypeInput Tests") +class CableTypeInputTest { + + private UUID testUuid; + private ConductorInput conductor; + private List isolation; + private List filler; + private List armor; + private List jack; + private ComparableQuantity limitTemperature; + private ComparableQuantity frequency; + private ComparableQuantity electricalCapacitance; + + @BeforeEach + void setUp() { + testUuid = UUID.randomUUID(); + + // conductor + ComparableQuantity crossSection = Quantities.getQuantity(400.0e-6, Units.SQUARE_METRE); + ComparableQuantity diameter = Quantities.getQuantity(0.0225, Units.METRE); + ComparableQuantity thermalResistivity = + Quantities.getQuantity(1.0 / 384.0, KELVIN_METRE_PER_WATT); + ComparableQuantity thermalCapacitance = + Quantities.getQuantity(3449600.0, JOULE_PER_CUBIC_METRE_KELVIN); + conductor = + new ConductorInput( + UUID.fromString("793da55e-6021-4468-af1c-5ec61576bb20"), + "conductor", + CableMaterial.COPPER, + crossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + + // isolation + isolation = new ArrayList<>(); + ComparableQuantity innerDiam = Quantities.getQuantity(0.0225, Units.METRE); + ComparableQuantity outerDiam = Quantities.getQuantity(0.027, Units.METRE); + ComparableQuantity layerThermalRes = + Quantities.getQuantity(3.5, KELVIN_METRE_PER_WATT); + ComparableQuantity layerThermalCap = + Quantities.getQuantity(2.4, JOULE_PER_CUBIC_METRE_KELVIN); + + LayerInput isolationLayer = + new LayerInput( + UUID.randomUUID(), + "Main insulation", + CableMaterial.XLPE, + innerDiam, + outerDiam, + layerThermalRes, + layerThermalCap, + Optional.empty()); + isolation.add(isolationLayer); + + // other layers + filler = new ArrayList<>(); + armor = new ArrayList<>(); + jack = new ArrayList<>(); + + limitTemperature = Quantities.getQuantity(90.0, Units.CELSIUS); + frequency = Quantities.getQuantity(50.0, Units.HERTZ); + electricalCapacitance = Quantities.getQuantity(350e-9, Units.FARAD); + } + + @Test + @DisplayName("Test CableTypeInput creation with valid parameters") + void testCableTypeInputCreation() { + CableTypeInput cable = + new CableTypeInput( + testUuid, + "NA2XS2Y 1x120 RM/25 12/20 kV", + 1, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0); + assertNotNull(cable); + assertEquals(testUuid, cable.getUuid()); + assertEquals("NA2XS2Y 1x120 RM/25 12/20 kV", cable.getId()); + assertEquals(1, cable.getCoreNumber()); + } + + @Test + @DisplayName("Test CableTypeInput with three cores") + void testCableTypeInputThreeCores() { + CableTypeInput cable = + new CableTypeInput( + testUuid, + "3-core cable", + 3, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0); + assertEquals(3, cable.getCoreNumber()); + } + + @Test + @DisplayName("Test CableTypeInput empty ID validation") + void testCableTypeInputEmptyId() { + assertThrows( + IllegalArgumentException.class, + () -> + new CableTypeInput( + testUuid, + "", + 1, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0)); + } + + @Test + @DisplayName("Test CableTypeInput invalid coreNumber validation") + void testCableTypeInputInvalidCoreNumber() { + assertThrows( + IllegalArgumentException.class, + () -> + new CableTypeInput( + testUuid, + "Test cable", + 0, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0)); + } + + @Test + @DisplayName("Test CableTypeInput invalid frequency validation") + void testCableTypeInputInvalidFrequency() { + ComparableQuantity negativeFrequency = Quantities.getQuantity(-50.0, Units.HERTZ); + assertThrows( + IllegalArgumentException.class, + () -> + new CableTypeInput( + testUuid, + "Test cable", + 1, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + negativeFrequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0)); + } + + @Test + @DisplayName("Test CableTypeInput with screen layer") + void testCableTypeInputWithScreen() { + ComparableQuantity screenInner = Quantities.getQuantity(0.027, Units.METRE); + ComparableQuantity screenOuter = Quantities.getQuantity(0.028, Units.METRE); + ComparableQuantity wireDiameter = Quantities.getQuantity(0.0005, Units.METRE); + ComparableQuantity screenThermalRes = + Quantities.getQuantity(2.5, KELVIN_METRE_PER_WATT); + ComparableQuantity screenThermalCap = + Quantities.getQuantity(2.4, JOULE_PER_CUBIC_METRE_KELVIN); + var electricResistivity = Quantities.getQuantity(1.7e-7, OHM_METRE); + + ScreenLayerInput screen = + new ScreenLayerInput( + UUID.randomUUID(), + "Copper screen", + CableMaterial.COPPER, + screenInner, + screenOuter, + screenThermalRes, + screenThermalCap, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + electricResistivity); + + CableTypeInput cable = + new CableTypeInput( + testUuid, + "Cable with screen", + 1, + conductor, + isolation, + Optional.of(screen), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0); + assertTrue(cable.getScreen().isPresent()); + assertEquals(screen, cable.getScreen().get()); + } + + @Test + @DisplayName("Test CableTypeInput equals method") + void testCableTypeInputEquals() { + CableTypeInput cable1 = + new CableTypeInput( + testUuid, + "Test cable", + 1, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0); + CableTypeInput cable2 = + new CableTypeInput( + testUuid, + "Test cable", + 1, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0); + assertEquals(cable1, cable2); + } + + @Test + @DisplayName("Test CableTypeInput hashCode consistency") + void testCableTypeInputHashCode() { + CableTypeInput cable1 = + new CableTypeInput( + testUuid, + "Test cable", + 1, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0); + CableTypeInput cable2 = + new CableTypeInput( + testUuid, + "Test cable", + 1, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0); + assertEquals(cable1.hashCode(), cable2.hashCode()); + } + + @Test + @DisplayName("Test CableTypeInput toString") + void testCableTypeInputToString() { + CableTypeInput cable = + new CableTypeInput( + testUuid, + "Test cable", + 1, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0); + String str = cable.toString(); + assertNotNull(str); + assertTrue(str.contains("Test cable")); + } + + @Test + @DisplayName("Test CableTypeInput invalid skinEffectCoefficient validation") + void testCableTypeInputInvalidSkinEffectCoefficient() { + assertThrows( + IllegalArgumentException.class, + () -> + new CableTypeInput( + testUuid, + "Test cable", + 1, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + -1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0)); + } + + @Test + @DisplayName("Test CableTypeInput invalid tanDelta validation") + void testCableTypeInputInvalidTanDelta() { + assertThrows( + IllegalArgumentException.class, + () -> + new CableTypeInput( + testUuid, + "Test cable", + 1, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + -0.1, + 0.0, + 0.0)); + } + + @Test + @DisplayName("Test CableTypeInput getters") + void testCableTypeInputGetters() { + CableTypeInput cable = + new CableTypeInput( + testUuid, + "Test cable", + 2, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.5, + 2.0, + electricalCapacitance, + 0.15, + 0.05, + 0.02); + + assertEquals(testUuid, cable.getUuid()); + assertEquals("Test cable", cable.getId()); + assertEquals(2, cable.getCoreNumber()); + assertEquals(conductor, cable.getConductor()); + assertEquals(isolation, cable.getIsolation()); + assertEquals(filler, cable.getFiller()); + assertEquals(armor, cable.getArmor()); + assertEquals(jack, cable.getJack()); + assertEquals(1.5, cable.getSkinEffectCoefficient(), 0.001); + assertEquals(2.0, cable.getProximityEffectCoefficient(), 0.001); + assertEquals(0.15, cable.getTanDelta(), 0.001); + assertEquals(0.05, cable.getCirculatingLossFactor(), 0.001); + assertEquals(0.02, cable.getEddyCurrentLossFactor(), 0.001); + } + + @Test + @DisplayName("Test CableTypeInput not equals for different UUIDs") + void testCableTypeInputNotEqualsUuid() { + UUID differentUuid = UUID.randomUUID(); + CableTypeInput cable1 = + new CableTypeInput( + testUuid, + "Test cable", + 1, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0); + CableTypeInput cable2 = + new CableTypeInput( + differentUuid, + "Test cable", + 1, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0); + assertNotEquals(cable1, cable2); + } + + @Test + @DisplayName("Test CableTypeInput isolationElements list is immutable") + void testCableTypeInputIsolationElementsImmutable() { + CableTypeInput cable = + new CableTypeInput( + testUuid, + "Test cable", + 1, + conductor, + isolation, + Optional.empty(), + filler, + armor, + jack, + limitTemperature, + frequency, + 1.0, + 1.0, + electricalCapacitance, + 0.1, + 0.0, + 0.0); + + List retrievedLayers = cable.getIsolation(); + assertThrows(UnsupportedOperationException.class, () -> retrievedLayers.add(null)); + } +} diff --git a/src/test/java/edu/ie3/datamodel/models/input/connector/type/ConductorInputTest.java b/src/test/java/edu/ie3/datamodel/models/input/connector/type/ConductorInputTest.java new file mode 100644 index 000000000..a63321287 --- /dev/null +++ b/src/test/java/edu/ie3/datamodel/models/input/connector/type/ConductorInputTest.java @@ -0,0 +1,360 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.connector.type; + +import static edu.ie3.util.quantities.PowerSystemUnits.JOULE_PER_CUBIC_METRE_KELVIN; +import static edu.ie3.util.quantities.PowerSystemUnits.KELVIN_METRE_PER_WATT; +import static org.junit.jupiter.api.Assertions.*; + +import edu.ie3.util.quantities.interfaces.ThermalCapacitance; +import edu.ie3.util.quantities.interfaces.ThermalResistivity; +import java.util.Optional; +import java.util.UUID; +import javax.measure.quantity.Area; +import javax.measure.quantity.Length; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import tech.units.indriya.ComparableQuantity; +import tech.units.indriya.quantity.Quantities; +import tech.units.indriya.unit.Units; + +/** Unit tests for ConductorInput class. */ +@DisplayName("ConductorInput Tests") +class ConductorInputTest { + + private UUID uuid; + private ComparableQuantity crossSection; + private ComparableQuantity diameter; + private ComparableQuantity thermalResistivity; + private ComparableQuantity thermalCapacitance; + + @BeforeEach + void setUp() { + uuid = UUID.fromString("d2074b88-1b54-4032-b721-e71f96f6b3ac"); + crossSection = Quantities.getQuantity(400e-6, Units.SQUARE_METRE); + diameter = Quantities.getQuantity(0.0225, Units.METRE); + thermalResistivity = Quantities.getQuantity(1.0 / 384.0, KELVIN_METRE_PER_WATT); + thermalCapacitance = Quantities.getQuantity(3449600.0, JOULE_PER_CUBIC_METRE_KELVIN); + } + + @Test + @DisplayName("Test ConductorInput creation with valid parameters") + void testConductorInputCreation() { + ConductorInput conductor = + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + assertNotNull(conductor); + assertEquals(CableMaterial.COPPER, conductor.material()); + assertEquals(crossSection, conductor.crossSection()); + assertFalse(conductor.isCompacted()); + } + + @Test + @DisplayName("Test ConductorInput with compacted") + void testConductorInputCompacted() { + ConductorInput conductor = + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + diameter, + true, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + assertTrue(conductor.isCompacted()); + } + + @Test + @DisplayName("Test ConductorInput null material validation") + void testConductorInputNullMaterial() { + assertThrows( + NullPointerException.class, + () -> + new ConductorInput( + uuid, + "conductor", + null, + crossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty())); + } + + @Test + @DisplayName("Test ConductorInput negative crossSection validation") + void testConductorInputNegativeCrossSection() { + ComparableQuantity negativeCrossSection = + Quantities.getQuantity(-1e-6, Units.SQUARE_METRE); + assertThrows( + IllegalArgumentException.class, + () -> + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + negativeCrossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty())); + } + + @Test + @DisplayName("Test ConductorInput negative diameter validation") + void testConductorInputNegativeDiameter() { + ComparableQuantity negativeDiameter = Quantities.getQuantity(-0.001, Units.METRE); + assertThrows( + IllegalArgumentException.class, + () -> + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + negativeDiameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty())); + } + + @Test + @DisplayName("Test ConductorInput with optional area") + void testConductorInputWithArea() { + ComparableQuantity area = Quantities.getQuantity(380e-6, Units.SQUARE_METRE); + ConductorInput conductor = + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.of(area)); + assertTrue(conductor.area().isPresent()); + assertEquals(area, conductor.area().get()); + } + + @Test + @DisplayName("Test ConductorInput equals method") + void testConductorInputEquals() { + ConductorInput conductor1 = + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + ConductorInput conductor2 = + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + assertEquals(conductor1, conductor2); + } + + @Test + @DisplayName("Test ConductorInput hashCode consistency") + void testConductorInputHashCode() { + ConductorInput conductor1 = + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + ConductorInput conductor2 = + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + assertEquals(conductor1.hashCode(), conductor2.hashCode()); + } + + @Test + @DisplayName("Test ConductorInput toString") + void testConductorInputToString() { + ConductorInput conductor = + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + String str = conductor.toString(); + assertNotNull(str); + assertTrue(str.contains("COPPER")); + } + + @Test + @DisplayName("Test ConductorInput with ALUMINIUM material") + void testConductorInputWithAluminium() { + ConductorInput conductor = + new ConductorInput( + uuid, + "conductor", + CableMaterial.ALUMINIUM, + crossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + assertEquals(CableMaterial.ALUMINIUM, conductor.material()); + } + + @Test + @DisplayName("Test ConductorInput null crossSection validation") + void testConductorInputNullCrossSection() { + assertThrows( + NullPointerException.class, + () -> + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + null, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty())); + } + + @Test + @DisplayName("Test ConductorInput null diameter validation") + void testConductorInputNullDiameter() { + assertThrows( + NullPointerException.class, + () -> + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + null, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty())); + } + + @Test + @DisplayName("Test ConductorInput negative thermalCapacitance validation") + void testConductorInputNegativeThermalCapacitance() { + ComparableQuantity negativeThermalCap = + Quantities.getQuantity(-1.0, JOULE_PER_CUBIC_METRE_KELVIN); + assertThrows( + IllegalArgumentException.class, + () -> + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + diameter, + false, + thermalResistivity, + negativeThermalCap, + Optional.empty())); + } + + @Test + @DisplayName("Test ConductorInput not equals for different materials") + void testConductorInputNotEquals() { + ConductorInput conductor1 = + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + ConductorInput conductor2 = + new ConductorInput( + uuid, + "conductor", + CableMaterial.ALUMINIUM, + crossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + assertNotEquals(conductor1, conductor2); + } + + @Test + @DisplayName("Test ConductorInput not equals for different compacted state") + void testConductorInputNotEqualsCompacted() { + ConductorInput conductor1 = + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + diameter, + false, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + ConductorInput conductor2 = + new ConductorInput( + uuid, + "conductor", + CableMaterial.COPPER, + crossSection, + diameter, + true, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + assertNotEquals(conductor1, conductor2); + } +} diff --git a/src/test/java/edu/ie3/datamodel/models/input/connector/type/LayerInputTest.java b/src/test/java/edu/ie3/datamodel/models/input/connector/type/LayerInputTest.java new file mode 100644 index 000000000..7b2c8af90 --- /dev/null +++ b/src/test/java/edu/ie3/datamodel/models/input/connector/type/LayerInputTest.java @@ -0,0 +1,322 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.connector.type; + +import static edu.ie3.util.quantities.PowerSystemUnits.JOULE_PER_CUBIC_METRE_KELVIN; +import static edu.ie3.util.quantities.PowerSystemUnits.KELVIN_METRE_PER_WATT; +import static org.junit.jupiter.api.Assertions.*; + +import edu.ie3.util.quantities.interfaces.ThermalCapacitance; +import edu.ie3.util.quantities.interfaces.ThermalResistivity; +import java.util.Optional; +import java.util.UUID; +import javax.measure.quantity.Area; +import javax.measure.quantity.Length; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import tech.units.indriya.ComparableQuantity; +import tech.units.indriya.quantity.Quantities; +import tech.units.indriya.unit.Units; + +/** Unit tests for LayerInput class. */ +@DisplayName("LayerInput Tests") +class LayerInputTest { + private UUID uuid; + private ComparableQuantity innerDiameter; + private ComparableQuantity outerDiameter; + private ComparableQuantity thermalResistivity; + private ComparableQuantity thermalCapacitance; + + @BeforeEach + void setUp() { + uuid = UUID.randomUUID(); + innerDiameter = Quantities.getQuantity(0.01, Units.METRE); + outerDiameter = Quantities.getQuantity(0.015, Units.METRE); + thermalResistivity = Quantities.getQuantity(3.5, KELVIN_METRE_PER_WATT); + thermalCapacitance = Quantities.getQuantity(2.4, JOULE_PER_CUBIC_METRE_KELVIN); + } + + @Test + @DisplayName("Test LayerInput creation with valid parameters") + void testLayerInputCreation() { + LayerInput layer = + new LayerInput( + uuid, + "Main insulation", + CableMaterial.XLPE, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + assertNotNull(layer); + assertEquals("Main insulation", layer.name()); + assertEquals(CableMaterial.XLPE, layer.material()); + } + + @Test + @DisplayName("Test LayerInput null name validation") + void testLayerInputNullName() { + assertThrows( + NullPointerException.class, + () -> + new LayerInput( + uuid, + null, + CableMaterial.XLPE, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty())); + } + + @Test + @DisplayName("Test LayerInput empty name validation") + void testLayerInputEmptyName() { + assertThrows( + IllegalArgumentException.class, + () -> + new LayerInput( + uuid, + "", + CableMaterial.XLPE, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty())); + } + + @Test + @DisplayName("Test LayerInput outerDiameter < innerDiameter validation") + void testLayerInputOuterDiameterLessThanInner() { + ComparableQuantity invalidOuter = Quantities.getQuantity(0.005, Units.METRE); + assertThrows( + IllegalArgumentException.class, + () -> + new LayerInput( + uuid, + "Invalid layer", + CableMaterial.XLPE, + innerDiameter, + invalidOuter, + thermalResistivity, + thermalCapacitance, + Optional.empty())); + } + + @Test + @DisplayName("Test LayerInput negative innerDiameter validation") + void testLayerInputNegativeInnerDiameter() { + ComparableQuantity negativeInner = Quantities.getQuantity(-0.001, Units.METRE); + assertThrows( + IllegalArgumentException.class, + () -> + new LayerInput( + uuid, + "Invalid layer", + CableMaterial.XLPE, + negativeInner, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty())); + } + + @Test + @DisplayName("Test LayerInput negative thermalResistivity validation") + void testLayerInputNegativeThermalResistivity() { + ComparableQuantity negativeThermalRes = + Quantities.getQuantity(-1.0, KELVIN_METRE_PER_WATT); + assertThrows( + IllegalArgumentException.class, + () -> + new LayerInput( + uuid, + "Invalid layer", + CableMaterial.XLPE, + innerDiameter, + outerDiameter, + negativeThermalRes, + thermalCapacitance, + Optional.empty())); + } + + @Test + @DisplayName("Test LayerInput with optional area") + void testLayerInputWithArea() { + ComparableQuantity area = Quantities.getQuantity(50e-6, Units.SQUARE_METRE); + LayerInput layer = + new LayerInput( + uuid, + "Layer with area", + CableMaterial.PE, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.of(area)); + assertTrue(layer.area().isPresent()); + assertEquals(area, layer.area().get()); + } + + @Test + @DisplayName("Test LayerInput equals method") + void testLayerInputEquals() { + LayerInput layer1 = + new LayerInput( + uuid, + "Main insulation", + CableMaterial.XLPE, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + LayerInput layer2 = + new LayerInput( + uuid, + "Main insulation", + CableMaterial.XLPE, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + assertEquals(layer1, layer2); + } + + @Test + @DisplayName("Test LayerInput hashCode consistency") + void testLayerInputHashCode() { + LayerInput layer1 = + new LayerInput( + uuid, + "Main insulation", + CableMaterial.XLPE, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + LayerInput layer2 = + new LayerInput( + uuid, + "Main insulation", + CableMaterial.XLPE, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + assertEquals(layer1.hashCode(), layer2.hashCode()); + } + + @Test + @DisplayName("Test LayerInput toString") + void testLayerInputToString() { + LayerInput layer = + new LayerInput( + uuid, + "Main insulation", + CableMaterial.XLPE, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + String str = layer.toString(); + assertNotNull(str); + assertTrue(str.contains("Main insulation")); + assertTrue(str.contains("XLPE")); + } + + @Test + @DisplayName("Test LayerInput with PVC material") + void testLayerInputWithPVC() { + LayerInput layer = + new LayerInput( + uuid, + "PVC jacket", + CableMaterial.PVC, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + assertEquals(CableMaterial.PVC, layer.material()); + } + + @Test + @DisplayName("Test LayerInput null material validation") + void testLayerInputNullMaterial() { + assertThrows( + NullPointerException.class, + () -> + new LayerInput( + uuid, + "Layer", + null, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty())); + } + + @Test + @DisplayName("Test LayerInput null innerDiameter validation") + void testLayerInputNullInnerDiameter() { + assertThrows( + NullPointerException.class, + () -> + new LayerInput( + uuid, + "Layer", + CableMaterial.XLPE, + null, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty())); + } + + @Test + @DisplayName("Test LayerInput null Optional parameter validation") + void testLayerInputNullOptional() { + assertThrows( + NullPointerException.class, + () -> + new LayerInput( + uuid, + "Layer", + CableMaterial.XLPE, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + null)); + } + + @Test + @DisplayName("Test LayerInput zero diameter validation") + void testLayerInputZeroDiameters() { + ComparableQuantity zeroDiameter = Quantities.getQuantity(0.0, Units.METRE); + LayerInput layer = + new LayerInput( + uuid, + "Zero layer", + CableMaterial.XLPE, + zeroDiameter, + zeroDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty()); + assertNotNull(layer); + } +} diff --git a/src/test/java/edu/ie3/datamodel/models/input/connector/type/LineTypeInputCableExtensionTest.java b/src/test/java/edu/ie3/datamodel/models/input/connector/type/LineTypeInputCableExtensionTest.java new file mode 100644 index 000000000..cb398ffda --- /dev/null +++ b/src/test/java/edu/ie3/datamodel/models/input/connector/type/LineTypeInputCableExtensionTest.java @@ -0,0 +1,173 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.connector.type; + +import static edu.ie3.util.quantities.PowerSystemUnits.JOULE_PER_CUBIC_METRE_KELVIN; +import static edu.ie3.util.quantities.PowerSystemUnits.KELVIN_METRE_PER_WATT; +import static org.junit.jupiter.api.Assertions.*; +import static tech.units.indriya.unit.Units.*; +import static tech.units.indriya.unit.Units.CELSIUS; +import static tech.units.indriya.unit.Units.FARAD; +import static tech.units.indriya.unit.Units.HERTZ; +import static tech.units.indriya.unit.Units.METRE; + +import edu.ie3.datamodel.models.StandardUnits; +import edu.ie3.test.common.GridTestData; +import edu.ie3.util.quantities.PowerSystemUnits; +import edu.ie3.util.quantities.interfaces.SpecificConductance; +import edu.ie3.util.quantities.interfaces.SpecificResistance; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.UUID; +import javax.measure.quantity.ElectricCurrent; +import javax.measure.quantity.ElectricPotential; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import tech.units.indriya.ComparableQuantity; +import tech.units.indriya.quantity.Quantities; +import tech.units.indriya.unit.Units; + +/** Unit tests for LineTypeInput cable-related extensions. */ +@DisplayName("LineTypeInput Cable Extensions Tests") +class LineTypeInputCableExtensionTest extends GridTestData { + UUID uuid = UUID.randomUUID(); + + ComparableQuantity b = + Quantities.getQuantity(1.0, StandardUnits.SUSCEPTANCE_PER_LENGTH); + + ComparableQuantity g = + Quantities.getQuantity(2.0, StandardUnits.CONDUCTANCE_PER_LENGTH); + + ComparableQuantity r = + Quantities.getQuantity(0.1, StandardUnits.RESISTANCE_PER_LENGTH); + + ComparableQuantity x = + Quantities.getQuantity(0.05, StandardUnits.REACTANCE_PER_LENGTH); + + ComparableQuantity iMax = Quantities.getQuantity(500.0, Units.AMPERE); + ComparableQuantity vRated = + Quantities.getQuantity(30.0, PowerSystemUnits.KILOVOLT); + + CableTypeInput cableType = GridTestData.cableTypeInput; + CableTypeInput cableType2 = + new CableTypeInput( + UUID.fromString("289ad5c9-90f8-4640-afee-ecbf84a5d4c7"), + "test cable type input", + 1, + new ConductorInput( + UUID.randomUUID(), + "conductor", + CableMaterial.COPPER, + Quantities.getQuantity(400.0e-6, SQUARE_METRE), + Quantities.getQuantity(0.0225, METRE), + false, + Quantities.getQuantity(1.0 / 384.0, KELVIN_METRE_PER_WATT), + Quantities.getQuantity(3449600.0, JOULE_PER_CUBIC_METRE_KELVIN), + Optional.empty()), + List.of( + new LayerInput( + UUID.randomUUID(), + "Main insulation", + CableMaterial.XLPE, + Quantities.getQuantity(0.0225, METRE), + Quantities.getQuantity(0.027, METRE), + Quantities.getQuantity(3.5, KELVIN_METRE_PER_WATT), + Quantities.getQuantity(2.4, JOULE_PER_CUBIC_METRE_KELVIN), + Optional.empty())), + Optional.empty(), + new ArrayList<>(), + new ArrayList<>(), + new ArrayList<>(), + Quantities.getQuantity(90.0, CELSIUS), + Quantities.getQuantity(50.0, HERTZ), + 1.0, + 1.0, + Quantities.getQuantity(350e-9, FARAD), + 0.1, + 0.0, + 0.0); + + @Test + @DisplayName("Test LineTypeInput creation with cable parameters") + void testLineTypeInputWithCableParameters() { + LineTypeInput line = + new LineTypeInput(uuid, "Test Line", b, g, r, x, iMax, vRated, Optional.of(cableType)); + assertNotNull(line); + assertEquals(Optional.of(cableType), line.getCableType()); + } + + @Test + @DisplayName("Test LineTypeInput with cableType") + void testLineTypeInputWithOnlyCableTypeUuid() { + LineTypeInput line = + new LineTypeInput(uuid, "Test Line", b, g, r, x, iMax, vRated, Optional.of(cableType)); + assertSame("test cable type input", line.getCableType().get().getId()); + } + + @Test + @DisplayName("Test LineTypeInput equals with same cable parameters") + void testLineTypeInputEqualsWithCableParameters() { + LineTypeInput line1 = + new LineTypeInput(uuid, "Test Line", b, g, r, x, iMax, vRated, Optional.of(cableType)); + LineTypeInput line2 = + new LineTypeInput(uuid, "Test Line", b, g, r, x, iMax, vRated, Optional.of(cableType)); + assertEquals(line1, line2); + } + + @Test + @DisplayName("Test LineTypeInput not equals with different cable UUIDs") + void testLineTypeInputNotEqualsDifferentCableUuid() { + + LineTypeInput line1 = + new LineTypeInput(uuid, "Test Line", b, g, r, x, iMax, vRated, Optional.of(cableType)); + LineTypeInput line2 = + new LineTypeInput(uuid, "Test Line", b, g, r, x, iMax, vRated, Optional.of(cableType2)); + assertNotEquals(line1, line2); + } + + @Test + @DisplayName("Test LineTypeInput copy builder with cable parameters") + void testLineTypeInputCopyBuilderWithCableParameters() { + LineTypeInput original = + new LineTypeInput(uuid, "Test Line", b, g, r, x, iMax, vRated, Optional.of(cableType)); + + LineTypeInput copied = original.copy().build(); + + assertEquals(Optional.of(cableType), copied.getCableType()); + } + + @Test + @DisplayName("Test LineTypeInput toString includes cable parameters") + void testLineTypeInputToStringWithCableParameters() { + LineTypeInput line = + new LineTypeInput(uuid, "Test Line", b, g, r, x, iMax, vRated, Optional.of(cableType)); + String str = line.toString(); + assertNotNull(str); + assertTrue(str.contains("cableType")); + } + + @Test + @DisplayName("Test LineTypeInput hashCode with cable parameters") + void testLineTypeInputHashCodeWithCableParameters() { + LineTypeInput line1 = + new LineTypeInput(uuid, "Test Line", b, g, r, x, iMax, vRated, Optional.of(cableType)); + LineTypeInput line2 = + new LineTypeInput(uuid, "Test Line", b, g, r, x, iMax, vRated, Optional.of(cableType)); + assertEquals(line1.hashCode(), line2.hashCode()); + } + + @Test + @DisplayName("Test LineTypeInput getters for cable parameters") + void testLineTypeInputGettersCableParameters() { + UUID uuid = UUID.randomUUID(); + + LineTypeInput line = + new LineTypeInput(uuid, "Test Line", b, g, r, x, iMax, vRated, Optional.of(cableType)); + + assertEquals(Optional.of(cableType), line.getCableType()); + } +} diff --git a/src/test/java/edu/ie3/datamodel/models/input/connector/type/ScreenLayerInputTest.java b/src/test/java/edu/ie3/datamodel/models/input/connector/type/ScreenLayerInputTest.java new file mode 100644 index 000000000..0085a33a6 --- /dev/null +++ b/src/test/java/edu/ie3/datamodel/models/input/connector/type/ScreenLayerInputTest.java @@ -0,0 +1,430 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.connector.type; + +import static edu.ie3.util.quantities.PowerSystemUnits.*; +import static org.junit.jupiter.api.Assertions.*; + +import edu.ie3.util.quantities.interfaces.ElectricalResistivity; +import edu.ie3.util.quantities.interfaces.ThermalCapacitance; +import edu.ie3.util.quantities.interfaces.ThermalResistivity; +import java.util.Optional; +import java.util.UUID; +import javax.measure.quantity.Area; +import javax.measure.quantity.Length; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import tech.units.indriya.ComparableQuantity; +import tech.units.indriya.quantity.Quantities; +import tech.units.indriya.unit.Units; + +/** Unit tests for ScreenLayerInput class. */ +@DisplayName("ScreenLayerInput Tests") +class ScreenLayerInputTest { + private UUID uuid; + private ComparableQuantity innerDiameter; + private ComparableQuantity outerDiameter; + private ComparableQuantity thermalResistivity; + private ComparableQuantity thermalCapacitance; + private ComparableQuantity wireDiameter; + private ComparableQuantity materialResistivity; + + @BeforeEach + void setUp() { + uuid = UUID.randomUUID(); + innerDiameter = Quantities.getQuantity(0.025, Units.METRE); + outerDiameter = Quantities.getQuantity(0.027, Units.METRE); + thermalResistivity = Quantities.getQuantity(2.5, KELVIN_METRE_PER_WATT); + thermalCapacitance = Quantities.getQuantity(2.4, JOULE_PER_CUBIC_METRE_KELVIN); + wireDiameter = Quantities.getQuantity(0.0005, Units.METRE); + materialResistivity = Quantities.getQuantity(1.7e-7, OHM_METRE); + } + + @Test + @DisplayName("Test ScreenLayerInput creation with valid parameters") + void testScreenLayerInputCreation() { + ScreenLayerInput screen = + new ScreenLayerInput( + uuid, + "Copper screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + materialResistivity); + assertNotNull(screen); + assertEquals("Copper screen", screen.name()); + assertEquals(CableMaterial.COPPER, screen.material()); + assertEquals(20, screen.wiresNumber()); + } + + @Test + @DisplayName("Test ScreenLayerInput null name validation") + void testScreenLayerInputNullName() { + assertThrows( + NullPointerException.class, + () -> + new ScreenLayerInput( + uuid, + null, + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + materialResistivity)); + } + + @Test + @DisplayName("Test ScreenLayerInput empty name validation") + void testScreenLayerInputEmptyName() { + assertThrows( + IllegalArgumentException.class, + () -> + new ScreenLayerInput( + uuid, + "", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + materialResistivity)); + } + + @Test + @DisplayName("Test ScreenLayerInput outerDiameter < innerDiameter validation") + void testScreenLayerInputOuterDiameterLessThanInner() { + ComparableQuantity invalidOuter = Quantities.getQuantity(0.02, Units.METRE); + assertThrows( + IllegalArgumentException.class, + () -> + new ScreenLayerInput( + uuid, + "Invalid screen", + CableMaterial.COPPER, + innerDiameter, + invalidOuter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + materialResistivity)); + } + + @Test + @DisplayName("Test ScreenLayerInput zero or negative wiresNumber validation") + void testScreenLayerInputNegativeWiresNumber() { + assertThrows( + IllegalArgumentException.class, + () -> + new ScreenLayerInput( + uuid, + "Invalid screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 0, + wireDiameter, + Optional.empty(), + materialResistivity)); + } + + @Test + @DisplayName("Test ScreenLayerInput negative wireDiameter validation") + void testScreenLayerInputNegativeWireDiameter() { + ComparableQuantity negativeWireDiameter = Quantities.getQuantity(-0.001, Units.METRE); + assertThrows( + IllegalArgumentException.class, + () -> + new ScreenLayerInput( + uuid, + "Invalid screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + negativeWireDiameter, + Optional.empty(), + materialResistivity)); + } + + @Test + @DisplayName("Test ScreenLayerInput with optional lengthOfLay") + void testScreenLayerInputWithLengthOfLay() { + ComparableQuantity lengthOfLay = Quantities.getQuantity(0.02, Units.METRE); + ScreenLayerInput screen = + new ScreenLayerInput( + uuid, + "Copper screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.of(lengthOfLay), + materialResistivity); + assertTrue(screen.lengthOfLay().isPresent()); + assertEquals(lengthOfLay, screen.lengthOfLay().get()); + } + + @Test + @DisplayName("Test ScreenLayerInput with optional area") + void testScreenLayerInputWithArea() { + ComparableQuantity area = Quantities.getQuantity(5e-6, Units.SQUARE_METRE); + ScreenLayerInput screen = + new ScreenLayerInput( + uuid, + "Copper screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.of(area), + 20, + wireDiameter, + Optional.empty(), + materialResistivity); + assertTrue(screen.area().isPresent()); + assertEquals(area, screen.area().get()); + } + + @Test + @DisplayName("Test ScreenLayerInput equals method") + void testScreenLayerInputEquals() { + ScreenLayerInput screen1 = + new ScreenLayerInput( + uuid, + "Copper screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + materialResistivity); + ScreenLayerInput screen2 = + new ScreenLayerInput( + uuid, + "Copper screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + materialResistivity); + assertEquals(screen1, screen2); + } + + @Test + @DisplayName("Test ScreenLayerInput hashCode consistency") + void testScreenLayerInputHashCode() { + ScreenLayerInput screen1 = + new ScreenLayerInput( + uuid, + "Copper screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + materialResistivity); + ScreenLayerInput screen2 = + new ScreenLayerInput( + uuid, + "Copper screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + materialResistivity); + assertEquals(screen1.hashCode(), screen2.hashCode()); + } + + @Test + @DisplayName("Test ScreenLayerInput toString") + void testScreenLayerInputToString() { + ScreenLayerInput screen = + new ScreenLayerInput( + uuid, + "Copper screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + materialResistivity); + String str = screen.toString(); + assertNotNull(str); + assertTrue(str.contains("Copper screen")); + assertTrue(str.contains("COPPER")); + } + + @Test + @DisplayName("Test ScreenLayerInput with STEEL material") + void testScreenLayerInputWithSteel() { + ScreenLayerInput screen = + new ScreenLayerInput( + uuid, + "Steel screen", + CableMaterial.STEEL, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + materialResistivity); + assertEquals(CableMaterial.STEEL, screen.material()); + } + + @Test + @DisplayName("Test ScreenLayerInput null material validation") + void testScreenLayerInputNullMaterial() { + assertThrows( + NullPointerException.class, + () -> + new ScreenLayerInput( + uuid, + "Screen", + null, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + materialResistivity)); + } + + @Test + @DisplayName("Test ScreenLayerInput null materialResistivity validation") + void testScreenLayerInputNullMaterialResistivity() { + assertThrows( + NullPointerException.class, + () -> + new ScreenLayerInput( + uuid, + "Screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + null)); + } + + @Test + @DisplayName("Test ScreenLayerInput negative materialResistivity validation") + void testScreenLayerInputNegativeMaterialResistivity() { + ComparableQuantity negativeResistivity = + Quantities.getQuantity(-1.0, OHM_METRE); + assertThrows( + IllegalArgumentException.class, + () -> + new ScreenLayerInput( + uuid, + "Screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + negativeResistivity)); + } + + @Test + @DisplayName("Test ScreenLayerInput not equals for different wires number") + void testScreenLayerInputNotEqualsWires() { + ScreenLayerInput screen1 = + new ScreenLayerInput( + uuid, + "Copper screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 20, + wireDiameter, + Optional.empty(), + materialResistivity); + ScreenLayerInput screen2 = + new ScreenLayerInput( + uuid, + "Copper screen", + CableMaterial.COPPER, + innerDiameter, + outerDiameter, + thermalResistivity, + thermalCapacitance, + Optional.empty(), + 30, + wireDiameter, + Optional.empty(), + materialResistivity); + assertNotEquals(screen1, screen2); + } +} From b51781696d93482484953cf120aa9c97428ebbf6 Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Tue, 23 Jun 2026 23:50:52 +0200 Subject: [PATCH 3/7] add documenation and references --- .../_static/bibliography/bibtex.bib | 59 ++++++ docs/readthedocs/index.md | 1 + .../models/input/grid/cableMaterial.md | 118 ++++++++++++ .../models/input/grid/cableType.md | 175 ++++++++++++++++++ docs/readthedocs/models/input/grid/line.md | 10 +- docs/readthedocs/references.md | 8 + docs/readthedocs/requirements.txt | 1 + 7 files changed, 371 insertions(+), 1 deletion(-) create mode 100644 docs/readthedocs/_static/bibliography/bibtex.bib create mode 100644 docs/readthedocs/models/input/grid/cableMaterial.md create mode 100644 docs/readthedocs/models/input/grid/cableType.md create mode 100644 docs/readthedocs/references.md diff --git a/docs/readthedocs/_static/bibliography/bibtex.bib b/docs/readthedocs/_static/bibliography/bibtex.bib new file mode 100644 index 000000000..6c59cd4ca --- /dev/null +++ b/docs/readthedocs/_static/bibliography/bibtex.bib @@ -0,0 +1,59 @@ + @book{luecking_1981, address={Wiesbaden}, edition={1st ed. 1981}, title={Energiekabeltechnik}, ISBN={9783322843128}, DOI={10.1007/978-3-322-84312-8}, publisher={Imprint: Vieweg+Teubner Verlag}, author={Lücking, H. Wilhelm}, year={1981} } +@misc{wiki:thermal_conductivity_resistivity, + author = {{Wikipedia contributors}}, + title = {Thermal conductivity and resistivity --- {Wikipedia}{,} The Free Encyclopedia}, + year = {2026}, + url = {https://en.wikipedia.org/wiki/Thermal_conductivity_and_resistivity}, + note = {[Online; accessed 3 June 2026]} +} +@misc{wiki:Copper, + author = {{Wikipedia contributors}}, + title = {Copper --- {Wikipedia}{,} The Free Encyclopedia}, + year = {2026}, + url = {https://en.wikipedia.org/wiki/Copper}, + note = {[Online; accessed 3 June 2026]} +} +@misc{wiki:Aluminium, + author = {{Wikipedia contributors}}, + title = {Aluminium --- {Wikipedia}{,} The Free Encyclopedia}, + year = {2026}, + url = {https://en.wikipedia.org/wiki/Aluminium}, + note = {[Online; accessed 3 June 2026]} +} +@misc{wiki:specific_heat_capacities, + author = {{Wikipedia contributors}}, + title = {Table of specific heat capacities --- {Wikipedia}{,} The Free Encyclopedia}, + year = {2026}, + url = {https://en.wikipedia.org/wiki/Table_of_specific_heat_capacities}, + note = {[Online; accessed 3 June 2026]} +} +@misc{wiki:thermal_conductivities, + author = {{Wikipedia contributors}}, + title = {List of thermal conductivities --- {Wikipedia}{,} The Free Encyclopedia}, + year = {2026}, + url = {https://en.wikipedia.org/wiki/List_of_thermal_conductivities}, + note = {[Online; accessed 3 June 2026]} +} + +@book{andersRatingElectricPower1997, + title = {Rating of Electric Power Cables: Ampacity Computations for Transmission, Distribution, and Industrial Applications}, + shorttitle = {Rating of Electric Power Cables}, + author = {Anders, George J.}, + year = 1997, + series = {{{IEEE Press}} Power Engineering Series}, + publisher = {McGraw-Hill [u.a.]}, + address = {New York, NY}, + isbn = {978-0-07-001791-7 978-0-7803-1177-0}, + langid = {english}, + file = {C:\Users\smdafeis\Zotero\storage\9DR3K43F\Anders - 1997 - Rating of electric power cables ampacity computations for transmission, distribution, and industria.pdf} +} +@techreport{CIGRE_TB880_2022, + author = {{CIGR\'{E} Working Group B1.56}}, + title = {Power cable rating examples for calculation tool verification}, + institution = {{Conseil International des Grands R\'{e}seaux \'{E}lectriques (CIGR\'{E})}}, + type = {Technical Brochure}, + number = {880}, + address = {Paris, France}, + year = {2022}, + isbn = {978-2-85873-585-3} +} \ No newline at end of file diff --git a/docs/readthedocs/index.md b/docs/readthedocs/index.md index f73b866a1..b8e4020a3 100644 --- a/docs/readthedocs/index.md +++ b/docs/readthedocs/index.md @@ -12,6 +12,7 @@ Effective handling of geographic information related to power grids is also poss gettingstarted models/models io/basiciousage +references ``` ## Contact the (Main) Maintainers diff --git a/docs/readthedocs/models/input/grid/cableMaterial.md b/docs/readthedocs/models/input/grid/cableMaterial.md new file mode 100644 index 000000000..84b63ed27 --- /dev/null +++ b/docs/readthedocs/models/input/grid/cableMaterial.md @@ -0,0 +1,118 @@ +# Cable Material + +## Overview + +The `CableMaterial` enum represents various materials used in electrical cable construction, providing their default thermal and electrical properties. This is primarily used for physical modeling and simulation of distribution grids, allowing for accurate calculations of thermal states, ampacity, and electrical losses. + +## Properties + +### Thermal Properties + +Retrieved via `getThermalProperties()`. Returns a `ThermalProperties` container providing **Thermal Resistivity** ($K \cdot m/W$) and **Thermal Capacitance** ($J / (m^3 \cdot K)$). + +```{list-table} + :widths: auto + :class: wrapping + :header-rows: 1 + + * - Material + - Thermal Resistivity [] + - Thermal Capacitance [1/K] + - source + - Notes + + * -`Copper` + - 1/384 + - 3,449,600.0 + - {cite:cts}`wiki:thermal_conductivity_resistivity`, {cite:cts}`wiki:Copper` + - c = 385 J/(kg * K), rho= 8.96 g/cm³ => 3449600 J / (m³ * K) + + * -`Aluminium` + - 1/237 + - 2,420,913.3 + - {cite:cts}`wiki:thermal_conductivity_resistivity`, {cite:cts}`wiki:Aluminium` + - c = 897 J/(kg * K), rho= 2.6989 g/cm³ => 2420913.3 J / (m³ * K) + + * -`XLPE (Cross-linked polyethylene)` + - 3.5 + - 2.4 + - {cite:cts}`andersRatingElectricPower1997` p. 400 + + * -`PE (Polyethylene)` + - 3.5 + - 2.4 + - {cite:cts}`andersRatingElectricPower1997` p. 400 + + * -`PVC (Polyvinyl chloride)` + - 3.5 + - 1.7 + - {cite:cts}`andersRatingElectricPower1997` p. 400 + + * -`Semi-Conductive Screen` + - 2.5 + - 2.4 + - Th. Res.: {cite:cts}`CIGRE_TB880_2022` p. 28; Th. Capa.: Same as adjacent dielectric material see {cite:cts}`andersRatingElectricPower1997` p. 400 + + * -`SC-Tape (Screen Tape)` + - 6.0 + - 2.4 + - Th. Res.: {cite:cts}`CIGRE_TB880_2022` p. 28; Th. Capa.: Same as adjacent dielectric material see {cite:cts}`andersRatingElectricPower1997` p. 400 + + * -`Lead` + - 1/35 + - 1,463,892.0 + - Th. Res.: {cite:cts}`wiki:thermal_conductivities`; Th. Capa.: {cite:cts}`wiki:wiki:specific_heat_capacities` + - c = 129 J/(kg * K), rho= 11.348 g/cm³ => 1,463,892.0 J / (m³ * K) + + * -`Steel` + - 1/45 + - 3,756,000.0 + - Th. Res.:{cite:cts}`wiki:thermal_conductivity_resistivity`; Th. Capa.: {cite:cts}`wiki:wiki:specific_heat_capacities` + + * -`Polypropylen` + - 6.0 + - 2.0 + - Th. Res.: {cite:cts}`CIGRE_TB880_2022` p. 28; Th. Capa.: Asumed to be clos to Paper-polypropylene-paper (PPL) in {cite:cts}`andersRatingElectricPower1997` p. 400 +``` + +**Note:** Metals inherently define their thermal resistivity as the inverse of their thermal conductivity $\lambda$ (e.g., $\lambda_{Copper} = 384 \, W/(m \cdot K)$). + +### Electrical Properties + +Electrical parameters define the conductive aspects of the materials, heavily utilized for power flow and loss calculations. + +* **Electrical Resistivity:** Retrieved via `getElectricalResistivity()` (at standard reference temperature). +* **Temperature Coefficient:** Retrieved via `getElectricalResistivityTemperatureCoefficient()`. + +```{list-table} + :widths: auto + :class: wrapping + :header-rows: 1 + + * - Material + - Electrical Resistivity [] + - Temp. Coefficient [1/K] + - source + + * -`Copper` + - $1.7241 10^{-8} + - 3.93 10^[-3} + - {cite:cts}`luecking_1981` p. 94 + + * -`Aluminium` + - $2.8264 10^{-8} + - 4.03 10^[-3} + - {cite:cts}`luecking_1981` p. 94 + + * -`Lead` + - $21.4 10^{-8} + - 4.0 10^[-3} + - {cite:cts}`luecking_1981` p. 94 + + * -`Steel` + - $13.8 10^{-8} + - 4.5 10^[-3} + - {cite:cts}`luecking_1981` p. 94 +``` + +Calling these methods on non-conductive insulation materials will throw an `IllegalArgumentException`. \ No newline at end of file diff --git a/docs/readthedocs/models/input/grid/cableType.md b/docs/readthedocs/models/input/grid/cableType.md new file mode 100644 index 000000000..a991a2083 --- /dev/null +++ b/docs/readthedocs/models/input/grid/cableType.md @@ -0,0 +1,175 @@ +# Cable type + +Representation of a cable type. + +## Attributes, Units and Remarks + +### Type Model + +Type model of a cable. + +```{list-table} + :widths: auto + :class: wrapping + :header-rows: 1 + + * - Attribute + - Unit + - Remarks + + * - uuid + - – + - + + * - id + - – + - Human readable identifier + + * - core number + - – + - Number of conductor cores in the cable + + * - conductor + - ConductorInput + - Layer model that represents the attributes and geometry of the conductor. + + * - isolation + - List of LayerInput + - List of insulation layers (from inner to outer) + + * - screenLayer + - Optional ScreenLayer + - Optional cable screen layer + + * - filler + - List of LayerInput + - List of filler layers (from inner to outer) + + * - armor + - List of LayerInput + - List of armor layers (from inner to outer) + + * - jack + - List of LayerInput + - List of outer sheath or jack layers (from inner to outer) + + * - limit temperature + - °C + - Maximum permissible operating temperature + + * - frequency + - Hz + - Rated frequency of the system + + * - skin effect coefficient + - + - Skin effect coefficient + + * - proximity effect coefficient + - + - Proximity effect coefficient + + * - electrical capacitance + - F/m + - Capacitance per unit length + + * - Dielectric loss factor tanDelta + - + - Dielectric loss factor tan(δ) + + * - circulatingLossFactor + - + - Circulating loss factor + + * - eddyCurrentLossFactor + - + - Eddy current loss factor +``` + +A list with some standard line types can be found here: [Standard Cable Type Parameter](#standard-cable-type-parameter) + +### Cable Layers + +Cables are modeled as a series of concentric layers. These layers—which include insulation, filler, armor, and outer sheaths—are defined using the LayerInput class. Each layer tracks its physical dimensions and thermal properties to support precise electrical and thermal simulations. + +#### LayerInput Attributes + +The following table details the attributes required to define a single cable + +```{list-table} + :widths: auto + :class: wrapping + :header-rows: 1 + + * - Layer Attribute + - Type + - Description + + * - name + - String + - Designation of the layer (e.g., "Main insulation") + + * - material + - CableMaterial + - Material of the layer + + * - innerDiameter + - Length + - Inner diameter of the layer + + * - outerDiameter + - Length + - Outer diameter of the layer + + * - thermalResistivity + - (K·m/W) + - Thermal resistivity of the material + + * - thermalCapacitance + - J/(m³·K) + - Thermal capacitance of the material + + * - area + - Optional Area + - Real cross-sectional area. If none, area will be calculated from geometry. +``` + +Different cable materials and their thermal and electrical parameter are also given as described in [cableMaterial](#cable-material) + +## Standard Cable Type Parameter + +//FIXME + +Following there are some standard line types with their source. To retrieve the data call the method `TypeSource.getStandardLineTypes()`. +A ``csv file`` containing the types listed below can be found [here](https://github.com/ie3-institute/PowerSystemDataModel/tree/dev/input/StandardAssetTypes). +This file can be used directly for any simulation with ``simona``. +The lines which source is ``simBench`` are from [here](https://simbench.de/en/download/datasets/). + + +### Cables +//FIMXE +Some standard cables type parameter and geometries. + +```{list-table} + :widths: auto + :class: wrapping + :header-rows: 1 + + + * - uuid + - b [µS / km] + - g [µS / km] + - iMax [A] + - id + - r [Ω / km] + - vRated [kV] + - x [Ω / km] + - source + +``` + + +## Caveats + +Nothing - at least not known. +If you found something, please contact us! diff --git a/docs/readthedocs/models/input/grid/line.md b/docs/readthedocs/models/input/grid/line.md index ec4ecc57e..61b0f3ac7 100644 --- a/docs/readthedocs/models/input/grid/line.md +++ b/docs/readthedocs/models/input/grid/line.md @@ -6,6 +6,8 @@ Representation of an AC line. ### Type Model +Type model of a line. Please note, that there is also a cable type model that can be used for further detailed modeling using cable layout parameter (e.g. for necessary for ampacity calculations) in case the line type represents some cable. + ```{list-table} :widths: auto :class: wrapping @@ -46,6 +48,10 @@ Representation of an AC line. * - vRated - kV - Rated voltage + + * - cableType + - Optional + - UUID of the cable type ``` @@ -53,6 +59,8 @@ A list with some standard line types can be found here: [Standard Line Types](#s ### Entity Model +The line entity model. + ```{list-table} :widths: auto :class: wrapping @@ -95,7 +103,7 @@ A list with some standard line types can be found here: [Standard Line Types](#s * - type - – - - + - UUID of the line type * - length - km diff --git a/docs/readthedocs/references.md b/docs/readthedocs/references.md new file mode 100644 index 000000000..b3b3ef086 --- /dev/null +++ b/docs/readthedocs/references.md @@ -0,0 +1,8 @@ +# References + +References of publications PSDM referred on: + +```{bibliography} _static/bibliography/bibtex.bib +:style: custom +:all: +``` diff --git a/docs/readthedocs/requirements.txt b/docs/readthedocs/requirements.txt index dc3b1d65a..ccc69d87b 100644 --- a/docs/readthedocs/requirements.txt +++ b/docs/readthedocs/requirements.txt @@ -4,3 +4,4 @@ Sphinx==9.1.0 sphinx-rtd-theme==3.1.0 myst-parser==5.1.0 markdown-it-py==4.2.0 +sphinxcontrib-bibtex==2.7.0 From 90b0e12e33d8622aaa7df3b6f6e9e7bb19d81dc2 Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Wed, 24 Jun 2026 00:05:23 +0200 Subject: [PATCH 4/7] include rawGridTypes and more changes to include cable specific information into model --- input/StandardAssetTypes/line_type_input.csv | 68 +- .../typeinput/CableTypeInputFactory.java | 217 +++++++ .../typeinput/LineTypeInputFactory.java | 7 +- .../io/naming/FieldNamingStrategy.java | 17 + .../ie3/datamodel/io/processor/Processor.java | 36 ++ .../processor/input/InputEntityProcessor.java | 2 + .../ie3/datamodel/io/sink/CsvFileSink.java | 22 + .../edu/ie3/datamodel/io/sink/SqlSink.java | 47 +- .../ie3/datamodel/io/source/TypeSource.java | 68 +- .../csv/CsvJointGridContainerSource.java | 28 +- .../input/connector/CableDeploymentInput.java | 79 +++ .../models/input/container/GridContainer.java | 35 +- .../input/container/JointGridContainer.java | 17 +- .../models/input/container/RawGridTypes.java | 232 +++++++ .../input/container/SubGridContainer.java | 12 +- .../utils/ContainerNodeUpdateUtil.java | 6 +- .../ie3/datamodel/utils/ContainerUtils.java | 36 +- src/main/resources/type/line_type_input.csv | 68 +- .../typeinput/LineTypeInputFactoryTest.groovy | 18 +- .../io/processor/ProcessorProviderTest.groovy | 2 + .../input/InputEntityProcessorTest.groovy | 52 +- .../datamodel/io/sink/CsvFileSinkTest.groovy | 3 + .../container/JointGridContainerTest.groovy | 8 +- .../models/typeInput/LineTypeInputTest.groovy | 31 + .../datamodel/utils/ContainerUtilsTest.groovy | 17 +- .../validation/ValidationUtilsTest.groovy | 4 +- .../ie3/test/common/ComplexTopology.groovy | 22 +- .../common/EnergyManagementTestData.groovy | 1 + .../edu/ie3/test/common/GridTestData.groovy | 46 +- .../test/common/RawGridTypesTestData.groovy | 13 + .../ie3/test/common/SampleJointGrid.groovy | 59 +- .../edu/ie3/datamodel/io/sink/_sql/types.sql | 93 +-- .../csv/_joint_grid/cable_type_input.csv | 2 + .../csv/_joint_grid/line_type_input.csv | 584 +++++++++--------- .../io/source/csv/_types/line_type_input.csv | 4 +- .../datamodel/io/source/sql/_types/types.sql | 59 +- 36 files changed, 1535 insertions(+), 480 deletions(-) create mode 100644 src/main/java/edu/ie3/datamodel/io/factory/typeinput/CableTypeInputFactory.java create mode 100644 src/main/java/edu/ie3/datamodel/models/input/connector/CableDeploymentInput.java create mode 100644 src/main/java/edu/ie3/datamodel/models/input/container/RawGridTypes.java create mode 100644 src/test/groovy/edu/ie3/test/common/RawGridTypesTestData.groovy create mode 100644 src/test/resources/edu/ie3/datamodel/io/source/csv/_joint_grid/cable_type_input.csv diff --git a/input/StandardAssetTypes/line_type_input.csv b/input/StandardAssetTypes/line_type_input.csv index 3ef2d756b..836e7083e 100644 --- a/input/StandardAssetTypes/line_type_input.csv +++ b/input/StandardAssetTypes/line_type_input.csv @@ -1,34 +1,34 @@ -uuid,b,g,i_max,id,r,v_rated,x -91617ab8-3de2-4fba-be45-a54473ba09a9,3.61283,0.0,1300.0,LineType_1,0.08,380.0,0.32 -b3b231ae-a971-4432-80d7-4ce2f2a56a32,3.22799,0.0,1950.0,LineType_4,0.033333,380.0,0.333333 -24595f91-8295-41f8-a3d8-c9418d860d9c,1.076,0.0,650.0,LineType_6,0.1,380.0,1.0 -f0fc57ec-aa5a-4484-b870-be70a5428cbd,6.45597,0.0,3900.0,LineType_9,0.016667,380.0,0.166667 -ba70d8e7-b082-49bc-8c45-3c10e1236c3e,8.60796,0.0,5200.0,LineType_10,0.0125,380.0,0.125 -eee8eeed-62c9-4345-aa5a-3743fe32007d,12.9119,0.0,7800.0,LineType_11,0.008333,380.0,0.083333 -d2b16935-dcd7-44d2-8623-cec4c703ccdc,17.2159,0.0,10400.0,LineType_12,0.00625,380.0,0.0625 -a490c96e-6e90-485a-b0d7-adeb81fa09cd,4.30398,0.0,2600.0,LineType_2,0.025,220.0,0.25 -5272bcbc-7d0e-4759-85fa-27943fd8d19c,2.15199,0.0,1300.0,LineType_3,0.05,220.0,0.5 -dd0bac07-de8d-4608-af36-b8ff2819f55a,7.22566,0.0,2600.0,LineType_5,0.04,220.0,0.16 -64c1dcb5-57a5-4f35-b2bf-9ae4e6cc4943,1.80642,0.0,650.0,LineType_7,0.16,220.0,0.64 -bdc83a85-c796-4bcb-8b79-8988dc2804f8,5.41925,0.0,1950.0,LineType_8,0.053333,220.0,0.213333 -3d75fb6b-f0be-4451-ab4c-7f00c0ebd619,2.8274,0.0,680.0,Al/St_265/35,0.1095,110.0,0.296 -f5dcaf44-7a9a-4b85-89ba-5c15c04c5766,3.45575,0.0,105.0,15-AL1/3-ST1A 20.0,1.8769,20.0,0.409 -9cbf484b-7256-4e7a-9c35-3e1049909aa0,3.53429,0.0,140.0,24-AL1/4-ST1A 20.0,1.2012,20.0,0.394 -5b542a50-b0c2-4497-ba90-b2b31aafaa0b,2.87456,0.0,170.0,34-AL1/6-ST1A 20.0,0.8342,20.0,0.382 -d594cd67-4459-44bc-9594-db710372db71,2.98451,0.0,210.0,48-AL1/8-ST1A 20.0,0.5939,20.0,0.372 -305e60ad-cfd2-4127-9d83-8d9b21942d93,3.04734,0.0,290.0,70-AL1/11-ST1A 20.0,0.4132,20.0,0.36 -cc59abd4-770b-45d2-98c8-919c91f1ca4b,58.7478,0.0,652.0,1x630_RM/50,0.122,110.0,0.122522 -82ea1b98-2b21-48bd-841a-8d17d8ac20c9,59.3761,0.0,158.0,NA2XS2Y 1x50 RM/25 12/20 kV,0.64,20.0,0.145 -4adef9e6-5e40-416d-8bd2-b6768d156c54,59.6903,0.0,220.0,NA2XS2Y 1x70 RM/25 12/20 kV,0.443,20.0,0.132 -d5c03484-59c2-44d5-a2ee-63a5a0d623b4,67.8584,0.0,252.0,NA2XS2Y 1x95 RM/25 12/20 kV,0.313,20.0,0.132 -9c13909d-1dd1-4e2d-980b-55345bdf0fd0,72.2566,0.0,283.0,NA2XS2Y 1x120 RM/25 12/20 kV,0.253,20.0,0.119 -36243493-eb31-4e81-bd13-b54ef59c4cbe,78.5398,0.0,319.0,NA2XS2Y 1x150 RM/25 12/20 kV,0.206,20.0,0.116 -437689f8-366d-4b04-b42d-d7a754db074b,85.7655,0.0,362.0,NA2XS2Y 1x185 RM/25 12/20 kV,0.161,20.0,0.117 -b459115d-d4eb-47d4-b7ec-625339ee0dcc,95.5044,0.0,421.0,NA2XS2Y 1x240 RM/25 12/20 kV,0.122,20.0,0.112 -9aed5818-c037-4033-8d15-806c62d70b8f,113.097,0.0,315.0,NA2XS2Y 1x150 RM/25 6/10 kV,0.206,10.0,0.11 -60d37bc7-157a-4c32-b1b5-e74c10d70531,127.549,0.0,358.0,NA2XS2Y 1x185 RM/25 6/10 kV,0.161,10.0,0.11 -a3ced617-2ffd-4593-b8e9-bcad9a521aab,143.257,0.0,416.0,NA2XS2Y 1x240 RM/25 6/10 kV,0.122,10.0,0.105 -f0484bb6-9d0d-4d13-bfbe-b83783b8352a,150.796,0.0,471.0,NA2XS2Y 1x300 RM/25 6/10 kV,0.1,10.0,0.0974 -6b223bc3-69e2-4eb8-a2c0-76be1cd2c998,169.646,0.0,535.0,NA2XS2Y 1x400 RM/25 6/10 kV,0.078,10.0,0.0942 -65181464-230a-487b-978f-81e406e9eb22,260.752,0.0,270.0,NAYY 4x150SE 0.6/1kV,0.2067,0.4,0.0804248 -1200d9eb-6d10-47f3-8543-abea43b128d3,273.319,0.0,357.0,NAYY 4x240SE 0.6/1kV,0.1267,0.4,0.0797965 +uuid,b,g,i_max,id,r,v_rated,x,cable_type +91617ab8-3de2-4fba-be45-a54473ba09a9,3.61283,0.0,1300.0,LineType_1,0.08,380.0,0.32, +b3b231ae-a971-4432-80d7-4ce2f2a56a32,3.22799,0.0,1950.0,LineType_4,0.033333,380.0,0.333333, +24595f91-8295-41f8-a3d8-c9418d860d9c,1.076,0.0,650.0,LineType_6,0.1,380.0,1.0, +f0fc57ec-aa5a-4484-b870-be70a5428cbd,6.45597,0.0,3900.0,LineType_9,0.016667,380.0,0.166667, +ba70d8e7-b082-49bc-8c45-3c10e1236c3e,8.60796,0.0,5200.0,LineType_10,0.0125,380.0,0.125, +eee8eeed-62c9-4345-aa5a-3743fe32007d,12.9119,0.0,7800.0,LineType_11,0.008333,380.0,0.083333, +d2b16935-dcd7-44d2-8623-cec4c703ccdc,17.2159,0.0,10400.0,LineType_12,0.00625,380.0,0.0625, +a490c96e-6e90-485a-b0d7-adeb81fa09cd,4.30398,0.0,2600.0,LineType_2,0.025,220.0,0.25, +5272bcbc-7d0e-4759-85fa-27943fd8d19c,2.15199,0.0,1300.0,LineType_3,0.05,220.0,0.5, +dd0bac07-de8d-4608-af36-b8ff2819f55a,7.22566,0.0,2600.0,LineType_5,0.04,220.0,0.16, +64c1dcb5-57a5-4f35-b2bf-9ae4e6cc4943,1.80642,0.0,650.0,LineType_7,0.16,220.0,0.64, +bdc83a85-c796-4bcb-8b79-8988dc2804f8,5.41925,0.0,1950.0,LineType_8,0.053333,220.0,0.213333, +3d75fb6b-f0be-4451-ab4c-7f00c0ebd619,2.8274,0.0,680.0,Al/St_265/35,0.1095,110.0,0.296, +f5dcaf44-7a9a-4b85-89ba-5c15c04c5766,3.45575,0.0,105.0,15-AL1/3-ST1A 20.0,1.8769,20.0,0.409, +9cbf484b-7256-4e7a-9c35-3e1049909aa0,3.53429,0.0,140.0,24-AL1/4-ST1A 20.0,1.2012,20.0,0.394, +5b542a50-b0c2-4497-ba90-b2b31aafaa0b,2.87456,0.0,170.0,34-AL1/6-ST1A 20.0,0.8342,20.0,0.382, +d594cd67-4459-44bc-9594-db710372db71,2.98451,0.0,210.0,48-AL1/8-ST1A 20.0,0.5939,20.0,0.372, +305e60ad-cfd2-4127-9d83-8d9b21942d93,3.04734,0.0,290.0,70-AL1/11-ST1A 20.0,0.4132,20.0,0.36, +cc59abd4-770b-45d2-98c8-919c91f1ca4b,58.7478,0.0,652.0,1x630_RM/50,0.122,110.0,0.122522, +82ea1b98-2b21-48bd-841a-8d17d8ac20c9,59.3761,0.0,158.0,NA2XS2Y 1x50 RM/25 12/20 kV,0.64,20.0,0.145, +4adef9e6-5e40-416d-8bd2-b6768d156c54,59.6903,0.0,220.0,NA2XS2Y 1x70 RM/25 12/20 kV,0.443,20.0,0.132, +d5c03484-59c2-44d5-a2ee-63a5a0d623b4,67.8584,0.0,252.0,NA2XS2Y 1x95 RM/25 12/20 kV,0.313,20.0,0.132, +9c13909d-1dd1-4e2d-980b-55345bdf0fd0,72.2566,0.0,283.0,NA2XS2Y 1x120 RM/25 12/20 kV,0.253,20.0,0.119, +36243493-eb31-4e81-bd13-b54ef59c4cbe,78.5398,0.0,319.0,NA2XS2Y 1x150 RM/25 12/20 kV,0.206,20.0,0.116, +437689f8-366d-4b04-b42d-d7a754db074b,85.7655,0.0,362.0,NA2XS2Y 1x185 RM/25 12/20 kV,0.161,20.0,0.117, +b459115d-d4eb-47d4-b7ec-625339ee0dcc,95.5044,0.0,421.0,NA2XS2Y 1x240 RM/25 12/20 kV,0.122,20.0,0.112, +9aed5818-c037-4033-8d15-806c62d70b8f,113.097,0.0,315.0,NA2XS2Y 1x150 RM/25 6/10 kV,0.206,10.0,0.11, +60d37bc7-157a-4c32-b1b5-e74c10d70531,127.549,0.0,358.0,NA2XS2Y 1x185 RM/25 6/10 kV,0.161,10.0,0.11, +a3ced617-2ffd-4593-b8e9-bcad9a521aab,143.257,0.0,416.0,NA2XS2Y 1x240 RM/25 6/10 kV,0.122,10.0,0.105, +f0484bb6-9d0d-4d13-bfbe-b83783b8352a,150.796,0.0,471.0,NA2XS2Y 1x300 RM/25 6/10 kV,0.1,10.0,0.0974, +6b223bc3-69e2-4eb8-a2c0-76be1cd2c998,169.646,0.0,535.0,NA2XS2Y 1x400 RM/25 6/10 kV,0.078,10.0,0.0942, +65181464-230a-487b-978f-81e406e9eb22,260.752,0.0,270.0,NAYY 4x150SE 0.6/1kV,0.2067,0.4,0.0804248, +1200d9eb-6d10-47f3-8543-abea43b128d3,273.319,0.0,357.0,NAYY 4x240SE 0.6/1kV,0.1267,0.4,0.0797965, \ No newline at end of file diff --git a/src/main/java/edu/ie3/datamodel/io/factory/typeinput/CableTypeInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/CableTypeInputFactory.java new file mode 100644 index 000000000..a56002a62 --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/CableTypeInputFactory.java @@ -0,0 +1,217 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.io.factory.typeinput; + +import static edu.ie3.util.quantities.PowerSystemUnits.*; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; +import edu.ie3.datamodel.io.factory.EntityData; +import edu.ie3.datamodel.models.StandardUnits; +import edu.ie3.datamodel.models.input.connector.type.CableTypeInput; +import edu.ie3.datamodel.models.input.connector.type.ConductorInput; +import edu.ie3.datamodel.models.input.connector.type.LayerInput; +import edu.ie3.datamodel.models.input.connector.type.ScreenLayerInput; +import edu.ie3.util.quantities.PowerSystemUnits; +import java.io.IOException; +import java.util.*; +import javax.measure.Unit; +import javax.measure.quantity.ElectricCapacitance; +import javax.measure.quantity.Frequency; +import javax.measure.quantity.Temperature; +import tech.units.indriya.ComparableQuantity; +import tech.units.indriya.quantity.Quantities; + +public class CableTypeInputFactory extends AssetTypeInputEntityFactory { + + public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + + static { + OBJECT_MAPPER.registerModule(new Jdk8Module()); + SimpleModule strictModule = new SimpleModule("StrictFieldUnitModule"); + + strictModule.addDeserializer( + ComparableQuantity.class, + new JsonDeserializer<>() { + @Override + public ComparableQuantity deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException { + String text = p.getText().trim(); + if (text.isEmpty() || "null".equalsIgnoreCase(text)) { + return null; + } + + String currentField = p.currentName(); + double value = Double.parseDouble(text); + Unit unit; + + switch (currentField) { + case "diameter": + case "innerDiameter": + case "inner_diameter": + case "outerDiameter": + case "outer_diameter": + case "wireDiameter": + case "wire_diameter": + unit = PowerSystemUnits.MILLIMETRE; + break; + case "electricalResistivity": + case "electrical_resistivity": + unit = OHM_METRE; + break; + case "thermalResistivity": + case "thermal_resistivity": + unit = KELVIN_METRE_PER_WATT; + break; + case "thermalCapacitance": + case "thermal_capacitance": + unit = JOULE_PER_CUBIC_METRE_KELVIN; + break; + case "area": + case "crossSection": + case "cross_section": + unit = SQUARE_MILLIMETRE; + break; + default: + throw new IOException( + "Strict unit enforcement failed: Unknown target unit context for property field '" + + currentField + + "'"); + } + + return Quantities.getQuantity(value, unit); + } + }); + + strictModule.addSerializer( + ComparableQuantity.class, + new JsonSerializer() { + @Override + public void serialize( + ComparableQuantity value, JsonGenerator gen, SerializerProvider serializers) + throws IOException { + if (value == null) { + gen.writeNull(); + } else { + gen.writeString(Double.toString(value.getValue().doubleValue())); + } + } + }); + OBJECT_MAPPER.registerModule(strictModule); + } + + private List parseLayerList(String json) { + try { + if (json == null || json.isBlank()) { + return Collections.emptyList(); + } + JsonNode node = OBJECT_MAPPER.readTree(json); + + if (node.isArray()) { + for (JsonNode element : node) { + if (element.isObject() && (!element.has("uuid") || element.get("uuid").isNull())) { + ((ObjectNode) element).put("uuid", java.util.UUID.randomUUID().toString()); + } + } + } + + return OBJECT_MAPPER.readValue( + OBJECT_MAPPER.treeAsTokens(node), new TypeReference>() {}); + } catch (Exception e) { + throw new RuntimeException("Cannot parse LayerInput list: " + json, e); + } + } + + private ScreenLayerInput parseScreenLayer(String json) { + try { + if (json == null || json.isBlank()) { + return null; + } + JsonNode node = OBJECT_MAPPER.readTree(json); + if (node.isObject() && (!node.has("uuid") || node.get("uuid").isNull())) { + ((ObjectNode) node).put("uuid", java.util.UUID.randomUUID().toString()); + } + + return OBJECT_MAPPER.treeToValue(node, ScreenLayerInput.class); + } catch (Exception e) { + throw new RuntimeException("Cannot parse ScreenLayerInput: " + json, e); + } + } + + private ConductorInput parseConductor(String json) { + try { + if (json == null || json.isBlank()) { + return null; + } + + JsonNode node = OBJECT_MAPPER.readTree(json); + + if (node.isObject() && (!node.has("uuid") || node.get("uuid").isNull())) { + ((ObjectNode) node).put("uuid", java.util.UUID.randomUUID().toString()); + } + + return OBJECT_MAPPER.treeToValue(node, ConductorInput.class); + } catch (Exception e) { + throw new RuntimeException("Cannot parse ConductorInput: " + json, e); + } + } + + public CableTypeInputFactory() { + super(CableTypeInput.class); + } + + @Override + protected CableTypeInput buildModel(EntityData data) { + UUID uuid = data.getUUID(UUID); + String id = data.getField(ID); + int cores = data.getInt(CORE_NUMBER); + ConductorInput conductor = parseConductor(data.getField(CONDUCTOR_STRING)); + + List isolation = parseLayerList(data.getField(ISOLATION_STRING)); + + Optional screen = + Optional.of(Objects.requireNonNull(parseScreenLayer(data.getField(SCREEN_STRING)))); + + List filler = parseLayerList(data.getField(FILLER_STRING)); + List armor = parseLayerList(data.getField(ARMOR_STRING)); + List jack = parseLayerList(data.getField(JACK_STRING)); + + ComparableQuantity limitTemp = + data.getQuantity(LIMIT_TEMP, StandardUnits.TEMPERATURE); + ComparableQuantity frequency = data.getQuantity(FREQUENCY, PowerSystemUnits.HERTZ); + double skinEffectCoefficient = data.getDouble(SKIN_EFF_COEFF); + double proxEffectCoefficient = data.getDouble(PROX_EFF_COEFF); + ComparableQuantity electricalCapacitance = + data.getQuantity(ELECTR_CAPACITANCE, PowerSystemUnits.FARAD); + double tanDelta = data.getDouble(TAN_DELTA); + double circulatingLossFactor = data.getDouble(CIRCULATING_LOSS_FACTOR); + double eddyCurrentLossFactor = data.getDouble(EDDY_CURRENT_LOSS_FACTOR); + + return new CableTypeInput( + uuid, + id, + cores, + conductor, + isolation, + screen, + filler, + armor, + jack, + limitTemp, + frequency, + skinEffectCoefficient, + proxEffectCoefficient, + electricalCapacitance, + tanDelta, + circulatingLossFactor, + eddyCurrentLossFactor); + } +} diff --git a/src/main/java/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactory.java index c5084dc4c..c2c69694c 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactory.java @@ -7,9 +7,11 @@ import edu.ie3.datamodel.io.factory.EntityData; import edu.ie3.datamodel.models.StandardUnits; +import edu.ie3.datamodel.models.input.connector.type.CableTypeInput; import edu.ie3.datamodel.models.input.connector.type.LineTypeInput; import edu.ie3.util.quantities.interfaces.SpecificConductance; import edu.ie3.util.quantities.interfaces.SpecificResistance; +import java.util.Optional; import java.util.UUID; import javax.measure.quantity.ElectricCurrent; import javax.measure.quantity.ElectricPotential; @@ -38,6 +40,9 @@ protected LineTypeInput buildModel(EntityData data) { ComparableQuantity vRated = data.getQuantity(V_RATED, StandardUnits.RATED_VOLTAGE_MAGNITUDE); - return new LineTypeInput(uuid, id, b, g, r, x, iMax, vRated, data.getFieldsToValues()); + Optional cableType = Optional.empty(); + + return new LineTypeInput( + uuid, id, b, g, r, x, iMax, vRated, cableType, data.getFieldsToValues()); } } diff --git a/src/main/java/edu/ie3/datamodel/io/naming/FieldNamingStrategy.java b/src/main/java/edu/ie3/datamodel/io/naming/FieldNamingStrategy.java index ae3ec377a..3ba8e3314 100644 --- a/src/main/java/edu/ie3/datamodel/io/naming/FieldNamingStrategy.java +++ b/src/main/java/edu/ie3/datamodel/io/naming/FieldNamingStrategy.java @@ -38,6 +38,7 @@ public class FieldNamingStrategy { public static final String S_RATED_B = "sRatedB"; public static final String S_RATED_C = "sRatedC"; public static final String S_RATED_DC = "sRatedDC"; + public static final String FREQUENCY = "frequency"; // energy public static final String E_STATE = "eState"; @@ -87,6 +88,22 @@ public class FieldNamingStrategy { public static final String X_SC_B = "xScB"; public static final String X_SC_C = "xScC"; + // cable + public static final String CORE_NUMBER = "coreNumber"; + public static final String CONDUCTOR_STRING = "conductor"; + public static final String ISOLATION_STRING = "isolation"; + public static final String SCREEN_STRING = "screen"; + public static final String FILLER_STRING = "filler"; + public static final String ARMOR_STRING = "armor"; + public static final String JACK_STRING = "jack"; + public static final String LIMIT_TEMP = "limitTemperature"; + public static final String SKIN_EFF_COEFF = "skinEffectCoefficient"; + public static final String PROX_EFF_COEFF = "proximityEffectCoefficient"; + public static final String ELECTR_CAPACITANCE = "electricalCapacitance"; + public static final String TAN_DELTA = "tanDelta"; + public static final String CIRCULATING_LOSS_FACTOR = "circulatingLossFactor"; + public static final String EDDY_CURRENT_LOSS_FACTOR = "eddyCurrentLossFactor"; + // efficiency public static final String ETA = "eta"; public static final String ETA_CONV = "etaConv"; diff --git a/src/main/java/edu/ie3/datamodel/io/processor/Processor.java b/src/main/java/edu/ie3/datamodel/io/processor/Processor.java index 4c466e5e8..33c8d9686 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/Processor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/Processor.java @@ -13,6 +13,7 @@ import edu.ie3.datamodel.models.UniqueEntity; import edu.ie3.datamodel.models.input.OperatorInput; import edu.ie3.datamodel.models.input.connector.SwitchInput; +import edu.ie3.datamodel.models.input.connector.type.ScreenLayerInput; import edu.ie3.datamodel.models.input.system.characteristic.CharacteristicInput; import edu.ie3.datamodel.models.profile.LoadProfile; import edu.ie3.datamodel.models.profile.PowerProfileKey; @@ -254,6 +255,19 @@ protected String processMethodResult( EntityProcessorException.class); } else if (o instanceof UniqueEntity entity) { return Try.of(entity::getUuid, EntityProcessorException.class); + } else if (o instanceof ScreenLayerInput screenLayer) { + return Try.of( + () -> { + try { + return edu.ie3.datamodel.io.factory.typeinput + .CableTypeInputFactory.OBJECT_MAPPER + .writeValueAsString(screenLayer); + } catch (com.fasterxml.jackson.core.JsonProcessingException e) { + throw new EntityProcessorException( + "Failed to serialize ScreenLayerInput inside Optional", e); + } + }, + EntityProcessorException.class); } else { return Failure.of( new EntityProcessorException( @@ -313,6 +327,28 @@ protected String processMethodResult( resultStringBuilder.append(((CongestionResult.InputModelType) methodReturnObject).type); case "PowerProfileKey" -> resultStringBuilder.append(((PowerProfileKey) methodReturnObject).getValue()); + case "List" -> { + try { + String jsonString = + edu.ie3.datamodel.io.factory.typeinput.CableTypeInputFactory.OBJECT_MAPPER + .writeValueAsString(methodReturnObject); + resultStringBuilder.append(jsonString); + } catch (com.fasterxml.jackson.core.JsonProcessingException e) { + throw new EntityProcessorException( + "Failed to serialize List to JSON string for field: " + fieldName, e); + } + } + case "ConductorInput" -> { + try { + String jsonString = + edu.ie3.datamodel.io.factory.typeinput.CableTypeInputFactory.OBJECT_MAPPER + .writeValueAsString(methodReturnObject); + resultStringBuilder.append(jsonString); + } catch (com.fasterxml.jackson.core.JsonProcessingException e) { + throw new EntityProcessorException( + "Failed to serialize ConductorInput to JSON string for field: " + fieldName, e); + } + } default -> throw new EntityProcessorException( "Unable to process value for attribute/field '" diff --git a/src/main/java/edu/ie3/datamodel/io/processor/input/InputEntityProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/input/InputEntityProcessor.java index cd9231738..ccd6c8222 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/input/InputEntityProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/input/InputEntityProcessor.java @@ -10,6 +10,7 @@ import edu.ie3.datamodel.io.source.TimeSeriesMappingSource; import edu.ie3.datamodel.models.input.*; import edu.ie3.datamodel.models.input.connector.*; +import edu.ie3.datamodel.models.input.connector.type.CableTypeInput; import edu.ie3.datamodel.models.input.connector.type.LineTypeInput; import edu.ie3.datamodel.models.input.connector.type.Transformer2WTypeInput; import edu.ie3.datamodel.models.input.connector.type.Transformer3WTypeInput; @@ -69,6 +70,7 @@ public class InputEntityProcessor extends EntityProcessor { EvTypeInput.class, HpTypeInput.class, LineTypeInput.class, + CableTypeInput.class, Transformer2WTypeInput.class, Transformer3WTypeInput.class, StorageTypeInput.class, diff --git a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java index 887b8ec5b..13cf90349 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/CsvFileSink.java @@ -20,8 +20,10 @@ import edu.ie3.datamodel.models.input.connector.SwitchInput; import edu.ie3.datamodel.models.input.connector.Transformer2WInput; import edu.ie3.datamodel.models.input.connector.Transformer3WInput; +import edu.ie3.datamodel.models.input.connector.type.CableTypeInput; import edu.ie3.datamodel.models.input.container.JointGridContainer; import edu.ie3.datamodel.models.input.container.RawGridElements; +import edu.ie3.datamodel.models.input.container.RawGridTypes; import edu.ie3.datamodel.models.input.container.SystemParticipants; import edu.ie3.datamodel.models.input.system.*; import edu.ie3.datamodel.models.result.ResultEntity; @@ -122,6 +124,21 @@ public void persist(T entity) { @Override public void persistIgnoreNested(C entity) { + if (entity instanceof CableTypeInput cable) { + var result = processorProvider.handleEntity(cable); + + if (result.isSuccess()) { + try { + System.out.println("CableType mapping: " + result.getOrThrow()); + } catch (ProcessorProviderException e) { + throw new RuntimeException(e); + } + } else { + System.out.println("CableType mapping FAILED:"); + result.getException().ifPresent(Throwable::printStackTrace); + } + } + write(entity); } @@ -158,8 +175,10 @@ public void persistAllIncludeNested(Collection entiti public void persistJointGrid(JointGridContainer jointGridContainer) { // get raw grid entities with types or operators RawGridElements rawGridElements = jointGridContainer.getRawGrid(); + RawGridTypes rawGridTypes = jointGridContainer.getRawGridTypes(); Set nodes = rawGridElements.getNodes(); Set lines = rawGridElements.getLines(); + Set cableTypes = rawGridTypes.getCableTypes(); Set transformer2Ws = rawGridElements.getTransformer2Ws(); Set transformer3Ws = rawGridElements.getTransformer3Ws(); Set switches = rawGridElements.getSwitches(); @@ -196,6 +215,9 @@ public void persistJointGrid(JointGridContainer jointGridContainer) { .map(Extractor::extractType) .collect(Collectors.toSet()); + // add also cableTypes + types.addAll(cableTypes); + // extract operators Set operators = Stream.of( diff --git a/src/main/java/edu/ie3/datamodel/io/sink/SqlSink.java b/src/main/java/edu/ie3/datamodel/io/sink/SqlSink.java index c106c6d2f..6b17c9007 100644 --- a/src/main/java/edu/ie3/datamodel/io/sink/SqlSink.java +++ b/src/main/java/edu/ie3/datamodel/io/sink/SqlSink.java @@ -214,19 +214,52 @@ private void insertListIgnoreNested( throws SQLException { try { String[] headerElements = processorProvider.getHeaderElements(cls); - String query = - basicInsertQueryValuesGrid( - schemaName, databaseNamingStrategy.getEntityName(cls).orElseThrow(), headerElements); - query = - query - + createInsertQueryBodyIgnoreConflict( - entities, headerElements, identifier, ignoreConflict); + String query; + String queryBody; + if (AssetTypeInput.class.isAssignableFrom(cls)) { + query = + basicInsertQueryType( + schemaName, + databaseNamingStrategy.getEntityName(cls).orElseThrow(), + headerElements); + + Set> entityFieldData = + processorProvider.handleEntities(entities); + String suffix = ignoreConflict ? "\nON CONFLICT (uuid) DO NOTHING;" : ";\n"; + + queryBody = + entityFieldData.stream() + .map( + data -> + writeOneLine( + Arrays.stream(headerElements).map(sqlEntityFieldData(data)::get))) + .collect(Collectors.joining(",\n", "", suffix)); + } else { + query = + basicInsertQueryValuesGrid( + schemaName, + databaseNamingStrategy.getEntityName(cls).orElseThrow(), + headerElements); + queryBody = + createInsertQueryBodyIgnoreConflict( + entities, headerElements, identifier, ignoreConflict); + } + query = query + queryBody; connector.executeUpdate(query); } catch (ProcessorProviderException e) { log.error("Exception occurred during processor request: ", e); } } + /** Provides the insert, column names and the VALUES statement for types. */ + private String basicInsertQueryType( + String schemaName, String tableName, String[] headerElements) { + return basicInsertQuery(schemaName, tableName) + + " " + + writeOneLine(Arrays.stream(StringUtils.camelCaseToSnakeCase(headerElements))) + + "\nVALUES\n"; + } + /** Persist one time series. */ protected , V extends Value, R extends Value> void persistTimeSeries( TimeSeries timeSeries, DbGridMetadata identifier) { diff --git a/src/main/java/edu/ie3/datamodel/io/source/TypeSource.java b/src/main/java/edu/ie3/datamodel/io/source/TypeSource.java index e82fc5dcf..e55c00f95 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/TypeSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/TypeSource.java @@ -8,17 +8,17 @@ import edu.ie3.datamodel.exceptions.SourceException; import edu.ie3.datamodel.exceptions.ValidationException; import edu.ie3.datamodel.io.factory.input.OperatorInputFactory; -import edu.ie3.datamodel.io.factory.typeinput.LineTypeInputFactory; -import edu.ie3.datamodel.io.factory.typeinput.SystemParticipantTypeInputFactory; -import edu.ie3.datamodel.io.factory.typeinput.Transformer2WTypeInputFactory; -import edu.ie3.datamodel.io.factory.typeinput.Transformer3WTypeInputFactory; +import edu.ie3.datamodel.io.factory.typeinput.*; import edu.ie3.datamodel.models.input.OperatorInput; +import edu.ie3.datamodel.models.input.connector.type.CableTypeInput; import edu.ie3.datamodel.models.input.connector.type.LineTypeInput; import edu.ie3.datamodel.models.input.connector.type.Transformer2WTypeInput; import edu.ie3.datamodel.models.input.connector.type.Transformer3WTypeInput; import edu.ie3.datamodel.models.input.system.type.*; import java.util.Map; +import java.util.Optional; import java.util.UUID; +import java.util.stream.Collectors; /** * Interface that provides the capability to build entities of type {@link @@ -35,6 +35,7 @@ public class TypeSource extends EntitySource { private final OperatorInputFactory operatorInputFactory; private final Transformer2WTypeInputFactory transformer2WTypeInputFactory; private final LineTypeInputFactory lineTypeInputFactory; + private final CableTypeInputFactory cableTypeInputFactory; private final Transformer3WTypeInputFactory transformer3WTypeInputFactory; private final SystemParticipantTypeInputFactory systemParticipantTypeInputFactory; @@ -46,6 +47,7 @@ public TypeSource(DataSource dataSource) { this.operatorInputFactory = new OperatorInputFactory(); this.transformer2WTypeInputFactory = new Transformer2WTypeInputFactory(); this.lineTypeInputFactory = new LineTypeInputFactory(); + this.cableTypeInputFactory = new CableTypeInputFactory(); this.transformer3WTypeInputFactory = new Transformer3WTypeInputFactory(); this.systemParticipantTypeInputFactory = new SystemParticipantTypeInputFactory(); } @@ -168,8 +170,66 @@ private Map getLineTypes(boolean withBuildIn) throws Source Map types = getEntities(LineTypeInput.class, dataSource, lineTypeInputFactory); + Map cableTypes = getCableTypes(true); + + Map resolved = + types.entrySet().stream() + .collect( + Collectors.toMap( + Map.Entry::getKey, + entry -> { + LineTypeInput lineType = entry.getValue(); + + String cableUuidStr = lineType.getAdditionalInformation().get("cable_type"); + + if (cableUuidStr != null && !cableUuidStr.isBlank()) { + UUID cableUuid = UUID.fromString(cableUuidStr); + CableTypeInput cableType = cableTypes.get(cableUuid); + + if (cableType != null) { + return lineType.copy().cableType(Optional.of(cableType)).build(); + } + } + + return lineType; + })); + if (withBuildIn) { Map allTypes = getStandardLineTypes(); + allTypes.putAll(resolved); + return allTypes; + } + + return resolved; + } + + /** + * Returns a set of build in {@link CableTypeInput} instances within a map by UUID. + * + * @return a map of UUID to object- and uuid-unique {@link CableTypeInput} entities + */ + public static Map getStandardCableTypes() throws SourceException { + return new TypeSource(getBuildInSource(CableTypeInput.class, SUB_DIRECTORY)) + .getCableTypes(false); + } + + /** + * Returns a set of {@link CableTypeInput} instances within a map by UUID. + * + *

This set has to be unique in the sense of object uniqueness but also in the sense of {@link + * UUID} uniqueness of the provided {@link CableTypeInput} which has to be checked manually, as + * {@link CableTypeInput#equals(Object)} is NOT restricted on the uuid of {@link CableTypeInput}. + * + * @param withBuildIn if true the cable line types will be included if their uuid is not + * overwritten by the source + * @return a map of UUID to object- and uuid-unique {@link CableTypeInput} entities + */ + public Map getCableTypes(boolean withBuildIn) throws SourceException { + Map types = + getEntities(CableTypeInput.class, dataSource, cableTypeInputFactory); + + if (withBuildIn) { + Map allTypes = getStandardCableTypes(); allTypes.putAll(types); return allTypes; } diff --git a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvJointGridContainerSource.java b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvJointGridContainerSource.java index 5f4f025ef..7efe58c06 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/csv/CsvJointGridContainerSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/csv/CsvJointGridContainerSource.java @@ -13,20 +13,15 @@ import edu.ie3.datamodel.io.naming.EntityPersistenceNamingStrategy; import edu.ie3.datamodel.io.naming.FileNamingStrategy; import edu.ie3.datamodel.io.source.*; +import edu.ie3.datamodel.models.input.AssetTypeInput; import edu.ie3.datamodel.models.input.NodeInput; import edu.ie3.datamodel.models.input.OperatorInput; import edu.ie3.datamodel.models.input.connector.LineInput; import edu.ie3.datamodel.models.input.connector.type.LineTypeInput; -import edu.ie3.datamodel.models.input.container.EnergyManagementUnits; -import edu.ie3.datamodel.models.input.container.JointGridContainer; -import edu.ie3.datamodel.models.input.container.RawGridElements; -import edu.ie3.datamodel.models.input.container.SystemParticipants; +import edu.ie3.datamodel.models.input.container.*; import edu.ie3.datamodel.utils.Try; import java.nio.file.Path; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.UUID; +import java.util.*; /** Convenience class for cases where all used data comes from CSV sources */ public class CsvJointGridContainerSource { @@ -91,6 +86,20 @@ public static JointGridContainer read( () -> new EnergyManagementUnits(new HashSet<>(emSource.getEmUnits(operators).values())), SourceException.class); + Try rawGridTypes = + Try.of( + () -> { + Set types = new HashSet<>(); + + types.addAll(typeSource.getCableTypes(true).values()); + types.addAll(typeSource.getLineTypes().values()); + types.addAll(typeSource.getTransformer2WTypes().values()); + types.addAll(typeSource.getTransformer3WTypes().values()); + + return new RawGridTypes(new ArrayList<>(types)); + }, + SourceException.class); + List exceptions = Try.getExceptions(rawGridElements, systemParticipants); if (!exceptions.isEmpty()) { @@ -102,7 +111,8 @@ public static JointGridContainer read( gridName, rawGridElements.getOrThrow(), systemParticipants.getOrThrow(), - emUnits.getOrThrow()); + emUnits.getOrThrow(), + rawGridTypes.getOrThrow()); } } } diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/CableDeploymentInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/CableDeploymentInput.java new file mode 100644 index 000000000..6ac83d049 --- /dev/null +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/CableDeploymentInput.java @@ -0,0 +1,79 @@ +/* + * © 2026. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation +*/ +package edu.ie3.datamodel.models.input.connector; + +import java.util.Objects; +import javax.measure.quantity.Length; +import org.jspecify.annotations.NonNull; +import tech.units.indriya.ComparableQuantity; + +/** + * Represents the installation environment and deployment parameters of a cable. This data describes + * the concrete installation level of a cable and is associated with some LineInput. + * + * @param layoutFormation Layout formation type (e.g., "TREFOIL", "FLAT"). + * @param depthCables Laying depth of the cables from ground level to cable center. We keep the + * negative sign for easier integration with Coordinates, thus depthCables must be negative. + * @param distanceCables Distance between cable phases/cores from center to center. + */ +public record CableDeploymentInput( + String layoutFormation, + ComparableQuantity depthCables, + ComparableQuantity distanceCables) { + /** + * Create a new CableDeploymentInput with all required parameters. + * + * @param layoutFormation Layout formation type. + * @param depthCables Laying depth of the cables from ground level to cable center. We keep the + * negative sign for easier integration with Coordinates, thus depthCables must be negative. + * @param distanceCables Distance between cables/phases from center to center. + * @throws IllegalArgumentException if validation constraints are violated. + */ + public CableDeploymentInput { // Validation + Objects.requireNonNull(layoutFormation, "Layout formation cannot be null"); + Objects.requireNonNull(depthCables, "Depth cables cannot be null"); + Objects.requireNonNull(distanceCables, "Distance cables cannot be null"); + + if (layoutFormation.isEmpty()) { + throw new IllegalArgumentException("Layout formation cannot be empty"); + } + + // Not possible values check + if (depthCables.getValue().doubleValue() >= 0) { + throw new IllegalArgumentException("Depth cables must be < 0"); + } + if (distanceCables.getValue().doubleValue() <= 0) { + throw new IllegalArgumentException("Distance cables must be > 0"); + } + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o + instanceof + CableDeploymentInput( + String formation, + ComparableQuantity cables, + ComparableQuantity distanceCables1))) return false; + return layoutFormation.equals(formation) + && depthCables.equals(cables) + && distanceCables.equals(distanceCables1); + } + + @Override + public @NonNull String toString() { + return "CableDeploymentInput{" + + "layoutFormation='" + + layoutFormation + + '\'' + + ", depthCables=" + + depthCables + + ", distanceCables=" + + distanceCables + + '}'; + } +} diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/GridContainer.java b/src/main/java/edu/ie3/datamodel/models/input/container/GridContainer.java index 366375ad5..d62d234de 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/GridContainer.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/GridContainer.java @@ -21,16 +21,21 @@ public abstract class GridContainer implements InputContainer /** Accumulated energy management units */ protected final EnergyManagementUnits emUnits; + /** Accumulated grid type elements (cableTypes, lineTypes, transformerTypes) */ + protected final RawGridTypes rawGridTypes; + protected GridContainer( String gridName, RawGridElements rawGrid, SystemParticipants systemParticipants, - EnergyManagementUnits emUnits) { + EnergyManagementUnits emUnits, + RawGridTypes rawGridTypes) { this.gridName = gridName; this.rawGrid = rawGrid; this.systemParticipants = systemParticipants; this.emUnits = emUnits; + this.rawGridTypes = rawGridTypes; } @Override @@ -39,6 +44,7 @@ public List allEntitiesAsList() { allEntities.addAll(rawGrid.allEntitiesAsList()); allEntities.addAll(systemParticipants.allEntitiesAsList()); allEntities.addAll(emUnits.allEntitiesAsList()); + allEntities.addAll(rawGridTypes.allEntitiesAsList()); return Collections.unmodifiableList(allEntities); } @@ -62,6 +68,10 @@ public EnergyManagementUnits getEmUnits() { return emUnits; } + public RawGridTypes getRawGridTypes() { + return rawGridTypes; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -69,12 +79,13 @@ public boolean equals(Object o) { return gridName.equals(that.gridName) && rawGrid.equals(that.rawGrid) && systemParticipants.equals(that.systemParticipants) - && emUnits.equals(that.emUnits); + && emUnits.equals(that.emUnits) + && rawGridTypes.equals(that.rawGridTypes); } @Override public int hashCode() { - return Objects.hash(gridName, rawGrid, systemParticipants, emUnits); + return Objects.hash(gridName, rawGrid, systemParticipants, emUnits, rawGridTypes); } @Override @@ -95,6 +106,7 @@ protected abstract static class GridContainerCopyBuilder { + /** Set of line types in this grid */ + private final Set lineTypes; + + /** Set of cable types in this grid */ + private final Set cableTypes; + + /** Set of two winding transformers types in this grid */ + private final Set transformer2WTypes; + + /** Set of three winding types in this grid */ + private final Set transformer3WTypes; + + public RawGridTypes( + Set lineTypes, + Set cableTypes, + Set transformer2WTypes, + Set transformer3WTypes) { + this.lineTypes = lineTypes; + this.cableTypes = cableTypes; + this.transformer2WTypes = transformer2WTypes; + this.transformer3WTypes = transformer3WTypes; + } + + /** + * Combine different already existing containers + * + * @param rawGridTypes Already existing containers + */ + public RawGridTypes(Collection rawGridTypes) { + this.lineTypes = + rawGridTypes.stream() + .flatMap(rawElements -> rawElements.getLineTypes().stream()) + .collect(Collectors.toSet()); + this.cableTypes = + rawGridTypes.stream() + .flatMap(rawElements -> rawElements.getCableTypes().stream()) + .collect(Collectors.toSet()); + this.transformer2WTypes = + rawGridTypes.stream() + .flatMap(rawElements -> rawElements.getTransformer2WTypes().stream()) + .collect(Collectors.toSet()); + this.transformer3WTypes = + rawGridTypes.stream() + .flatMap(rawElements -> rawElements.getTransformer3WTypes().stream()) + .collect(Collectors.toSet()); + } + + /** + * Create an instance based on a list of {@link AssetTypeInput} entities that are included in + * {@link RawGridTypes} + * + * @param rawGridTypes list of type elements this container instance should create from + */ + public RawGridTypes(List rawGridTypes) { + + /* init sets */ + this.lineTypes = + rawGridTypes.parallelStream() + .filter(LineTypeInput.class::isInstance) + .map(LineTypeInput.class::cast) + .collect(Collectors.toSet()); + this.cableTypes = + rawGridTypes.parallelStream() + .filter(CableTypeInput.class::isInstance) + .map(CableTypeInput.class::cast) + .collect(Collectors.toSet()); + this.transformer2WTypes = + rawGridTypes.parallelStream() + .filter(Transformer2WTypeInput.class::isInstance) + .map(Transformer2WTypeInput.class::cast) + .collect(Collectors.toSet()); + this.transformer3WTypes = + rawGridTypes.parallelStream() + .filter(Transformer3WTypeInput.class::isInstance) + .map(Transformer3WTypeInput.class::cast) + .collect(Collectors.toSet()); + } + + @Override + public final List allEntitiesAsList() { + List allEntities = new ArrayList<>(); + allEntities.addAll(lineTypes); + allEntities.addAll(cableTypes); + allEntities.addAll(transformer2WTypes); + allEntities.addAll(transformer3WTypes); + return Collections.unmodifiableList(allEntities); + } + + @Override + public RawGridTypesCopyBuilder copy() { + return new RawGridTypesCopyBuilder(this); + } + + /** + * @return unmodifiable Set of all line types in this grid + */ + public Set getLineTypes() { + return Collections.unmodifiableSet(lineTypes); + } + + /** + * @return unmodifiable Set of all cable types in this grid + */ + public Set getCableTypes() { + return Collections.unmodifiableSet(cableTypes); + } + + /** + * @return unmodifiable Set of all two winding transformers in this grid + */ + public Set getTransformer2WTypes() { + return Collections.unmodifiableSet(transformer2WTypes); + } + + /** + * @return unmodifiable Set of all three winding transformers in this grid + */ + public Set getTransformer3WTypes() { + return Collections.unmodifiableSet(transformer3WTypes); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof RawGridTypes that)) return false; + return lineTypes.equals(that.lineTypes) + && cableTypes.equals(that.cableTypes) + && transformer2WTypes.equals(that.transformer2WTypes) + && transformer3WTypes.equals(that.transformer3WTypes); + } + + @Override + public int hashCode() { + return Objects.hash(lineTypes, cableTypes, transformer2WTypes, transformer3WTypes); + } + + /** + * A builder pattern based approach to create copies of {@link RawGridTypes} containers with + * altered field values. For detailed field descriptions refer to Javadocs of {@link RawGridTypes} + */ + public static class RawGridTypesCopyBuilder extends InputContainerCopyBuilder { + private Set lineTypes; + private Set cableTypes; + private Set transformer2WTypes; + private Set transformer3WTypes; + + /** + * Constructor for {@link RawGridTypesCopyBuilder} + * + * @param rawGridTypes instance of {@link RawGridTypesCopyBuilder} + */ + protected RawGridTypesCopyBuilder(RawGridTypes rawGridTypes) { + this.lineTypes = rawGridTypes.getLineTypes(); + this.cableTypes = rawGridTypes.getCableTypes(); + this.transformer2WTypes = rawGridTypes.getTransformer2WTypes(); + this.transformer3WTypes = rawGridTypes.getTransformer3WTypes(); + } + + /** + * Method to alter {@link LineTypeInput} + * + * @param lineTypes set of altered line types + * @return this instance of {@link RawGridTypesCopyBuilder} + */ + public RawGridTypesCopyBuilder lineTypes(Set lineTypes) { + this.lineTypes = lineTypes; + return thisInstance(); + } + + /** + * Method to alter {@link CableTypeInput} + * + * @param cableTypes set of altered types + * @return this instance of {@link RawGridTypesCopyBuilder} + */ + public RawGridTypesCopyBuilder cableTypes(Set cableTypes) { + this.cableTypes = cableTypes; + return thisInstance(); + } + + /** + * Method to alter {@link Transformer2WTypeInput} + * + * @param transformer2WTypes set of altered two winding transformer types + * @return this instance of {@link RawGridTypesCopyBuilder} + */ + public RawGridTypesCopyBuilder transformers2WTypes( + Set transformer2WTypes) { + this.transformer2WTypes = transformer2WTypes; + return thisInstance(); + } + + /** + * Method to alter {@link Transformer3WTypeInput} + * + * @param transformer3WTypes set of altered three winding transformer types + * @return this instance of {@link RawGridTypesCopyBuilder} + */ + public RawGridTypesCopyBuilder transformer3WTypes( + Set transformer3WTypes) { + this.transformer3WTypes = transformer3WTypes; + return thisInstance(); + } + + @Override + protected RawGridTypesCopyBuilder thisInstance() { + return this; + } + + @Override + public RawGridTypes build() { + return new RawGridTypes(lineTypes, cableTypes, transformer2WTypes, transformer3WTypes); + } + } +} diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/SubGridContainer.java b/src/main/java/edu/ie3/datamodel/models/input/container/SubGridContainer.java index 941a52b6a..8c0e72af7 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/SubGridContainer.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/SubGridContainer.java @@ -25,9 +25,10 @@ public SubGridContainer( int subnet, RawGridElements rawGrid, SystemParticipants systemParticipants, - EnergyManagementUnits emUnits) + EnergyManagementUnits emUnits, + RawGridTypes rawGridTypes) throws InvalidGridException { - super(gridName, rawGrid, systemParticipants, emUnits); + super(gridName, rawGrid, systemParticipants, emUnits, rawGridTypes); this.subnet = subnet; this.predominantVoltageLevel = ContainerUtils.determinePredominantVoltLvl(rawGrid, subnet); } @@ -113,7 +114,12 @@ protected SubGridContainerCopyBuilder thisInstance() { @Override public SubGridContainer build() throws InvalidGridException { return new SubGridContainer( - getGridName(), subnet, getRawGrid(), getSystemParticipants(), getEmUnits()); + getGridName(), + subnet, + getRawGrid(), + getSystemParticipants(), + getEmUnits(), + getRawGridTypes()); } } } diff --git a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java index ebc916200..60353adec 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java +++ b/src/main/java/edu/ie3/datamodel/utils/ContainerNodeUpdateUtil.java @@ -74,7 +74,8 @@ public static JointGridContainer updateGridWithNodes( grid.getGridName(), updatedEntities.rawGridElements(), updatedEntities.systemParticipants(), - grid.getEmUnits()); + grid.getEmUnits(), + grid.getRawGridTypes()); } /** @@ -108,7 +109,8 @@ public static SubGridContainer updateGridWithNodes( grid.getSubnet(), updatedEntities.rawGridElements(), updatedEntities.systemParticipants(), - grid.getEmUnits()); + grid.getEmUnits(), + grid.getRawGridTypes()); } /** diff --git a/src/main/java/edu/ie3/datamodel/utils/ContainerUtils.java b/src/main/java/edu/ie3/datamodel/utils/ContainerUtils.java index e7580a21a..3f077448f 100644 --- a/src/main/java/edu/ie3/datamodel/utils/ContainerUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/ContainerUtils.java @@ -444,13 +444,16 @@ public static VoltageLevel determinePredominantVoltLvl(RawGridElements rawGrid, * @param gridName Name of the grid * @param rawGrid Container model of raw grid elements * @param systemParticipants Container model of system participants + * @param energyManagementUnits Container model of energy system units + * @param rawGridTypes Container model of raw grid types * @return An immutable, directed graph of sub grid topologies. */ public static SubGridTopologyGraph buildSubGridTopologyGraph( String gridName, RawGridElements rawGrid, SystemParticipants systemParticipants, - EnergyManagementUnits energyManagementUnits) + EnergyManagementUnits energyManagementUnits, + RawGridTypes rawGridTypes) throws InvalidGridException { /* Collect the different subnets. Through the validation of lines, it is ensured, that no galvanically connected * grid has more than one subnet number assigned */ @@ -459,7 +462,12 @@ public static SubGridTopologyGraph buildSubGridTopologyGraph( /* Build the single sub grid models */ HashMap subGrids = buildSubGridContainers( - gridName, subnetNumbers, rawGrid, systemParticipants, energyManagementUnits); + gridName, + subnetNumbers, + rawGrid, + systemParticipants, + energyManagementUnits, + rawGridTypes); /* Build the graph structure denoting the topology of the grid */ return buildSubGridTopologyGraph(subGrids, rawGrid); @@ -482,6 +490,8 @@ private static SortedSet determineSubnetNumbers(Set nodes) { * @param subnetNumbers Set of available subnet numbers * @param rawGrid Container model with all raw grid elements * @param systemParticipants Container model with all system participant inputs + * @param energyManagementUnits Container model with all energy management unit inputs + * @param rawGridTypes Container model with all type inputs of grid elements * @return A mapping from subnet number to container model with sub grid elements */ private static HashMap buildSubGridContainers( @@ -489,7 +499,8 @@ private static HashMap buildSubGridContainers( SortedSet subnetNumbers, RawGridElements rawGrid, SystemParticipants systemParticipants, - EnergyManagementUnits energyManagementUnits) + EnergyManagementUnits energyManagementUnits, + RawGridTypes rawGridTypes) throws InvalidGridException { HashMap subGrids = new HashMap<>(subnetNumbers.size()); for (int subnetNumber : subnetNumbers) { @@ -504,7 +515,8 @@ private static HashMap buildSubGridContainers( subnetNumber, rawGridElements, systemParticipantElements, - energyManagementUnits)); + energyManagementUnits, + rawGridTypes)); } return subGrids; } @@ -695,6 +707,12 @@ public static JointGridContainer combineToJointGrid( new EnergyManagementUnits( subGridContainers.stream().map(GridContainer::getEmUnits).collect(Collectors.toSet())); + RawGridTypes rawGridTypes = + new RawGridTypes( + subGridContainers.stream() + .map(GridContainer::getRawGridTypes) + .collect(Collectors.toSet())); + Map subGridMapping = subGridContainers.stream() .collect(Collectors.toMap(SubGridContainer::getSubnet, Function.identity())); @@ -702,7 +720,12 @@ public static JointGridContainer combineToJointGrid( SubGridTopologyGraph subGridTopologyGraph = buildSubGridTopologyGraph(subGridMapping, rawGrid); return new JointGridContainer( - gridName, rawGrid, systemParticipants, energyManagementUnits, subGridTopologyGraph); + gridName, + rawGrid, + systemParticipants, + energyManagementUnits, + rawGridTypes, + subGridTopologyGraph); } /** @@ -843,6 +866,7 @@ public static SubGridContainer withTrafoNodeAsSlack(final SubGridContainer subGr subGridContainer.getRawGrid().getSwitches(), subGridContainer.getRawGrid().getMeasurementUnits()), subGridContainer.getSystemParticipants(), - subGridContainer.getEmUnits()); + subGridContainer.getEmUnits(), + subGridContainer.getRawGridTypes()); } } diff --git a/src/main/resources/type/line_type_input.csv b/src/main/resources/type/line_type_input.csv index 3ef2d756b..3b823323c 100644 --- a/src/main/resources/type/line_type_input.csv +++ b/src/main/resources/type/line_type_input.csv @@ -1,34 +1,34 @@ -uuid,b,g,i_max,id,r,v_rated,x -91617ab8-3de2-4fba-be45-a54473ba09a9,3.61283,0.0,1300.0,LineType_1,0.08,380.0,0.32 -b3b231ae-a971-4432-80d7-4ce2f2a56a32,3.22799,0.0,1950.0,LineType_4,0.033333,380.0,0.333333 -24595f91-8295-41f8-a3d8-c9418d860d9c,1.076,0.0,650.0,LineType_6,0.1,380.0,1.0 -f0fc57ec-aa5a-4484-b870-be70a5428cbd,6.45597,0.0,3900.0,LineType_9,0.016667,380.0,0.166667 -ba70d8e7-b082-49bc-8c45-3c10e1236c3e,8.60796,0.0,5200.0,LineType_10,0.0125,380.0,0.125 -eee8eeed-62c9-4345-aa5a-3743fe32007d,12.9119,0.0,7800.0,LineType_11,0.008333,380.0,0.083333 -d2b16935-dcd7-44d2-8623-cec4c703ccdc,17.2159,0.0,10400.0,LineType_12,0.00625,380.0,0.0625 -a490c96e-6e90-485a-b0d7-adeb81fa09cd,4.30398,0.0,2600.0,LineType_2,0.025,220.0,0.25 -5272bcbc-7d0e-4759-85fa-27943fd8d19c,2.15199,0.0,1300.0,LineType_3,0.05,220.0,0.5 -dd0bac07-de8d-4608-af36-b8ff2819f55a,7.22566,0.0,2600.0,LineType_5,0.04,220.0,0.16 -64c1dcb5-57a5-4f35-b2bf-9ae4e6cc4943,1.80642,0.0,650.0,LineType_7,0.16,220.0,0.64 -bdc83a85-c796-4bcb-8b79-8988dc2804f8,5.41925,0.0,1950.0,LineType_8,0.053333,220.0,0.213333 -3d75fb6b-f0be-4451-ab4c-7f00c0ebd619,2.8274,0.0,680.0,Al/St_265/35,0.1095,110.0,0.296 -f5dcaf44-7a9a-4b85-89ba-5c15c04c5766,3.45575,0.0,105.0,15-AL1/3-ST1A 20.0,1.8769,20.0,0.409 -9cbf484b-7256-4e7a-9c35-3e1049909aa0,3.53429,0.0,140.0,24-AL1/4-ST1A 20.0,1.2012,20.0,0.394 -5b542a50-b0c2-4497-ba90-b2b31aafaa0b,2.87456,0.0,170.0,34-AL1/6-ST1A 20.0,0.8342,20.0,0.382 -d594cd67-4459-44bc-9594-db710372db71,2.98451,0.0,210.0,48-AL1/8-ST1A 20.0,0.5939,20.0,0.372 -305e60ad-cfd2-4127-9d83-8d9b21942d93,3.04734,0.0,290.0,70-AL1/11-ST1A 20.0,0.4132,20.0,0.36 -cc59abd4-770b-45d2-98c8-919c91f1ca4b,58.7478,0.0,652.0,1x630_RM/50,0.122,110.0,0.122522 -82ea1b98-2b21-48bd-841a-8d17d8ac20c9,59.3761,0.0,158.0,NA2XS2Y 1x50 RM/25 12/20 kV,0.64,20.0,0.145 -4adef9e6-5e40-416d-8bd2-b6768d156c54,59.6903,0.0,220.0,NA2XS2Y 1x70 RM/25 12/20 kV,0.443,20.0,0.132 -d5c03484-59c2-44d5-a2ee-63a5a0d623b4,67.8584,0.0,252.0,NA2XS2Y 1x95 RM/25 12/20 kV,0.313,20.0,0.132 -9c13909d-1dd1-4e2d-980b-55345bdf0fd0,72.2566,0.0,283.0,NA2XS2Y 1x120 RM/25 12/20 kV,0.253,20.0,0.119 -36243493-eb31-4e81-bd13-b54ef59c4cbe,78.5398,0.0,319.0,NA2XS2Y 1x150 RM/25 12/20 kV,0.206,20.0,0.116 -437689f8-366d-4b04-b42d-d7a754db074b,85.7655,0.0,362.0,NA2XS2Y 1x185 RM/25 12/20 kV,0.161,20.0,0.117 -b459115d-d4eb-47d4-b7ec-625339ee0dcc,95.5044,0.0,421.0,NA2XS2Y 1x240 RM/25 12/20 kV,0.122,20.0,0.112 -9aed5818-c037-4033-8d15-806c62d70b8f,113.097,0.0,315.0,NA2XS2Y 1x150 RM/25 6/10 kV,0.206,10.0,0.11 -60d37bc7-157a-4c32-b1b5-e74c10d70531,127.549,0.0,358.0,NA2XS2Y 1x185 RM/25 6/10 kV,0.161,10.0,0.11 -a3ced617-2ffd-4593-b8e9-bcad9a521aab,143.257,0.0,416.0,NA2XS2Y 1x240 RM/25 6/10 kV,0.122,10.0,0.105 -f0484bb6-9d0d-4d13-bfbe-b83783b8352a,150.796,0.0,471.0,NA2XS2Y 1x300 RM/25 6/10 kV,0.1,10.0,0.0974 -6b223bc3-69e2-4eb8-a2c0-76be1cd2c998,169.646,0.0,535.0,NA2XS2Y 1x400 RM/25 6/10 kV,0.078,10.0,0.0942 -65181464-230a-487b-978f-81e406e9eb22,260.752,0.0,270.0,NAYY 4x150SE 0.6/1kV,0.2067,0.4,0.0804248 -1200d9eb-6d10-47f3-8543-abea43b128d3,273.319,0.0,357.0,NAYY 4x240SE 0.6/1kV,0.1267,0.4,0.0797965 +uuid,b,g,i_max,id,r,v_rated,x,cable_type +91617ab8-3de2-4fba-be45-a54473ba09a9,3.61283,0.0,1300.0,LineType_1,0.08,380.0,0.32, +b3b231ae-a971-4432-80d7-4ce2f2a56a32,3.22799,0.0,1950.0,LineType_4,0.033333,380.0,0.333333, +24595f91-8295-41f8-a3d8-c9418d860d9c,1.076,0.0,650.0,LineType_6,0.1,380.0,1.0, +f0fc57ec-aa5a-4484-b870-be70a5428cbd,6.45597,0.0,3900.0,LineType_9,0.016667,380.0,0.166667, +ba70d8e7-b082-49bc-8c45-3c10e1236c3e,8.60796,0.0,5200.0,LineType_10,0.0125,380.0,0.125, +eee8eeed-62c9-4345-aa5a-3743fe32007d,12.9119,0.0,7800.0,LineType_11,0.008333,380.0,0.083333, +d2b16935-dcd7-44d2-8623-cec4c703ccdc,17.2159,0.0,10400.0,LineType_12,0.00625,380.0,0.0625, +a490c96e-6e90-485a-b0d7-adeb81fa09cd,4.30398,0.0,2600.0,LineType_2,0.025,220.0,0.25, +5272bcbc-7d0e-4759-85fa-27943fd8d19c,2.15199,0.0,1300.0,LineType_3,0.05,220.0,0.5, +dd0bac07-de8d-4608-af36-b8ff2819f55a,7.22566,0.0,2600.0,LineType_5,0.04,220.0,0.16, +64c1dcb5-57a5-4f35-b2bf-9ae4e6cc4943,1.80642,0.0,650.0,LineType_7,0.16,220.0,0.64, +bdc83a85-c796-4bcb-8b79-8988dc2804f8,5.41925,0.0,1950.0,LineType_8,0.053333,220.0,0.213333, +3d75fb6b-f0be-4451-ab4c-7f00c0ebd619,2.8274,0.0,680.0,Al/St_265/35,0.1095,110.0,0.296, +f5dcaf44-7a9a-4b85-89ba-5c15c04c5766,3.45575,0.0,105.0,15-AL1/3-ST1A 20.0,1.8769,20.0,0.409, +9cbf484b-7256-4e7a-9c35-3e1049909aa0,3.53429,0.0,140.0,24-AL1/4-ST1A 20.0,1.2012,20.0,0.394, +5b542a50-b0c2-4497-ba90-b2b31aafaa0b,2.87456,0.0,170.0,34-AL1/6-ST1A 20.0,0.8342,20.0,0.382, +d594cd67-4459-44bc-9594-db710372db71,2.98451,0.0,210.0,48-AL1/8-ST1A 20.0,0.5939,20.0,0.372, +305e60ad-cfd2-4127-9d83-8d9b21942d93,3.04734,0.0,290.0,70-AL1/11-ST1A 20.0,0.4132,20.0,0.36, +cc59abd4-770b-45d2-98c8-919c91f1ca4b,58.7478,0.0,652.0,1x630_RM/50,0.122,110.0,0.122522, +82ea1b98-2b21-48bd-841a-8d17d8ac20c9,59.3761,0.0,158.0,NA2XS2Y 1x50 RM/25 12/20 kV,0.64,20.0,0.145, +4adef9e6-5e40-416d-8bd2-b6768d156c54,59.6903,0.0,220.0,NA2XS2Y 1x70 RM/25 12/20 kV,0.443,20.0,0.132, +d5c03484-59c2-44d5-a2ee-63a5a0d623b4,67.8584,0.0,252.0,NA2XS2Y 1x95 RM/25 12/20 kV,0.313,20.0,0.132, +9c13909d-1dd1-4e2d-980b-55345bdf0fd0,72.2566,0.0,283.0,NA2XS2Y 1x120 RM/25 12/20 kV,0.253,20.0,0.119, +36243493-eb31-4e81-bd13-b54ef59c4cbe,78.5398,0.0,319.0,NA2XS2Y 1x150 RM/25 12/20 kV,0.206,20.0,0.116, +437689f8-366d-4b04-b42d-d7a754db074b,85.7655,0.0,362.0,NA2XS2Y 1x185 RM/25 12/20 kV,0.161,20.0,0.117, +b459115d-d4eb-47d4-b7ec-625339ee0dcc,95.5044,0.0,421.0,NA2XS2Y 1x240 RM/25 12/20 kV,0.122,20.0,0.112, +9aed5818-c037-4033-8d15-806c62d70b8f,113.097,0.0,315.0,NA2XS2Y 1x150 RM/25 6/10 kV,0.206,10.0,0.11, +60d37bc7-157a-4c32-b1b5-e74c10d70531,127.549,0.0,358.0,NA2XS2Y 1x185 RM/25 6/10 kV,0.161,10.0,0.11, +a3ced617-2ffd-4593-b8e9-bcad9a521aab,143.257,0.0,416.0,NA2XS2Y 1x240 RM/25 6/10 kV,0.122,10.0,0.105, +f0484bb6-9d0d-4d13-bfbe-b83783b8352a,150.796,0.0,471.0,NA2XS2Y 1x300 RM/25 6/10 kV,0.1,10.0,0.0974, +6b223bc3-69e2-4eb8-a2c0-76be1cd2c998,169.646,0.0,535.0,NA2XS2Y 1x400 RM/25 6/10 kV,0.078,10.0,0.0942, +65181464-230a-487b-978f-81e406e9eb22,260.752,0.0,270.0,NAYY 4x150SE 0.6/1kV,0.2067,0.4,0.0804248, +1200d9eb-6d10-47f3-8543-abea43b128d3,273.319,0.0,357.0,NAYY 4x240SE 0.6/1kV,0.1267,0.4,0.0797965, diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactoryTest.groovy index 267dde925..dfda4eb67 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactoryTest.groovy @@ -28,14 +28,15 @@ class LineTypeInputFactoryTest extends Specification implements FactoryTestHelpe given: "a system participant input type factory and model data" def typeInputFactory = new LineTypeInputFactory() Map parameter = [ - "uuid": "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7", - "id": "blablub", - "b": "3", - "g": "4", - "r": "5", - "x": "6", - "imax": "7", - "vrated": "8" + "uuid": "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7", + "id": "blablub", + "b": "3", + "g": "4", + "r": "5", + "x": "6", + "imax": "7", + "vrated": "8", + "cabletype": "", ] def typeInputClass = LineTypeInput @@ -54,6 +55,7 @@ class LineTypeInputFactoryTest extends Specification implements FactoryTestHelpe x == getQuant(parameter["x"], StandardUnits.REACTANCE_PER_LENGTH) iMax == getQuant(parameter["imax"], StandardUnits.ELECTRIC_CURRENT_MAGNITUDE) vRated == getQuant(parameter["vrated"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) + !cableType.present } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/processor/ProcessorProviderTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/processor/ProcessorProviderTest.groovy index 92335ad81..493aa4bc5 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/processor/ProcessorProviderTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/processor/ProcessorProviderTest.groovy @@ -16,6 +16,7 @@ import edu.ie3.datamodel.models.input.connector.LineInput import edu.ie3.datamodel.models.input.connector.SwitchInput import edu.ie3.datamodel.models.input.connector.Transformer2WInput import edu.ie3.datamodel.models.input.connector.Transformer3WInput +import edu.ie3.datamodel.models.input.connector.type.CableTypeInput import edu.ie3.datamodel.models.input.connector.type.LineTypeInput import edu.ie3.datamodel.models.input.connector.type.Transformer2WTypeInput import edu.ie3.datamodel.models.input.connector.type.Transformer3WTypeInput @@ -97,6 +98,7 @@ class ProcessorProviderTest extends Specification implements TimeSeriesTestData AcTypeInput, HpTypeInput, LineTypeInput, + CableTypeInput, Transformer2WTypeInput, Transformer3WTypeInput, StorageTypeInput, diff --git a/src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy index 39c0cbd3c..e15752577 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy @@ -17,6 +17,7 @@ import edu.ie3.datamodel.models.input.connector.LineInput import edu.ie3.datamodel.models.input.connector.SwitchInput import edu.ie3.datamodel.models.input.connector.Transformer2WInput import edu.ie3.datamodel.models.input.connector.Transformer3WInput +import edu.ie3.datamodel.models.input.connector.type.CableTypeInput import edu.ie3.datamodel.models.input.connector.type.LineTypeInput import edu.ie3.datamodel.models.input.connector.type.Transformer2WTypeInput import edu.ie3.datamodel.models.input.connector.type.Transformer3WTypeInput @@ -403,14 +404,49 @@ class InputEntityProcessorTest extends Specification { InputEntityProcessor processor = new InputEntityProcessor(LineTypeInput) LineTypeInput type = GridTestData.lineTypeInputCtoD Map expected = [ - "uuid" : "3bed3eb3-9790-4874-89b5-a5434d408088", - "id" : "lineType_AtoB", - "b" : "0.00322", - "g" : "0.0", - "r" : "0.437", - "x" : "0.356", - "iMax" : "300.0", - "vRated": "20.0" + "uuid" : "3bed3eb3-9790-4874-89b5-a5434d408088", + "id" : "lineType_AtoB", + "b" : "0.00322", + "g" : "0.0", + "r" : "0.437", + "x" : "0.356", + "iMax" : "300.0", + "vRated" : "20.0", + "cableType" : "", + ] + + when: + Map actual = processor.handleEntity(type) + + then: + actual == expected + } + + + + def "The InputEntityProcessor should serialize a provided CableType correctly"() { + given: + InputEntityProcessor processor = new InputEntityProcessor(CableTypeInput) + CableTypeInput type = GridTestData.cableTypeInput + + Map expected = [ + "uuid" : "994dcc32-d6ec-4d0f-9941-7c25be942aa6", + "id" : "test cable type input", + "coreNumber" : "1", + "limitTemperature" : "90.0", + "frequency" : "50.0", + "skinEffectCoefficient" : "1.0", + "proximityEffectCoefficient": "1.0", + "electricalCapacitance" : "3.5E-7", + "tanDelta" : "0.1", + "circulatingLossFactor" : "0.0", + "eddyCurrentLossFactor" : "0.0", + "armor" : "[]", + "filler" : "[]", + "jack" : "[]", + "screen" : "", + "conductor" : '{"uuid":"' + type.getConductor().uuid() + '","name":"coductor","material":"COPPER","crossSection":"4.0E-4","diameter":"0.0225","isCompacted":false,"thermalResistivity":"0.0026041667","thermalCapacitance":"3449600.0","area":null,"additionalInformation":{}}', + "isolation" : '[{"uuid":"' + type.getIsolation().get(0).uuid() + '","name":"Main insulation","material":"XLPE","innerDiameter":"0.0225","outerDiameter":"0.027","thermalResistivity":"3.5","thermalCapacitance":"2.4","area":null,"additionalInformation":{}}]' ] when: diff --git a/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy index e181d90c1..6f294fd43 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/sink/CsvFileSinkTest.groovy @@ -22,6 +22,7 @@ import edu.ie3.datamodel.models.input.NodeInput import edu.ie3.datamodel.models.input.OperatorInput import edu.ie3.datamodel.models.input.connector.LineInput import edu.ie3.datamodel.models.input.connector.Transformer2WInput +import edu.ie3.datamodel.models.input.connector.type.CableTypeInput import edu.ie3.datamodel.models.input.connector.type.LineTypeInput import edu.ie3.datamodel.models.input.connector.type.Transformer2WTypeInput import edu.ie3.datamodel.models.input.system.EvcsInput @@ -127,6 +128,7 @@ class CsvFileSinkTest extends Specification implements TimeSeriesTestData { new InputEntityProcessor(LineInput), new InputEntityProcessor(ThermalBusInput), new InputEntityProcessor(LineTypeInput), + new InputEntityProcessor(CableTypeInput), new InputEntityProcessor(LoadInput), new InputEntityProcessor(EmInput) ], [] as Map), @@ -339,6 +341,7 @@ class CsvFileSinkTest extends Specification implements TimeSeriesTestData { then: testBaseFolderPath.resolve("line_input.csv").toFile().exists() testBaseFolderPath.resolve("line_type_input.csv").toFile().exists() + testBaseFolderPath.resolve("cable_type_input.csv").toFile().exists() testBaseFolderPath.resolve("load_input.csv").toFile().exists() testBaseFolderPath.resolve("node_input.csv").toFile().exists() testBaseFolderPath.resolve("operator_input.csv").toFile().exists() diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/container/JointGridContainerTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/container/JointGridContainerTest.groovy index 7e6f1a2e5..023055077 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/container/JointGridContainerTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/container/JointGridContainerTest.groovy @@ -6,6 +6,7 @@ package edu.ie3.datamodel.models.input.container import static edu.ie3.test.common.EnergyManagementTestData.emptyEnergyManagementUnits +import static edu.ie3.test.common.RawGridTypesTestData.emptyRawGridTypes import static edu.ie3.test.common.SystemParticipantTestData.emptySystemParticipants import edu.ie3.test.common.EnergyManagementTestData @@ -26,7 +27,7 @@ class JointGridContainerTest extends Specification { def "A single subgrid can be used to build a JointGridContainer"() { when: - def jointGridContainer = new JointGridContainer(GRID_NAME, RAW_GRID, emptySystemParticipants, emptyEnergyManagementUnits) + def jointGridContainer = new JointGridContainer(GRID_NAME, RAW_GRID, emptySystemParticipants, emptyEnergyManagementUnits, emptyRawGridTypes) then: noExceptionThrown() @@ -35,10 +36,11 @@ class JointGridContainerTest extends Specification { def "A JointGridContainer's copy method should work as expected"() { given: - def jointGridContainer = new JointGridContainer(GRID_NAME, RAW_GRID, emptySystemParticipants, emptyEnergyManagementUnits) + def jointGridContainer = new JointGridContainer(GRID_NAME, RAW_GRID, emptySystemParticipants, emptyEnergyManagementUnits, emptyRawGridTypes) def rawGrid = new RawGridElements(List.of(GridTestData.lineAtoB, GridTestData.transformerAtoBtoC)) def systemParticipants = new SystemParticipants(List.of(SystemParticipantTestData.bmInput)) def emUnits = new EnergyManagementUnits(Set.of(EnergyManagementTestData.emInput)) + def rawGridTypes = new RawGridTypes(List.of(GridTestData.lineTypeInputCtoD)) when: def modifiedJointGridContainer = jointGridContainer.copy() @@ -46,6 +48,7 @@ class JointGridContainerTest extends Specification { .rawGrid(rawGrid) .systemParticipants(systemParticipants) .emUnits(emUnits) + .rawGridTypes(rawGridTypes) .build() then: @@ -53,5 +56,6 @@ class JointGridContainerTest extends Specification { modifiedJointGridContainer.rawGrid == rawGrid modifiedJointGridContainer.systemParticipants == systemParticipants modifiedJointGridContainer.emUnits == emUnits + modifiedJointGridContainer.rawGridTypes == rawGridTypes } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/typeInput/LineTypeInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/typeInput/LineTypeInputTest.groovy index 3fed9d536..dbea0cf6b 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/typeInput/LineTypeInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/typeInput/LineTypeInputTest.groovy @@ -41,4 +41,35 @@ class LineTypeInputTest extends Specification { vRated == Quantities.getQuantity(30d, Units.VOLT) } } + def "A LineTypeInput copy method should work as expected also for optional parameter"(){ + given: + + def lineTypeInput = GridTestData.lineTypeInputCtoD + def cableTypeInput = GridTestData.cableTypeInput + + when: + def alteredUnit = lineTypeInput.copy() + .id("lineTypeInput_copy") + .b(Quantities.getQuantity(0.1d, PowerSystemUnits.MICRO_SIEMENS_PER_KILOMETRE)) + .g(Quantities.getQuantity(0.1d, PowerSystemUnits.MICRO_SIEMENS_PER_KILOMETRE)) + .r(Quantities.getQuantity(0.5d, PowerSystemUnits.OHM_PER_KILOMETRE)) + .x(Quantities.getQuantity(0.4d, PowerSystemUnits.OHM_PER_KILOMETRE)) + .iMax(Quantities.getQuantity(310d, Units.AMPERE)) + .vRated(Quantities.getQuantity(30d, Units.VOLT)) + .cableType(Optional.of(cableTypeInput)) + .build() + + then: + alteredUnit.with { + uuid == lineTypeInput.uuid + id == "lineTypeInput_copy" + b == Quantities.getQuantity(0.1d, PowerSystemUnits.MICRO_SIEMENS_PER_KILOMETRE) + g == Quantities.getQuantity(0.1d, PowerSystemUnits.MICRO_SIEMENS_PER_KILOMETRE) + r == Quantities.getQuantity(0.5d, PowerSystemUnits.OHM_PER_KILOMETRE) + x == Quantities.getQuantity(0.4d, PowerSystemUnits.OHM_PER_KILOMETRE) + iMax == Quantities.getQuantity(310d, Units.AMPERE) + vRated == Quantities.getQuantity(30d, Units.VOLT) + cableType == Optional.of(cableTypeInput) + } + } } diff --git a/src/test/groovy/edu/ie3/datamodel/utils/ContainerUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/ContainerUtilsTest.groovy index a6b2f955c..1d3d1785c 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/ContainerUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/ContainerUtilsTest.groovy @@ -295,6 +295,7 @@ class ContainerUtilsTest extends Specification { RawGridElements rawGrid = ComplexTopology.grid.rawGrid SystemParticipants systemParticipants = ComplexTopology.grid.systemParticipants EnergyManagementUnits energyManagementUnits = ComplexTopology.grid.emUnits + RawGridTypes rawGridTypes = ComplexTopology.grid.rawGridTypes HashMap expectedSubGrids = ComplexTopology.expectedSubGrids @@ -304,7 +305,8 @@ class ContainerUtilsTest extends Specification { subNetNumbers, rawGrid, systemParticipants, - energyManagementUnits) + energyManagementUnits, + rawGridTypes) then: actual.size() == 6 @@ -324,6 +326,7 @@ class ContainerUtilsTest extends Specification { RawGridElements rawGridInput= ComplexTopology.grid.rawGrid SystemParticipants systemParticipantsInput = ComplexTopology.grid.systemParticipants EnergyManagementUnits energyManagementUnits = ComplexTopology.grid.emUnits + RawGridTypes rawGridTypes = ComplexTopology.grid.rawGridTypes HashMap unmodifiedSubGrids = ComplexTopology.expectedSubGrids @@ -332,7 +335,8 @@ class ContainerUtilsTest extends Specification { subNetNumbers, rawGridInput, systemParticipantsInput, - energyManagementUnits) + energyManagementUnits, + rawGridTypes) when: def computableSubgrids = subgrids.collectEntries {[(it.key): ContainerUtils.withTrafoNodeAsSlack(it.value)]} as HashMap @@ -387,12 +391,15 @@ class ContainerUtilsTest extends Specification { RawGridElements rawGrid = ComplexTopology.grid.rawGrid SystemParticipants systemParticipants = ComplexTopology.grid.systemParticipants EnergyManagementUnits energyManagementUnits = ComplexTopology.grid.emUnits + RawGridTypes rawGridTypes = ComplexTopology.grid.rawGridTypes + Map subgrids = ContainerUtils.buildSubGridContainers( gridName, subNetNumbers, rawGrid, systemParticipants, - energyManagementUnits) + energyManagementUnits, + rawGridTypes) SubGridTopologyGraph expectedSubGridTopology = ComplexTopology.expectedSubGridTopology when: @@ -410,6 +417,7 @@ class ContainerUtilsTest extends Specification { RawGridElements rawGrid = ComplexTopology.grid.rawGrid SystemParticipants systemParticpants = ComplexTopology.grid.systemParticipants EnergyManagementUnits energyManagementUnits = ComplexTopology.grid.emUnits + RawGridTypes rawGridTypes = ComplexTopology.grid.rawGridTypes SubGridTopologyGraph expectedSubGridTopology = ComplexTopology.expectedSubGridTopology when: @@ -417,7 +425,8 @@ class ContainerUtilsTest extends Specification { gridName, rawGrid, systemParticpants, - energyManagementUnits) + energyManagementUnits, + rawGridTypes) then: actual == expectedSubGridTopology diff --git a/src/test/groovy/edu/ie3/datamodel/utils/validation/ValidationUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/validation/ValidationUtilsTest.groovy index 051b8b405..98389ad7a 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/validation/ValidationUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/validation/ValidationUtilsTest.groovy @@ -84,7 +84,7 @@ class ValidationUtilsTest extends Specification { then: InvalidEntityException ex = thrown() - ex.message == "Entity is invalid because of: The following quantities have to be positive: b=-1 µS/km [LineTypeInput{uuid=3bed3eb3-9790-4874-89b5-a5434d408088, id=lineType_AtoB, b=-1 µS/km, g=0 µS/km, r=0.437 Ω/km, x=0.356 Ω/km, iMax=300 A, vRated=20 kV, additionalInformation={}}]" + ex.message == "Entity is invalid because of: The following quantities have to be positive: b=-1 µS/km [LineTypeInput{uuid=3bed3eb3-9790-4874-89b5-a5434d408088, id=lineType_AtoB, b=-1 µS/km, g=0 µS/km, r=0.437 Ω/km, x=0.356 Ω/km, iMax=300 A, vRated=20 kV, cableType=Optional.empty, additionalInformation={}}]" } def "The check for zero or negative entities should work as expected"() { @@ -121,7 +121,7 @@ class ValidationUtilsTest extends Specification { then: InvalidEntityException ex = thrown() - ex.message == "Entity is invalid because of: The following quantities have to be positive: b=0 µS/km [LineTypeInput{uuid=3bed3eb3-9790-4874-89b5-a5434d408088, id=lineType_AtoB, b=0 µS/km, g=0 µS/km, r=0.437 Ω/km, x=0.356 Ω/km, iMax=300 A, vRated=20 kV, additionalInformation={}}]" + ex.message == "Entity is invalid because of: The following quantities have to be positive: b=0 µS/km [LineTypeInput{uuid=3bed3eb3-9790-4874-89b5-a5434d408088, id=lineType_AtoB, b=0 µS/km, g=0 µS/km, r=0.437 Ω/km, x=0.356 Ω/km, iMax=300 A, vRated=20 kV, cableType=Optional.empty, additionalInformation={}}]" } def "Checking an asset type input without an id leads to an exception"() { diff --git a/src/test/groovy/edu/ie3/test/common/ComplexTopology.groovy b/src/test/groovy/edu/ie3/test/common/ComplexTopology.groovy index 1a7173c10..b2228108a 100644 --- a/src/test/groovy/edu/ie3/test/common/ComplexTopology.groovy +++ b/src/test/groovy/edu/ie3/test/common/ComplexTopology.groovy @@ -6,6 +6,7 @@ package edu.ie3.test.common import static edu.ie3.test.common.EnergyManagementTestData.emptyEnergyManagementUnits +import static edu.ie3.test.common.RawGridTypesTestData.emptyRawGridTypes import static edu.ie3.test.common.SystemParticipantTestData.emptySystemParticipants import edu.ie3.datamodel.graph.SubGridGate @@ -45,7 +46,8 @@ class ComplexTopology extends GridTestData { gridName, rawGrid, emptySystemParticipants, - emptyEnergyManagementUnits) + emptyEnergyManagementUnits, + emptyRawGridTypes) public static final HashMap expectedSubGrids = new HashMap<>() @@ -63,7 +65,8 @@ class ComplexTopology extends GridTestData { [] as Set, [] as Set), emptySystemParticipants, - emptyEnergyManagementUnits + emptyEnergyManagementUnits, + emptyRawGridTypes, ) ) expectedSubGrids.put(2, new SubGridContainer( @@ -77,7 +80,8 @@ class ComplexTopology extends GridTestData { [] as Set, [] as Set), emptySystemParticipants, - emptyEnergyManagementUnits + emptyEnergyManagementUnits, + emptyRawGridTypes, ) ) expectedSubGrids.put(3, new SubGridContainer( @@ -91,7 +95,8 @@ class ComplexTopology extends GridTestData { [] as Set, [] as Set), emptySystemParticipants, - emptyEnergyManagementUnits + emptyEnergyManagementUnits, + emptyRawGridTypes, ) ) expectedSubGrids.put(4, new SubGridContainer( @@ -105,7 +110,8 @@ class ComplexTopology extends GridTestData { [] as Set, [] as Set), emptySystemParticipants, - emptyEnergyManagementUnits + emptyEnergyManagementUnits, + emptyRawGridTypes, ) ) expectedSubGrids.put(5, new SubGridContainer( @@ -122,7 +128,8 @@ class ComplexTopology extends GridTestData { [] as Set, [] as Set), emptySystemParticipants, - emptyEnergyManagementUnits + emptyEnergyManagementUnits, + emptyRawGridTypes, ) ) expectedSubGrids.put(6, new SubGridContainer( @@ -139,7 +146,8 @@ class ComplexTopology extends GridTestData { [] as Set, [] as Set), emptySystemParticipants, - emptyEnergyManagementUnits + emptyEnergyManagementUnits, + emptyRawGridTypes, ) ) diff --git a/src/test/groovy/edu/ie3/test/common/EnergyManagementTestData.groovy b/src/test/groovy/edu/ie3/test/common/EnergyManagementTestData.groovy index 832387557..1e7b950a6 100644 --- a/src/test/groovy/edu/ie3/test/common/EnergyManagementTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/EnergyManagementTestData.groovy @@ -7,6 +7,7 @@ package edu.ie3.test.common import edu.ie3.datamodel.models.input.EmInput import edu.ie3.datamodel.models.input.container.EnergyManagementUnits +import edu.ie3.datamodel.models.input.container.RawGridTypes class EnergyManagementTestData { public static final String emControlStrategy = "PRIORITIZED" diff --git a/src/test/groovy/edu/ie3/test/common/GridTestData.groovy b/src/test/groovy/edu/ie3/test/common/GridTestData.groovy index 29f50c512..6d1788fb3 100644 --- a/src/test/groovy/edu/ie3/test/common/GridTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/GridTestData.groovy @@ -17,6 +17,10 @@ import edu.ie3.datamodel.models.input.connector.LineInput import edu.ie3.datamodel.models.input.connector.SwitchInput import edu.ie3.datamodel.models.input.connector.Transformer2WInput import edu.ie3.datamodel.models.input.connector.Transformer3WInput +import edu.ie3.datamodel.models.input.connector.type.CableMaterial +import edu.ie3.datamodel.models.input.connector.type.CableTypeInput +import edu.ie3.datamodel.models.input.connector.type.ConductorInput +import edu.ie3.datamodel.models.input.connector.type.LayerInput import edu.ie3.datamodel.models.input.connector.type.LineTypeInput import edu.ie3.datamodel.models.input.connector.type.Transformer2WTypeInput import edu.ie3.datamodel.models.input.connector.type.Transformer3WTypeInput @@ -27,6 +31,7 @@ import org.locationtech.jts.geom.LineString import org.locationtech.jts.geom.Point import org.locationtech.jts.io.geojson.GeoJsonReader import tech.units.indriya.quantity.Quantities +import tech.units.indriya.unit.Units /** * This class contains a collection of different model instances that can be used for testing purposes. @@ -308,10 +313,47 @@ class GridTestData { Quantities.getQuantity(0.437d, OHM_PER_KILOMETRE), Quantities.getQuantity(0.356d, OHM_PER_KILOMETRE), Quantities.getQuantity(300d, ELECTRIC_CURRENT_MAGNITUDE), - Quantities.getQuantity(20d, RATED_VOLTAGE_MAGNITUDE) - + Quantities.getQuantity(20d, RATED_VOLTAGE_MAGNITUDE), + Optional.empty(), ) + public static final CableTypeInput cableTypeInput = new CableTypeInput( + UUID.fromString("994dcc32-d6ec-4d0f-9941-7c25be942aa6"), + "test cable type input", + 1, + new ConductorInput( + UUID.randomUUID(), + "coductor", + CableMaterial.COPPER, + Quantities.getQuantity(400.0e-6, Units.SQUARE_METRE), + Quantities.getQuantity(0.0225, Units.METRE), + false, + Quantities.getQuantity(1.0 / 384.0, (Units.KELVIN * Units.METRE).divide(Units.WATT)), + Quantities.getQuantity( + 3449600.0, Units.JOULE.divide(Units.CUBIC_METRE * Units.KELVIN)), + Optional.empty()), + List.of(new LayerInput( + UUID.randomUUID(), + "Main insulation", + CableMaterial.XLPE, + Quantities.getQuantity(0.0225, Units.METRE), + Quantities.getQuantity(0.027, Units.METRE), + Quantities.getQuantity(3.5, (Units.KELVIN * Units.METRE).divide(Units.WATT)), + Quantities.getQuantity(2.4, Units.JOULE.divide(Units.CUBIC_METRE * Units.KELVIN)), + Optional.empty())), + Optional.empty(), + new ArrayList<>(), + new ArrayList<>(), + new ArrayList<>(), + Quantities.getQuantity(90.0, Units.CELSIUS), + Quantities.getQuantity(50.0, Units.HERTZ), + 1.0, + 1.0, + Quantities.getQuantity(350e-9, Units.FARAD), + 0.1, + 0.0, + 0.0) + public static final LineInput lineCtoD = new LineInput( UUID.fromString("91ec3bcf-1777-4d38-af67-0bf7c9fa73c7"), "test_line_CtoD", diff --git a/src/test/groovy/edu/ie3/test/common/RawGridTypesTestData.groovy b/src/test/groovy/edu/ie3/test/common/RawGridTypesTestData.groovy new file mode 100644 index 000000000..303e4c358 --- /dev/null +++ b/src/test/groovy/edu/ie3/test/common/RawGridTypesTestData.groovy @@ -0,0 +1,13 @@ +/* + * © 2023. TU Dortmund University, + * Institute of Energy Systems, Energy Efficiency and Energy Economics, + * Research group Distribution grid planning and operation + */ +package edu.ie3.test.common + +import edu.ie3.datamodel.models.input.container.RawGridTypes + +class RawGridTypesTestData { + public static RawGridTypes emptyRawGridTypes = + new RawGridTypes([] as List) +} diff --git a/src/test/groovy/edu/ie3/test/common/SampleJointGrid.groovy b/src/test/groovy/edu/ie3/test/common/SampleJointGrid.groovy index 3dfc13ad4..b39cbbe26 100644 --- a/src/test/groovy/edu/ie3/test/common/SampleJointGrid.groovy +++ b/src/test/groovy/edu/ie3/test/common/SampleJointGrid.groovy @@ -13,11 +13,16 @@ import edu.ie3.datamodel.models.input.NodeInput import edu.ie3.datamodel.models.input.OperatorInput import edu.ie3.datamodel.models.input.connector.LineInput import edu.ie3.datamodel.models.input.connector.Transformer2WInput +import edu.ie3.datamodel.models.input.connector.type.CableMaterial +import edu.ie3.datamodel.models.input.connector.type.CableTypeInput +import edu.ie3.datamodel.models.input.connector.type.ConductorInput +import edu.ie3.datamodel.models.input.connector.type.LayerInput import edu.ie3.datamodel.models.input.connector.type.LineTypeInput import edu.ie3.datamodel.models.input.connector.type.Transformer2WTypeInput import edu.ie3.datamodel.models.input.container.EnergyManagementUnits import edu.ie3.datamodel.models.input.container.JointGridContainer import edu.ie3.datamodel.models.input.container.RawGridElements +import edu.ie3.datamodel.models.input.container.RawGridTypes import edu.ie3.datamodel.models.input.container.SystemParticipants import edu.ie3.datamodel.models.input.system.LoadInput import edu.ie3.datamodel.models.input.system.PvInput @@ -35,19 +40,19 @@ import java.util.stream.Collectors /** * //ToDo: Class Description * - * @version 0.1* @since 08.06.20 */ class SampleJointGrid extends SystemParticipantTestData { static JointGridContainer grid() throws ParseException, ParsingException { RawGridElements rawGridElements = jointSampleRawGridElements() - + RawGridTypes rawGridTypes = jointSampleRawGridTypes() return new JointGridContainer( "sampleGrid", rawGridElements, systemParticipants(rawGridElements), - new EnergyManagementUnits(Collections.singleton(emInput))) + new EnergyManagementUnits(Collections.singleton(emInput)), + rawGridTypes) } private static SystemParticipants systemParticipants(RawGridElements rawGridElements) @@ -146,6 +151,54 @@ class SampleJointGrid extends SystemParticipantTestData { Collections.emptySet()) } + + public static final CableTypeInput cableTypeInput = new CableTypeInput( + UUID.fromString("a93fcf78-f9ff-41e6-a90f-ae08679d8fd8"), + "test cable type input", + 1, + new ConductorInput( + UUID.randomUUID(), + "conductor", + CableMaterial.COPPER, + Quantities.getQuantity(400.0e-6, SQUARE_METRE), + Quantities.getQuantity(0.0225, METRE), + false, + Quantities.getQuantity(1.0 / 384.0, (KELVIN * METRE).divide(WATT)), + Quantities.getQuantity( + 3449600.0, JOULE.divide(CUBIC_METRE * KELVIN)), + Optional.empty()), + List.of(new LayerInput( + UUID.randomUUID(), + "Main insulation", + CableMaterial.XLPE, + Quantities.getQuantity(0.0225, METRE), + Quantities.getQuantity(0.027, METRE), + Quantities.getQuantity(3.5, (KELVIN * METRE).divide(WATT)), + Quantities.getQuantity(2.4, JOULE.divide(CUBIC_METRE * KELVIN)), + Optional.empty())), + Optional.empty(), + new ArrayList<>(), + new ArrayList<>(), + new ArrayList<>(), + Quantities.getQuantity(90.0, CELSIUS), + Quantities.getQuantity(50.0, HERTZ), + 1.0, + 1.0, + Quantities.getQuantity(350e-9, FARAD), + 0.1, + 0.0, + 0.0) + + private static RawGridTypes jointSampleRawGridTypes() throws ParseException { + + return new RawGridTypes( + Set.of(mv_lineType,lv_lineType), + Set.of(cableTypeInput), + Set.of(transformerType_MV_HV_110KV, transformerType_LV_MV_10KV), + Collections.emptySet(), + ) + } + private static final GeoJsonReader geoJsonReader = new GeoJsonReader() // LV diff --git a/src/test/resources/edu/ie3/datamodel/io/sink/_sql/types.sql b/src/test/resources/edu/ie3/datamodel/io/sink/_sql/types.sql index 03efd5342..9863f8c89 100644 --- a/src/test/resources/edu/ie3/datamodel/io/sink/_sql/types.sql +++ b/src/test/resources/edu/ie3/datamodel/io/sink/_sql/types.sql @@ -1,37 +1,59 @@ -CREATE TABLE public.transformer_2_w_type_input +CREATE TABLE public.cable_type_input ( uuid UUID PRIMARY KEY, - b_m DOUBLE PRECISION NOT NULL, - d_phi DOUBLE PRECISION NOT NULL, - d_v DOUBLE PRECISION NOT NULL, - g_m DOUBLE PRECISION NOT NULL, - id TEXT NOT NULL, - r_sc DOUBLE PRECISION NOT NULL, - s_rated DOUBLE PRECISION NOT NULL, - tap_max INT NOT NULL, - tap_min INT NOT NULL, - tap_neutr INT NOT NULL, - tap_side BOOL NOT NULL, - v_rated_a DOUBLE PRECISION NOT NULL, - v_rated_b DOUBLE PRECISION NOT NULL, - x_sc DOUBLE PRECISION NOT NULL, - grid_uuid UUID NOT NULL REFERENCES grids(uuid) -) - WITHOUT OIDS + id varchar NOT NULL, + core_number int NOT NULL, + conductor jsonb NOT NULL, + isolation jsonb NOT NULL, + screen jsonb, + filler jsonb NOT NULL, + armor jsonb NOT NULL, + jack jsonb NOT NULL, + limit_temperature double precision NOT NULL, + frequency double precision NOT NULL, + skin_effect_coefficient double precision NOT NULL, + proximity_effect_coefficient double precision NOT NULL, + electrical_capacitance double precision NOT NULL, + tan_delta double precision NOT NULL, + circulating_loss_factor double precision NOT NULL, + eddy_current_loss_factor double precision NOT NULL +) WITHOUT OIDS TABLESPACE pg_default; +CREATE INDEX idx_cable_type_conductor_material ON public.cable_type_input USING gin ((conductor->'material')); +CREATE INDEX idx_cable_type_id ON public.cable_type_input (id); CREATE TABLE public.line_type_input ( uuid UUID PRIMARY KEY, - b DOUBLE PRECISION NOT NULL, - g DOUBLE PRECISION NOT NULL, - i_max DOUBLE PRECISION NOT NULL, - id TEXT NOT NULL, - r DOUBLE PRECISION NOT NULL, - v_rated DOUBLE PRECISION NOT NULL, - x DOUBLE PRECISION NOT NULL, + id varchar NOT NULL, + v_rated double precision NOT NULL, + i_max double precision NOT NULL, + r double precision NOT NULL, + x double precision NOT NULL, + b double precision NOT NULL, + g double precision NOT NULL, + cable_type UUID REFERENCES public.cable_type_input(uuid) +) + WITHOUT OIDS + TABLESPACE pg_default; - grid_uuid UUID NOT NULL REFERENCES grids(uuid) +CREATE TABLE public.transformer_2_w_type_input +( + uuid UUID PRIMARY KEY, + id varchar NOT NULL, + s_rated double precision NOT NULL, + r_sc double precision NOT NULL, + x_sc double precision NOT NULL, + b_m double precision NOT NULL, + g_m double precision NOT NULL, + d_phi double precision NOT NULL, + d_v double precision NOT NULL, + tap_max int NOT NULL, + tap_min int NOT NULL, + tap_neutr int NOT NULL, + tap_side bool NOT NULL, + v_rated_a double precision NOT NULL, + v_rated_b double precision NOT NULL ) WITHOUT OIDS TABLESPACE pg_default; @@ -39,16 +61,15 @@ CREATE TABLE public.line_type_input CREATE TABLE public.storage_type_input ( uuid UUID PRIMARY KEY, - active_power_gradient DOUBLE PRECISION NOT NULL, - capex DOUBLE PRECISION NOT NULL, - cos_phi_rated TEXT NOT NULL, - e_storage DOUBLE PRECISION NOT NULL, - eta DOUBLE PRECISION NOT NULL, - id TEXT NOT NULL, - opex DOUBLE PRECISION NOT NULL, - p_max DOUBLE PRECISION NOT NULL, - s_rated DOUBLE PRECISION NOT NULL, - grid_uuid UUID NOT NULL + id varchar NOT NULL, + capex double precision, + opex double precision, + s_rated double precision NOT NULL, + cos_phi_rated double precision NOT NULL, + e_storage double precision NOT NULL, + p_max double precision NOT NULL, + active_power_gradient double precision NOT NULL, + eta double precision NOT NULL ) WITHOUT OIDS TABLESPACE pg_default; diff --git a/src/test/resources/edu/ie3/datamodel/io/source/csv/_joint_grid/cable_type_input.csv b/src/test/resources/edu/ie3/datamodel/io/source/csv/_joint_grid/cable_type_input.csv new file mode 100644 index 000000000..e19a3c2af --- /dev/null +++ b/src/test/resources/edu/ie3/datamodel/io/source/csv/_joint_grid/cable_type_input.csv @@ -0,0 +1,2 @@ +uuid,id,core_number,conductor,isolation,screen,filler,armor,jack,limit_temperature,frequency,skin_effect_coefficient,proximity_effect_coefficient,electrical_capacitance,tan_delta,circulating_loss_factor,eddy_current_loss_factor +b8152c3f-d12f-4857-9746-a30aef6aee08,CigreT880_33kVLandCable,1,"{""name"":""conductor"",""material"":""COPPER"",""crossSection"":""240.0"",""diameter"":""18.4"",""thermalResistivity"":""0.0026"",""thermalCapacitance"":""3.4e6"",""area"":""240.0"",""isCompacted"":false}","[{""name"":""conductorScreen"",""material"":""SEMI_COND_SCREEN"",""innerDiameter"":""18.4"",""outerDiameter"":""19.4"",""thermalResistivity"":""4.0"",""thermalCapacitance"":""2.0e6"",""area"":null},{""name"":""insulation"",""material"":""XLPE"",""innerDiameter"":""19.4"",""outerDiameter"":""34.8"",""thermalResistivity"":""3.5"",""thermalCapacitance"":""2.4e6"",""area"":null},{""name"":""insulationScreen"",""material"":""SEMI_COND_SCREEN"",""innerDiameter"":""34.8"",""outerDiameter"":""35.8"",""thermalResistivity"":""4.0"",""thermalCapacitance"":""2.0e6"",""area"":null},{""name"":""screenTape"",""material"":""SC_TAPE"",""innerDiameter"":""35.8"",""outerDiameter"":""36.8"",""thermalResistivity"":""0.01"",""thermalCapacitance"":""3.0e6"",""area"":null}]","{""name"":""screen"",""material"":""COPPER"",""innerDiameter"":""36.8"",""outerDiameter"":""38.6"",""thermalResistivity"":""0.0026"",""thermalCapacitance"":""3.4e6"",""area"":""35.62566"",""wiresNumber"":56,""wireDiameter"":""0.9"",""electricalResistivity"":""1.7241e-8""}",,,"[{""name"":""jackTape"",""material"":""SC_TAPE"",""innerDiameter"":""38.6"",""outerDiameter"":""39.2"",""thermalResistivity"":""0.01"",""thermalCapacitance"":""3.0e6"",""area"":null},{""name"":""jack"",""material"":""XLPE"",""innerDiameter"":""39.2"",""outerDiameter"":""43.6"",""thermalResistivity"":""3.5"",""thermalCapacitance"":""2.4e6"",""area"":null},{""name"":""outerCover"",""material"":""SEMI_COND_SCREEN"",""innerDiameter"":""43.6"",""outerDiameter"":""44.0"",""thermalResistivity"":""4.0"",""thermalCapacitance"":""2.0e6"",""area"":null}]",90.0,50.0,1.0,1.0,0.000000000237683304,0.004,0.0435122656,0.0 \ No newline at end of file diff --git a/src/test/resources/edu/ie3/datamodel/io/source/csv/_joint_grid/line_type_input.csv b/src/test/resources/edu/ie3/datamodel/io/source/csv/_joint_grid/line_type_input.csv index fd5ffebb0..2a7699dbc 100644 --- a/src/test/resources/edu/ie3/datamodel/io/source/csv/_joint_grid/line_type_input.csv +++ b/src/test/resources/edu/ie3/datamodel/io/source/csv/_joint_grid/line_type_input.csv @@ -1,292 +1,292 @@ -uuid,b,g,i_max,id,r,v_rated,x -c3e20038-888d-4d19-91d0-9732110ff433,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -491312ff-b705-4baf-ad5e-139ca62abd13,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -17e87208-d092-4514-8b23-ab91598798ce,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -000a8091-6782-41a2-aa13-fcf0056989d1,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -7eb50926-f5b2-4fc4-b293-c679eaf19f65,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -6986321a-0a85-411e-8b2d-9d929a7f298b,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -34bcbd39-34fe-4ba4-896b-e123e597985a,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -fe7f2726-e60e-4111-9577-61f332eebf2e,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -d639d54f-19ff-4b56-bf41-206c1736258c,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -3bfb3448-4aa4-4390-88ab-b73e539c336f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -86828e8b-9ff2-4bb6-8a32-f291c397acea,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -af9a3ab2-48e6-4972-b589-8baae5c74fb9,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -f3a219f3-8999-4b77-90b8-7f78b4a884a8,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788 -a246d41e-4ad0-4dbc-9261-99104c22f0d8,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -899d2b91-69bc-46fb-a4bb-0b97c7c8751a,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -f8b900a6-7d3e-41b9-b5c6-48eca9153984,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -d4ff2175-de32-4f24-99ad-ab11517444f9,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -f24aa8ff-676a-4638-a1b4-4c16566079e8,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -bc540add-8fdb-43b8-b98a-7989b11ff268,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -36876e77-ccb6-4cc1-8508-d1728c149a07,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -9d193d4b-29bf-4cf5-9ff0-ab04185a6486,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -184d5283-e90b-4ad1-9a28-51f09df26312,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -71d2059f-ed6c-4cd1-9c3a-28b3409e93bb,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788 -342054c6-c0dc-4b03-b914-6bdc69c17d1b,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -bdcb3549-eb2e-4903-8f0d-cf6a2166c09f,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -f564bbec-720f-4299-b516-e576f02152c8,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -1659f544-bc4d-40d8-a62b-70dd611bfc33,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -e8fb78e6-329b-4968-b748-48d27078347a,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -29ce3d34-1e26-468c-af62-19ff0d0fd70f,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242 -a34786e0-a3f2-4420-8754-9af63551cbf8,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -7482222e-f925-4004-abdd-0b69ef453d8d,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -5287c56e-1a3f-4265-bdf6-bad967e03478,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -fa07a917-4d21-4e0b-abc4-527420509063,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -6fefbb49-0419-447c-9431-657cb0dc29fe,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -f6ac868a-f7c6-48b7-a86e-ede7100859ea,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -235dc9e4-7328-4386-8ca5-ce9c3202210e,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -ca622ca6-25e3-4ddc-9516-99e2376ded1d,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -1173fa67-2573-4476-aa5e-c3fe756a7f07,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -3cde9801-6334-4e0d-8994-6d18b3906a71,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -b3546eb6-8ac0-42c7-b5ee-ad0ba3cdd21a,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788 -2ae4a009-1481-412f-aa25-9d74b23a60ce,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -471b943e-0115-4262-beee-ebaef1503b09,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -7895fb66-d867-4e4a-bab9-ce5165207321,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -29925a58-7664-486a-a503-ab0d994c9e75,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242 -ceb28bd4-0090-4920-bedc-4f66968729dc,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -69cea08f-72d2-4f65-b4b9-ae0a137da20b,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -98d23c1c-fd2a-4257-993f-55663b42200b,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -3b41ea67-4e64-466f-9932-712b23fcf7df,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -5f39d862-cf14-4619-847d-1b77eaa80546,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -0bfe6869-6869-438d-918c-e697955a922f,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242 -c2618b8d-df63-4bc1-8eab-3ce2fd74e183,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -267979b1-af4a-4ae9-a22c-3e0234ce2271,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -64336228-e311-47a6-aa65-4e2883352109,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -8bd8a653-39a7-420d-976d-68d9492601bd,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -7204651a-462e-4a96-ab91-9bec7dbdcb92,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -9f3e546f-f81a-4602-8ceb-4401abceb42e,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -12ccc9e0-9987-4c1c-b176-84574ab2d262,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -1ede9038-2ae8-4794-839d-f60f70d50177,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -6daeb4b5-b137-4ed4-8bac-f6193d5daf33,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -62829e00-c835-4fea-b47a-104d258a5393,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -fbd5c9d9-96b2-4270-a927-c7a604f032f1,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -d03eee1c-0c11-41c4-90a3-2743ab894974,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -6ac4e62e-72ef-4772-8148-58586dd8d461,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -b2edb582-9e3e-4381-8807-75abd1710902,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -0610293b-068b-4851-927b-618da07e6fcf,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -6e3b7cd2-87cb-4155-a5a8-1e7ad6557a47,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -be79605e-39e3-4a53-b27c-33b5b80e8832,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -c940e435-0523-419a-90bc-f3dbf2e463f7,0.0,0.0,1360.0,Freileitung_110kV_2,0.0547,110.0,0.4 -44f95594-319f-47ba-9df2-5d9833e47408,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -cbe6053c-f1fc-46e4-8c47-1291d84083ba,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -f181cb5c-2234-49d5-9e3f-d21f14963074,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -6d1930ba-b144-459f-9a7f-463c0a0f46b4,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -87591389-0527-4fe0-8b33-7800b89a50c6,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -2cbe87fe-c770-4b7b-b1ac-6e52ea35682a,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788 -b42b9195-4953-403f-8e52-55cc8e653c94,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -b8bec046-5587-4a35-a262-233452558bfa,0.0,0.0,800.0,Kabel_110kV_1,0.0283,110.0,0.11 -f2a9246c-1d44-4903-b6a1-f038b786c01b,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -6fab725c-b58a-47eb-957c-9ca99f4558ce,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242 -7286023c-864d-476f-8b54-f23179ed906a,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -89a28eeb-daae-4a0b-bfd5-6c5ba90f7440,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -d3f48b67-8081-41a8-a9ea-2515ef4c70ee,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -5670305b-68cf-4b9a-ab60-ea3bbd57afb4,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -7da1277a-931e-48f2-8d9f-810e49e0b8ec,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -b0640c38-10d2-4f95-aa23-afbd8ad7f21c,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -b859db2f-036d-4697-887f-cb9445bc0814,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -f1974038-6ca4-4c43-8cf9-b9e6988b035c,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -5050a032-62b4-4239-aa13-9672c890e74a,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -9db7e41e-7360-4529-bbdb-dbd220117f61,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -7e6f9030-73ff-4fcb-a384-f71820af1a41,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -4318646d-6b12-411d-9fe1-6151c5106479,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -01b81835-2d2a-4e5c-bf78-cb1e789f2d0f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -e745cdd4-1c30-447f-8694-d3b3d2e01a96,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -a4aab125-8af4-4ef9-8842-4cf718f998bc,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -a61bace6-0050-436a-8715-0e042a8582f6,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -9989a72f-2587-4a15-804e-e81d9af7ee93,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -04e8252c-c3f3-4a4e-a11a-a182e94c382e,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -7445744d-21dd-46ad-805b-1d8b8a470294,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -f265e497-3a6d-4f96-9329-a7644cd8e785,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242 -e0c1129d-75ba-4639-928d-2f43eeabc88e,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -3362b510-7d57-44b1-a6cf-8081aac84a5b,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -0615b7b8-e7ec-4771-9e68-f02948044da2,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -a2f51a3d-5e1e-41cd-8be6-696ac1a12d52,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -ce61ee4b-0244-416f-b3e0-80577b58781c,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -803c298b-61c6-412c-9b60-21cabc5bd945,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -e6b134f3-2f34-4bdb-a353-0de86ef64651,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -ec77a581-8148-4b2c-bb6a-3f7c24ebb93b,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -33e2dfb4-60cd-4b99-b7ac-bc28267e8b9c,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -5c01eba4-8697-4e06-82f0-7ffd7bb43715,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788 -3124880e-a2af-42a1-be47-841a8176e7b6,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -b4dfd39c-38ec-4883-adf7-413c0662694a,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -d5addbe0-2d36-489a-8552-b3a0e66aa5b8,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -8cb6dcdc-c648-4c54-8cda-1df69f317b47,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242 -3d684e78-d7ba-436f-b223-c2f50de8d7ac,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -9987d3ab-2135-4c6d-bb7b-209659ab9356,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -d0f81106-444d-4832-ad0b-a293d719206a,3.0,0.0,550.0,HS_1,0.109999999403954,110.0,0.379999995231628 -fa60cbc7-5599-4409-b866-dc05a5b27235,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -6f8f3927-ac51-4b7d-a23e-8e429949f345,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -970e0436-65e3-48d6-9d9c-1f194f94f02c,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -612f81f3-5f7f-45c7-ad13-f729ef2ee07d,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -d334240a-49ef-430f-8924-3d3104b636ba,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -7513c490-99e4-4d11-983d-3d6bcf8dea93,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -9bcd4dbb-18d3-43af-85e0-e475f6371030,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -5b2b259b-1155-4130-b119-afea37851952,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -5f05acb2-b125-47e1-af39-878997a48981,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242 -ea01036f-5b25-47dd-98e3-0d944fd2e670,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -cb059d73-c67b-41d4-9c49-844c12351e77,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -048a2c36-6fbc-43ec-aa92-3807f7bfec50,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -f66fc57d-f2be-41fd-bc60-d1177b091ac6,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -763854f1-b1c6-44fb-a458-c7878ac026e5,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -8bfec339-14db-48d1-869b-c46b602a5940,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -ce1623cf-68c5-4f91-842a-2845ca7aa0e1,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -744ea833-d481-4583-99e7-4e83728ea176,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -df4aeff9-dacd-4326-9126-58e39f4161f9,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -f5402aea-e1ab-43a3-b65b-a101e7358a6f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -ad9a28fb-b6c5-447f-847f-14480a638bfc,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -1dd89c18-1436-4212-a053-5c6435368da5,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -03627bdf-9d77-44d5-a9c2-9e3109ec8a32,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -c27513a1-3d09-4f03-9fdd-cdf15cb83dfb,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -51eff3e4-bffc-42b0-89d0-5c4756e128ba,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -82bc6482-24eb-42dd-8dc3-e05b86696a22,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -9a3869ee-c4b1-4b3a-89ce-02d79a2cf4ad,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -9ac19e4c-0379-4aaf-a96a-b2e71462abb3,0.0,0.0,800.0,Kabel_110kV_1,0.0283,110.0,0.11 -c130b080-9569-4398-b66f-ee3ac517daca,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788 -3654a929-29a8-4945-80df-5fd5a7ab6218,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -b3cac110-acef-4ec0-9139-3858a4c36acc,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -0417354b-2a35-4499-965d-24b153f98769,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -b63674e1-6827-4e8b-b3e6-34ee6d4823a9,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -90f47116-bd6e-489b-b5c0-8db3ff905d4b,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -80eb9e25-4a5c-49b6-bb57-8fa7cf5dc035,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -0b2b2d0b-0bff-4b57-b505-78d70f9a2d96,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -c1eab793-7cb2-44b1-a309-e6a96e5ee80e,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -f4a72519-d0f2-4208-b7c7-032cb5e5516d,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -98940ea1-18b6-4823-99aa-ede16c31602f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -716ef541-2872-42dc-9304-6c2d840c1f0d,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -359e568b-3167-4c1b-9e94-6e6aa74e36cc,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -97a2a008-5c56-41d4-bef2-f1af45f2925b,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -e04e5d5a-1f24-40ce-9869-1835e0ade796,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -4f86b68c-cbfe-4f1c-b849-dd17c640aa7c,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -2f625e1a-ff4b-4379-bd79-e309d5841ffb,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -b8e2950a-6213-4502-bcd3-16a287428fbe,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -6a818827-ddba-4916-ab33-2c326d3c5745,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -5806cf0a-5c5c-44ec-ac36-83a0030fb9dc,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -6d8c33a0-9d13-40fb-a8ed-66f653461521,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -e4d237c9-b025-4838-8b12-34bbf1265fb9,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -22a27f37-a8dc-4316-9795-7525ee7a0ac7,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -785dc700-c099-44fa-88b8-4242184395cf,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -dffa0c85-3ad7-4cae-b3f4-48bc41826b84,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788 -103e89f7-9c1d-459d-abb8-cf964570340a,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -0d9b5a69-e04d-4617-b46d-6ddb64ca815d,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -6eae5d86-3269-4d7c-aca6-150008d85eb2,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -6bc2f42c-d4bb-422c-9aa8-6255d18bf010,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -ec6693de-2458-4ace-b303-4ef744f72884,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -e0de3267-5ef6-4fcb-83c9-771d53e7fde8,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -c4caf964-fe70-47f4-9596-b52418ee8d39,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -9a7fdf17-f929-42be-98fb-cf5778ce4358,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -82e77523-a1ad-40e4-a7d1-0a9ae55a5b2f,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -673692bb-40e7-4793-8010-59a6c825fb0f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -d4890af8-3627-4397-b962-31e5ae9a8164,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -0ce5f7e7-51b3-4da3-ad12-1c50dc44c6c9,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -58f4e0dc-7dd3-4890-af41-0a1730aa0e1d,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -0ae22511-6661-4a9c-a3b4-62e28f0c6301,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -0d77358d-422b-4f97-8eb9-b36f717da4a2,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -a4c7ef55-d178-4967-a6cf-8a762672d27c,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -5373af9c-0365-498f-959d-80bf86bd9a26,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -03877157-9a63-40f9-a4ba-12b86cf2ccd4,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -a61d2b6a-2ae3-4e87-b69c-d6ef03746edb,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -333e8b90-4af3-4385-a845-ce1e56549bad,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -28c423bf-1639-4599-847c-d0db54b6d55d,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -b1614223-e9ef-4551-b50f-074d368a4289,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -54a5e86e-8535-427e-b07b-638ba00913a5,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242 -04a91974-26b9-4b6c-9c0a-31f4bcc9c8d1,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -b6264d92-34ba-49db-bb48-9a1d16e78482,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -abbe9d99-e6b5-4958-9637-b3a36e3283ce,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -85771d96-26ec-47d7-b8ef-f991a0bb996e,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788 -0250b2f4-4cbf-449f-87ef-b90dc451673e,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -b0242798-3ebc-43b5-b26d-0afc2e3af126,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -c6ec6f58-dae8-4dcc-b486-d0ba6df880c6,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -fb585936-8df9-4d57-9545-0372de271044,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -8c9f87cd-141c-4ba9-a017-5fcde0e542a2,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242 -567497fb-f77c-4e25-a030-9d40b377711c,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -b6c5b4cb-fc54-478c-9e57-0b5204e06120,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -9f363635-277f-49ad-9d59-17ba6fe87989,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -ab79d7fc-15bc-4ab6-bd7c-432ae87839d7,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -9aafec57-d20c-4d25-9a12-0ffb299eddda,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -1568ffdb-4504-4dce-b1d4-680a286f52b2,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -76530f38-d7be-4e8b-b1f5-cfe49b59388f,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -7e56f483-33df-4eb3-b80d-787dcd1d5fec,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -29538d4e-9d99-4701-b21a-0d8ee5b665de,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -8ad70eaf-8f88-49ac-9369-556f8d4e4981,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242 -0cbc7c1e-1146-40bc-a87e-a4293f1b8765,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -1846cb8f-2d1f-48ec-a73c-9f9a8392bf1f,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242 -4503f215-7ded-4230-9f94-e8ce4f2560ab,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -bb9bd979-bf7e-48cb-840f-e63e85f00911,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -1a77afda-35bc-4902-a32e-a3a8f3d1a88a,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -1d393258-37f4-4e4f-a77f-781524a55083,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -e3a643fe-bba4-4a7f-83db-23b0e03c923c,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -2de36fa6-bedc-413d-b9ea-ac1a47459531,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -809a36fc-7f08-4800-8714-2b6607974a43,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -2c4f86a0-5161-4f3f-b6c6-bcc9c7c0ed4e,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -afc0f157-2fcd-4435-8cc1-46b29f8c799a,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -0d7473a5-dd01-460f-a1ee-624d10f34c8e,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -7b2c7e95-87c7-4c2d-8174-012a138f9c2f,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -152c2e89-46ec-4b21-9cea-5c10420de37b,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -138c7831-202a-4f00-9a5f-8c205a810816,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -8c6655c4-4ab0-4eb9-9ef3-ccc4c1c58b86,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -6734c033-4156-4e9f-b924-2f5d6aee5c7f,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788 -a4a49bc8-ea2c-4728-8c40-d6863e46f042,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -9b5784f1-0ae5-4692-9deb-3d74743f59e0,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -fdae377a-76ff-447c-a64b-ae3a431691a3,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -cb8e491b-e99f-4a68-a0e0-dfa07b77ca7f,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -dc2dafb1-dd6f-489e-9fb1-36d029b03980,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -c56980f1-59a0-4966-8743-a6a8165efdda,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -9c4d86bb-ab1d-42ff-a5f2-4d1f39778f6c,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -d03f95b2-28c1-41cc-a80b-768a2a2f4788,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -9312de84-9197-462f-9d69-7d2fea8f7f68,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -37b03eb6-ef0f-48c2-ba36-e1a5ed1747b4,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -c435432c-3647-4b5b-96e1-ac1e32a546e4,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -54b7a190-585f-4a05-a07f-840289540a3f,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -0622aad8-6436-429e-a46b-4e09adad1a6c,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -a0318665-d079-4454-b335-67a08d52063e,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -90499632-fb19-4b07-9726-8741307a2f77,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -2c4b31fd-9662-4b0a-95da-bab5a1b541cd,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -e2ee2ab1-8e22-41be-9a1f-cfdee99d611e,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -2440030d-910e-4a4b-ac70-15f09e34e23b,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -ddfd9f5d-c943-4c9a-a019-58ef25e3cbb1,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -98d060f1-bde2-4649-92e9-c818ba66f474,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -c21290a1-ce12-4bc1-be0b-3492c9399da3,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -9bdff8f4-9fc5-4bb4-a346-786543058f6a,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -01ef6262-ae52-48e5-833c-aface9a34b35,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -33bf42ab-01ba-493f-a92e-de302649b490,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -91bec055-7ab3-49f0-940d-f7399bbb129e,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -660acf3d-706b-4daa-83e7-af1edcb02804,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -0199a8ad-0453-4362-90a8-49ee825029ac,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -caf07358-b134-46ae-a7f4-7c64d06ab25b,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -b8c8070f-0668-4a5c-bbff-4326670eedc3,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -b44c03a0-c838-4de1-b329-e2df2a769d53,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -21efe2be-86c1-4d0c-ba01-f77b01632ddf,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -be6b1366-0282-427c-99fe-7ee0ae092652,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -110964ab-decd-4f63-af13-dfe2ee499ba7,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -d8c2bfa8-4782-4989-afe9-4f69e3c42ae1,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -6c4bc7e5-6510-43f2-b370-89e5426d8364,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -71bc51af-be08-413f-8165-90822ffef011,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788 -28ff8422-4924-4669-8352-2d5fd68a084c,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -d865f47b-3f99-4ba1-973b-4bdb6fe2414b,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -5407472c-b967-4600-864d-c79362f5658c,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242 -3be9f63d-c316-4aa1-8695-6cfcfac29790,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -a63fd579-c35b-4870-9173-0fd383364c6f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -0ef707b4-69a5-4e4b-95a0-91dc0752aa46,0.0,0.0,680.0,Freileitung_110kV_1,0.1094,110.0,0.4 -c9444107-2d82-4591-a80e-eacc5bea633f,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -29a0785e-569d-4941-b7a3-9f4710dcb749,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -0cf49259-c126-4602-9b8a-764208d67914,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788 -a7071b97-2be4-40bf-a0b1-b8faf6bff6d6,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -121eb9fa-9cd8-49ef-a5c5-a382596b9d9f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -63a743b3-b45e-4862-b571-b4448545fb21,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -8f7197d4-129a-4493-9a21-55e258d7b6ed,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -75e63c65-ec08-4c59-aef2-3db3f96904cc,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -cde5f3a8-4a99-49b7-a7e7-b73e1c6d8003,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -ba85a896-08d3-4b95-8a21-1c06f29513e4,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -3f4a87a8-dd17-4b3d-acfc-10453391acc6,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -9da326a4-b96c-4e3c-bcd2-58be00a460cb,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -d3293c00-7bc8-434f-bfc8-b90cc2ff85be,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -7374aedd-b0cd-467c-99e9-fe3b26adb3b7,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -d984e978-5734-43e7-ac15-fd8cb4d281a6,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -4ee89e0b-1e97-4dde-ba57-3b0b862957c5,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -ce8ff61c-97fd-441a-914a-250c0dc80ed2,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -e5d110d3-321b-4726-bc51-e265f83891df,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -62a6a50e-8d16-415c-960d-8ef133627350,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788 -f8b5526a-2f8b-4937-864a-4162157a98be,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 -459cc17d-3f08-484b-a886-33c987466b5b,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242 -f701322d-3c8f-4c18-9259-117ac854df91,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788 -b423a5cf-ca70-4a11-9b97-07d002a10837,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971 +uuid,b,g,i_max,id,r,v_rated,x,cable_type +c3e20038-888d-4d19-91d0-9732110ff433,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971,994dcc32-d6ec-4d0f-9941-7c25be942aa6 +491312ff-b705-4baf-ad5e-139ca62abd13,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +17e87208-d092-4514-8b23-ab91598798ce,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +000a8091-6782-41a2-aa13-fcf0056989d1,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +7eb50926-f5b2-4fc4-b293-c679eaf19f65,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +6986321a-0a85-411e-8b2d-9d929a7f298b,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +34bcbd39-34fe-4ba4-896b-e123e597985a,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +fe7f2726-e60e-4111-9577-61f332eebf2e,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +d639d54f-19ff-4b56-bf41-206c1736258c,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +3bfb3448-4aa4-4390-88ab-b73e539c336f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +86828e8b-9ff2-4bb6-8a32-f291c397acea,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +af9a3ab2-48e6-4972-b589-8baae5c74fb9,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +f3a219f3-8999-4b77-90b8-7f78b4a884a8,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788, +a246d41e-4ad0-4dbc-9261-99104c22f0d8,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +899d2b91-69bc-46fb-a4bb-0b97c7c8751a,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +f8b900a6-7d3e-41b9-b5c6-48eca9153984,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +d4ff2175-de32-4f24-99ad-ab11517444f9,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +f24aa8ff-676a-4638-a1b4-4c16566079e8,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +bc540add-8fdb-43b8-b98a-7989b11ff268,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +36876e77-ccb6-4cc1-8508-d1728c149a07,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +9d193d4b-29bf-4cf5-9ff0-ab04185a6486,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +184d5283-e90b-4ad1-9a28-51f09df26312,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +71d2059f-ed6c-4cd1-9c3a-28b3409e93bb,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788, +342054c6-c0dc-4b03-b914-6bdc69c17d1b,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +bdcb3549-eb2e-4903-8f0d-cf6a2166c09f,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +f564bbec-720f-4299-b516-e576f02152c8,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +1659f544-bc4d-40d8-a62b-70dd611bfc33,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +e8fb78e6-329b-4968-b748-48d27078347a,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +29ce3d34-1e26-468c-af62-19ff0d0fd70f,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242, +a34786e0-a3f2-4420-8754-9af63551cbf8,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +7482222e-f925-4004-abdd-0b69ef453d8d,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +5287c56e-1a3f-4265-bdf6-bad967e03478,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +fa07a917-4d21-4e0b-abc4-527420509063,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +6fefbb49-0419-447c-9431-657cb0dc29fe,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +f6ac868a-f7c6-48b7-a86e-ede7100859ea,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +235dc9e4-7328-4386-8ca5-ce9c3202210e,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +ca622ca6-25e3-4ddc-9516-99e2376ded1d,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +1173fa67-2573-4476-aa5e-c3fe756a7f07,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +3cde9801-6334-4e0d-8994-6d18b3906a71,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +b3546eb6-8ac0-42c7-b5ee-ad0ba3cdd21a,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788, +2ae4a009-1481-412f-aa25-9d74b23a60ce,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +471b943e-0115-4262-beee-ebaef1503b09,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +7895fb66-d867-4e4a-bab9-ce5165207321,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +29925a58-7664-486a-a503-ab0d994c9e75,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242, +ceb28bd4-0090-4920-bedc-4f66968729dc,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +69cea08f-72d2-4f65-b4b9-ae0a137da20b,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +98d23c1c-fd2a-4257-993f-55663b42200b,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +3b41ea67-4e64-466f-9932-712b23fcf7df,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +5f39d862-cf14-4619-847d-1b77eaa80546,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +0bfe6869-6869-438d-918c-e697955a922f,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242, +c2618b8d-df63-4bc1-8eab-3ce2fd74e183,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +267979b1-af4a-4ae9-a22c-3e0234ce2271,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +64336228-e311-47a6-aa65-4e2883352109,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +8bd8a653-39a7-420d-976d-68d9492601bd,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +7204651a-462e-4a96-ab91-9bec7dbdcb92,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +9f3e546f-f81a-4602-8ceb-4401abceb42e,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +12ccc9e0-9987-4c1c-b176-84574ab2d262,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +1ede9038-2ae8-4794-839d-f60f70d50177,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +6daeb4b5-b137-4ed4-8bac-f6193d5daf33,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +62829e00-c835-4fea-b47a-104d258a5393,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +fbd5c9d9-96b2-4270-a927-c7a604f032f1,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +d03eee1c-0c11-41c4-90a3-2743ab894974,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +6ac4e62e-72ef-4772-8148-58586dd8d461,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +b2edb582-9e3e-4381-8807-75abd1710902,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +0610293b-068b-4851-927b-618da07e6fcf,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +6e3b7cd2-87cb-4155-a5a8-1e7ad6557a47,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +be79605e-39e3-4a53-b27c-33b5b80e8832,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +c940e435-0523-419a-90bc-f3dbf2e463f7,0.0,0.0,1360.0,Freileitung_110kV_2,0.0547,110.0,0.4, +44f95594-319f-47ba-9df2-5d9833e47408,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +cbe6053c-f1fc-46e4-8c47-1291d84083ba,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +f181cb5c-2234-49d5-9e3f-d21f14963074,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +6d1930ba-b144-459f-9a7f-463c0a0f46b4,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +87591389-0527-4fe0-8b33-7800b89a50c6,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +2cbe87fe-c770-4b7b-b1ac-6e52ea35682a,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788, +b42b9195-4953-403f-8e52-55cc8e653c94,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +b8bec046-5587-4a35-a262-233452558bfa,0.0,0.0,800.0,Kabel_110kV_1,0.0283,110.0,0.11, +f2a9246c-1d44-4903-b6a1-f038b786c01b,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +6fab725c-b58a-47eb-957c-9ca99f4558ce,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242, +7286023c-864d-476f-8b54-f23179ed906a,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +89a28eeb-daae-4a0b-bfd5-6c5ba90f7440,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +d3f48b67-8081-41a8-a9ea-2515ef4c70ee,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +5670305b-68cf-4b9a-ab60-ea3bbd57afb4,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +7da1277a-931e-48f2-8d9f-810e49e0b8ec,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +b0640c38-10d2-4f95-aa23-afbd8ad7f21c,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +b859db2f-036d-4697-887f-cb9445bc0814,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +f1974038-6ca4-4c43-8cf9-b9e6988b035c,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +5050a032-62b4-4239-aa13-9672c890e74a,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +9db7e41e-7360-4529-bbdb-dbd220117f61,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +7e6f9030-73ff-4fcb-a384-f71820af1a41,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +4318646d-6b12-411d-9fe1-6151c5106479,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +01b81835-2d2a-4e5c-bf78-cb1e789f2d0f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +e745cdd4-1c30-447f-8694-d3b3d2e01a96,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +a4aab125-8af4-4ef9-8842-4cf718f998bc,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +a61bace6-0050-436a-8715-0e042a8582f6,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +9989a72f-2587-4a15-804e-e81d9af7ee93,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +04e8252c-c3f3-4a4e-a11a-a182e94c382e,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +7445744d-21dd-46ad-805b-1d8b8a470294,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +f265e497-3a6d-4f96-9329-a7644cd8e785,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242, +e0c1129d-75ba-4639-928d-2f43eeabc88e,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +3362b510-7d57-44b1-a6cf-8081aac84a5b,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +0615b7b8-e7ec-4771-9e68-f02948044da2,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +a2f51a3d-5e1e-41cd-8be6-696ac1a12d52,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +ce61ee4b-0244-416f-b3e0-80577b58781c,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +803c298b-61c6-412c-9b60-21cabc5bd945,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +e6b134f3-2f34-4bdb-a353-0de86ef64651,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +ec77a581-8148-4b2c-bb6a-3f7c24ebb93b,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +33e2dfb4-60cd-4b99-b7ac-bc28267e8b9c,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +5c01eba4-8697-4e06-82f0-7ffd7bb43715,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788, +3124880e-a2af-42a1-be47-841a8176e7b6,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +b4dfd39c-38ec-4883-adf7-413c0662694a,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +d5addbe0-2d36-489a-8552-b3a0e66aa5b8,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +8cb6dcdc-c648-4c54-8cda-1df69f317b47,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242, +3d684e78-d7ba-436f-b223-c2f50de8d7ac,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +9987d3ab-2135-4c6d-bb7b-209659ab9356,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +d0f81106-444d-4832-ad0b-a293d719206a,3.0,0.0,550.0,HS_1,0.109999999403954,110.0,0.379999995231628, +fa60cbc7-5599-4409-b866-dc05a5b27235,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +6f8f3927-ac51-4b7d-a23e-8e429949f345,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +970e0436-65e3-48d6-9d9c-1f194f94f02c,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +612f81f3-5f7f-45c7-ad13-f729ef2ee07d,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +d334240a-49ef-430f-8924-3d3104b636ba,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +7513c490-99e4-4d11-983d-3d6bcf8dea93,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +9bcd4dbb-18d3-43af-85e0-e475f6371030,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +5b2b259b-1155-4130-b119-afea37851952,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +5f05acb2-b125-47e1-af39-878997a48981,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242, +ea01036f-5b25-47dd-98e3-0d944fd2e670,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +cb059d73-c67b-41d4-9c49-844c12351e77,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +048a2c36-6fbc-43ec-aa92-3807f7bfec50,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +f66fc57d-f2be-41fd-bc60-d1177b091ac6,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +763854f1-b1c6-44fb-a458-c7878ac026e5,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +8bfec339-14db-48d1-869b-c46b602a5940,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +ce1623cf-68c5-4f91-842a-2845ca7aa0e1,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +744ea833-d481-4583-99e7-4e83728ea176,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +df4aeff9-dacd-4326-9126-58e39f4161f9,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +f5402aea-e1ab-43a3-b65b-a101e7358a6f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +ad9a28fb-b6c5-447f-847f-14480a638bfc,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +1dd89c18-1436-4212-a053-5c6435368da5,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +03627bdf-9d77-44d5-a9c2-9e3109ec8a32,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +c27513a1-3d09-4f03-9fdd-cdf15cb83dfb,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +51eff3e4-bffc-42b0-89d0-5c4756e128ba,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +82bc6482-24eb-42dd-8dc3-e05b86696a22,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +9a3869ee-c4b1-4b3a-89ce-02d79a2cf4ad,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +9ac19e4c-0379-4aaf-a96a-b2e71462abb3,0.0,0.0,800.0,Kabel_110kV_1,0.0283,110.0,0.11, +c130b080-9569-4398-b66f-ee3ac517daca,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788, +3654a929-29a8-4945-80df-5fd5a7ab6218,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +b3cac110-acef-4ec0-9139-3858a4c36acc,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +0417354b-2a35-4499-965d-24b153f98769,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +b63674e1-6827-4e8b-b3e6-34ee6d4823a9,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +90f47116-bd6e-489b-b5c0-8db3ff905d4b,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +80eb9e25-4a5c-49b6-bb57-8fa7cf5dc035,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +0b2b2d0b-0bff-4b57-b505-78d70f9a2d96,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +c1eab793-7cb2-44b1-a309-e6a96e5ee80e,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +f4a72519-d0f2-4208-b7c7-032cb5e5516d,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +98940ea1-18b6-4823-99aa-ede16c31602f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +716ef541-2872-42dc-9304-6c2d840c1f0d,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +359e568b-3167-4c1b-9e94-6e6aa74e36cc,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +97a2a008-5c56-41d4-bef2-f1af45f2925b,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +e04e5d5a-1f24-40ce-9869-1835e0ade796,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +4f86b68c-cbfe-4f1c-b849-dd17c640aa7c,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +2f625e1a-ff4b-4379-bd79-e309d5841ffb,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +b8e2950a-6213-4502-bcd3-16a287428fbe,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +6a818827-ddba-4916-ab33-2c326d3c5745,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +5806cf0a-5c5c-44ec-ac36-83a0030fb9dc,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +6d8c33a0-9d13-40fb-a8ed-66f653461521,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +e4d237c9-b025-4838-8b12-34bbf1265fb9,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +22a27f37-a8dc-4316-9795-7525ee7a0ac7,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +785dc700-c099-44fa-88b8-4242184395cf,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +dffa0c85-3ad7-4cae-b3f4-48bc41826b84,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788, +103e89f7-9c1d-459d-abb8-cf964570340a,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +0d9b5a69-e04d-4617-b46d-6ddb64ca815d,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +6eae5d86-3269-4d7c-aca6-150008d85eb2,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +6bc2f42c-d4bb-422c-9aa8-6255d18bf010,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +ec6693de-2458-4ace-b303-4ef744f72884,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +e0de3267-5ef6-4fcb-83c9-771d53e7fde8,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +c4caf964-fe70-47f4-9596-b52418ee8d39,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +9a7fdf17-f929-42be-98fb-cf5778ce4358,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +82e77523-a1ad-40e4-a7d1-0a9ae55a5b2f,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +673692bb-40e7-4793-8010-59a6c825fb0f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +d4890af8-3627-4397-b962-31e5ae9a8164,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +0ce5f7e7-51b3-4da3-ad12-1c50dc44c6c9,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +58f4e0dc-7dd3-4890-af41-0a1730aa0e1d,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +0ae22511-6661-4a9c-a3b4-62e28f0c6301,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +0d77358d-422b-4f97-8eb9-b36f717da4a2,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +a4c7ef55-d178-4967-a6cf-8a762672d27c,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +5373af9c-0365-498f-959d-80bf86bd9a26,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +03877157-9a63-40f9-a4ba-12b86cf2ccd4,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +a61d2b6a-2ae3-4e87-b69c-d6ef03746edb,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +333e8b90-4af3-4385-a845-ce1e56549bad,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +28c423bf-1639-4599-847c-d0db54b6d55d,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +b1614223-e9ef-4551-b50f-074d368a4289,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +54a5e86e-8535-427e-b07b-638ba00913a5,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242, +04a91974-26b9-4b6c-9c0a-31f4bcc9c8d1,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +b6264d92-34ba-49db-bb48-9a1d16e78482,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +abbe9d99-e6b5-4958-9637-b3a36e3283ce,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +85771d96-26ec-47d7-b8ef-f991a0bb996e,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788, +0250b2f4-4cbf-449f-87ef-b90dc451673e,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +b0242798-3ebc-43b5-b26d-0afc2e3af126,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +c6ec6f58-dae8-4dcc-b486-d0ba6df880c6,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +fb585936-8df9-4d57-9545-0372de271044,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +8c9f87cd-141c-4ba9-a017-5fcde0e542a2,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242, +567497fb-f77c-4e25-a030-9d40b377711c,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +b6c5b4cb-fc54-478c-9e57-0b5204e06120,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +9f363635-277f-49ad-9d59-17ba6fe87989,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +ab79d7fc-15bc-4ab6-bd7c-432ae87839d7,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +9aafec57-d20c-4d25-9a12-0ffb299eddda,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +1568ffdb-4504-4dce-b1d4-680a286f52b2,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +76530f38-d7be-4e8b-b1f5-cfe49b59388f,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +7e56f483-33df-4eb3-b80d-787dcd1d5fec,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +29538d4e-9d99-4701-b21a-0d8ee5b665de,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +8ad70eaf-8f88-49ac-9369-556f8d4e4981,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242, +0cbc7c1e-1146-40bc-a87e-a4293f1b8765,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +1846cb8f-2d1f-48ec-a73c-9f9a8392bf1f,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242, +4503f215-7ded-4230-9f94-e8ce4f2560ab,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +bb9bd979-bf7e-48cb-840f-e63e85f00911,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +1a77afda-35bc-4902-a32e-a3a8f3d1a88a,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +1d393258-37f4-4e4f-a77f-781524a55083,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +e3a643fe-bba4-4a7f-83db-23b0e03c923c,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +2de36fa6-bedc-413d-b9ea-ac1a47459531,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +809a36fc-7f08-4800-8714-2b6607974a43,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +2c4f86a0-5161-4f3f-b6c6-bcc9c7c0ed4e,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +afc0f157-2fcd-4435-8cc1-46b29f8c799a,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +0d7473a5-dd01-460f-a1ee-624d10f34c8e,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +7b2c7e95-87c7-4c2d-8174-012a138f9c2f,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +152c2e89-46ec-4b21-9cea-5c10420de37b,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +138c7831-202a-4f00-9a5f-8c205a810816,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +8c6655c4-4ab0-4eb9-9ef3-ccc4c1c58b86,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +6734c033-4156-4e9f-b924-2f5d6aee5c7f,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788, +a4a49bc8-ea2c-4728-8c40-d6863e46f042,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +9b5784f1-0ae5-4692-9deb-3d74743f59e0,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +fdae377a-76ff-447c-a64b-ae3a431691a3,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +cb8e491b-e99f-4a68-a0e0-dfa07b77ca7f,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +dc2dafb1-dd6f-489e-9fb1-36d029b03980,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +c56980f1-59a0-4966-8743-a6a8165efdda,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +9c4d86bb-ab1d-42ff-a5f2-4d1f39778f6c,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +d03f95b2-28c1-41cc-a80b-768a2a2f4788,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +9312de84-9197-462f-9d69-7d2fea8f7f68,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +37b03eb6-ef0f-48c2-ba36-e1a5ed1747b4,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +c435432c-3647-4b5b-96e1-ac1e32a546e4,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +54b7a190-585f-4a05-a07f-840289540a3f,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +0622aad8-6436-429e-a46b-4e09adad1a6c,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +a0318665-d079-4454-b335-67a08d52063e,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +90499632-fb19-4b07-9726-8741307a2f77,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +2c4b31fd-9662-4b0a-95da-bab5a1b541cd,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +e2ee2ab1-8e22-41be-9a1f-cfdee99d611e,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +2440030d-910e-4a4b-ac70-15f09e34e23b,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +ddfd9f5d-c943-4c9a-a019-58ef25e3cbb1,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +98d060f1-bde2-4649-92e9-c818ba66f474,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +c21290a1-ce12-4bc1-be0b-3492c9399da3,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +9bdff8f4-9fc5-4bb4-a346-786543058f6a,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +01ef6262-ae52-48e5-833c-aface9a34b35,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +33bf42ab-01ba-493f-a92e-de302649b490,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +91bec055-7ab3-49f0-940d-f7399bbb129e,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +660acf3d-706b-4daa-83e7-af1edcb02804,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +0199a8ad-0453-4362-90a8-49ee825029ac,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +caf07358-b134-46ae-a7f4-7c64d06ab25b,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +b8c8070f-0668-4a5c-bbff-4326670eedc3,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +b44c03a0-c838-4de1-b329-e2df2a769d53,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +21efe2be-86c1-4d0c-ba01-f77b01632ddf,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +be6b1366-0282-427c-99fe-7ee0ae092652,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +110964ab-decd-4f63-af13-dfe2ee499ba7,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +d8c2bfa8-4782-4989-afe9-4f69e3c42ae1,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +6c4bc7e5-6510-43f2-b370-89e5426d8364,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +71bc51af-be08-413f-8165-90822ffef011,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788, +28ff8422-4924-4669-8352-2d5fd68a084c,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +d865f47b-3f99-4ba1-973b-4bdb6fe2414b,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +5407472c-b967-4600-864d-c79362f5658c,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242, +3be9f63d-c316-4aa1-8695-6cfcfac29790,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +a63fd579-c35b-4870-9173-0fd383364c6f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +0ef707b4-69a5-4e4b-95a0-91dc0752aa46,0.0,0.0,680.0,Freileitung_110kV_1,0.1094,110.0,0.4, +c9444107-2d82-4591-a80e-eacc5bea633f,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +29a0785e-569d-4941-b7a3-9f4710dcb749,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +0cf49259-c126-4602-9b8a-764208d67914,191.636993408203,0.0,300.0,MS_2,0.207000002264977,20.0,0.0691149979829788, +a7071b97-2be4-40bf-a0b1-b8faf6bff6d6,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +121eb9fa-9cd8-49ef-a5c5-a382596b9d9f,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +63a743b3-b45e-4862-b571-b4448545fb21,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +8f7197d4-129a-4493-9a21-55e258d7b6ed,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +75e63c65-ec08-4c59-aef2-3db3f96904cc,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +cde5f3a8-4a99-49b7-a7e7-b73e1c6d8003,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +ba85a896-08d3-4b95-8a21-1c06f29513e4,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +3f4a87a8-dd17-4b3d-acfc-10453391acc6,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +9da326a4-b96c-4e3c-bcd2-58be00a460cb,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +d3293c00-7bc8-434f-bfc8-b90cc2ff85be,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +7374aedd-b0cd-467c-99e9-fe3b26adb3b7,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +d984e978-5734-43e7-ac15-fd8cb4d281a6,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +4ee89e0b-1e97-4dde-ba57-3b0b862957c5,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +ce8ff61c-97fd-441a-914a-250c0dc80ed2,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +e5d110d3-321b-4726-bc51-e265f83891df,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +62a6a50e-8d16-415c-960d-8ef133627350,191.636993408203,0.0,265.0,NS_3,0.253899991512299,0.4,0.0691149979829788, +f8b5526a-2f8b-4937-864a-4162157a98be,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, +459cc17d-3f08-484b-a886-33c987466b5b,85.7655029296875,0.0,361.0,MS_3,0.165999993681908,20.0,0.117200002074242, +f701322d-3c8f-4c18-9259-117ac854df91,185.35400390625,0.0,235.0,NS_2,0.319999992847443,0.4,0.0691149979829788, +b423a5cf-ca70-4a11-9b97-07d002a10837,163.363006591797,0.0,195.0,NS_1,0.442999988794327,0.4,0.0722566023468971, diff --git a/src/test/resources/edu/ie3/datamodel/io/source/csv/_types/line_type_input.csv b/src/test/resources/edu/ie3/datamodel/io/source/csv/_types/line_type_input.csv index 686900bf9..aeb990abc 100644 --- a/src/test/resources/edu/ie3/datamodel/io/source/csv/_types/line_type_input.csv +++ b/src/test/resources/edu/ie3/datamodel/io/source/csv/_types/line_type_input.csv @@ -1,2 +1,2 @@ -uuid,b,g,i_max,id,r,v_rated,x -3bed3eb3-9790-4874-89b5-a5434d408088,0.00322,0.0,300.0,lineType_AtoB,0.437,20.0,0.356 \ No newline at end of file +uuid,b,g,i_max,id,r,v_rated,x,cable_type +3bed3eb3-9790-4874-89b5-a5434d408088,0.00322,0.0,300.0,lineType_AtoB,0.437,20.0,0.356, \ No newline at end of file diff --git a/src/test/resources/edu/ie3/datamodel/io/source/sql/_types/types.sql b/src/test/resources/edu/ie3/datamodel/io/source/sql/_types/types.sql index 13bb195bf..19e24bc17 100644 --- a/src/test/resources/edu/ie3/datamodel/io/source/sql/_types/types.sql +++ b/src/test/resources/edu/ie3/datamodel/io/source/sql/_types/types.sql @@ -1,3 +1,28 @@ +CREATE TABLE public.cable_type_input +( + uuid uuid NOT NULL, + id varchar NOT NULL, + core_number int NOT NULL, + conductor jsonb NOT NULL, + isolation jsonb NOT NULL, + screen jsonb, + filler jsonb NOT NULL, + armor jsonb NOT NULL, + jack jsonb NOT NULL, + limit_temperature double precision NOT NULL, + frequency double precision NOT NULL, + skin_effect_coefficient double precision NOT NULL, + proximity_effect_coefficient double precision NOT NULL, + electrical_capacitance double precision NOT NULL, + tan_delta double precision NOT NULL, + circulating_loss_factor double precision NOT NULL, + eddy_current_loss_factor double precision NOT NULL, + PRIMARY KEY (uuid) +); + +CREATE INDEX idx_cable_type_conductor_material ON public.cable_type_input USING gin ((conductor->'material')); +CREATE INDEX idx_cable_type_id ON public.cable_type_input (id); + CREATE TABLE public.line_type_input ( uuid uuid NOT NULL, @@ -8,6 +33,7 @@ CREATE TABLE public.line_type_input x double precision NOT NULL, b double precision NOT NULL, g double precision NOT NULL, + cable_type UUID REFERENCES public.cable_type_input(uuid), PRIMARY KEY (uuid) ); @@ -31,12 +57,33 @@ CREATE TABLE public.transformer_2_w_type_input PRIMARY KEY (uuid) ); -INSERT INTO - public.line_type_input (uuid, id, v_rated, i_max, r, x, b, g) +INSERT INTO public.cable_type_input +(uuid, id, core_number, conductor, isolation, screen, filler, armor, jack, + limit_temperature, frequency, skin_effect_coefficient, proximity_effect_coefficient, + electrical_capacitance, tan_delta, circulating_loss_factor, eddy_current_loss_factor) +VALUES + ('b8152c3f-d12f-4857-9746-a30aef6aee08', + 'CigreT880_33kVLandCable', + 1, + '{"id": "conductor", "material": "COPPER", "crossSection": "240.0", "diameter": "18.4", "thermalResistivity": "0.0026", "thermalCapacitance": "3.4e6", "area": "240.0", "isCompacted": false}'::jsonb, + '[{"name": "conductorScreen", "material": "SEMI_COND_SCREEN", "innerDiameter": "18.4", "outerDiameter": "19.4", "thermalResistivity": "4.0", "thermalCapacitance": "2.0e6", "area": null}, {"name": "insulation", "material": "XLPE", "innerDiameter": "19.4", "outerDiameter": "34.8", "thermalResistivity": "3.5", "thermalCapacitance": "2.4e6", "area": null}, {"name": "insulationScreen", "material": "SEMI_COND_SCREEN", "innerDiameter": "34.8", "outerDiameter": "35.8", "thermalResistivity": "4.0", "thermalCapacitance": "2.0e6", "area": null}, {"name": "screenTape", "material": "SC_TAPE", "innerDiameter": "35.8", "outerDiameter": "36.8", "thermalResistivity": "0.01", "thermalCapacitance": "3.0e6", "area": null}]'::jsonb, + '{"name": "screen", "material": "COPPER", "innerDiameter": "36.8", "outerDiameter": "38.6", "thermalResistivity": "0.0026", "thermalCapacitance": "3.4e6", "area": "35.62566", "wiresNumber": 56, "wireDiameter": "0.9", "electricalResistivity": "1.7241e-8"}'::jsonb, + '[]'::jsonb, + '[]'::jsonb, + '[{"name": "jackTape", "material": "SC_TAPE", "innerDiameter": "38.6", "outerDiameter": "39.2", "thermalResistivity": "0.01", "thermalCapacitance": "3.0e6", "area": null}, {"name": "jack", "material": "XLPE", "innerDiameter": "39.2", "outerDiameter": "43.6", "thermalResistivity": "3.5", "thermalCapacitance": "2.4e6", "area": null}, {"name": "outerCover", "material": "SEMI_COND_SCREEN", "innerDiameter": "43.6", "outerDiameter": "44.0", "thermalResistivity": "4.0", "thermalCapacitance": "2.0e6", "area": null}]'::jsonb, + 90.0, + 50.0, + 1.0, + 1.0, + 0.000000000237683304, + 0.004, + 0.0435122656, + 0.0); + +INSERT INTO public.line_type_input (uuid, id, v_rated, i_max, r, x, b, g, cable_type,grid_uuid) VALUES - ('3bed3eb3-9790-4874-89b5-a5434d408088', 'lineType_AtoB', 0.00322, 0.0, 0.437, 0.437, 300.0, 20.0); + ('3bed3eb3-9790-4874-89b5-a5434d408088', 'lineType_AtoB', 20.0, 300.0, 0.437, 0.356, 0.00322, 0.0, 'b8152c3f-d12f-4857-9746-a30aef6aee08','8e6bd444-4580-11ee-be56-0242ac120002'); -INSERT INTO - public.transformer_2_w_type_input (uuid,b_m,d_phi,d_v,g_m,id,r_sc,s_rated,tap_max,tap_min,tap_neutr,tap_side,v_rated_a,v_rated_b,x_sc) +INSERT INTO public.transformer_2_w_type_input (uuid,b_m,d_phi,d_v,g_m,id,r_sc,s_rated,tap_max,tap_min,tap_neutr,tap_side,v_rated_a,v_rated_b,x_sc,grid_uuid) VALUES - ('202069a7-bcf8-422c-837c-273575220c8a',0.0,0.0,1.5,0.0,'HS-MS_1',45.375,20000.0,10,-10,0,false,110.0,20.0,102.759); \ No newline at end of file + ('202069a7-bcf8-422c-837c-273575220c8a',0.0,0.0,1.5,0.0,'HS-MS_1',45.375,20000.0,10,-10,0,false,110.0,20.0,102.759,'8e6bd444-4580-11ee-be56-0242ac120002'); \ No newline at end of file From 465b58c1eed055a7136cff397cc0e337cbf2d621 Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Wed, 24 Jun 2026 07:22:03 +0200 Subject: [PATCH 5/7] add cableType, include jackson and psu 3.2.2 --- build.gradle | 6 +- .../input/connector/type/LineTypeInput.java | 84 ++++++++++++++++--- .../input/container/RawGridElements.java | 2 +- 3 files changed, 80 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 9b788adef..3b94e875a 100644 --- a/build.gradle +++ b/build.gradle @@ -54,7 +54,7 @@ repositories { dependencies { // ie³ power system utils - implementation 'com.github.ie3-institute:PowerSystemUtils:3.2.1' + implementation 'com.github.ie3-institute:PowerSystemUtils:3.2.2' implementation 'tech.units:indriya:2.2.4' @@ -65,6 +65,10 @@ dependencies { implementation 'org.locationtech.jts.io:jts-io-common:1.20.0' + // parsing json + implementation 'com.fasterxml.jackson.core:jackson-databind:2.22.0' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.2' + // Graphs implementation 'org.jgrapht:jgrapht-core:1.5.3' diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/type/LineTypeInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/type/LineTypeInput.java index cf4717420..49a50178a 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/connector/type/LineTypeInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/type/LineTypeInput.java @@ -11,6 +11,7 @@ import edu.ie3.util.quantities.interfaces.SpecificResistance; import java.util.Map; import java.util.Objects; +import java.util.Optional; import java.util.UUID; import javax.measure.quantity.ElectricCurrent; import javax.measure.quantity.ElectricPotential; @@ -36,6 +37,9 @@ public class LineTypeInput extends AssetTypeInput { /** Rated voltage for this type of line (typically in V) */ private final ComparableQuantity vRated; + /** Optional reference to a detailed cable type specification */ + private final Optional cableType; + /** * @param uuid of the input entity * @param id of this type @@ -55,6 +59,30 @@ public LineTypeInput( ComparableQuantity x, ComparableQuantity iMax, ComparableQuantity vRated) { + this(uuid, id, b, g, r, x, iMax, vRated, Optional.empty()); + } + + /** + * @param uuid of the input entity + * @param id of this type + * @param b Specific phase-to-ground susceptance for this type of line + * @param g Specific phase-to-ground conductance for this type of line + * @param r Specific resistance for this type of line + * @param x Specific reactance for this type of line + * @param iMax Maximum thermal current for this type of line + * @param vRated Rated voltage for this type of line + * @param cableType Optional reference to a detailed cable type specification + */ + public LineTypeInput( + UUID uuid, + String id, + ComparableQuantity b, + ComparableQuantity g, + ComparableQuantity r, + ComparableQuantity x, + ComparableQuantity iMax, + ComparableQuantity vRated, + Optional cableType) { super(uuid, id); this.r = r.to(StandardUnits.RESISTANCE_PER_LENGTH); this.x = x.to(StandardUnits.REACTANCE_PER_LENGTH); @@ -62,6 +90,7 @@ public LineTypeInput( this.g = g.to(StandardUnits.CONDUCTANCE_PER_LENGTH); this.iMax = iMax.to(StandardUnits.ELECTRIC_CURRENT_MAGNITUDE); this.vRated = vRated.to(StandardUnits.RATED_VOLTAGE_MAGNITUDE); + this.cableType = Objects.requireNonNull(cableType, "Cable type Optional cannot be null"); } /** @@ -85,13 +114,34 @@ public LineTypeInput( ComparableQuantity iMax, ComparableQuantity vRated, Map additionalInformation) { - super(uuid, id); - this.r = r.to(StandardUnits.RESISTANCE_PER_LENGTH); - this.x = x.to(StandardUnits.REACTANCE_PER_LENGTH); - this.b = b.to(StandardUnits.SUSCEPTANCE_PER_LENGTH); - this.g = g.to(StandardUnits.CONDUCTANCE_PER_LENGTH); - this.iMax = iMax.to(StandardUnits.ELECTRIC_CURRENT_MAGNITUDE); - this.vRated = vRated.to(StandardUnits.RATED_VOLTAGE_MAGNITUDE); + this(uuid, id, b, g, r, x, iMax, vRated, Optional.empty()); + setAdditionalInformation(additionalInformation); + } + + /** + * @param uuid of the input entity + * @param id of this type + * @param b Specific phase-to-ground susceptance for this type of line + * @param g Specific phase-to-ground conductance for this type of line + * @param r Specific resistance for this type of line + * @param x Specific reactance for this type of line + * @param iMax Maximum thermal current for this type of line (typically in A) + * @param vRated Rated voltage for this type of line + * @param cableType Optional reference to a detailed cable type specification + * @param additionalInformation That were provided by the source + */ + public LineTypeInput( + UUID uuid, + String id, + ComparableQuantity b, + ComparableQuantity g, + ComparableQuantity r, + ComparableQuantity x, + ComparableQuantity iMax, + ComparableQuantity vRated, + Optional cableType, + Map additionalInformation) { + this(uuid, id, b, g, r, x, iMax, vRated, cableType); setAdditionalInformation(additionalInformation); } @@ -119,6 +169,10 @@ public ComparableQuantity getvRated() { return vRated; } + public Optional getCableType() { + return cableType; + } + @Override public LineTypeInputCopyBuilder copy() { return new LineTypeInputCopyBuilder(this); @@ -134,12 +188,13 @@ public boolean equals(Object o) { && r.equals(that.r) && x.equals(that.x) && iMax.equals(that.iMax) - && vRated.equals(that.vRated); + && vRated.equals(that.vRated) + && cableType.equals(that.cableType); } @Override public int hashCode() { - return Objects.hash(super.hashCode(), b, g, r, x, iMax, vRated); + return Objects.hash(super.hashCode(), b, g, r, x, iMax, vRated, cableType); } @Override @@ -161,6 +216,8 @@ public String toString() { + iMax + ", vRated=" + vRated + + ", cableType=" + + cableType + ", additionalInformation=" + getAdditionalInformation() + '}'; @@ -179,6 +236,7 @@ public static final class LineTypeInputCopyBuilder private ComparableQuantity x; private ComparableQuantity iMax; private ComparableQuantity vRated; + private Optional cableType; protected LineTypeInputCopyBuilder(LineTypeInput entity) { super(entity); @@ -188,6 +246,12 @@ protected LineTypeInputCopyBuilder(LineTypeInput entity) { this.x = entity.x; this.iMax = entity.iMax; this.vRated = entity.vRated; + this.cableType = entity.cableType; + } + + public LineTypeInputCopyBuilder cableType(Optional cableType) { + this.cableType = cableType; + return thisInstance(); } /** Setter */ @@ -223,7 +287,7 @@ public LineTypeInputCopyBuilder vRated(ComparableQuantity vRa @Override public LineTypeInput build() { - return new LineTypeInput(getUuid(), getId(), b, g, r, x, iMax, vRated); + return new LineTypeInput(getUuid(), getId(), b, g, r, x, iMax, vRated, cableType); } @Override diff --git a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java index afd2fc532..ce9ba4e29 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java +++ b/src/main/java/edu/ie3/datamodel/models/input/container/RawGridElements.java @@ -262,7 +262,7 @@ public RawGridElementsCopyBuilder transformers2Ws(Set transf /** * Method to alter {@link Transformer3WInput} * - * @param transformer3Ws set of altered three winding trnasformers + * @param transformer3Ws set of altered three winding transformers * @return this instance of {@link RawGridElementsCopyBuilder} */ public RawGridElementsCopyBuilder transformer3Ws(Set transformer3Ws) { From d6884692e75a99f4b603e9007c34fbc3be63e5e7 Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Wed, 24 Jun 2026 18:24:50 +0200 Subject: [PATCH 6/7] add types --- .../models/input/connector/type/CableMaterial.java | 3 ++- .../models/input/connector/type/ScreenLayerInput.java | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/type/CableMaterial.java b/src/main/java/edu/ie3/datamodel/models/input/connector/type/CableMaterial.java index 5fc86daa6..2a2af0235 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/connector/type/CableMaterial.java +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/type/CableMaterial.java @@ -7,6 +7,7 @@ import static edu.ie3.util.quantities.PowerSystemUnits.*; +import edu.ie3.util.quantities.interfaces.ElectricalResistivity; import edu.ie3.util.quantities.interfaces.ThermalCapacitance; import edu.ie3.util.quantities.interfaces.ThermalResistivity; import tech.units.indriya.ComparableQuantity; @@ -131,7 +132,7 @@ public ThermalProperties getThermalProperties() { * @return Electrical resistivity * @throws IllegalArgumentException if the material type is unknown */ - public ComparableQuantity getElectricalResistivity() { + public ComparableQuantity getElectricalResistivity() { return switch (this) { case COPPER -> Quantities.getQuantity(1.7241e-8, OHM_METRE); case ALUMINIUM -> Quantities.getQuantity(2.8264e-8, OHM_METRE); diff --git a/src/main/java/edu/ie3/datamodel/models/input/connector/type/ScreenLayerInput.java b/src/main/java/edu/ie3/datamodel/models/input/connector/type/ScreenLayerInput.java index 3091eb273..8dd41335f 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/connector/type/ScreenLayerInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/connector/type/ScreenLayerInput.java @@ -6,6 +6,7 @@ package edu.ie3.datamodel.models.input.connector.type; import edu.ie3.datamodel.models.input.InputEntity; +import edu.ie3.util.quantities.interfaces.ElectricalResistivity; import edu.ie3.util.quantities.interfaces.ThermalCapacitance; import edu.ie3.util.quantities.interfaces.ThermalResistivity; import java.util.Map; @@ -46,7 +47,7 @@ public record ScreenLayerInput( int wiresNumber, ComparableQuantity wireDiameter, Optional> lengthOfLay, - ComparableQuantity electricalResistivity) + ComparableQuantity electricalResistivity) implements InputEntity { /** * Create a new screen layer with all required parameters. @@ -130,13 +131,13 @@ public boolean equals(Object o) { CableMaterial material1, ComparableQuantity diameter, ComparableQuantity outerDiameter1, - ComparableQuantity resistivity, - ComparableQuantity capacitance, + ComparableQuantity resistivity, + ComparableQuantity capacitance, Optional> area1, int number, ComparableQuantity wireDiameter1, Optional> ofLay, - ComparableQuantity materialResistivity1))) return false; + ComparableQuantity materialResistivity1))) return false; return uuid.equals(uuid1) && wiresNumber == number && name.equals(name1) From 32810e7576beb7ca699871f066408f4978d902c3 Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Thu, 25 Jun 2026 12:37:06 +0200 Subject: [PATCH 7/7] update and fix rtd --- docs/readthedocs/conf.py | 6 +- .../models/input/grid/cableMaterial.md | 56 +++++---- .../models/input/grid/cableType.md | 112 +++++++++++------- docs/readthedocs/models/input/grid/line.md | 8 +- docs/readthedocs/models/models.md | 2 + docs/readthedocs/references.md | 2 +- input/StandardAssetTypes/cable_type_input.csv | 2 + input/StandardAssetTypes/line_type_input.csv | 2 +- 8 files changed, 112 insertions(+), 78 deletions(-) create mode 100644 input/StandardAssetTypes/cable_type_input.csv diff --git a/docs/readthedocs/conf.py b/docs/readthedocs/conf.py index 4616a1484..3af2d07db 100644 --- a/docs/readthedocs/conf.py +++ b/docs/readthedocs/conf.py @@ -36,9 +36,13 @@ # ones. extensions = [ 'sphinx.ext.intersphinx', - 'myst_parser' + 'myst_parser', + 'sphinxcontrib.bibtex' ] +bibtex_bibfiles = ["_static/bibliography/bibtex.bib"] +bibtex_default_style = 'plain' + myst_enable_extensions = ["dollarmath", "amsmath"] myst_heading_anchors = 4 diff --git a/docs/readthedocs/models/input/grid/cableMaterial.md b/docs/readthedocs/models/input/grid/cableMaterial.md index 84b63ed27..15efc5aee 100644 --- a/docs/readthedocs/models/input/grid/cableMaterial.md +++ b/docs/readthedocs/models/input/grid/cableMaterial.md @@ -1,3 +1,4 @@ +(cable-material)= # Cable Material ## Overview @@ -21,58 +22,65 @@ Retrieved via `getThermalProperties()`. Returns a `ThermalProperties` container - source - Notes - * -`Copper` + * - `Copper` - 1/384 - 3,449,600.0 - {cite:cts}`wiki:thermal_conductivity_resistivity`, {cite:cts}`wiki:Copper` - c = 385 J/(kg * K), rho= 8.96 g/cm³ => 3449600 J / (m³ * K) - * -`Aluminium` + * - `Aluminium` - 1/237 - 2,420,913.3 - {cite:cts}`wiki:thermal_conductivity_resistivity`, {cite:cts}`wiki:Aluminium` - c = 897 J/(kg * K), rho= 2.6989 g/cm³ => 2420913.3 J / (m³ * K) - * -`XLPE (Cross-linked polyethylene)` + * - `XLPE (Cross-linked polyethylene)` - 3.5 - 2.4 - {cite:cts}`andersRatingElectricPower1997` p. 400 + - - - * -`PE (Polyethylene)` + * - `PE (Polyethylene)` - 3.5 - 2.4 - {cite:cts}`andersRatingElectricPower1997` p. 400 + - - - * -`PVC (Polyvinyl chloride)` + * - `PVC (Polyvinyl chloride)` - 3.5 - 1.7 - {cite:cts}`andersRatingElectricPower1997` p. 400 + - - - * -`Semi-Conductive Screen` + * - `Semi-Conductive Screen` - 2.5 - 2.4 - Th. Res.: {cite:cts}`CIGRE_TB880_2022` p. 28; Th. Capa.: Same as adjacent dielectric material see {cite:cts}`andersRatingElectricPower1997` p. 400 + - - - * -`SC-Tape (Screen Tape)` + * - `SC-Tape (Screen Tape)` - 6.0 - 2.4 - Th. Res.: {cite:cts}`CIGRE_TB880_2022` p. 28; Th. Capa.: Same as adjacent dielectric material see {cite:cts}`andersRatingElectricPower1997` p. 400 + - - - * -`Lead` + * - `Lead` - 1/35 - 1,463,892.0 - - Th. Res.: {cite:cts}`wiki:thermal_conductivities`; Th. Capa.: {cite:cts}`wiki:wiki:specific_heat_capacities` + - Th. Res.: {cite:cts}`wiki:thermal_conductivities`; Th. Capa.: {cite:cts}`wiki:specific_heat_capacities` - c = 129 J/(kg * K), rho= 11.348 g/cm³ => 1,463,892.0 J / (m³ * K) - * -`Steel` + * - `Steel` - 1/45 - 3,756,000.0 - - Th. Res.:{cite:cts}`wiki:thermal_conductivity_resistivity`; Th. Capa.: {cite:cts}`wiki:wiki:specific_heat_capacities` + - Th. Res.:{cite:cts}`wiki:thermal_conductivity_resistivity`; Th. Capa.: {cite:cts}`wiki:specific_heat_capacities` + - - - * -`Polypropylen` + * - `Polypropylen` - 6.0 - 2.0 - Th. Res.: {cite:cts}`CIGRE_TB880_2022` p. 28; Th. Capa.: Asumed to be clos to Paper-polypropylene-paper (PPL) in {cite:cts}`andersRatingElectricPower1997` p. 400 + - - ``` **Note:** Metals inherently define their thermal resistivity as the inverse of their thermal conductivity $\lambda$ (e.g., $\lambda_{Copper} = 384 \, W/(m \cdot K)$). @@ -94,24 +102,24 @@ Electrical parameters define the conductive aspects of the materials, heavily ut - Temp. Coefficient [1/K] - source - * -`Copper` - - $1.7241 10^{-8} - - 3.93 10^[-3} + * - `Copper` + - $1.7241 \times 10^{-8}$ + - $3.93 \times 10^{-3}$ - {cite:cts}`luecking_1981` p. 94 - * -`Aluminium` - - $2.8264 10^{-8} - - 4.03 10^[-3} + * - `Aluminium` + - $2.8264 \times 10^{-8}$ + - $4.03 \times 10^[-3}$ - {cite:cts}`luecking_1981` p. 94 - * -`Lead` - - $21.4 10^{-8} - - 4.0 10^[-3} + * - `Lead` + - $21.4 \times 10^{-8}$ + - $4.0 \times 10^[-3}$ - {cite:cts}`luecking_1981` p. 94 - * -`Steel` - - $13.8 10^{-8} - - 4.5 10^[-3} + * - `Steel` + - $13.8 \times 10^{-8}$ + - $4.5 \times 10^[-3}$ - {cite:cts}`luecking_1981` p. 94 ``` diff --git a/docs/readthedocs/models/input/grid/cableType.md b/docs/readthedocs/models/input/grid/cableType.md index a991a2083..dd0f66c96 100644 --- a/docs/readthedocs/models/input/grid/cableType.md +++ b/docs/readthedocs/models/input/grid/cableType.md @@ -1,4 +1,4 @@ -# Cable type +# Cable Type Representation of a cable type. @@ -19,13 +19,13 @@ Type model of a cable. * - uuid - – - - + - Identifier * - id - – - Human readable identifier - * - core number + * - core number - – - Number of conductor cores in the cable @@ -62,7 +62,7 @@ Type model of a cable. - Rated frequency of the system * - skin effect coefficient - - + - - - Skin effect coefficient * - proximity effect coefficient @@ -74,11 +74,11 @@ Type model of a cable. - Capacitance per unit length * - Dielectric loss factor tanDelta - - + - - - Dielectric loss factor tan(δ) * - circulatingLossFactor - - + - - - Circulating loss factor * - eddyCurrentLossFactor @@ -101,53 +101,49 @@ The following table details the attributes required to define a single cable :class: wrapping :header-rows: 1 - * - Layer Attribute - - Type - - Description +* - Layer Attribute + - Type + - Description - * - name - - String - - Designation of the layer (e.g., "Main insulation") +* - name + - String + - Designation of the layer (e.g., "Main insulation") - * - material - - CableMaterial - - Material of the layer +* - material + - CableMaterial + - Material of the layer - * - innerDiameter - - Length - - Inner diameter of the layer +* - innerDiameter + - Length + - Inner diameter of the layer - * - outerDiameter - - Length - - Outer diameter of the layer +* - outerDiameter + - Length + - Outer diameter of the layer - * - thermalResistivity - - (K·m/W) - - Thermal resistivity of the material +* - thermalResistivity + - (K·m/W) + - Thermal resistivity of the material - * - thermalCapacitance - - J/(m³·K) - - Thermal capacitance of the material +* - thermalCapacitance + - J/(m³·K) + - Thermal capacitance of the material - * - area - - Optional Area - - Real cross-sectional area. If none, area will be calculated from geometry. +* - area + - Optional Area + - Real cross-sectional area. If none, area will be calculated from geometry. ``` Different cable materials and their thermal and electrical parameter are also given as described in [cableMaterial](#cable-material) ## Standard Cable Type Parameter -//FIXME - Following there are some standard line types with their source. To retrieve the data call the method `TypeSource.getStandardLineTypes()`. A ``csv file`` containing the types listed below can be found [here](https://github.com/ie3-institute/PowerSystemDataModel/tree/dev/input/StandardAssetTypes). This file can be used directly for any simulation with ``simona``. -The lines which source is ``simBench`` are from [here](https://simbench.de/en/download/datasets/). - ### Cables -//FIMXE + Some standard cables type parameter and geometries. ```{list-table} @@ -156,15 +152,43 @@ Some standard cables type parameter and geometries. :header-rows: 1 - * - uuid - - b [µS / km] - - g [µS / km] - - iMax [A] - - id - - r [Ω / km] - - vRated [kV] - - x [Ω / km] - - source +* - uuid + - id + - core_number + - conductor + - isolation + - screen + - filler + - armor + - jack + - limit_temperature + - frequency + - skin_effect_coefficient + - proximity_effect_coefficient + - electrical_capacitance + - tan_delta + - circulating_loss_factor + - eddy_current_loss_factor + - source + +* - b8152c3f-d12f-4857-9746-a30aef6aee08 + - CigreT880_33kVLandCable + - 1 + - "{""name"":""conductor"",""material"":""COPPER"",""crossSection"":""240.0"",""diameter"":""18.4"",""thermalResistivity"":""0.0026"",""thermalCapacitance"":""3.4e6"",""area"":""240.0"",""isCompacted"":false}" + - "[{""name"":""conductorScreen"",""material"":""SEMI_COND_SCREEN"",""innerDiameter"":""18.4"",""outerDiameter"":""19.4"",""thermalResistivity"":""4.0"",""thermalCapacitance"":""2.0e6"",""area"":null},{""name"":""insulation"",""material"":""XLPE"",""innerDiameter"":""19.4"",""outerDiameter"":""34.8"",""thermalResistivity"":""3.5"",""thermalCapacitance"":""2.4e6"",""area"":null},{""name"":""insulationScreen"",""material"":""SEMI_COND_SCREEN"",""innerDiameter"":""34.8"",""outerDiameter"":""35.8"",""thermalResistivity"":""4.0"",""thermalCapacitance"":""2.0e6"",""area"":null},{""name"":""screenTape"",""material"":""SC_TAPE"",""innerDiameter"":""35.8"",""outerDiameter"":""36.8"",""thermalResistivity"":""0.01"",""thermalCapacitance"":""3.0e6"",""area"":null}]", + - "{""name"":""screen"",""material"":""COPPER"",""innerDiameter"":""36.8"",""outerDiameter"":""38.6"",""thermalResistivity"":""0.0026"",""thermalCapacitance"":""3.4e6"",""area"":""35.62566"",""wiresNumber"":56,""wireDiameter"":""0.9"",""electricalResistivity"":""1.7241e-8""}" + - - + - - + - "[{""name"":""jackTape"",""material"":""SC_TAPE"",""innerDiameter"":""38.6"",""outerDiameter"":""39.2"",""thermalResistivity"":""0.01"",""thermalCapacitance"":""3.0e6"",""area"":null},{""name"":""jack"",""material"":""XLPE"",""innerDiameter"":""39.2"",""outerDiameter"":""43.6"",""thermalResistivity"":""3.5"",""thermalCapacitance"":""2.4e6"",""area"":null},{""name"":""outerCover"",""material"":""SEMI_COND_SCREEN"",""innerDiameter"":""43.6"",""outerDiameter"":""44.0"",""thermalResistivity"":""4.0"",""thermalCapacitance"":""2.0e6"",""area"":null}]" + - 90.0 + - 50.0 + - 1.0 + - 1.0 + - 0.000000000237683304 + - 0.004 + - 0.0435122656 + - 0.0 + - CIGRE TB880 B1.56 Power cable rating examples for calculation tool verification ``` diff --git a/docs/readthedocs/models/input/grid/line.md b/docs/readthedocs/models/input/grid/line.md index 61b0f3ac7..e713e3603 100644 --- a/docs/readthedocs/models/input/grid/line.md +++ b/docs/readthedocs/models/input/grid/line.md @@ -48,10 +48,6 @@ Type model of a line. Please note, that there is also a cable type model that ca * - vRated - kV - Rated voltage - - * - cableType - - Optional - - UUID of the cable type ``` @@ -59,8 +55,6 @@ A list with some standard line types can be found here: [Standard Line Types](#s ### Entity Model -The line entity model. - ```{list-table} :widths: auto :class: wrapping @@ -103,7 +97,7 @@ The line entity model. * - type - – - - UUID of the line type + - * - length - km diff --git a/docs/readthedocs/models/models.md b/docs/readthedocs/models/models.md index 43769a4c7..28d36621c 100644 --- a/docs/readthedocs/models/models.md +++ b/docs/readthedocs/models/models.md @@ -124,6 +124,8 @@ input/grid/transformer2w input/grid/transformer3w input/grid/measurementunit input/grid/gridcontainer +input/grid/cableMaterial +input/grid/cableType ``` #### Thermal Grid diff --git a/docs/readthedocs/references.md b/docs/readthedocs/references.md index b3b3ef086..79d778b13 100644 --- a/docs/readthedocs/references.md +++ b/docs/readthedocs/references.md @@ -3,6 +3,6 @@ References of publications PSDM referred on: ```{bibliography} _static/bibliography/bibtex.bib -:style: custom +:style: plain :all: ``` diff --git a/input/StandardAssetTypes/cable_type_input.csv b/input/StandardAssetTypes/cable_type_input.csv new file mode 100644 index 000000000..e19a3c2af --- /dev/null +++ b/input/StandardAssetTypes/cable_type_input.csv @@ -0,0 +1,2 @@ +uuid,id,core_number,conductor,isolation,screen,filler,armor,jack,limit_temperature,frequency,skin_effect_coefficient,proximity_effect_coefficient,electrical_capacitance,tan_delta,circulating_loss_factor,eddy_current_loss_factor +b8152c3f-d12f-4857-9746-a30aef6aee08,CigreT880_33kVLandCable,1,"{""name"":""conductor"",""material"":""COPPER"",""crossSection"":""240.0"",""diameter"":""18.4"",""thermalResistivity"":""0.0026"",""thermalCapacitance"":""3.4e6"",""area"":""240.0"",""isCompacted"":false}","[{""name"":""conductorScreen"",""material"":""SEMI_COND_SCREEN"",""innerDiameter"":""18.4"",""outerDiameter"":""19.4"",""thermalResistivity"":""4.0"",""thermalCapacitance"":""2.0e6"",""area"":null},{""name"":""insulation"",""material"":""XLPE"",""innerDiameter"":""19.4"",""outerDiameter"":""34.8"",""thermalResistivity"":""3.5"",""thermalCapacitance"":""2.4e6"",""area"":null},{""name"":""insulationScreen"",""material"":""SEMI_COND_SCREEN"",""innerDiameter"":""34.8"",""outerDiameter"":""35.8"",""thermalResistivity"":""4.0"",""thermalCapacitance"":""2.0e6"",""area"":null},{""name"":""screenTape"",""material"":""SC_TAPE"",""innerDiameter"":""35.8"",""outerDiameter"":""36.8"",""thermalResistivity"":""0.01"",""thermalCapacitance"":""3.0e6"",""area"":null}]","{""name"":""screen"",""material"":""COPPER"",""innerDiameter"":""36.8"",""outerDiameter"":""38.6"",""thermalResistivity"":""0.0026"",""thermalCapacitance"":""3.4e6"",""area"":""35.62566"",""wiresNumber"":56,""wireDiameter"":""0.9"",""electricalResistivity"":""1.7241e-8""}",,,"[{""name"":""jackTape"",""material"":""SC_TAPE"",""innerDiameter"":""38.6"",""outerDiameter"":""39.2"",""thermalResistivity"":""0.01"",""thermalCapacitance"":""3.0e6"",""area"":null},{""name"":""jack"",""material"":""XLPE"",""innerDiameter"":""39.2"",""outerDiameter"":""43.6"",""thermalResistivity"":""3.5"",""thermalCapacitance"":""2.4e6"",""area"":null},{""name"":""outerCover"",""material"":""SEMI_COND_SCREEN"",""innerDiameter"":""43.6"",""outerDiameter"":""44.0"",""thermalResistivity"":""4.0"",""thermalCapacitance"":""2.0e6"",""area"":null}]",90.0,50.0,1.0,1.0,0.000000000237683304,0.004,0.0435122656,0.0 \ No newline at end of file diff --git a/input/StandardAssetTypes/line_type_input.csv b/input/StandardAssetTypes/line_type_input.csv index 836e7083e..7f2592b4a 100644 --- a/input/StandardAssetTypes/line_type_input.csv +++ b/input/StandardAssetTypes/line_type_input.csv @@ -1,5 +1,5 @@ uuid,b,g,i_max,id,r,v_rated,x,cable_type -91617ab8-3de2-4fba-be45-a54473ba09a9,3.61283,0.0,1300.0,LineType_1,0.08,380.0,0.32, +91617ab8-3de2-4fba-be45-a54473ba09a9,3.61283,0.0,1300.0,LineType_1,0.08,380.0,0.32,b8152c3f-d12f-4857-9746-a30aef6aee08 b3b231ae-a971-4432-80d7-4ce2f2a56a32,3.22799,0.0,1950.0,LineType_4,0.033333,380.0,0.333333, 24595f91-8295-41f8-a3d8-c9418d860d9c,1.076,0.0,650.0,LineType_6,0.1,380.0,1.0, f0fc57ec-aa5a-4484-b870-be70a5428cbd,6.45597,0.0,3900.0,LineType_9,0.016667,380.0,0.166667,