Skip to content

Commit e2b248b

Browse files
Create data model for air condition
1 parent ea8514a commit e2b248b

File tree

46 files changed

+1166
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1166
-15
lines changed

docs/readthedocs/io/ValidationUtils.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ The ValidationUtils include validation checks for...
5757
- MeasurementUnitInput
5858
- SystemParticipantValidationUtils
5959
- SystemParticipantInput
60+
- AcInput
6061
- BmInput
6162
- ChpInput
6263
- EvInput
@@ -67,7 +68,8 @@ The ValidationUtils include validation checks for...
6768
- StorageInput
6869
- WecInput
6970
- EvcsInput (also checks ChargingPointType)
70-
- SystemParticipantTypeInput
71+
- SystemParticipantTypeInput
72+
- AcTypeInput
7173
- BmTypeInput
7274
- ChpTypeInput
7375
- EvTypeInput
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
(aircon-model)=
2+
3+
# Air Condition
4+
5+
Model of a heat pump.
6+
7+
## Attributes, Units and Remarks
8+
9+
### Type Model
10+
11+
```{list-table}
12+
:widths: auto
13+
:class: wrapping
14+
:header-rows: 1
15+
16+
17+
* - Attribute
18+
- Unit
19+
- Remarks
20+
21+
* - uuid
22+
-
23+
-
24+
25+
* - id
26+
-
27+
- Human readable identifier
28+
29+
* - capex
30+
- €
31+
- Capital expenditure to purchase one entity of this type
32+
33+
* - opex
34+
- € / MWh
35+
- Operational expenditure to operate one entity of
36+
this type
37+
38+
* - sRated
39+
- kVA
40+
- Rated apparent power
41+
42+
* - cosPhiRated
43+
-
44+
- Rated power factor
45+
46+
* - pThermal
47+
- kW
48+
- Rated thermal power (at rated electrical power)
49+
50+
```
51+
52+
### Entity Model
53+
54+
```{list-table}
55+
:widths: auto
56+
:class: wrapping
57+
:header-rows: 1
58+
59+
60+
* - Attribute
61+
- Unit
62+
- Remarks
63+
64+
* - uuid
65+
-
66+
-
67+
68+
* - id
69+
-
70+
- Human readable identifier
71+
72+
* - operator
73+
-
74+
-
75+
76+
* - operationTime
77+
-
78+
- Timely restriction of operation
79+
80+
* - node
81+
-
82+
-
83+
84+
* - thermalBus
85+
-
86+
- Connection point to the thermal system
87+
88+
* - qCharacteristics
89+
-
90+
- [Reactive power characteristic](#participant-general-q-characteristic) to follow
91+
92+
* - type
93+
-
94+
-
95+
96+
* - controllingEm
97+
-
98+
- UUID reference to an [Energy Management Unit](#em_model) that is controlling
99+
this system participant. Field can be empty or missing, if this participant
100+
is not controlled.
101+
102+
103+
```
104+
105+
## Caveats
106+
107+
Nothing - at least not known.
108+
If you found something, please contact us!

docs/readthedocs/models/models.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ input/thermal/domestichotwaterstorage
139139
maxdepth: 1
140140
---
141141
input/participant/general
142+
input/participant/ac
142143
input/participant/bm
143144
input/participant/chp
144145
input/participant/ev
@@ -195,6 +196,7 @@ result/grid/congestion
195196
---
196197
maxdepth: 1
197198
---
199+
result/participant/ac
198200
result/participant/bm
199201
result/participant/chp
200202
result/participant/ev
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
(ac-result)=
2+
3+
# Air Condition
4+
5+
Result of an air condition.
6+
7+
## Attributes, Units and Remarks
8+
9+
```{list-table}
10+
:widths: 33 33 33
11+
:header-rows: 1
12+
13+
14+
* - Attribute
15+
- Unit
16+
- Remarks
17+
18+
* - time
19+
-
20+
- date and time for the produced result
21+
22+
* - inputModel
23+
-
24+
- uuid for the associated input model
25+
26+
* - p
27+
- MW
28+
-
29+
30+
* - q
31+
- MVAr
32+
-
33+
34+
* - qDot
35+
- MW
36+
- Thermal power
37+
38+
```
39+
40+
## Caveats
41+
42+
Nothing - at least not known.
43+
If you found something, please contact us!

docs/uml/main/EntitySourceClassDiagram.puml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ class ResultEntitySource {
129129
+ Set<EvcsResult> getEvcsResults() throws SourceException
130130
+ Set<EvResult> getEvResults() throws SourceException
131131
+ Set<HpResult> getHpResults() throws SourceException
132+
+ Set<AcResult> getAcResults() throws SourceException
132133
+ Set<CylindricalStorageResult> getCylindricalStorageResult() throws SourceException
133134
+ Set<DomesticHotStorageResult> getDomesticHotWaterStorageResult() throws SourceException
134135
+ Set<ThermalHouseResult> getThermalHouseResults() throws SourceException
@@ -141,6 +142,7 @@ class SystemParticipantSource{
141142
- RawGridSource rawGridSource
142143
- ThermalSource thermalSource
143144
- EnergyManagementSource energyManagementSource
145+
- AcInputFactory acInputFactory
144146
- BmInputFactory bmInputFactory
145147
- ChpInputFactory chpInputFactory
146148
- EvInputFactory evInputFactory
@@ -154,6 +156,8 @@ class SystemParticipantSource{
154156
+ SystemParticipantSource(TypeSource, ThermalSource, RawGridSource, EnergyManagementSource, DataSource)
155157
+ SystemParticipants getSystemParticipants() throws SourceException
156158
+ SystemParticipants getSystemParticipants(Map<UUID, OperatorInput>, Map<UUID, NodeInput>) throws SourceException
159+
+ Set<AcInput> getAirConditions() throws SourceException
160+
+ Set<AcInput> getAirConditions(Map<UUID, OperatorInput>, Map<UUID, NodeInput>, Set<AcTypeInput>) throws SourceException
157161
+ Set<BmInput> getBmPlants() throws SourceException
158162
+ Set<BmInput> getBmPlants(Map<UUID, OperatorInput>, Map<UUID, NodeInput>, Set<BmTypeInput>) throws SourceException
159163
+ Set<ChpInput> getChpPlants() throws SourceException

docs/uml/main/OutputDatamodelConcept.puml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ package models {
9393
class HpResult
9494
SystemParticipantWithHeatResult <|-- HpResult
9595

96+
class AcResult
97+
SystemParticipantWithHeatResult <|-- AcResult
98+
9699
class WecResult
97100
SystemParticipantResult <|-- WecResult
98101

docs/uml/main/input/ModelContainerConcept.puml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ package models.input.container {
4040
RawGridElements ..|> InputContainer
4141

4242
class SystemParticipants {
43+
- airConditions: Set<AcInput>
4344
- bmPlants: Set<BmInput>
4445
- chpPlants: Set<ChpInput>
4546
- evcs: Set<EvcsInput>

docs/uml/main/input/SystemDatamodelConcept.puml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,15 @@ package models {
173173
SystemParticipantInput ..|> HasNodes
174174
SystemParticipantInput ..|> NodeInput
175175

176+
class AcInput {
177+
- type: AcTypeInput
178+
- thermalBus: ThermalBusInput
179+
}
180+
AcInput --|> SystemParticipantInput
181+
AcInput ..|> HasType
182+
AcInput ..|> HasThermalBus
183+
AcInput *-- ThermalBusInput
184+
176185
class BmInput {
177186
- type: BmTypeInput
178187
- marketReaction: Boolean
@@ -214,7 +223,7 @@ package models {
214223
HpInput --|> SystemParticipantInput
215224
HpInput ..|> HasType
216225
HpInput ..|> HasThermalBus
217-
ChpInput *-- ThermalBusInput
226+
HpInput *-- ThermalBusInput
218227

219228
class LoadInput {
220229
- standardLoadProfile: StandardLoadProfile
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
/*
2+
* © 2021. TU Dortmund University,
3+
* Institute of Energy Systems, Energy Efficiency and Energy Economics,
4+
* Research group Distribution grid planning and operation
5+
*/
6+
package edu.ie3.datamodel.io.factory.input.participant;
7+
8+
import edu.ie3.datamodel.models.input.EmInput;
9+
import edu.ie3.datamodel.models.input.NodeInput;
10+
import edu.ie3.datamodel.models.input.OperatorInput;
11+
import edu.ie3.datamodel.models.input.system.AcInput;
12+
import edu.ie3.datamodel.models.input.system.type.AcTypeInput;
13+
import edu.ie3.datamodel.models.input.thermal.ThermalBusInput;
14+
import java.util.Map;
15+
import java.util.Objects;
16+
17+
public class AcInputEntityData extends SystemParticipantTypedEntityData<AcTypeInput> {
18+
private final ThermalBusInput thermalBusInput;
19+
20+
public AcInputEntityData(
21+
Map<String, String> fieldsToAttributes,
22+
NodeInput node,
23+
EmInput em,
24+
AcTypeInput typeInput,
25+
ThermalBusInput thermalBusInput) {
26+
super(fieldsToAttributes, AcInput.class, node, em, typeInput);
27+
this.thermalBusInput = thermalBusInput;
28+
}
29+
30+
public AcInputEntityData(
31+
Map<String, String> fieldsToAttributes,
32+
OperatorInput operator,
33+
NodeInput node,
34+
EmInput em,
35+
AcTypeInput typeInput,
36+
ThermalBusInput thermalBusInput) {
37+
super(fieldsToAttributes, AcInput.class, operator, node, em, typeInput);
38+
this.thermalBusInput = thermalBusInput;
39+
}
40+
41+
/**
42+
* Creates a new AcInputEntityData object based on a given {@link
43+
* SystemParticipantTypedEntityData} object and given thermal bus input
44+
*
45+
* @param entityData The SystemParticipantTypedEntityData object to enhance
46+
* @param thermalBusInput The thermal bus input
47+
*/
48+
public AcInputEntityData(
49+
SystemParticipantTypedEntityData<AcTypeInput> entityData, ThermalBusInput thermalBusInput) {
50+
super(entityData, entityData.getTypeInput());
51+
this.thermalBusInput = thermalBusInput;
52+
}
53+
54+
public ThermalBusInput getThermalBusInput() {
55+
return thermalBusInput;
56+
}
57+
58+
@Override
59+
public boolean equals(Object o) {
60+
if (this == o) return true;
61+
if (!(o instanceof AcInputEntityData that)) return false;
62+
if (!super.equals(o)) return false;
63+
return thermalBusInput.equals(that.thermalBusInput);
64+
}
65+
66+
@Override
67+
public int hashCode() {
68+
return Objects.hash(super.hashCode(), thermalBusInput);
69+
}
70+
71+
@Override
72+
public String toString() {
73+
return "AcInputEntityData{"
74+
+ "thermalBusInput="
75+
+ thermalBusInput.getUuid()
76+
+ ", typeInput="
77+
+ getTypeInput().getUuid()
78+
+ ", node="
79+
+ getNode().getUuid()
80+
+ ", operatorInput="
81+
+ getOperatorInput().getUuid()
82+
+ ", fieldsToValues="
83+
+ getFieldsToValues()
84+
+ ", targetClass="
85+
+ getTargetClass()
86+
+ '}';
87+
}
88+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* © 2021. TU Dortmund University,
3+
* Institute of Energy Systems, Energy Efficiency and Energy Economics,
4+
* Research group Distribution grid planning and operation
5+
*/
6+
package edu.ie3.datamodel.io.factory.input.participant;
7+
8+
import edu.ie3.datamodel.models.OperationTime;
9+
import edu.ie3.datamodel.models.input.EmInput;
10+
import edu.ie3.datamodel.models.input.NodeInput;
11+
import edu.ie3.datamodel.models.input.OperatorInput;
12+
import edu.ie3.datamodel.models.input.system.AcInput;
13+
import edu.ie3.datamodel.models.input.system.characteristic.ReactivePowerCharacteristic;
14+
import java.util.UUID;
15+
16+
public class AcInputFactory
17+
extends SystemParticipantInputEntityFactory<AcInput, AcInputEntityData> {
18+
19+
public AcInputFactory() {
20+
super(AcInput.class);
21+
}
22+
23+
@Override
24+
protected String[] getAdditionalFields() {
25+
return new String[0];
26+
}
27+
28+
@Override
29+
protected AcInput buildModel(
30+
AcInputEntityData data,
31+
UUID uuid,
32+
String id,
33+
NodeInput node,
34+
ReactivePowerCharacteristic qCharacteristics,
35+
OperatorInput operator,
36+
OperationTime operationTime) {
37+
final EmInput em = data.getControllingEm().orElse(null);
38+
39+
return new AcInput(
40+
uuid,
41+
id,
42+
operator,
43+
operationTime,
44+
node,
45+
data.getThermalBusInput(),
46+
qCharacteristics,
47+
em,
48+
data.getTypeInput());
49+
}
50+
}

0 commit comments

Comments
 (0)