Skip to content

Mh/#1195 removing dsm attribute #1202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed ThermalUnitValidation: Ensure that thermal boundaries of thermal house are not the same [#1186](https://github.com/ie3-institute/PowerSystemDataModel/issues/1186)
- Converted `MappingEntry` into a normal class [#1087](https://github.com/ie3-institute/PowerSystemDataModel/issues/1087)
- Renamed timeseries mapping `participant` column to `asset` [#1191](https://github.com/ie3-institute/PowerSystemDataModel/issues/1191)
- Removed attribute `dsm` from `LoadInput` [#1195](https://github.com/ie3-institute/PowerSystemDataModel/issues/1195)

## [5.1.0] - 2024-06-24

Expand Down
4 changes: 0 additions & 4 deletions docs/readthedocs/models/input/participant/load.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ Model of (mainly) domestic loads.
-
- [Load profile](#load-lp) as model behaviour

* - dsm
-
- Whether the load is able to follow demand side management signals

* - eConsAnnual
- kWh
- Annual energy consumption
Expand Down
1 change: 0 additions & 1 deletion docs/uml/main/input/SystemDatamodelConcept.puml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ package models {

class LoadInput {
- standardLoadProfile: StandardLoadProfile
- dsm: Boolean
- sRated: ComparableQuantity<Power> [kVA]
- eConsAnnual: ComparableQuantity<Energy> [kWh]
- cosPhiRated: double
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public class LoadInputFactory
private static final Logger logger = LoggerFactory.getLogger(LoadInputFactory.class);

private static final String LOAD_PROFILE = "loadProfile";
private static final String DSM = "dsm";
private static final String E_CONS_ANNUAL = "eConsAnnual";
private static final String S_RATED = "sRated";
private static final String COS_PHI = "cosPhiRated";
Expand All @@ -37,7 +36,7 @@ public LoadInputFactory() {

@Override
protected String[] getAdditionalFields() {
return new String[] {LOAD_PROFILE, DSM, E_CONS_ANNUAL, S_RATED, COS_PHI};
return new String[] {LOAD_PROFILE, E_CONS_ANNUAL, S_RATED, COS_PHI};
}

@Override
Expand All @@ -60,7 +59,7 @@ protected LoadInput buildModel(
loadProfile = LoadProfile.DefaultLoadProfiles.NO_LOAD_PROFILE;
}
final EmInput em = data.getEm().orElse(null);
final boolean dsm = data.getBoolean(DSM);

final ComparableQuantity<Energy> eConsAnnual =
data.getQuantity(E_CONS_ANNUAL, StandardUnits.ENERGY_IN);
final ComparableQuantity<Power> sRated = data.getQuantity(S_RATED, StandardUnits.S_RATED);
Expand All @@ -75,7 +74,6 @@ protected LoadInput buildModel(
qCharacteristics,
em,
loadProfile,
dsm,
eConsAnnual,
sRated,
cosPhi);
Expand Down
33 changes: 2 additions & 31 deletions src/main/java/edu/ie3/datamodel/models/input/system/LoadInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ public class LoadInput extends SystemParticipantInput {
* model
*/
private final LoadProfile loadProfile;
/** True, if demand side management is activated for this load */
private final boolean dsm;
/** Annually consumed energy (typically in kWh) */
private final ComparableQuantity<Energy> eConsAnnual;
/** Active Power (typically in kVA) */
Expand All @@ -50,7 +48,6 @@ public class LoadInput extends SystemParticipantInput {
* @param qCharacteristics Description of a reactive power characteristic
* @param em The {@link EmInput} controlling this system participant. Null, if not applicable.
* @param loadProfile Load profile to use for this model
* @param dsm True, if demand side management is activated for this load
* @param eConsAnnual Annually consumed energy (typically in kWh)
* @param sRated Rated apparent power (in kVA)
* @param cosPhiRated Rated power factor
Expand All @@ -64,13 +61,11 @@ public LoadInput(
ReactivePowerCharacteristic qCharacteristics,
EmInput em,
LoadProfile loadProfile,
boolean dsm,
ComparableQuantity<Energy> eConsAnnual,
ComparableQuantity<Power> sRated,
double cosPhiRated) {
super(uuid, id, operator, operationTime, node, qCharacteristics, em);
this.loadProfile = loadProfile;
this.dsm = dsm;
this.eConsAnnual = eConsAnnual.to(StandardUnits.ENERGY_IN);
this.sRated = sRated.to(StandardUnits.S_RATED);
this.cosPhiRated = cosPhiRated;
Expand All @@ -89,7 +84,6 @@ public LoadInput(
* @param loadProfileKey Load profile key corresponding to {@link
* edu.ie3.datamodel.models.profile.BdewStandardLoadProfile} or {@link
* edu.ie3.datamodel.models.profile.NbwTemperatureDependantLoadProfile}
* @param dsm True, if demand side management is activated for this load
* @param eConsAnnual Annually consumed energy (typically in kWh)
* @param sRated Rated apparent power (in kVA)
* @param cosPhiRated Rated power factor
Expand All @@ -103,7 +97,6 @@ public LoadInput(
ReactivePowerCharacteristic qCharacteristics,
EmInput em,
String loadProfileKey,
boolean dsm,
ComparableQuantity<Energy> eConsAnnual,
ComparableQuantity<Power> sRated,
double cosPhiRated)
Expand All @@ -118,7 +111,6 @@ public LoadInput(
qCharacteristics,
em,
LoadProfile.parse(loadProfileKey),
dsm,
eConsAnnual,
sRated,
cosPhiRated);
Expand All @@ -133,7 +125,6 @@ public LoadInput(
* @param qCharacteristics Description of a reactive power characteristic
* @param em The {@link EmInput} controlling this system participant. Null, if not applicable.
* @param loadProfile Standard load profile to use for this model
* @param dsm True, if demand side management is activated for this load
* @param eConsAnnual Annually consumed energy (typically in kWh)
* @param sRated Rated apparent power (in kVA)
* @param cosPhiRated Rated power factor
Expand All @@ -145,13 +136,11 @@ public LoadInput(
ReactivePowerCharacteristic qCharacteristics,
EmInput em,
LoadProfile loadProfile,
boolean dsm,
ComparableQuantity<Energy> eConsAnnual,
ComparableQuantity<Power> sRated,
double cosPhiRated) {
super(uuid, id, node, qCharacteristics, em);
this.loadProfile = loadProfile;
this.dsm = dsm;
this.eConsAnnual = eConsAnnual.to(StandardUnits.ENERGY_IN);
this.sRated = sRated.to(StandardUnits.S_RATED);
this.cosPhiRated = cosPhiRated;
Expand All @@ -168,7 +157,6 @@ public LoadInput(
* @param loadProfileKey load profile key corresponding to {@link
* edu.ie3.datamodel.models.profile.BdewStandardLoadProfile} or {@link
* edu.ie3.datamodel.models.profile.NbwTemperatureDependantLoadProfile}
* @param dsm True, if demand side management is activated for this load
* @param eConsAnnual Annually consumed energy (typically in kWh)
* @param sRated Rated apparent power (in kVA)
* @param cosPhiRated Rated power factor
Expand All @@ -180,7 +168,6 @@ public LoadInput(
ReactivePowerCharacteristic qCharacteristics,
EmInput em,
String loadProfileKey,
boolean dsm,
ComparableQuantity<Energy> eConsAnnual,
ComparableQuantity<Power> sRated,
double cosPhiRated)
Expand All @@ -192,7 +179,6 @@ public LoadInput(
qCharacteristics,
em,
LoadProfile.parse(loadProfileKey),
dsm,
eConsAnnual,
sRated,
cosPhiRated);
Expand All @@ -202,10 +188,6 @@ public LoadProfile getLoadProfile() {
return loadProfile;
}

public boolean isDsm() {
return dsm;
}

public ComparableQuantity<Energy> geteConsAnnual() {
return eConsAnnual;
}
Expand All @@ -227,16 +209,15 @@ public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof LoadInput loadInput)) return false;
if (!super.equals(o)) return false;
return dsm == loadInput.dsm
&& Double.compare(loadInput.cosPhiRated, cosPhiRated) == 0
return Double.compare(loadInput.cosPhiRated, cosPhiRated) == 0
&& eConsAnnual.equals(loadInput.eConsAnnual)
&& loadProfile.equals(loadInput.loadProfile)
&& sRated.equals(loadInput.sRated);
}

@Override
public int hashCode() {
return Objects.hash(super.hashCode(), dsm, eConsAnnual, sRated, cosPhiRated);
return Objects.hash(super.hashCode(), eConsAnnual, sRated, cosPhiRated);
}

@Override
Expand All @@ -256,8 +237,6 @@ public String toString() {
+ getqCharacteristics()
+ "', em="
+ getControllingEm()
+ ", dsm="
+ dsm
+ ", eConsAnnual="
+ eConsAnnual
+ ", sRated="
Expand All @@ -278,15 +257,13 @@ public static class LoadInputCopyBuilder
extends SystemParticipantInputCopyBuilder<LoadInputCopyBuilder> {

private LoadProfile loadProfile;
private boolean dsm;
private ComparableQuantity<Energy> eConsAnnual;
private ComparableQuantity<Power> sRated;
private double cosPhiRated;

private LoadInputCopyBuilder(LoadInput entity) {
super(entity);
this.loadProfile = entity.getLoadProfile();
this.dsm = entity.isDsm();
this.eConsAnnual = entity.geteConsAnnual();
this.sRated = entity.getsRated();
this.cosPhiRated = entity.getCosPhiRated();
Expand All @@ -297,11 +274,6 @@ public LoadInputCopyBuilder loadprofile(StandardLoadProfile standardLoadProfile)
return this;
}

public LoadInputCopyBuilder dsm(boolean dsm) {
this.dsm = dsm;
return this;
}

public LoadInputCopyBuilder eConsAnnual(ComparableQuantity<Energy> eConsAnnual) {
this.eConsAnnual = eConsAnnual;
return this;
Expand Down Expand Up @@ -335,7 +307,6 @@ public LoadInput build() {
getqCharacteristics(),
getEm(),
loadProfile,
dsm,
eConsAnnual,
sRated,
cosPhiRated);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class LoadInputFactoryTest extends Specification implements FactoryTestHelper {
"id" : "TestID",
"qcharacteristics" : "cosPhiFixed:{(0.0,1.0)}",
"loadprofile" : profileKey,
"dsm" : "true",
"econsannual" : "3",
"srated" : "4",
"cosphirated" : "5"
Expand All @@ -72,7 +71,6 @@ class LoadInputFactoryTest extends Specification implements FactoryTestHelper {
}
assert controllingEm == Optional.of(emUnit)
assert loadProfile == profile
assert dsm
assert eConsAnnual == getQuant(parameter["econsannual"], StandardUnits.ENERGY_IN)
assert sRated == getQuant(parameter["srated"], StandardUnits.S_RATED)
assert cosPhiRated == Double.parseDouble(parameter["cosphirated"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ class InputEntityProcessorTest extends Specification {
LoadInput | SystemParticipantTestData.loadInput || [
"uuid" : SystemParticipantTestData.loadInput.uuid.toString(),
"cosPhiRated" : SystemParticipantTestData.loadInput.cosPhiRated.toString(),
"dsm" : SystemParticipantTestData.loadInput.dsm.toString(),
"eConsAnnual" : SystemParticipantTestData.loadInput.eConsAnnual.getValue().doubleValue().toString(),
"id" : SystemParticipantTestData.loadInput.id,
"node" : SystemParticipantTestData.loadInput.node.uuid.toString(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ class CsvDataSourceTest extends Specification implements CsvTestDataMeta {
"q_characteristics",
"e_cons_annual",
"operator",
"dsm",
"em"
] as Set
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class LoadInputTest extends Specification {
def loadInput = SystemParticipantTestData.loadInput

when:
def alteredUnit = loadInput.copy().loadprofile(BdewStandardLoadProfile.G0).dsm(true)
def alteredUnit = loadInput.copy().loadprofile(BdewStandardLoadProfile.G0)
.eConsAnnual(Quantities.getQuantity(6000, KILOWATTHOUR)).sRated(Quantities.getQuantity(0d, KILOVOLTAMPERE))
.cosPhiRated(0.8).node(GridTestData.nodeG)
.qCharacteristics(CosPhiFixed.CONSTANT_CHARACTERISTIC).build()
Expand All @@ -35,7 +35,6 @@ class LoadInputTest extends Specification {
assert operator == loadInput.operator
assert id == loadInput.id
assert loadProfile == BdewStandardLoadProfile.G0
assert dsm
assert node == GridTestData.nodeG
assert qCharacteristics == CosPhiFixed.CONSTANT_CHARACTERISTIC
assert eConsAnnual == Quantities.getQuantity(6000, KILOWATTHOUR)
Expand All @@ -59,7 +58,6 @@ class LoadInputTest extends Specification {
assert operator == loadInput.operator
assert id == loadInput.id
assert loadProfile == loadInput.loadProfile
assert dsm == loadInput.dsm
assert node == loadInput.node
assert qCharacteristics == loadInput.qCharacteristics
assert eConsAnnual == loadInput.eConsAnnual * 2d
Expand Down
2 changes: 0 additions & 2 deletions src/test/groovy/edu/ie3/test/common/SampleJointGrid.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class SampleJointGrid extends SystemParticipantTestData {
cosPhiFixed,
emInput,
standardLoadProfile,
false,
eConsAnnual,
sRated,
cosPhiRated)
Expand All @@ -107,7 +106,6 @@ class SampleJointGrid extends SystemParticipantTestData {
cosPhiFixed,
emInput,
standardLoadProfile,
false,
eConsAnnual,
sRated,
cosPhiRated)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ class SystemParticipantTestData {
cosPhiFixed,
emInput,
standardLoadProfile,
false,
eConsAnnual,
sRated,
cosPhiRated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ CREATE TABLE public.load_input
uuid UUID PRIMARY KEY,
controlling_em UUID NOT NULL,
cos_phi_rated TEXT NOT NULL,
dsm BOOL NOT NULL,
e_cons_annual DOUBLE PRECISION NOT NULL,
id TEXT NOT NULL,
load_profile TEXT NOT NULL,
Expand Down
Loading