Skip to content

Commit 75e10a9

Browse files
Merge branch 'dev' into ms/#543-enhance-timeseriesSources-with-future-activation-call
2 parents be66f2b + 6648bed commit 75e10a9

File tree

14 files changed

+18
-86
lines changed

14 files changed

+18
-86
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
### Fixed
1414

1515
### Changed
16+
- Storage minimum level parameter removed from cylindrical thermal storage [#1123](https://github.com/ie3-institute/PowerSystemDataModel/issues/1123)
1617

1718
## [5.1.0] - 2024-06-24
1819

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
id 'signing'
66
id 'pmd' // code check, working on source code
77
id 'com.diffplug.spotless' version '6.25.0' //code format
8-
id 'com.github.spotbugs' version '6.0.19' // code check, working on byte code
8+
id 'com.github.spotbugs' version '6.0.20' // code check, working on byte code
99
id 'de.undercouch.download' version '5.6.0'
1010
id 'kr.motd.sphinx' version '2.10.1' // documentation generation
1111
id 'jacoco' // java code coverage plugin
@@ -70,10 +70,10 @@ dependencies {
7070
// testing
7171
testImplementation "org.apache.groovy:groovy:$groovyBinaryVersion"
7272

73-
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.3'
73+
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0'
7474
testImplementation "org.spockframework:spock-core:2.3-groovy-$groovyVersion"
7575
testImplementation 'org.objenesis:objenesis:3.4' // Mock creation with constructor parameters
76-
testImplementation 'net.bytebuddy:byte-buddy:1.14.18' // Mocks of classes
76+
testImplementation 'net.bytebuddy:byte-buddy:1.14.19' // Mocks of classes
7777

7878
// testcontainers (docker framework for testing)
7979
testImplementation "org.testcontainers:testcontainers:$testcontainersVersion"
@@ -90,12 +90,12 @@ dependencies {
9090

9191
// Databases
9292
implementation 'org.influxdb:influxdb-java:2.24'
93-
implementation 'com.couchbase.client:java-client:3.7.1'
93+
implementation 'com.couchbase.client:java-client:3.7.2'
9494
runtimeOnly 'org.postgresql:postgresql:42.7.3' // postgresql jdbc driver required during runtime
9595

9696
implementation 'commons-io:commons-io:2.16.1' // I/O functionalities
9797
implementation 'commons-codec:commons-codec:1.17.1' // needed by commons-compress
98-
implementation 'org.apache.commons:commons-compress:1.26.2' // I/O functionalities
98+
implementation 'org.apache.commons:commons-compress:1.27.1' // I/O functionalities
9999
}
100100

101101
tasks.withType(JavaCompile) {

docs/readthedocs/models/input/thermal/cylindricalstorage.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ Model of a cylindrical thermal storage using a fluent to store thermal energy.
3838
3939
* - storageVolumeLvl
4040
- m³
41-
- Overall available storage volume
42-
43-
* - storageVolumeLvlMin
44-
- m³
45-
- Minimum permissible storage volume
41+
- Overall usable storage volume
4642
4743
* - inletTemp
4844
- °C

docs/readthedocs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ commonmark==0.9.1
22
recommonmark==0.7.1
33
Sphinx==7.4.7
44
sphinx-rtd-theme==2.0.0
5-
myst-parser==3.0.1
5+
myst-parser==4.0.0
66
markdown-it-py==3.0.0

docs/uml/main/input/ThermalDatamodelConcept.puml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ package models {
115115

116116
class CylindricalStorageInput {
117117
- storageVolumeLvl: ComparableQuantity<Volume> [m³]
118-
- storageVolumeLvlMin: ComparableQuantity<Volume> [m³]
119118
- inletTemp: ComparableQuantity<Temperature> [°C]
120119
- returnTemp: ComparableQuantity<Temperature> [°C]
121120
- c: ComparableQuantity<SpecificHeatCapacity> [kWh/(K*m³)]

src/main/java/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactory.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
public class CylindricalStorageInputFactory
2020
extends AssetInputEntityFactory<CylindricalStorageInput, ThermalUnitInputEntityData> {
2121
private static final String STORAGE_VOLUME_LVL = "storageVolumeLvl";
22-
private static final String STORAGE_VOLUME_LVL_MIN = "storageVolumeLvlMin";
2322
private static final String INLET_TEMP = "inletTemp";
2423
private static final String RETURN_TEMP = "returnTemp";
2524
private static final String C = "c";
@@ -30,7 +29,7 @@ public CylindricalStorageInputFactory() {
3029

3130
@Override
3231
protected String[] getAdditionalFields() {
33-
return new String[] {STORAGE_VOLUME_LVL, STORAGE_VOLUME_LVL_MIN, INLET_TEMP, RETURN_TEMP, C};
32+
return new String[] {STORAGE_VOLUME_LVL, INLET_TEMP, RETURN_TEMP, C};
3433
}
3534

3635
@Override
@@ -43,24 +42,13 @@ protected CylindricalStorageInput buildModel(
4342
final ThermalBusInput bus = data.getBusInput();
4443
final ComparableQuantity<Volume> storageVolumeLvl =
4544
data.getQuantity(STORAGE_VOLUME_LVL, StandardUnits.VOLUME);
46-
final ComparableQuantity<Volume> storageVolumeLvlMin =
47-
data.getQuantity(STORAGE_VOLUME_LVL_MIN, StandardUnits.VOLUME);
4845
final ComparableQuantity<Temperature> inletTemp =
4946
data.getQuantity(INLET_TEMP, StandardUnits.TEMPERATURE);
5047
final ComparableQuantity<Temperature> returnTemp =
5148
data.getQuantity(RETURN_TEMP, StandardUnits.TEMPERATURE);
5249
final ComparableQuantity<SpecificHeatCapacity> c =
5350
data.getQuantity(C, StandardUnits.SPECIFIC_HEAT_CAPACITY);
5451
return new CylindricalStorageInput(
55-
uuid,
56-
id,
57-
operator,
58-
operationTime,
59-
bus,
60-
storageVolumeLvl,
61-
storageVolumeLvlMin,
62-
inletTemp,
63-
returnTemp,
64-
c);
52+
uuid, id, operator, operationTime, bus, storageVolumeLvl, inletTemp, returnTemp, c);
6553
}
6654
}

src/main/java/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInput.java

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
public class CylindricalStorageInput extends ThermalStorageInput {
2020
/** Available storage volume (typically in m³) */
2121
private final ComparableQuantity<Volume> storageVolumeLvl;
22-
/** Minimum permissible storage volume (typically in m³) */
23-
private final ComparableQuantity<Volume> storageVolumeLvlMin;
2422
/** Temperature of the inlet (typically in C) */
2523
private final ComparableQuantity<Temperature> inletTemp;
2624
/** Temperature of the outlet (typically in C) */
@@ -35,7 +33,6 @@ public class CylindricalStorageInput extends ThermalStorageInput {
3533
* @param operationTime operation time of the asset
3634
* @param bus Thermal bus, a thermal unit is connected to
3735
* @param storageVolumeLvl Available storage volume
38-
* @param storageVolumeLvlMin Minimum permissible storage volume
3936
* @param inletTemp Temperature of the inlet
4037
* @param returnTemp Temperature of the outlet
4138
* @param c Specific heat capacity of the storage medium
@@ -47,13 +44,11 @@ public CylindricalStorageInput(
4744
OperationTime operationTime,
4845
ThermalBusInput bus,
4946
ComparableQuantity<Volume> storageVolumeLvl,
50-
ComparableQuantity<Volume> storageVolumeLvlMin,
5147
ComparableQuantity<Temperature> inletTemp,
5248
ComparableQuantity<Temperature> returnTemp,
5349
ComparableQuantity<SpecificHeatCapacity> c) {
5450
super(uuid, id, operator, operationTime, bus);
5551
this.storageVolumeLvl = storageVolumeLvl.to(StandardUnits.VOLUME);
56-
this.storageVolumeLvlMin = storageVolumeLvlMin.to(StandardUnits.VOLUME);
5752
this.inletTemp = inletTemp.to(StandardUnits.TEMPERATURE);
5853
this.returnTemp = returnTemp.to(StandardUnits.TEMPERATURE);
5954
this.c = c.to(StandardUnits.SPECIFIC_HEAT_CAPACITY);
@@ -64,7 +59,6 @@ public CylindricalStorageInput(
6459
* @param id Identifier of the thermal unit
6560
* @param bus Thermal bus, a thermal unit is connected to
6661
* @param storageVolumeLvl Available storage volume
67-
* @param storageVolumeLvlMin Minimum permissible storage volume
6862
* @param inletTemp Temperature of the inlet
6963
* @param returnTemp Temperature of the outlet
7064
* @param c Specific heat capacity of the storage medium
@@ -74,13 +68,11 @@ public CylindricalStorageInput(
7468
String id,
7569
ThermalBusInput bus,
7670
ComparableQuantity<Volume> storageVolumeLvl,
77-
ComparableQuantity<Volume> storageVolumeLvlMin,
7871
ComparableQuantity<Temperature> inletTemp,
7972
ComparableQuantity<Temperature> returnTemp,
8073
ComparableQuantity<SpecificHeatCapacity> c) {
8174
super(uuid, id, bus);
8275
this.storageVolumeLvl = storageVolumeLvl.to(StandardUnits.VOLUME);
83-
this.storageVolumeLvlMin = storageVolumeLvlMin.to(StandardUnits.VOLUME);
8476
this.inletTemp = inletTemp.to(StandardUnits.TEMPERATURE);
8577
this.returnTemp = returnTemp.to(StandardUnits.TEMPERATURE);
8678
this.c = c.to(StandardUnits.SPECIFIC_HEAT_CAPACITY);
@@ -90,10 +82,6 @@ public ComparableQuantity<Volume> getStorageVolumeLvl() {
9082
return storageVolumeLvl;
9183
}
9284

93-
public ComparableQuantity<Volume> getStorageVolumeLvlMin() {
94-
return storageVolumeLvlMin;
95-
}
96-
9785
public ComparableQuantity<Temperature> getInletTemp() {
9886
return inletTemp;
9987
}
@@ -117,16 +105,14 @@ public boolean equals(Object o) {
117105
if (!(o instanceof CylindricalStorageInput that)) return false;
118106
if (!super.equals(o)) return false;
119107
return storageVolumeLvl.equals(that.storageVolumeLvl)
120-
&& storageVolumeLvlMin.equals(that.storageVolumeLvlMin)
121108
&& inletTemp.equals(that.inletTemp)
122109
&& returnTemp.equals(that.returnTemp)
123110
&& c.equals(that.c);
124111
}
125112

126113
@Override
127114
public int hashCode() {
128-
return Objects.hash(
129-
super.hashCode(), storageVolumeLvl, storageVolumeLvlMin, inletTemp, returnTemp, c);
115+
return Objects.hash(super.hashCode(), storageVolumeLvl, inletTemp, returnTemp, c);
130116
}
131117

132118
@Override
@@ -144,8 +130,6 @@ public String toString() {
144130
+ getThermalBus().getUuid()
145131
+ ", storageVolumeLvl="
146132
+ storageVolumeLvl
147-
+ ", storageVolumeLvlMin="
148-
+ storageVolumeLvlMin
149133
+ ", inletTemp="
150134
+ inletTemp
151135
+ ", returnTemp="
@@ -164,15 +148,13 @@ public static class CylindricalStorageInputCopyBuilder
164148
extends ThermalStorageInputCopyBuilder<CylindricalStorageInputCopyBuilder> {
165149

166150
private ComparableQuantity<Volume> storageVolumeLvl;
167-
private ComparableQuantity<Volume> storageVolumeLvlMin;
168151
private ComparableQuantity<Temperature> inletTemp;
169152
private ComparableQuantity<Temperature> returnTemp;
170153
private ComparableQuantity<SpecificHeatCapacity> c;
171154

172155
private CylindricalStorageInputCopyBuilder(CylindricalStorageInput entity) {
173156
super(entity);
174157
this.storageVolumeLvl = entity.getStorageVolumeLvl();
175-
this.storageVolumeLvlMin = entity.getStorageVolumeLvlMin();
176158
this.inletTemp = entity.getInletTemp();
177159
this.returnTemp = entity.getReturnTemp();
178160
this.c = entity.getC();
@@ -184,12 +166,6 @@ public CylindricalStorageInputCopyBuilder storageVolumeLvl(
184166
return this;
185167
}
186168

187-
public CylindricalStorageInputCopyBuilder storageVolumeLvlMin(
188-
ComparableQuantity<Volume> storageVolumeLvlMin) {
189-
this.storageVolumeLvlMin = storageVolumeLvlMin;
190-
return this;
191-
}
192-
193169
public CylindricalStorageInputCopyBuilder inletTemp(ComparableQuantity<Temperature> inletTemp) {
194170
this.inletTemp = inletTemp;
195171
return this;
@@ -209,7 +185,6 @@ public CylindricalStorageInputCopyBuilder c(ComparableQuantity<SpecificHeatCapac
209185
@Override
210186
public CylindricalStorageInputCopyBuilder scale(Double factor) {
211187
storageVolumeLvl(storageVolumeLvl.multiply(factor));
212-
storageVolumeLvlMin(storageVolumeLvlMin.multiply(factor));
213188
return this;
214189
}
215190

@@ -222,7 +197,6 @@ public CylindricalStorageInput build() {
222197
getOperationTime(),
223198
getThermalBus(),
224199
storageVolumeLvl,
225-
storageVolumeLvlMin,
226200
inletTemp,
227201
returnTemp,
228202
c);

src/main/java/edu/ie3/datamodel/utils/validation/ThermalUnitValidationUtils.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ private static List<Try<Void, InvalidEntityException>> checkThermalHouse(
182182
* <ul>
183183
* <li>it is not null
184184
* <li>its available storage volume is positive
185-
* <li>its minimum permissible storage volume is positive and not greater than the available
186-
* storage volume
187185
* <li>its inlet temperature is equal/greater than the outlet temperature
188186
* <li>its specific heat capacity is positive
189187
* </ul>
@@ -213,25 +211,13 @@ private static List<Try<Void, InvalidEntityException>> checkCylindricalStorage(
213211
new InvalidEntityException(
214212
"Inlet temperature of the cylindrical storage cannot be lower than outlet temperature",
215213
cylindricalStorageInput)));
216-
// Check if minimum permissible storage volume is lower than overall available storage volume
217-
exceptions.add(
218-
Try.ofVoid(
219-
cylindricalStorageInput
220-
.getStorageVolumeLvlMin()
221-
.isGreaterThan(cylindricalStorageInput.getStorageVolumeLvl()),
222-
() ->
223-
new InvalidEntityException(
224-
"Minimum permissible storage volume of the cylindrical storage cannot be higher than overall available storage volume",
225-
cylindricalStorageInput)));
226214

227215
exceptions.add(
228216
Try.ofVoid(
229217
() ->
230218
detectZeroOrNegativeQuantities(
231219
new Quantity<?>[] {
232-
cylindricalStorageInput.getStorageVolumeLvl(),
233-
cylindricalStorageInput.getStorageVolumeLvlMin(),
234-
cylindricalStorageInput.getC()
220+
cylindricalStorageInput.getStorageVolumeLvl(), cylindricalStorageInput.getC()
235221
},
236222
cylindricalStorageInput),
237223
InvalidEntityException.class));

src/test/groovy/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactoryTest.groovy

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ class CylindricalStorageInputFactoryTest extends Specification implements Facto
3232
"uuid" : "91ec3bcf-1777-4d38-af67-0bf7c9fa73c7",
3333
"id" : "TestID",
3434
"storagevolumelvl" : "3",
35-
"storagevolumelvlmin": "4",
36-
"inlettemp" : "5",
37-
"returntemp" : "6",
38-
"c" : "7"
35+
"inlettemp" : "4",
36+
"returntemp" : "5",
37+
"c" : "6"
3938
]
4039
def inputClass = CylindricalStorageInput
4140
def thermalBusInput = Mock(ThermalBusInput)
@@ -53,7 +52,6 @@ class CylindricalStorageInputFactoryTest extends Specification implements Facto
5352
assert id == parameter["id"]
5453
assert thermalBus == thermalBusInput
5554
assert storageVolumeLvl == getQuant(parameter["storagevolumelvl"], StandardUnits.VOLUME)
56-
assert storageVolumeLvlMin == getQuant(parameter["storagevolumelvlmin"], StandardUnits.VOLUME)
5755
assert inletTemp == getQuant(parameter["inlettemp"], StandardUnits.TEMPERATURE)
5856
assert returnTemp == getQuant(parameter["returntemp"], StandardUnits.TEMPERATURE)
5957
assert c == getQuant(parameter["c"], StandardUnits.SPECIFIC_HEAT_CAPACITY)

src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalSourceTest.groovy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta {
6565
operationTime == sptd.thermalStorage.operationTime
6666
thermalBus == sptd.thermalStorage.thermalBus
6767
storageVolumeLvl == sptd.storageVolumeLvl
68-
storageVolumeLvlMin == sptd.storageVolumeLvlMin
6968
inletTemp == sptd.inletTemp
7069
returnTemp == sptd.returnTemp
7170
c == sptd.c
@@ -84,7 +83,6 @@ class CsvThermalSourceTest extends Specification implements CsvTestDataMeta {
8483
operationTime == sptd.thermalStorage.operationTime
8584
thermalBus == sptd.thermalStorage.thermalBus
8685
storageVolumeLvl == sptd.storageVolumeLvl
87-
storageVolumeLvlMin == sptd.storageVolumeLvlMin
8886
inletTemp == sptd.inletTemp
8987
returnTemp == sptd.returnTemp
9088
c == sptd.c

0 commit comments

Comments
 (0)