diff --git a/docs/uml/main/InputDatamodelConcept.puml b/docs/uml/main/InputDatamodelConcept.puml index 5044f62bd..79af3962e 100644 --- a/docs/uml/main/InputDatamodelConcept.puml +++ b/docs/uml/main/InputDatamodelConcept.puml @@ -36,11 +36,20 @@ abstract Class ConnectorInput { } ConnectorInput --|> AssetInput -abstract Class AssetCharacteristicsInput { -+ type: String +abstract Class AssetCharacteristicsInput { + - type: T + - characteristic: String } AssetCharacteristicsInput --|> InputEntity +Class WecCharacteristicInput { +} +WecCharacteristicInput --|> AssetCharacteristicsInput: <>T::WecTypeInput + +Class EvCharacteristicInput { +} +EvCharacteristicInput --|> AssetCharacteristicsInput: <>T::EvTypeInput + abstract Class AssetTypeInput { + id: String } @@ -161,18 +170,6 @@ Class Transformer3WTypeInput { } Transformer3WTypeInput --|> AssetTypeInput - -Class WecCharacteristicInput { -+ cpCharacteristic: String -} -WecCharacteristicInput --|> AssetCharacteristicsInput - -Class EvCharacteristicInput { - ??? -} -EvCharacteristicInput --|> AssetCharacteristicsInput - - Class RandomLoadParameter { + quarterHour: Integer + kWd: Double diff --git a/docs/uml/test/TestDataHierarchy.puml b/docs/uml/test/TestDataHierarchy.puml index 83831602a..a009dc660 100644 --- a/docs/uml/test/TestDataHierarchy.puml +++ b/docs/uml/test/TestDataHierarchy.puml @@ -2,7 +2,9 @@ Interface GridTestData Interface ComplexTopology Interface SystemParticipantTestData +Interface TypeTestData GridTestData <|-- ComplexTopology GridTestData <|-- SystemParticipantTestData +GridTestData <|-- TypeTestData @enduml \ No newline at end of file diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/NodeInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/NodeInputFactory.java index eabe92493..6bdedd494 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/NodeInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/NodeInputFactory.java @@ -17,10 +17,10 @@ public class NodeInputFactory extends AssetInputEntityFactory { private static final String V_TARGET = "vtarget"; - public static final String V_RATED = "vrated"; + public static final String V_RATED = "vRated"; private static final String SLACK = "slack"; private static final String GEO_POSITION = "geoposition"; - public static final String VOLT_LVL = "voltlvl"; + public static final String VOLT_LVL = "voltLvl"; private static final String SUBNET = "subnet"; public NodeInputFactory() { @@ -29,7 +29,9 @@ public NodeInputFactory() { @Override protected String[] getAdditionalFields() { - return new String[] {V_TARGET, V_RATED, SLACK, GEO_POSITION, VOLT_LVL, SUBNET}; + return new String[] { + V_TARGET, V_RATED.toLowerCase(), SLACK, GEO_POSITION, VOLT_LVL.toLowerCase(), SUBNET + }; } @Override @@ -43,7 +45,7 @@ protected NodeInput buildModel( data.getQuantity(V_TARGET, StandardUnits.TARGET_VOLTAGE_MAGNITUDE); final boolean slack = data.getBoolean(SLACK); final Point geoPosition = data.getPoint(GEO_POSITION).orElse(null); - final VoltageLevel voltLvl = data.getVoltageLvl(VOLT_LVL, V_RATED); + final VoltageLevel voltLvl = data.getVoltageLvl(VOLT_LVL.toLowerCase(), V_RATED.toLowerCase()); final int subnet = data.getInt(SUBNET); return new NodeInput( uuid, operationTime, operatorInput, id, vTarget, slack, geoPosition, voltLvl, subnet); diff --git a/src/main/java/edu/ie3/datamodel/io/factory/typeinput/SystemParticipantTypeInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/SystemParticipantTypeInputFactory.java index 148837c65..ab1f04fd2 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/typeinput/SystemParticipantTypeInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/typeinput/SystemParticipantTypeInputFactory.java @@ -37,7 +37,7 @@ public class SystemParticipantTypeInputFactory private static final String E_CONS = "econs"; // BmTypeInput - private static final String LOAD_GRADIENT = "loadgradient"; + private static final String ACTIVE_POWER_GRADIENT = "activepowergradient"; // WecTypeInput private static final String ROTOR_AREA = "rotorarea"; @@ -50,7 +50,6 @@ public class SystemParticipantTypeInputFactory // StorageTypeInput private static final String P_MAX = "pmax"; - private static final String CP_RATE = "cprate"; private static final String ETA = "eta"; private static final String DOD = "dod"; private static final String LIFETIME = "lifetime"; @@ -77,7 +76,7 @@ protected List> getFields(SimpleEntityData data) { } else if (data.getEntityClass().equals(HpTypeInput.class)) { constructorParameters = expandSet(standardConstructorParams, P_THERMAL); } else if (data.getEntityClass().equals(BmTypeInput.class)) { - constructorParameters = expandSet(standardConstructorParams, LOAD_GRADIENT, ETA_CONV); + constructorParameters = expandSet(standardConstructorParams, ACTIVE_POWER_GRADIENT, ETA_CONV); } else if (data.getEntityClass().equals(WecTypeInput.class)) { constructorParameters = expandSet(standardConstructorParams, ETA_CONV, ROTOR_AREA, HUB_HEIGHT); @@ -87,7 +86,14 @@ protected List> getFields(SimpleEntityData data) { } else if (data.getEntityClass().equals(StorageTypeInput.class)) { constructorParameters = expandSet( - standardConstructorParams, E_STORAGE, P_MAX, CP_RATE, ETA, DOD, LIFETIME, LIFECYCLE); + standardConstructorParams, + E_STORAGE, + P_MAX, + ACTIVE_POWER_GRADIENT, + ETA, + DOD, + LIFETIME, + LIFECYCLE); } return Collections.singletonList(constructorParameters); @@ -156,7 +162,7 @@ private SystemParticipantTypeInput buildBmTypeInput( Quantity sRated, double cosPhi) { Quantity loadGradient = - data.getQuantity(LOAD_GRADIENT, StandardUnits.LOAD_GRADIENT); + data.getQuantity(ACTIVE_POWER_GRADIENT, StandardUnits.ACTIVE_POWER_GRADIENT); Quantity etaConv = data.getQuantity(ETA_CONV, StandardUnits.EFFICIENCY); return new BmTypeInput(uuid, id, capEx, opEx, loadGradient, sRated, cosPhi, etaConv); @@ -204,14 +210,26 @@ private SystemParticipantTypeInput buildStorageTypeInput( double cosPhi) { Quantity eStorage = data.getQuantity(E_STORAGE, StandardUnits.ENERGY_IN); Quantity pMax = data.getQuantity(P_MAX, StandardUnits.ACTIVE_POWER_IN); - Quantity cprate = data.getQuantity(CP_RATE, StandardUnits.CP_RATE); + Quantity activePowerGradient = + data.getQuantity(ACTIVE_POWER_GRADIENT, StandardUnits.ACTIVE_POWER_GRADIENT); Quantity eta = data.getQuantity(ETA, StandardUnits.EFFICIENCY); Quantity dod = data.getQuantity(DOD, StandardUnits.DOD); Quantity