-
Notifications
You must be signed in to change notification settings - Fork 5
/
ThermalHouseResult.java
73 lines (65 loc) · 2.29 KB
/
ThermalHouseResult.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
/*
* © 2021. TU Dortmund University,
* Institute of Energy Systems, Energy Efficiency and Energy Economics,
* Research group Distribution grid planning and operation
*/
package edu.ie3.datamodel.models.result.thermal;
import edu.ie3.datamodel.models.StandardUnits;
import java.time.ZonedDateTime;
import java.util.Objects;
import java.util.UUID;
import javax.measure.quantity.Power;
import javax.measure.quantity.Temperature;
import tech.units.indriya.ComparableQuantity;
/** Represents the results of {@link edu.ie3.datamodel.models.input.thermal.ThermalHouseInput} */
public class ThermalHouseResult extends ThermalSinkResult {
/** Indoor room temperature of the house */
private ComparableQuantity<Temperature> indoorTemperature;
/**
* Standard constructor which includes auto generation of the resulting output models uuid.
*
* @param time date and time when the result is produced
* @param inputModel uuid of the input model that produces the result
* @param qDot thermal heat demand of the sink
* @param indoorTemperature Indoor room temperature
*/
public ThermalHouseResult(
ZonedDateTime time,
UUID inputModel,
ComparableQuantity<Power> qDot,
ComparableQuantity<Temperature> indoorTemperature) {
super(time, inputModel, qDot);
this.indoorTemperature = indoorTemperature.to(StandardUnits.TEMPERATURE);
}
public ComparableQuantity<Temperature> getIndoorTemperature() {
return indoorTemperature;
}
public void setIndoorTemperature(ComparableQuantity<Temperature> indoorTemperature) {
this.indoorTemperature = indoorTemperature.to(StandardUnits.TEMPERATURE);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
ThermalHouseResult that = (ThermalHouseResult) o;
return indoorTemperature.equals(that.indoorTemperature);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), indoorTemperature);
}
@Override
public String toString() {
return "ThermalHouseResult{"
+ "time="
+ getTime()
+ ", inputModel="
+ getInputModel()
+ ", qDot="
+ getqDot()
+ ", indoorTemperature="
+ indoorTemperature
+ '}';
}
}