|
5 | 5 | */
|
6 | 6 | package edu.ie3.datamodel.models.result.thermal;
|
7 | 7 |
|
8 |
| -import edu.ie3.datamodel.models.StandardUnits; |
9 |
| -import edu.ie3.datamodel.models.input.thermal.CylindricalStorageInput; |
10 | 8 | import java.time.ZonedDateTime;
|
11 |
| -import java.util.Objects; |
12 | 9 | import java.util.UUID;
|
13 | 10 | import javax.measure.quantity.Dimensionless;
|
14 | 11 | import javax.measure.quantity.Energy;
|
15 | 12 | import javax.measure.quantity.Power;
|
16 | 13 | import tech.units.indriya.ComparableQuantity;
|
17 | 14 |
|
18 |
| -/** Respresents the results of {@link CylindricalStorageInput} */ |
19 |
| -public class CylindricalStorageResult extends ThermalStorageResult { |
20 |
| - /** Fill level of the storage */ |
21 |
| - private ComparableQuantity<Dimensionless> fillLevel; |
| 15 | +/** Represents the results of Cylindrical Storage */ |
| 16 | +public class CylindricalStorageResult extends AbstractThermalStorageResult { |
22 | 17 |
|
23 |
| - /** |
24 |
| - * Constructs the result with |
25 |
| - * |
26 |
| - * @param time date and time when the result is produced |
27 |
| - * @param inputModel uuid of the input model that produces the result |
28 |
| - * @param energy Currently stored energy |
29 |
| - * @param qDot Heat power flowing into (> 0) or coming from (< 0) the storage |
30 |
| - * @param fillLevel Fill level of the storage |
31 |
| - */ |
32 | 18 | public CylindricalStorageResult(
|
33 | 19 | ZonedDateTime time,
|
34 | 20 | UUID inputModel,
|
35 | 21 | ComparableQuantity<Energy> energy,
|
36 | 22 | ComparableQuantity<Power> qDot,
|
37 | 23 | ComparableQuantity<Dimensionless> fillLevel) {
|
38 |
| - super(time, inputModel, energy, qDot); |
39 |
| - this.fillLevel = fillLevel.to(StandardUnits.FILL_LEVEL); |
40 |
| - } |
41 |
| - |
42 |
| - public ComparableQuantity<Dimensionless> getFillLevel() { |
43 |
| - return fillLevel; |
44 |
| - } |
45 |
| - |
46 |
| - public void setFillLevel(ComparableQuantity<Dimensionless> fillLevel) { |
47 |
| - this.fillLevel = fillLevel.to(StandardUnits.FILL_LEVEL); |
48 |
| - } |
49 |
| - |
50 |
| - @Override |
51 |
| - public boolean equals(Object o) { |
52 |
| - if (this == o) return true; |
53 |
| - if (o == null || getClass() != o.getClass()) return false; |
54 |
| - if (!super.equals(o)) return false; |
55 |
| - CylindricalStorageResult that = (CylindricalStorageResult) o; |
56 |
| - return fillLevel.equals(that.fillLevel); |
57 |
| - } |
58 |
| - |
59 |
| - @Override |
60 |
| - public int hashCode() { |
61 |
| - return Objects.hash(super.hashCode(), fillLevel); |
62 |
| - } |
63 |
| - |
64 |
| - @Override |
65 |
| - public String toString() { |
66 |
| - return "CylindricalStorageResult{" |
67 |
| - + "time=" |
68 |
| - + getTime() |
69 |
| - + ", inputModel=" |
70 |
| - + getInputModel() |
71 |
| - + ", qDot=" |
72 |
| - + getqDot() |
73 |
| - + ", energy=" |
74 |
| - + getEnergy() |
75 |
| - + ", fillLevel=" |
76 |
| - + fillLevel |
77 |
| - + '}'; |
| 24 | + super(time, inputModel, energy, qDot, fillLevel); |
78 | 25 | }
|
79 | 26 | }
|
0 commit comments