-
Notifications
You must be signed in to change notification settings - Fork 5
/
SystemParticipantSource.java
425 lines (400 loc) · 22.2 KB
/
SystemParticipantSource.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
/*
* © 2021. TU Dortmund University,
* Institute of Energy Systems, Energy Efficiency and Energy Economics,
* Research group Distribution grid planning and operation
*/
package edu.ie3.datamodel.io.source;
import edu.ie3.datamodel.exceptions.RawInputDataException;
import edu.ie3.datamodel.models.input.NodeInput;
import edu.ie3.datamodel.models.input.OperatorInput;
import edu.ie3.datamodel.models.input.container.SystemParticipants;
import edu.ie3.datamodel.models.input.system.*;
import edu.ie3.datamodel.models.input.system.type.*;
import edu.ie3.datamodel.models.input.thermal.ThermalBusInput;
import edu.ie3.datamodel.models.input.thermal.ThermalStorageInput;
import java.util.Optional;
import java.util.Set;
/**
* Interface that provides the capability to build entities of type {@link SystemParticipantInput}
* as well as {@link SystemParticipants} container from .csv files.
*
* @version 0.1
* @since 08.04.20
*/
public interface SystemParticipantSource extends DataSource {
/**
* Should return either a consistent instance of {@link SystemParticipants} wrapped in {@link
* Optional} or an empty {@link Optional}. The decision to use {@link Optional} instead of
* returning the {@link SystemParticipants} instance directly is motivated by the fact, that a
* {@link SystemParticipants} is a container instance that depends on several other entities.
* Without being complete, it is useless for further processing.
*
* <p>Hence, whenever at least one entity {@link SystemParticipants} depends on cannot be
* provided, {@link Optional#empty()} should be returned and extensive logging should provide
* enough information to debug the error and fix the persistent data that has been failed to
* processed.
*
* <p>Furthermore, it is expected, that the specific implementation of this method ensures not
* only the completeness of the resulting {@link SystemParticipants} instance, but also its
* validity e.g. in the sense that not duplicate UUIDs exist within all entities contained in the
* returning instance.
*
* @return either a valid, complete {@link SystemParticipants} or throws a {@link
* edu.ie3.datamodel.exceptions.RawInputDataException}
*/
SystemParticipants getSystemParticipants() throws RawInputDataException;
/**
* Returns a unique set of {@link FixedFeedInInput} instances.
*
* <p>This set has to be unique in the sense of object uniqueness but also in the sense of {@link
* java.util.UUID} uniqueness of the provided {@link FixedFeedInInput} which has to be checked
* manually, as {@link FixedFeedInInput#equals(Object)} is NOT restricted on the uuid of {@link
* FixedFeedInInput}.
*
* @return a set of object and uuid unique {@link FixedFeedInInput} entities
*/
Set<FixedFeedInInput> getFixedFeedIns();
/**
* Returns a set of {@link FixedFeedInInput} instances. This set has to be unique in the sense of
* object uniqueness but also in the sense of {@link java.util.UUID} uniqueness of the provided
* {@link FixedFeedInInput} which has to be checked manually, as {@link
* FixedFeedInInput#equals(Object)} is NOT restricted on the uuid of {@link FixedFeedInInput}.
*
* <p>In contrast to {@link #getFixedFeedIns()} this interface provides the ability to pass in an
* already existing set of {@link NodeInput} and {@link OperatorInput} entities, the {@link
* FixedFeedInInput} instances depend on. Doing so, already loaded nodes can be recycled to
* improve performance and prevent unnecessary loading operations.
*
* <p>If something fails during the creation process it's up to the concrete implementation of an
* empty set or a set with all entities that has been able to be build is returned.
*
* @param operators a set of object and uuid unique {@link OperatorInput} that should be used for
* the returning instances
* @param nodes a set of object and uuid unique {@link NodeInput} entities
* @return a set of object and uuid unique {@link FixedFeedInInput} entities
*/
Set<FixedFeedInInput> getFixedFeedIns(Set<NodeInput> nodes, Set<OperatorInput> operators);
/**
* Returns a unique set of {@link PvInput} instances.
*
* <p>This set has to be unique in the sense of object uniqueness but also in the sense of {@link
* java.util.UUID} uniqueness of the provided {@link PvInput} which has to be checked manually, as
* {@link PvInput#equals(Object)} is NOT restricted on the uuid of {@link PvInput}.
*
* @return a set of object and uuid unique {@link PvInput} entities
*/
Set<PvInput> getPvPlants();
/**
* Returns a set of {@link PvInput} instances. This set has to be unique in the sense of object
* uniqueness but also in the sense of {@link java.util.UUID} uniqueness of the provided {@link
* PvInput} which has to be checked manually, as {@link PvInput#equals(Object)} is NOT restricted
* on the uuid of {@link PvInput}.
*
* <p>In contrast to {@link #getPvPlants()} this interface provides the ability to pass in an
* already existing set of {@link NodeInput} and {@link OperatorInput} entities, the {@link
* PvInput} instances depend on. Doing so, already loaded nodes can be recycled to improve
* performance and prevent unnecessary loading operations.
*
* <p>If something fails during the creation process it's up to the concrete implementation of an
* empty set or a set with all entities that has been able to be build is returned.
*
* @param operators a set of object and uuid unique {@link OperatorInput} that should be used for
* the returning instances
* @param nodes a set of object and uuid unique {@link NodeInput} entities
* @return a set of object and uuid unique {@link PvInput} entities
*/
Set<PvInput> getPvPlants(Set<NodeInput> nodes, Set<OperatorInput> operators);
/**
* Returns a unique set of {@link LoadInput} instances.
*
* <p>This set has to be unique in the sense of object uniqueness but also in the sense of {@link
* java.util.UUID} uniqueness of the provided {@link LoadInput} which has to be checked manually,
* as {@link LoadInput#equals(Object)} is NOT restricted on the uuid of {@link LoadInput}.
*
* @return a set of object and uuid unique {@link LoadInput} entities
*/
Set<LoadInput> getLoads();
/**
* Returns a set of {@link LoadInput} instances. This set has to be unique in the sense of object
* uniqueness but also in the sense of {@link java.util.UUID} uniqueness of the provided {@link
* LoadInput} which has to be checked manually, as {@link LoadInput#equals(Object)} is NOT
* restricted on the uuid of {@link LoadInput}.
*
* <p>In contrast to {@link #getLoads()} this interface provides the ability to pass in an already
* existing set of {@link NodeInput} and {@link OperatorInput} entities, the {@link LoadInput}
* instances depend on. Doing so, already loaded nodes can be recycled to improve performance and
* prevent unnecessary loading operations.
*
* <p>If something fails during the creation process it's up to the concrete implementation of an
* empty set or a set with all entities that has been able to be build is returned.
*
* @param operators a set of object and uuid unique {@link OperatorInput} that should be used for
* the returning instances
* @param nodes a set of object and uuid unique {@link NodeInput} entities
* @return a set of object and uuid unique {@link LoadInput} entities
*/
Set<LoadInput> getLoads(Set<NodeInput> nodes, Set<OperatorInput> operators);
/**
* Returns a unique set of {@link EvcsInput} instances.
*
* <p>This set has to be unique in the sense of object uniqueness but also in the sense of {@link
* java.util.UUID} uniqueness of the provided {@link EvcsInput} which has to be checked manually,
* as {@link EvcsInput#equals(Object)} is NOT restricted on the uuid of {@link EvcsInput}.
*
* @return a set of object and uuid unique {@link EvcsInput} entities
*/
Set<EvcsInput> getEvCS();
/**
* Returns a set of {@link EvcsInput} instances. This set has to be unique in the sense of object
* uniqueness but also in the sense of {@link java.util.UUID} uniqueness of the provided {@link
* EvcsInput} which has to be checked manually, as {@link EvcsInput#equals(Object)} is NOT
* restricted on the uuid of {@link EvcsInput}.
*
* <p>In contrast to {@link #getEvCS()} this interface provides the ability to pass in an already
* existing set of {@link NodeInput} and {@link OperatorInput} entities, the {@link EvcsInput}
* instances depend on. Doing so, already loaded nodes can be recycled to improve performance and
* prevent unnecessary loading operations.
*
* <p>If something fails during the creation process it's up to the concrete implementation of an
* empty set or a set with all entities that has been able to be build is returned.
*
* @param operators a set of object and uuid unique {@link OperatorInput} that should be used for
* the returning instances
* @param nodes a set of object and uuid unique {@link NodeInput} entities
* @return a set of object and uuid unique {@link EvcsInput} entities
*/
Set<EvcsInput> getEvCS(Set<NodeInput> nodes, Set<OperatorInput> operators);
/**
* Returns a unique set of {@link BmInput} instances.
*
* <p>This set has to be unique in the sense of object uniqueness but also in the sense of {@link
* java.util.UUID} uniqueness of the provided {@link BmInput} which has to be checked manually, as
* {@link BmInput#equals(Object)} is NOT restricted on the uuid of {@link BmInput}.
*
* @return a set of object and uuid unique {@link BmInput} entities
*/
Set<BmInput> getBmPlants();
/**
* Returns a set of {@link BmInput} instances. This set has to be unique in the sense of object
* uniqueness but also in the sense of {@link java.util.UUID} uniqueness of the provided {@link
* BmInput} which has to be checked manually, as {@link BmInput#equals(Object)} is NOT restricted
* on the uuid of {@link BmInput}.
*
* <p>In contrast to {@link #getBmPlants()} this interface provides the ability to pass in an
* already existing set of {@link NodeInput}, {@link BmTypeInput} and {@link OperatorInput}
* entities, the {@link BmInput} instances depend on. Doing so, already loaded nodes can be
* recycled to improve performance and prevent unnecessary loading operations.
*
* <p>If something fails during the creation process it's up to the concrete implementation of an
* empty set or a set with all entities that has been able to be build is returned.
*
* @param operators a set of object and uuid unique {@link OperatorInput} that should be used for
* the returning instances
* @param nodes a set of object and uuid unique {@link NodeInput} entities
* @param types a set of object and uuid unique {@link BmTypeInput} entities
* @return a set of object and uuid unique {@link BmInput} entities
*/
Set<BmInput> getBmPlants(
Set<NodeInput> nodes, Set<OperatorInput> operators, Set<BmTypeInput> types);
/**
* Returns a unique set of {@link StorageInput} instances.
*
* <p>This set has to be unique in the sense of object uniqueness but also in the sense of {@link
* java.util.UUID} uniqueness of the provided {@link StorageInput} which has to be checked
* manually, as {@link StorageInput#equals(Object)} is NOT restricted on the uuid of {@link
* StorageInput}.
*
* @return a set of object and uuid unique {@link StorageInput} entities
*/
Set<StorageInput> getStorages();
/**
* Returns a set of {@link StorageInput} instances. This set has to be unique in the sense of
* object uniqueness but also in the sense of {@link java.util.UUID} uniqueness of the provided
* {@link StorageInput} which has to be checked manually, as {@link StorageInput#equals(Object)}
* is NOT restricted on the uuid of {@link StorageInput}.
*
* <p>In contrast to {@link #getStorages()} this interface provides the ability to pass in an
* already existing set of {@link NodeInput}, {@link StorageTypeInput} and {@link OperatorInput}
* entities, the {@link StorageInput} instances depend on. Doing so, already loaded nodes can be
* recycled to improve performance and prevent unnecessary loading operations.
*
* <p>If something fails during the creation process it's up to the concrete implementation of an
* empty set or a set with all entities that has been able to be build is returned.
*
* @param operators a set of object and uuid unique {@link OperatorInput} that should be used for
* the returning instances
* @param nodes a set of object and uuid unique {@link NodeInput} entities
* @param types a set of object and uuid unique {@link StorageTypeInput} entities
* @return a set of object and uuid unique {@link StorageInput} entities
*/
Set<StorageInput> getStorages(
Set<NodeInput> nodes, Set<OperatorInput> operators, Set<StorageTypeInput> types);
/**
* Returns a unique set of {@link WecInput} instances.
*
* <p>This set has to be unique in the sense of object uniqueness but also in the sense of {@link
* java.util.UUID} uniqueness of the provided {@link WecInput} which has to be checked manually,
* as {@link WecInput#equals(Object)} is NOT restricted on the uuid of {@link WecInput}.
*
* @return a set of object and uuid unique {@link WecInput} entities
*/
Set<WecInput> getWecPlants();
/**
* Returns a set of {@link WecInput} instances. This set has to be unique in the sense of object
* uniqueness but also in the sense of {@link java.util.UUID} uniqueness of the provided {@link
* WecInput} which has to be checked manually, as {@link WecInput#equals(Object)} is NOT
* restricted on the uuid of {@link WecInput}.
*
* <p>In contrast to {@link #getWecPlants()} this interface provides the ability to pass in an
* already existing set of {@link NodeInput}, {@link WecTypeInput} and {@link OperatorInput}
* entities, the {@link WecInput} instances depend on. Doing so, already loaded nodes can be
* recycled to improve performance and prevent unnecessary loading operations.
*
* <p>If something fails during the creation process it's up to the concrete implementation of an
* empty set or a set with all entities that has been able to be build is returned.
*
* @param operators a set of object and uuid unique {@link OperatorInput} that should be used for
* the returning instances
* @param nodes a set of object and uuid unique {@link NodeInput} entities
* @param types a set of object and uuid unique {@link WecTypeInput} entities
* @return a set of object and uuid unique {@link WecInput} entities
*/
Set<WecInput> getWecPlants(
Set<NodeInput> nodes, Set<OperatorInput> operators, Set<WecTypeInput> types);
/**
* Returns a unique set of {@link EvInput} instances.
*
* <p>This set has to be unique in the sense of object uniqueness but also in the sense of {@link
* java.util.UUID} uniqueness of the provided {@link EvInput} which has to be checked manually, as
* {@link EvInput#equals(Object)} is NOT restricted on the uuid of {@link EvInput}.
*
* @return a set of object and uuid unique {@link EvInput} entities
*/
Set<EvInput> getEvs();
/**
* Returns a set of {@link EvInput} instances. This set has to be unique in the sense of object
* uniqueness but also in the sense of {@link java.util.UUID} uniqueness of the provided {@link
* EvInput} which has to be checked manually, as {@link EvInput#equals(Object)} is NOT restricted
* on the uuid of {@link EvInput}.
*
* <p>In contrast to {@link #getEvs()} this interface provides the ability to pass in an already
* existing set of {@link NodeInput}, {@link EvTypeInput} and {@link OperatorInput} entities, the
* {@link EvInput} instances depend on. Doing so, already loaded nodes can be recycled to improve
* performance and prevent unnecessary loading operations.
*
* <p>If something fails during the creation process it's up to the concrete implementation of an
* empty set or a set with all entities that has been able to be build is returned.
*
* @param operators a set of object and uuid unique {@link OperatorInput} that should be used for
* the returning instances
* @param nodes a set of object and uuid unique {@link NodeInput} entities
* @param types a set of object and uuid unique {@link EvTypeInput} entities
* @return a set of object and uuid unique {@link EvInput} entities
*/
Set<EvInput> getEvs(Set<NodeInput> nodes, Set<OperatorInput> operators, Set<EvTypeInput> types);
/**
* Returns a unique set of {@link ChpInput} instances.
*
* <p>This set has to be unique in the sense of object uniqueness but also in the sense of {@link
* java.util.UUID} uniqueness of the provided {@link ChpInput} which has to be checked manually,
* as {@link ChpInput#equals(Object)} is NOT restricted on the uuid of {@link ChpInput}.
*
* @return a set of object and uuid unique {@link ChpInput} entities
*/
Set<ChpInput> getChpPlants();
/**
* Returns a set of {@link ChpInput} instances. This set has to be unique in the sense of object
* uniqueness but also in the sense of {@link java.util.UUID} uniqueness of the provided {@link
* ChpInput} which has to be checked manually, as {@link ChpInput#equals(Object)} is NOT
* restricted on the uuid of {@link ChpInput}.
*
* <p>In contrast to {@link #getChpPlants()} this interface provides the ability to pass in an
* already existing set of {@link NodeInput}, {@link ChpTypeInput}, {@link ThermalBusInput},
* {@link ThermalStorageInput} and {@link OperatorInput} entities, the {@link ChpInput} instances
* depend on. Doing so, already loaded nodes can be recycled to improve performance and prevent
* unnecessary loading operations.
*
* <p>If something fails during the creation process it's up to the concrete implementation of an
* empty set or a set with all entities that has been able to be build is returned.
*
* @param operators a set of object and uuid unique {@link OperatorInput} that should be used for
* the returning instances
* @param nodes a set of object and uuid unique {@link NodeInput} entities
* @param types a set of object and uuid unique {@link ChpTypeInput} entities
* @param thermalBuses a set of object and uuid unique {@link ThermalBusInput} entities
* @param thermalStorages a set of object and uuid unique {@link ThermalStorageInput} entities
* @return a set of object and uuid unique {@link ChpInput} entities
*/
Set<ChpInput> getChpPlants(
Set<NodeInput> nodes,
Set<OperatorInput> operators,
Set<ChpTypeInput> types,
Set<ThermalBusInput> thermalBuses,
Set<ThermalStorageInput> thermalStorages);
/**
* Returns a unique set of {@link HpInput} instances.
*
* <p>This set has to be unique in the sense of object uniqueness but also in the sense of {@link
* java.util.UUID} uniqueness of the provided {@link HpInput} which has to be checked manually, as
* {@link HpInput#equals(Object)} is NOT restricted on the uuid of {@link HpInput}.
*
* @return a set of object and uuid unique {@link HpInput} entities
*/
Set<HpInput> getHeatPumps();
/**
* Returns a set of {@link HpInput} instances. This set has to be unique in the sense of object
* uniqueness but also in the sense of {@link java.util.UUID} uniqueness of the provided {@link
* HpInput} which has to be checked manually, as {@link HpInput#equals(Object)} is NOT restricted
* on the uuid of {@link HpInput}.
*
* <p>In contrast to {@link #getHeatPumps()} this interface provides the ability to pass in an
* already existing set of {@link NodeInput}, {@link HpTypeInput}, {@link ThermalBusInput}, {@link
* ThermalStorageInput} and {@link OperatorInput} entities, the {@link HpInput} instances depend
* on. Doing so, already loaded nodes can be recycled to improve performance and prevent
* unnecessary loading operations.
*
* <p>If something fails during the creation process it's up to the concrete implementation of an
* empty set or a set with all entities that has been able to be build is returned.
*
* @param operators a set of object and uuid unique {@link OperatorInput} that should be used for
* the returning instances
* @param nodes a set of object and uuid unique {@link NodeInput} entities
* @param types a set of object and uuid unique {@link HpTypeInput} entities
* @param thermalBuses a set of object and uuid unique {@link ThermalBusInput} entities
* @return a set of object and uuid unique {@link HpInput} entities
*/
Set<HpInput> getHeatPumps(
Set<NodeInput> nodes,
Set<OperatorInput> operators,
Set<HpTypeInput> types,
Set<ThermalBusInput> thermalBuses);
/**
* Returns a unique set of {@link EmInput} instances.
*
* <p>This set has to be unique in the sense of object uniqueness but also in the sense of {@link
* java.util.UUID} uniqueness of the provided {@link EmInput} which has to be checked manually, as
* {@link EmInput#equals(Object)} is NOT restricted on the uuid of {@link EmInput}.
*
* @return a set of object and uuid unique {@link EmInput} entities
*/
Set<EmInput> getEmSystems();
/**
* This set has to be unique in the sense of object uniqueness but also in the sense of {@link
* java.util.UUID} uniqueness of the provided {@link EmInput} which has to be checked manually, as
* {@link EmInput#equals(Object)} is NOT restricted on the uuid of {@link EmInput}.
*
* <p>In contrast to {@link #getHeatPumps()} this interface provides the ability to pass in an
* already existing set of {@link NodeInput} and {@link OperatorInput} entities, the {@link
* EmInput} instances depend on. Doing so, already loaded nodes can be recycled to improve
* performance and prevent unnecessary loading operations.
*
* <p>If something fails during the creation process it's up to the concrete implementation of an
* empty set or a set with all entities that has been able to be build is returned.
*
* @param operators a set of object and uuid unique {@link OperatorInput} that should be used for
* the returning instances
* @param nodes a set of object and uuid unique {@link NodeInput} entities
* @return a set of object and uuid unique {@link EmInput} entities
*/
Set<EmInput> getEmSystems(Set<NodeInput> nodes, Set<OperatorInput> operators);
}