Skip to content

Commit 24c8f3c

Browse files
Merge pull request #1202 from ie3-institute/mh/#1195-removing-dsm-attribute
Mh/#1195 removing dsm attribute
2 parents 04e0c49 + 9fef234 commit 24c8f3c

File tree

14 files changed

+505
-550
lines changed

14 files changed

+505
-550
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222
- Changed ThermalUnitValidation: Ensure that thermal boundaries of thermal house are not the same [#1186](https://github.com/ie3-institute/PowerSystemDataModel/issues/1186)
2323
- Converted `MappingEntry` into a normal class [#1087](https://github.com/ie3-institute/PowerSystemDataModel/issues/1087)
2424
- Renamed timeseries mapping `participant` column to `asset` [#1191](https://github.com/ie3-institute/PowerSystemDataModel/issues/1191)
25+
- Removed attribute `dsm` from `LoadInput` [#1195](https://github.com/ie3-institute/PowerSystemDataModel/issues/1195)
2526

2627
## [5.1.0] - 2024-06-24
2728

docs/readthedocs/models/input/participant/load.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ Model of (mainly) domestic loads.
4444
-
4545
- [Load profile](#load-lp) as model behaviour
4646
47-
* - dsm
48-
-
49-
- Whether the load is able to follow demand side management signals
50-
5147
* - eConsAnnual
5248
- kWh
5349
- Annual energy consumption

docs/uml/main/input/SystemDatamodelConcept.puml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ package models {
218218

219219
class LoadInput {
220220
- standardLoadProfile: StandardLoadProfile
221-
- dsm: Boolean
222221
- sRated: ComparableQuantity<Power> [kVA]
223222
- eConsAnnual: ComparableQuantity<Energy> [kWh]
224223
- cosPhiRated: double

src/main/java/edu/ie3/datamodel/io/factory/input/participant/LoadInputFactory.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public class LoadInputFactory
2626
private static final Logger logger = LoggerFactory.getLogger(LoadInputFactory.class);
2727

2828
private static final String LOAD_PROFILE = "loadProfile";
29-
private static final String DSM = "dsm";
3029
private static final String E_CONS_ANNUAL = "eConsAnnual";
3130
private static final String S_RATED = "sRated";
3231
private static final String COS_PHI = "cosPhiRated";
@@ -37,7 +36,7 @@ public LoadInputFactory() {
3736

3837
@Override
3938
protected String[] getAdditionalFields() {
40-
return new String[] {LOAD_PROFILE, DSM, E_CONS_ANNUAL, S_RATED, COS_PHI};
39+
return new String[] {LOAD_PROFILE, E_CONS_ANNUAL, S_RATED, COS_PHI};
4140
}
4241

4342
@Override
@@ -60,7 +59,7 @@ protected LoadInput buildModel(
6059
loadProfile = LoadProfile.DefaultLoadProfiles.NO_LOAD_PROFILE;
6160
}
6261
final EmInput em = data.getEm().orElse(null);
63-
final boolean dsm = data.getBoolean(DSM);
62+
6463
final ComparableQuantity<Energy> eConsAnnual =
6564
data.getQuantity(E_CONS_ANNUAL, StandardUnits.ENERGY_IN);
6665
final ComparableQuantity<Power> sRated = data.getQuantity(S_RATED, StandardUnits.S_RATED);
@@ -75,7 +74,6 @@ protected LoadInput buildModel(
7574
qCharacteristics,
7675
em,
7776
loadProfile,
78-
dsm,
7977
eConsAnnual,
8078
sRated,
8179
cosPhi);

src/main/java/edu/ie3/datamodel/models/input/system/LoadInput.java

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ public class LoadInput extends SystemParticipantInput {
3030
* model
3131
*/
3232
private final LoadProfile loadProfile;
33-
/** True, if demand side management is activated for this load */
34-
private final boolean dsm;
3533
/** Annually consumed energy (typically in kWh) */
3634
private final ComparableQuantity<Energy> eConsAnnual;
3735
/** Active Power (typically in kVA) */
@@ -50,7 +48,6 @@ public class LoadInput extends SystemParticipantInput {
5048
* @param qCharacteristics Description of a reactive power characteristic
5149
* @param em The {@link EmInput} controlling this system participant. Null, if not applicable.
5250
* @param loadProfile Load profile to use for this model
53-
* @param dsm True, if demand side management is activated for this load
5451
* @param eConsAnnual Annually consumed energy (typically in kWh)
5552
* @param sRated Rated apparent power (in kVA)
5653
* @param cosPhiRated Rated power factor
@@ -64,13 +61,11 @@ public LoadInput(
6461
ReactivePowerCharacteristic qCharacteristics,
6562
EmInput em,
6663
LoadProfile loadProfile,
67-
boolean dsm,
6864
ComparableQuantity<Energy> eConsAnnual,
6965
ComparableQuantity<Power> sRated,
7066
double cosPhiRated) {
7167
super(uuid, id, operator, operationTime, node, qCharacteristics, em);
7268
this.loadProfile = loadProfile;
73-
this.dsm = dsm;
7469
this.eConsAnnual = eConsAnnual.to(StandardUnits.ENERGY_IN);
7570
this.sRated = sRated.to(StandardUnits.S_RATED);
7671
this.cosPhiRated = cosPhiRated;
@@ -89,7 +84,6 @@ public LoadInput(
8984
* @param loadProfileKey Load profile key corresponding to {@link
9085
* edu.ie3.datamodel.models.profile.BdewStandardLoadProfile} or {@link
9186
* edu.ie3.datamodel.models.profile.NbwTemperatureDependantLoadProfile}
92-
* @param dsm True, if demand side management is activated for this load
9387
* @param eConsAnnual Annually consumed energy (typically in kWh)
9488
* @param sRated Rated apparent power (in kVA)
9589
* @param cosPhiRated Rated power factor
@@ -103,7 +97,6 @@ public LoadInput(
10397
ReactivePowerCharacteristic qCharacteristics,
10498
EmInput em,
10599
String loadProfileKey,
106-
boolean dsm,
107100
ComparableQuantity<Energy> eConsAnnual,
108101
ComparableQuantity<Power> sRated,
109102
double cosPhiRated)
@@ -118,7 +111,6 @@ public LoadInput(
118111
qCharacteristics,
119112
em,
120113
LoadProfile.parse(loadProfileKey),
121-
dsm,
122114
eConsAnnual,
123115
sRated,
124116
cosPhiRated);
@@ -133,7 +125,6 @@ public LoadInput(
133125
* @param qCharacteristics Description of a reactive power characteristic
134126
* @param em The {@link EmInput} controlling this system participant. Null, if not applicable.
135127
* @param loadProfile Standard load profile to use for this model
136-
* @param dsm True, if demand side management is activated for this load
137128
* @param eConsAnnual Annually consumed energy (typically in kWh)
138129
* @param sRated Rated apparent power (in kVA)
139130
* @param cosPhiRated Rated power factor
@@ -145,13 +136,11 @@ public LoadInput(
145136
ReactivePowerCharacteristic qCharacteristics,
146137
EmInput em,
147138
LoadProfile loadProfile,
148-
boolean dsm,
149139
ComparableQuantity<Energy> eConsAnnual,
150140
ComparableQuantity<Power> sRated,
151141
double cosPhiRated) {
152142
super(uuid, id, node, qCharacteristics, em);
153143
this.loadProfile = loadProfile;
154-
this.dsm = dsm;
155144
this.eConsAnnual = eConsAnnual.to(StandardUnits.ENERGY_IN);
156145
this.sRated = sRated.to(StandardUnits.S_RATED);
157146
this.cosPhiRated = cosPhiRated;
@@ -168,7 +157,6 @@ public LoadInput(
168157
* @param loadProfileKey load profile key corresponding to {@link
169158
* edu.ie3.datamodel.models.profile.BdewStandardLoadProfile} or {@link
170159
* edu.ie3.datamodel.models.profile.NbwTemperatureDependantLoadProfile}
171-
* @param dsm True, if demand side management is activated for this load
172160
* @param eConsAnnual Annually consumed energy (typically in kWh)
173161
* @param sRated Rated apparent power (in kVA)
174162
* @param cosPhiRated Rated power factor
@@ -180,7 +168,6 @@ public LoadInput(
180168
ReactivePowerCharacteristic qCharacteristics,
181169
EmInput em,
182170
String loadProfileKey,
183-
boolean dsm,
184171
ComparableQuantity<Energy> eConsAnnual,
185172
ComparableQuantity<Power> sRated,
186173
double cosPhiRated)
@@ -192,7 +179,6 @@ public LoadInput(
192179
qCharacteristics,
193180
em,
194181
LoadProfile.parse(loadProfileKey),
195-
dsm,
196182
eConsAnnual,
197183
sRated,
198184
cosPhiRated);
@@ -202,10 +188,6 @@ public LoadProfile getLoadProfile() {
202188
return loadProfile;
203189
}
204190

205-
public boolean isDsm() {
206-
return dsm;
207-
}
208-
209191
public ComparableQuantity<Energy> geteConsAnnual() {
210192
return eConsAnnual;
211193
}
@@ -227,16 +209,15 @@ public boolean equals(Object o) {
227209
if (this == o) return true;
228210
if (!(o instanceof LoadInput loadInput)) return false;
229211
if (!super.equals(o)) return false;
230-
return dsm == loadInput.dsm
231-
&& Double.compare(loadInput.cosPhiRated, cosPhiRated) == 0
212+
return Double.compare(loadInput.cosPhiRated, cosPhiRated) == 0
232213
&& eConsAnnual.equals(loadInput.eConsAnnual)
233214
&& loadProfile.equals(loadInput.loadProfile)
234215
&& sRated.equals(loadInput.sRated);
235216
}
236217

237218
@Override
238219
public int hashCode() {
239-
return Objects.hash(super.hashCode(), dsm, eConsAnnual, sRated, cosPhiRated);
220+
return Objects.hash(super.hashCode(), eConsAnnual, sRated, cosPhiRated);
240221
}
241222

242223
@Override
@@ -256,8 +237,6 @@ public String toString() {
256237
+ getqCharacteristics()
257238
+ "', em="
258239
+ getControllingEm()
259-
+ ", dsm="
260-
+ dsm
261240
+ ", eConsAnnual="
262241
+ eConsAnnual
263242
+ ", sRated="
@@ -278,15 +257,13 @@ public static class LoadInputCopyBuilder
278257
extends SystemParticipantInputCopyBuilder<LoadInputCopyBuilder> {
279258

280259
private LoadProfile loadProfile;
281-
private boolean dsm;
282260
private ComparableQuantity<Energy> eConsAnnual;
283261
private ComparableQuantity<Power> sRated;
284262
private double cosPhiRated;
285263

286264
private LoadInputCopyBuilder(LoadInput entity) {
287265
super(entity);
288266
this.loadProfile = entity.getLoadProfile();
289-
this.dsm = entity.isDsm();
290267
this.eConsAnnual = entity.geteConsAnnual();
291268
this.sRated = entity.getsRated();
292269
this.cosPhiRated = entity.getCosPhiRated();
@@ -297,11 +274,6 @@ public LoadInputCopyBuilder loadprofile(StandardLoadProfile standardLoadProfile)
297274
return this;
298275
}
299276

300-
public LoadInputCopyBuilder dsm(boolean dsm) {
301-
this.dsm = dsm;
302-
return this;
303-
}
304-
305277
public LoadInputCopyBuilder eConsAnnual(ComparableQuantity<Energy> eConsAnnual) {
306278
this.eConsAnnual = eConsAnnual;
307279
return this;
@@ -335,7 +307,6 @@ public LoadInput build() {
335307
getqCharacteristics(),
336308
getEm(),
337309
loadProfile,
338-
dsm,
339310
eConsAnnual,
340311
sRated,
341312
cosPhiRated);

src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/LoadInputFactoryTest.groovy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class LoadInputFactoryTest extends Specification implements FactoryTestHelper {
4747
"id" : "TestID",
4848
"qcharacteristics" : "cosPhiFixed:{(0.0,1.0)}",
4949
"loadprofile" : profileKey,
50-
"dsm" : "true",
5150
"econsannual" : "3",
5251
"srated" : "4",
5352
"cosphirated" : "5"
@@ -72,7 +71,6 @@ class LoadInputFactoryTest extends Specification implements FactoryTestHelper {
7271
}
7372
assert controllingEm == Optional.of(emUnit)
7473
assert loadProfile == profile
75-
assert dsm
7674
assert eConsAnnual == getQuant(parameter["econsannual"], StandardUnits.ENERGY_IN)
7775
assert sRated == getQuant(parameter["srated"], StandardUnits.S_RATED)
7876
assert cosPhiRated == Double.parseDouble(parameter["cosphirated"])

src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ class InputEntityProcessorTest extends Specification {
239239
LoadInput | SystemParticipantTestData.loadInput || [
240240
"uuid" : SystemParticipantTestData.loadInput.uuid.toString(),
241241
"cosPhiRated" : SystemParticipantTestData.loadInput.cosPhiRated.toString(),
242-
"dsm" : SystemParticipantTestData.loadInput.dsm.toString(),
243242
"eConsAnnual" : SystemParticipantTestData.loadInput.eConsAnnual.getValue().doubleValue().toString(),
244243
"id" : SystemParticipantTestData.loadInput.id,
245244
"node" : SystemParticipantTestData.loadInput.node.uuid.toString(),

src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ class CsvDataSourceTest extends Specification implements CsvTestDataMeta {
9393
"q_characteristics",
9494
"e_cons_annual",
9595
"operator",
96-
"dsm",
9796
"em"
9897
] as Set
9998
}

src/test/groovy/edu/ie3/datamodel/models/input/system/LoadInputTest.groovy

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class LoadInputTest extends Specification {
2323
def loadInput = SystemParticipantTestData.loadInput
2424

2525
when:
26-
def alteredUnit = loadInput.copy().loadprofile(BdewStandardLoadProfile.G0).dsm(true)
26+
def alteredUnit = loadInput.copy().loadprofile(BdewStandardLoadProfile.G0)
2727
.eConsAnnual(Quantities.getQuantity(6000, KILOWATTHOUR)).sRated(Quantities.getQuantity(0d, KILOVOLTAMPERE))
2828
.cosPhiRated(0.8).node(GridTestData.nodeG)
2929
.qCharacteristics(CosPhiFixed.CONSTANT_CHARACTERISTIC).build()
@@ -35,7 +35,6 @@ class LoadInputTest extends Specification {
3535
assert operator == loadInput.operator
3636
assert id == loadInput.id
3737
assert loadProfile == BdewStandardLoadProfile.G0
38-
assert dsm
3938
assert node == GridTestData.nodeG
4039
assert qCharacteristics == CosPhiFixed.CONSTANT_CHARACTERISTIC
4140
assert eConsAnnual == Quantities.getQuantity(6000, KILOWATTHOUR)
@@ -59,7 +58,6 @@ class LoadInputTest extends Specification {
5958
assert operator == loadInput.operator
6059
assert id == loadInput.id
6160
assert loadProfile == loadInput.loadProfile
62-
assert dsm == loadInput.dsm
6361
assert node == loadInput.node
6462
assert qCharacteristics == loadInput.qCharacteristics
6563
assert eConsAnnual == loadInput.eConsAnnual * 2d

src/test/groovy/edu/ie3/test/common/SampleJointGrid.groovy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ class SampleJointGrid extends SystemParticipantTestData {
9292
cosPhiFixed,
9393
emInput,
9494
standardLoadProfile,
95-
false,
9695
eConsAnnual,
9796
sRated,
9897
cosPhiRated)
@@ -107,7 +106,6 @@ class SampleJointGrid extends SystemParticipantTestData {
107106
cosPhiFixed,
108107
emInput,
109108
standardLoadProfile,
110-
false,
111109
eConsAnnual,
112110
sRated,
113111
cosPhiRated)

0 commit comments

Comments
 (0)