Skip to content

Commit 8036d56

Browse files
committed
removing dod etc from other files
1 parent 88c53f5 commit 8036d56

File tree

10 files changed

+14
-59
lines changed

10 files changed

+14
-59
lines changed

docs/uml/main/input/SystemDatamodelConcept.puml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@ package models {
153153
- pMax: ComparableQuantity<Power> [kW]
154154
- activePowerGradient: ComparableQuantity<DimensionlessRate> [%/h]
155155
- eta: ComparableQuantity<Dimensionless> [%]
156-
- dod: ComparableQuantity<Dimensionless> [%]
157-
- lifeTime: ComparableQuantity<Time> [h]
158-
- lifeCycle: int
159156
}
160157
StorageTypeInput --|> SystemParticipantTypeInput
161158

src/main/java/edu/ie3/datamodel/models/StandardUnits.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,8 @@ public class StandardUnits {
101101
KILOWATTHOUR_PER_KELVIN_TIMES_CUBICMETRE;
102102
/** Thermal transmission through an insulation in kW/K */
103103
public static final Unit<ThermalConductance> THERMAL_TRANSMISSION = KILOWATT_PER_KELVIN;
104-
/** Depth of discharge in % */
105-
public static final Unit<Dimensionless> DOD = PERCENT;
106104
/** State of charge in % */
107105
public static final Unit<Dimensionless> SOC = PERCENT;
108-
/** Life time of a system in h */
109-
public static final Unit<Time> LIFE_TIME = HOUR;
110106
/** Area covered by the rotor of a wind energy converter in m² */
111107
public static final Unit<Area> ROTOR_AREA = SQUARE_METRE;
112108
/** Height of the hub of an wind energy converter in metre */

src/main/java/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtils.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -461,13 +461,6 @@ private static List<Try<Void, InvalidEntityException>> checkStorageType(
461461
StorageTypeInput storageTypeInput) {
462462
List<Try<Void, InvalidEntityException>> exceptions = new ArrayList<>();
463463

464-
exceptions.add(
465-
Try.ofVoid(
466-
storageTypeInput.getLifeCycle() < 0,
467-
() ->
468-
new InvalidEntityException(
469-
"Permissible amount of life cycles of the storage type must be zero or positive",
470-
storageTypeInput)));
471464

472465
exceptions.addAll(
473466
Try.ofVoid(
@@ -477,17 +470,11 @@ private static List<Try<Void, InvalidEntityException>> checkStorageType(
477470
storageTypeInput,
478471
storageTypeInput.getEta(),
479472
"Efficiency of the electrical converter"),
480-
() ->
481-
isBetweenZeroAndHundredPercent(
482-
storageTypeInput,
483-
storageTypeInput.getDod(),
484-
"Maximum permissible depth of discharge"),
485473
() ->
486474
detectNegativeQuantities(
487475
new Quantity<?>[] {
488476
storageTypeInput.getpMax(),
489477
storageTypeInput.getActivePowerGradient(),
490-
storageTypeInput.getLifeTime()
491478
},
492479
storageTypeInput),
493480
() ->

src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/SystemParticipantTypeInputFactoryTest.groovy

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,7 @@ class SystemParticipantTypeInputFactoryTest extends Specification implements Fac
245245
"estorage" : "6",
246246
"pmax" : "8",
247247
"activepowergradient" : "1",
248-
"eta" : "9",
249-
"dod" : "10",
250-
"lifetime" : "11",
251-
"lifecycle" : "12"
248+
"eta" : "9"
252249
]
253250
def typeInputClass = StorageTypeInput
254251

@@ -271,9 +268,6 @@ class SystemParticipantTypeInputFactoryTest extends Specification implements Fac
271268
assert pMax == getQuant(parameter["pmax"], StandardUnits.ACTIVE_POWER_IN)
272269
assert activePowerGradient == getQuant(parameter["activepowergradient"], StandardUnits.ACTIVE_POWER_GRADIENT)
273270
assert eta == getQuant(parameter["eta"], StandardUnits.EFFICIENCY)
274-
assert dod == getQuant(parameter["dod"], StandardUnits.DOD)
275-
assert lifeTime == getQuant(parameter["lifetime"], StandardUnits.LIFE_TIME)
276-
assert lifeCycle == Integer.parseInt(parameter["lifecycle"])
277271
}
278272
}
279273

@@ -290,30 +284,26 @@ class SystemParticipantTypeInputFactoryTest extends Specification implements Fac
290284
"estorage": "6",
291285
"pmin": "7",
292286
"pmax": "8",
293-
"eta": "9",
294-
"dod": "10",
295-
"lifetime": "11"
287+
"eta": "9"
296288
]
297289

298290
when:
299291
Try<SystemParticipantTypeInput, FactoryException> input = typeInputFactory.get(new SimpleEntityData(parameter, StorageTypeInput))
300292

301293
then:
302294
input.failure
303-
input.exception.get().cause.message == "The provided fields [capex, cosPhiRated, dod, estorage, eta, id, lifetime, opex, pmax, pmin, srated, uuid] with data \n" +
295+
input.exception.get().cause.message == "The provided fields [capex, cosPhiRated, estorage, eta, id, opex, pmax, pmin, srated, uuid] with data \n" +
304296
"{capex -> 3,\n" +
305297
"cosPhiRated -> 6,\n" +
306-
"dod -> 10,\n" +
307298
"estorage -> 6,\n" +
308299
"eta -> 9,\n" +
309300
"id -> blablub,\n" +
310-
"lifetime -> 11,\n" +
311301
"opex -> 4,\n" +
312302
"pmax -> 8,\n" +
313303
"pmin -> 7,\n" +
314304
"srated -> 5,\n" +
315305
"uuid -> 91ec3bcf-1777-4d38-af67-0bf7c9fa73c7} are invalid for instance of StorageTypeInput. \n" +
316306
"The following fields (without complex objects e.g. nodes, operators, ...) to be passed to a constructor of 'StorageTypeInput' are possible (NOT case-sensitive!):\n" +
317-
"0: [activepowergradient, capex, cosphirated, dod, estorage, eta, id, lifecycle, lifetime, opex, pmax, srated, uuid]\n"
307+
"0: [activepowergradient, capex, cosphirated, estorage, eta, id, opex, pmax, srated, uuid]\n"
318308
}
319309
}

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,10 +600,7 @@ class InputEntityProcessorTest extends Specification {
600600
"cosPhiRated" : "0.997",
601601
"pMax" : "12.961",
602602
"activePowerGradient": "3.0",
603-
"eta" : "92.0",
604-
"dod" : "20.0",
605-
"lifeTime" : "43800.0",
606-
"lifeCycle" : "100000"
603+
"eta" : "92.0"
607604
]
608605

609606
when:

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,6 @@ class CsvTypeSourceTest extends Specification implements CsvTestDataMeta {
164164
storageTypes.first().pMax == sptd.storageTypeInput.pMax
165165
storageTypes.first().activePowerGradient == sptd.storageTypeInput.activePowerGradient
166166
storageTypes.first().eta == sptd.storageTypeInput.eta
167-
storageTypes.first().dod == sptd.storageTypeInput.dod
168-
storageTypes.first().lifeTime == sptd.storageTypeInput.lifeTime
169-
storageTypes.first().lifeCycle == sptd.storageTypeInput.lifeCycle
170167
}
171168

172169
def "A CsvTypeSource should read and handle valid wec type file as expected"() {

src/test/groovy/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtilsTest.groovy

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ class SystemParticipantValidationUtilsTest extends Specification {
8585
private static final ComparableQuantity<Energy> eStorage = Quantities.getQuantity(100, ENERGY_IN)
8686
private static final ComparableQuantity<Power> pMax = Quantities.getQuantity(15, ACTIVE_POWER_IN)
8787
private static final ComparableQuantity<Dimensionless> eta = Quantities.getQuantity(95, EFFICIENCY)
88-
private static final ComparableQuantity<Dimensionless> dod = Quantities.getQuantity(10, EFFICIENCY)
8988
private static final ComparableQuantity<DimensionlessRate> cpRate = Quantities.getQuantity(100, ACTIVE_POWER_GRADIENT)
90-
private static final ComparableQuantity<Time> lifeTime = Quantities.getQuantity(175316.4, LIFE_TIME)
91-
private static final int lifeCycle = 100
9289

9390
// Specific data for wec type
9491
private static final WecCharacteristicInput wecCharacteristic = new WecCharacteristicInput("cP:{(10.00,0.05),(15.00,0.10),(20.00,0.20)}")
@@ -411,11 +408,11 @@ class SystemParticipantValidationUtilsTest extends Specification {
411408

412409
where:
413410
invalidStorageType || expectedException
414-
new StorageTypeInput(uuid, id, capex, opex, eStorage, sRated, cosPhiRated, pMax, cpRate, eta, dod, lifeTime, -1) || new InvalidEntityException("Permissible amount of life cycles of the storage type must be zero or positive", invalidStorageType)
415-
new StorageTypeInput(uuid, id, capex, opex, eStorage, sRated, cosPhiRated, pMax, cpRate, Quantities.getQuantity(110, EFFICIENCY), dod, lifeTime, lifeCycle) || new InvalidEntityException("Efficiency of the electrical converter of StorageTypeInput must be between 0% and 100%", invalidStorageType)
416-
new StorageTypeInput(uuid, id, capex, opex, eStorage, sRated, cosPhiRated, pMax, cpRate, eta, Quantities.getQuantity(-10, EFFICIENCY), lifeTime, lifeCycle) || new InvalidEntityException("Maximum permissible depth of discharge of StorageTypeInput must be between 0% and 100%", invalidStorageType)
417-
new StorageTypeInput(uuid, id, capex, opex, eStorage, sRated, cosPhiRated, Quantities.getQuantity(-15, ACTIVE_POWER_IN), Quantities.getQuantity(-100, ACTIVE_POWER_GRADIENT), eta, dod, Quantities.getQuantity(-10.5, LIFE_TIME), lifeCycle) || new InvalidEntityException("The following quantities have to be zero or positive: -15 kW, -100 %/h, -10.5 h", invalidStorageType)
418-
new StorageTypeInput(uuid, id, capex, opex, Quantities.getQuantity(0, ENERGY_IN), sRated, cosPhiRated, pMax, cpRate, eta, dod, lifeTime, lifeCycle) || new InvalidEntityException("The following quantities have to be positive: 0 kWh", invalidStorageType)
411+
new StorageTypeInput(uuid, id, capex, opex, eStorage, sRated, cosPhiRated, pMax, cpRate, eta, -1) || new InvalidEntityException("Permissible amount of life cycles of the storage type must be zero or positive", invalidStorageType)
412+
new StorageTypeInput(uuid, id, capex, opex, eStorage, sRated, cosPhiRated, pMax, cpRate, Quantities.getQuantity(110, EFFICIENCY)) || new InvalidEntityException("Efficiency of the electrical converter of StorageTypeInput must be between 0% and 100%", invalidStorageType)
413+
new StorageTypeInput(uuid, id, capex, opex, eStorage, sRated, cosPhiRated, pMax, cpRate, eta, Quantities.getQuantity(-10, EFFICIENCY)) || new InvalidEntityException("Maximum permissible depth of discharge of StorageTypeInput must be between 0% and 100%", invalidStorageType)
414+
new StorageTypeInput(uuid, id, capex, opex, eStorage, sRated, cosPhiRated, Quantities.getQuantity(-15, ACTIVE_POWER_IN), Quantities.getQuantity(-100, ACTIVE_POWER_GRADIENT), eta) || new InvalidEntityException("The following quantities have to be zero or positive: -15 kW, -100 %/h, -10.5 h", invalidStorageType)
415+
new StorageTypeInput(uuid, id, capex, opex, Quantities.getQuantity(0, ENERGY_IN), sRated, cosPhiRated, pMax, cpRate, eta) || new InvalidEntityException("The following quantities have to be positive: 0 kWh", invalidStorageType)
419416
}
420417

421418
// WEC

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,7 @@ class SystemParticipantTestData {
244244
// Storage
245245
private static final ComparableQuantity<Power> pMax = Quantities.getQuantity(15, ACTIVE_POWER_IN)
246246
private static final ComparableQuantity<Dimensionless> eta = Quantities.getQuantity(95, EFFICIENCY)
247-
private static final ComparableQuantity<Dimensionless> dod = Quantities.getQuantity(10, EFFICIENCY)
248247
private static final ComparableQuantity<DimensionlessRate> cpRate = Quantities.getQuantity(100, ACTIVE_POWER_GRADIENT)
249-
private static final ComparableQuantity<Time> lifeTime = Quantities.getQuantity(175316.4, LIFE_TIME)
250-
private static final int lifeCycle = 100
251248
public static final StorageTypeInput storageTypeInput = new StorageTypeInput(
252249
typeUuid,
253250
"test_storageTypeInput",
@@ -259,9 +256,6 @@ class SystemParticipantTestData {
259256
pMax,
260257
cpRate,
261258
eta,
262-
dod,
263-
lifeTime,
264-
lifeCycle
265259
)
266260
public static final StorageInput storageInput = new StorageInput(
267261
UUID.fromString("06b58276-8350-40fb-86c0-2414aa4a0452"),
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
"uuid","active_power_gradient","capex","cos_phi_rated","dod","e_storage","eta","id","life_cycle","life_time","opex","p_max","s_rated"
2-
95d4c980-d9e1-4813-9f2a-b0942488a570,1.0,0.0,0.96,8.0,16.0,93.0,Typ_1,5000,5000.0,0.65,4.0,4.166666666666667
1+
"uuid","active_power_gradient","capex","cos_phi_rated","e_storage","eta","id","opex","p_max","s_rated"
2+
95d4c980-d9e1-4813-9f2a-b0942488a570,1.0,0.0,0.96,16.0,93.0,Typ_1,0.65,4.0,4.166666666666667
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
uuid,active_power_gradient,capex,cosphi_rated,dod,e_storage,eta,id,life_cycle,life_time,opex,p_max,s_rated
2-
5ebd8f7e-dedb-4017-bb86-6373c4b68eb8,100.0,100.0,0.95,10.0,100.0,95.0,test_storageTypeInput,100,175316.4,50.0,15.0,25.0
1+
uuid,active_power_gradient,capex,cosphi_rated,e_storage,eta,id,opex,p_max,s_rated
2+
5ebd8f7e-dedb-4017-bb86-6373c4b68eb8,100.0,100.0,0.95,100.0,95.0,test_storageTypeInput,50.0,15.0,25.0

0 commit comments

Comments
 (0)