Skip to content

Commit ea750dd

Browse files
further changes for domestic hot water storage
1 parent e1cb1b3 commit ea750dd

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

src/main/java/edu/ie3/datamodel/io/source/ThermalSource.java

+17-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import java.util.Map;
1515
import java.util.Set;
1616
import java.util.UUID;
17+
import java.util.stream.Collectors;
1718
import java.util.stream.Stream;
1819

1920
/**
@@ -124,8 +125,14 @@ public Map<UUID, ThermalBusInput> getThermalBuses(Map<UUID, OperatorInput> opera
124125
* @return a map of UUID to object- and uuid-unique {@link ThermalStorageInput} entities
125126
*/
126127
public Map<UUID, ThermalStorageInput> getThermalStorages() throws SourceException {
127-
return getCylindricalStorages().stream().collect(toMap());
128-
// FIXME
128+
return Stream.concat(
129+
getCylindricalStorages().stream(),
130+
getDomesticHotWaterStorages().stream()
131+
)
132+
.collect(Collectors.toMap(
133+
ThermalStorageInput::getUuid,
134+
storage -> storage
135+
));
129136
}
130137

131138
/**
@@ -150,7 +157,14 @@ public Map<UUID, ThermalStorageInput> getThermalStorages() throws SourceExceptio
150157
public Map<UUID, ThermalStorageInput> getThermalStorages(
151158
Map<UUID, OperatorInput> operators, Map<UUID, ThermalBusInput> thermalBuses)
152159
throws SourceException {
153-
return getCylindricalStorages(operators, thermalBuses).stream().collect(toMap());
160+
return Stream.concat(
161+
getCylindricalStorages(operators, thermalBuses).stream(),
162+
getDomesticHotWaterStorages(operators, thermalBuses).stream()
163+
)
164+
.collect(Collectors.toMap(
165+
ThermalStorageInput::getUuid,
166+
storage -> storage
167+
));
154168
}
155169

156170
/**

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class DomesticHotWaterStorageInput extends ThermalStorageInput {
3232
private final ComparableQuantity<Power> pThermalMax;
3333

3434
/**
35-
* @param uuid Unique identifier of a cylindrical storage
35+
* @param uuid Unique identifier of a domestic hot water storage
3636
* @param id Identifier of the thermal unit
3737
* @param operator operator of the asset
3838
* @param operationTime operation time of the asset
@@ -66,7 +66,7 @@ public DomesticHotWaterStorageInput(
6666
}
6767

6868
/**
69-
* @param uuid Unique identifier of a cylindrical storage
69+
* @param uuid Unique identifier of a domestic hot water storage
7070
* @param id Identifier of the thermal unit
7171
* @param bus Thermal bus, a thermal unit is connected to
7272
* @param storageVolumeLvl Available storage volume

0 commit comments

Comments
 (0)