Skip to content
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

adapting dod in documentation #942

Open
wants to merge 21 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
27ac2c9
adapting dod in documentation
SimonHuette Nov 27, 2023
ae9c38f
Merge branch 'dev' into sh/#872-storage-documentation
SimonHuette Nov 27, 2023
1b10e60
Merge branch 'dev' into sh/#872-storage-documentation
SimonHuette Nov 28, 2023
96a5997
addition in CHANGELOG
SimonHuette Dec 2, 2023
c8b14ec
Merge branch 'dev' into sh/#872-storage-documentation
SimonHuette Dec 2, 2023
7edc389
Merge remote-tracking branch 'origin/sh/#872-storage-documentation' i…
SimonHuette Dec 2, 2023
a4bf0d8
removed dod, lifetime and lifecycle from documentation
SimonHuette Mar 30, 2024
88c53f5
removed dod etc from StorageTypeInput and SystemParticipantTypeInputF…
SimonHuette Apr 29, 2024
8036d56
removing dod etc from other files
SimonHuette Apr 29, 2024
6b303ec
Merge branch 'refs/heads/dev' into sh/#872-storage-documentation
danielfeismann Apr 30, 2024
faa4715
remove more storage attributes which aren't used any longer
danielfeismann Apr 30, 2024
2e2c9aa
recover storage input docs
danielfeismann Apr 30, 2024
06bd9d5
Merge remote-tracking branch 'origin/sh/#872-storage-documentation' i…
danielfeismann Apr 30, 2024
34212c5
del storage.rst
danielfeismann Apr 30, 2024
26e3009
fix tests
danielfeismann Apr 30, 2024
a140d70
Merge remote-tracking branch 'origin/sh/#872-storage-documentation' i…
danielfeismann Apr 30, 2024
1cb938c
fix SystemParticipantValidationUtils and test
danielfeismann Apr 30, 2024
bc5d64d
Merge branch 'dev' into sh/#872-storage-documentation
danielfeismann May 6, 2024
935f80c
Merge branch 'refs/heads/dev' into sh/#872-storage-documentation
danielfeismann May 16, 2024
5ed1c73
Merge branch 'refs/heads/dev' into sh/#872-storage-documentation
danielfeismann Jun 10, 2024
596284e
move em into entity model documentation
danielfeismann Jun 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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

### Fixed
- Fixed `equals` of `ResultEntity` and `TimeSeriesEntry` [#1037](https://github.com/ie3-institute/PowerSystemDataModel/issues/1037)
- Fixed "depth of discharge" in documentation [#872](https://github.com/ie3-institute/PowerSystemDataModel/issues/872)

## [5.0.0] - 2024-03-06

Expand Down
26 changes: 6 additions & 20 deletions docs/readthedocs/models/input/participant/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,6 @@ Model of an ideal electrical battery energy storage.
- %
- Efficiency of the electrical inverter

* - dod
- %
- | Maximum permissible depth of discharge. 80 % dod
| is equivalent to a state of charge of 20 %.

* - lifeTime
- h
- Permissible hours of full use

* - lifeCycle
- --
- Permissible amount of full cycles

* - em
- --
- | UUID reference to an :ref:`Energy Management Unit<em_model>` that is controlling
| this system participant. Field can be empty or missing, if this participant
| is not controlled.

```

### Entity Model
Expand Down Expand Up @@ -125,7 +106,12 @@ Model of an ideal electrical battery energy storage.
- --
- | Foreseen operation strategy of the storage.
| Eligible input: *"market"*, *"grid"*, *"self"*


* - em
- --
- | UUID reference to an :ref:`Energy Management Unit<em_model>` that is controlling
| this system participant. Field can be empty or missing, if this participant
| is not controlled.

```

Expand Down
3 changes: 0 additions & 3 deletions docs/uml/main/input/SystemDatamodelConcept.puml
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@ package models {
- pMax: ComparableQuantity<Power> [kW]
- activePowerGradient: ComparableQuantity<DimensionlessRate> [%/h]
- eta: ComparableQuantity<Dimensionless> [%]
- dod: ComparableQuantity<Dimensionless> [%]
- lifeTime: ComparableQuantity<Time> [h]
- lifeCycle: int
}
StorageTypeInput --|> SystemParticipantTypeInput

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ public class SystemParticipantTypeInputFactory
// StorageTypeInput
private static final String P_MAX = "pMax";
private static final String ETA = "eta";
private static final String DOD = "dod";
private static final String LIFETIME = "lifeTime";
private static final String LIFECYCLE = "lifeCycle";

// WecTypeInput
private static final String CP_CHARACTERISTIC = "cpCharacteristic";
Expand Down Expand Up @@ -89,15 +86,7 @@ protected List<Set<String>> getFields(Class<?> entityClass) {
expandSet(standardConstructorParams, ETA_EL, ETA_THERMAL, P_THERMAL, P_OWN);
} else if (entityClass.equals(StorageTypeInput.class)) {
constructorParameters =
expandSet(
standardConstructorParams,
E_STORAGE,
P_MAX,
ACTIVE_POWER_GRADIENT,
ETA,
DOD,
LIFETIME,
LIFECYCLE);
expandSet(standardConstructorParams, E_STORAGE, P_MAX, ACTIVE_POWER_GRADIENT, ETA);
}

return Collections.singletonList(constructorParameters);
Expand Down Expand Up @@ -241,23 +230,8 @@ private SystemParticipantTypeInput buildStorageTypeInput(
ComparableQuantity<DimensionlessRate> activePowerGradient =
data.getQuantity(ACTIVE_POWER_GRADIENT, StandardUnits.ACTIVE_POWER_GRADIENT);
ComparableQuantity<Dimensionless> eta = data.getQuantity(ETA, StandardUnits.EFFICIENCY);
ComparableQuantity<Dimensionless> dod = data.getQuantity(DOD, StandardUnits.DOD);
ComparableQuantity<Time> lifeTime = data.getQuantity(LIFETIME, StandardUnits.LIFE_TIME);
int lifeCycle = data.getInt(LIFECYCLE);

return new StorageTypeInput(
uuid,
id,
capEx,
opEx,
eStorage,
sRated,
cosPhi,
pMax,
activePowerGradient,
eta,
dod,
lifeTime,
lifeCycle);
uuid, id, capEx, opEx, eStorage, sRated, cosPhi, pMax, activePowerGradient, eta);
}
}
4 changes: 0 additions & 4 deletions src/main/java/edu/ie3/datamodel/models/StandardUnits.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,8 @@ public class StandardUnits {
KILOWATTHOUR_PER_KELVIN_TIMES_CUBICMETRE;
/** Thermal transmission through an insulation in kW/K */
public static final Unit<ThermalConductance> THERMAL_TRANSMISSION = KILOWATT_PER_KELVIN;
/** Depth of discharge in % */
public static final Unit<Dimensionless> DOD = PERCENT;
/** State of charge in % */
public static final Unit<Dimensionless> SOC = PERCENT;
/** Life time of a system in h */
public static final Unit<Time> LIFE_TIME = HOUR;
/** Area covered by the rotor of a wind energy converter in m² */
public static final Unit<Area> ROTOR_AREA = SQUARE_METRE;
/** Height of the hub of an wind energy converter in metre */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ public class StorageTypeInput extends SystemParticipantTypeInput {
private final ComparableQuantity<DimensionlessRate> activePowerGradient;
/** Efficiency of the charging and discharging process (typically in %) */
private final ComparableQuantity<Dimensionless> eta;
/** Minimum permissible depth of discharge (typically in %) */
private final ComparableQuantity<Dimensionless> dod;
/** Maximum life time of the storage (typically in h) */
private final ComparableQuantity<Time> lifeTime;
/** Maximum amount of full charging cycles */
private final int lifeCycle;

/**
* @param uuid of the input entity
Expand All @@ -45,9 +39,6 @@ public class StorageTypeInput extends SystemParticipantTypeInput {
* @param pMax maximum permissible active power of the integrated inverter
* @param activePowerGradient maximum permissible gradient of active power change
* @param eta efficiency of the charging and discharging process
* @param dod maximum permissible depth of discharge
* @param lifeTime maximum life time of the storage
* @param lifeCycle maximum amount of full charging/discharging cycles
*/
public StorageTypeInput(
UUID uuid,
Expand All @@ -59,36 +50,18 @@ public StorageTypeInput(
double cosPhiRated,
ComparableQuantity<Power> pMax,
ComparableQuantity<DimensionlessRate> activePowerGradient,
ComparableQuantity<Dimensionless> eta,
ComparableQuantity<Dimensionless> dod,
ComparableQuantity<Time> lifeTime,
int lifeCycle) {
ComparableQuantity<Dimensionless> eta) {
super(uuid, id, capex, opex, sRated.to(StandardUnits.S_RATED), cosPhiRated);
this.eStorage = eStorage.to(StandardUnits.ENERGY_IN);
this.pMax = pMax.to(StandardUnits.ACTIVE_POWER_IN);
this.activePowerGradient = activePowerGradient.to(StandardUnits.ACTIVE_POWER_GRADIENT);
this.eta = eta.to(StandardUnits.EFFICIENCY);
this.dod = dod.to(StandardUnits.DOD);
this.lifeTime = lifeTime.to(StandardUnits.LIFE_TIME);
this.lifeCycle = lifeCycle;
}

public ComparableQuantity<Dimensionless> getEta() {
return eta;
}

public ComparableQuantity<Dimensionless> getDod() {
return dod;
}

public ComparableQuantity<Time> getLifeTime() {
return lifeTime;
}

public int getLifeCycle() {
return lifeCycle;
}

public ComparableQuantity<Energy> geteStorage() {
return eStorage;
}
Expand All @@ -111,19 +84,15 @@ public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof StorageTypeInput that)) return false;
if (!super.equals(o)) return false;
return lifeCycle == that.lifeCycle
&& eStorage.equals(that.eStorage)
return eStorage.equals(that.eStorage)
&& pMax.equals(that.pMax)
&& activePowerGradient.equals(that.activePowerGradient)
&& eta.equals(that.eta)
&& dod.equals(that.dod)
&& lifeTime.equals(that.lifeTime);
&& eta.equals(that.eta);
}

@Override
public int hashCode() {
return Objects.hash(
super.hashCode(), eStorage, pMax, activePowerGradient, eta, dod, lifeTime, lifeCycle);
return Objects.hash(super.hashCode(), eStorage, pMax, activePowerGradient, eta);
}

@Override
Expand All @@ -149,12 +118,6 @@ public String toString() {
+ activePowerGradient
+ ", eta="
+ eta
+ ", dod="
+ dod
+ ", lifeTime="
+ lifeTime
+ ", lifeCycle="
+ lifeCycle
+ '}';
}

Expand All @@ -180,9 +143,6 @@ private StorageTypeInputCopyBuilder(StorageTypeInput entity) {
this.pMax = entity.getpMax();
this.activePowerGradient = entity.getActivePowerGradient();
this.eta = entity.getEta();
this.dod = entity.getDod();
this.lifeTime = entity.getLifeTime();
this.lifeCycle = entity.getLifeCycle();
}

public StorageTypeInputCopyBuilder seteStorage(ComparableQuantity<Energy> eStorage) {
Expand Down Expand Up @@ -270,10 +230,7 @@ public StorageTypeInput build() {
getCosPhiRated(),
pMax,
activePowerGradient,
eta,
dod,
lifeTime,
lifeCycle);
eta);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,13 +482,10 @@ private static List<Try<Void, InvalidEntityException>> checkStorage(StorageInput
* Validates a StorageTypeInput if:
*
* <ul>
* <li>its permissible amount of full cycles is not negative
* <li>its efficiency of the electrical converter is between 0% and 100%
* <li>its maximum permissible depth of discharge is between 0% and 100%
* <li>its active power gradient is not negative
* <li>its battery capacity is positive
* <li>its maximum permissible active power (in-feed or consumption) is not negative
* <li>its permissible hours of full use is not negative
* </ul>
*
* @param storageTypeInput StorageTypeInput to validate
Expand All @@ -499,14 +496,6 @@ private static List<Try<Void, InvalidEntityException>> checkStorageType(
StorageTypeInput storageTypeInput) {
List<Try<Void, InvalidEntityException>> exceptions = new ArrayList<>();

exceptions.add(
Try.ofVoid(
storageTypeInput.getLifeCycle() < 0,
() ->
new InvalidEntityException(
"Permissible amount of life cycles of the storage type must be zero or positive",
storageTypeInput)));

exceptions.addAll(
Try.ofVoid(
InvalidEntityException.class,
Expand All @@ -515,17 +504,10 @@ private static List<Try<Void, InvalidEntityException>> checkStorageType(
storageTypeInput,
storageTypeInput.getEta(),
"Efficiency of the electrical converter"),
() ->
isBetweenZeroAndHundredPercent(
storageTypeInput,
storageTypeInput.getDod(),
"Maximum permissible depth of discharge"),
() ->
detectNegativeQuantities(
new Quantity<?>[] {
storageTypeInput.getpMax(),
storageTypeInput.getActivePowerGradient(),
storageTypeInput.getLifeTime()
storageTypeInput.getpMax(), storageTypeInput.getActivePowerGradient(),
},
storageTypeInput),
() ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,7 @@ class SystemParticipantTypeInputFactoryTest extends Specification implements Fac
"estorage" : "6",
"pmax" : "8",
"activepowergradient" : "1",
"eta" : "9",
"dod" : "10",
"lifetime" : "11",
"lifecycle" : "12"
"eta" : "9"
]
def typeInputClass = StorageTypeInput

Expand All @@ -273,24 +270,21 @@ class SystemParticipantTypeInputFactoryTest extends Specification implements Fac
assert pMax == getQuant(parameter["pmax"], StandardUnits.ACTIVE_POWER_IN)
assert activePowerGradient == getQuant(parameter["activepowergradient"], StandardUnits.ACTIVE_POWER_GRADIENT)
assert eta == getQuant(parameter["eta"], StandardUnits.EFFICIENCY)
assert dod == getQuant(parameter["dod"], StandardUnits.DOD)
assert lifeTime == getQuant(parameter["lifetime"], StandardUnits.LIFE_TIME)
assert lifeCycle == Integer.parseInt(parameter["lifecycle"])
}
}

def "A SystemParticipantTypeInputFactory should throw an exception on invalid or incomplete data"() {
given: "a system participant factory and model data"
def typeInputFactory = new SystemParticipantTypeInputFactory()
def actualFields = SystemParticipantTypeInputFactory.newSet("uuid", "id", "capex", "opex", "srated", "cosPhiRated", "estorage", "pmin", "pmax", "eta", "dod", "lifetime",)
def actualFields = SystemParticipantTypeInputFactory.newSet("uuid", "id", "capex", "opex", "srated", "cosPhiRated", "estorage", "pmin", "pmax", "eta",)

when:
def input = typeInputFactory.validate(actualFields, StorageTypeInput)

then:
input.failure
input.exception.get().message == "The provided fields [capex, cosPhiRated, dod, estorage, eta, id, lifetime, opex, pmax, pmin, srated, uuid] are invalid for instance of 'StorageTypeInput'. \n" +
input.exception.get().message == "The provided fields [capex, cosPhiRated, estorage, eta, id, opex, pmax, pmin, srated, uuid] are invalid for instance of 'StorageTypeInput'. \n" +
"The following fields (without complex objects e.g. nodes, operators, ...) to be passed to a constructor of 'StorageTypeInput' are possible (NOT case-sensitive!):\n" +
"0: [activePowerGradient, capex, cosPhiRated, dod, eStorage, eta, id, lifeCycle, lifeTime, opex, pMax, sRated, uuid] or [active_power_gradient, capex, cos_phi_rated, dod, e_storage, eta, id, life_cycle, life_time, opex, p_max, s_rated, uuid]\n"
"0: [activePowerGradient, capex, cosPhiRated, eStorage, eta, id, opex, pMax, sRated, uuid] or [active_power_gradient, capex, cos_phi_rated, e_storage, eta, id, opex, p_max, s_rated, uuid]\n"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,7 @@ class InputEntityProcessorTest extends Specification {
"cosPhiRated" : "0.997",
"pMax" : "12.961",
"activePowerGradient": "3.0",
"eta" : "92.0",
"dod" : "20.0",
"lifeTime" : "43800.0",
"lifeCycle" : "100000"
"eta" : "92.0"
]

when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta {
pMax == sptd.storageTypeInput.pMax
activePowerGradient == sptd.storageTypeInput.activePowerGradient
eta == sptd.storageTypeInput.eta
dod == sptd.storageTypeInput.dod
lifeTime == sptd.storageTypeInput.lifeTime
lifeCycle == sptd.storageTypeInput.lifeCycle
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class StorageTypeInputTest extends Specification {
def alteredUnit = storageTypeInput.copy()
.seteStorage(Quantities.getQuantity(90, ENERGY_IN))
.setpMax(Quantities.getQuantity(15, ACTIVE_POWER_IN))
.setLifeTime(Quantities.getQuantity(999999, LIFE_TIME))
.build()

then:
Expand All @@ -38,9 +37,6 @@ class StorageTypeInputTest extends Specification {
assert pMax == Quantities.getQuantity(15, ACTIVE_POWER_IN)
assert activePowerGradient == storageTypeInput.activePowerGradient
assert eta == storageTypeInput.eta
assert dod == storageTypeInput.dod
assert lifeTime == Quantities.getQuantity(999999, LIFE_TIME)
assert lifeCycle == storageTypeInput.lifeCycle
}
}

Expand All @@ -63,9 +59,6 @@ class StorageTypeInputTest extends Specification {
assert pMax == storageTypeInput.pMax * 2d
assert activePowerGradient == storageTypeInput.activePowerGradient
assert eta == storageTypeInput.eta
assert dod == storageTypeInput.dod
assert lifeTime == storageTypeInput.lifeTime
assert lifeCycle == storageTypeInput.lifeCycle
}
}
}