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

ThermalGrid integration test #879

Draft
wants to merge 247 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
247 commits
Select commit Hold shift + click to select a range
891ab88
add maybeThermalThreshold to nextActivationTicks
danielfeismann Jul 17, 2024
5b9f652
changelog
danielfeismann Jul 17, 2024
989b7b6
provide heat pump the latest entry of weather data
danielfeismann Jul 17, 2024
8b41023
adapt handleInfeed to check for lastState qDot
danielfeismann Jul 17, 2024
e4457dc
fix energyDemand evaluation for demand only below target temperature
danielfeismann Jul 19, 2024
374a2ee
format and exception
danielfeismann Jul 19, 2024
280fed5
Revert "format and exception"
danielfeismann Jul 19, 2024
f51dd61
format and exception
danielfeismann Jul 19, 2024
a297697
refactor handleInfeed to comply with case where thermal storage has b…
danielfeismann Jul 19, 2024
77941f9
fix HpModelSpec to check for targetTemperature
danielfeismann Jul 19, 2024
cde52e4
adapt HpModelSpec to check for targetTemperature
danielfeismann Jul 19, 2024
6244e79
fmt
danielfeismann Jul 19, 2024
81ef30d
refactor energyDemand
danielfeismann Jul 19, 2024
ab0806c
refactor EmAgentIT
danielfeismann Jul 19, 2024
8c6aed6
rollback HpModelSpec
danielfeismann Jul 22, 2024
44873d2
fix energyDemand
danielfeismann Jul 22, 2024
ec7d3f7
update EmAgentIT
danielfeismann Jul 22, 2024
5dcc230
adapt EmAgentIT
danielfeismann Jul 22, 2024
3cc1aa6
Merge branch 'refs/heads/dev' into df/#827_fix_hp_overheating_house
danielfeismann Jul 22, 2024
a3959cb
rollback EmAgentIT changes
danielfeismann Jul 22, 2024
07574aa
Revert "rollback EmAgentIT changes"
danielfeismann Jul 22, 2024
1d7ae94
adapt EmAgentIT comments
danielfeismann Jul 22, 2024
fd1630e
use actual state when determine energyDemand for next period
danielfeismann Jul 22, 2024
9cd94e8
only charge storage if it has still available capacity
danielfeismann Jul 22, 2024
a001dc0
use the actual result tick for thermalhouse and thermal storage results
danielfeismann Jul 22, 2024
ae8185e
use the actual result tick for thermalhouse and thermal storage resul…
danielfeismann Jul 22, 2024
43d114b
fmt
danielfeismann Jul 22, 2024
d1edeab
Merge branch 'refs/heads/dev' into df/#827_fix_hp_storage_refill
danielfeismann Jul 23, 2024
402b858
refactor determining the energyDemand to recharge storage
danielfeismann Jul 23, 2024
901f444
split energyDemand of ThermalGrid into demand of house and of storage
danielfeismann Jul 23, 2024
ba75a19
changelog
danielfeismann Jul 23, 2024
a65f25a
fix condition for handleInfeed in case qdot should be used first for …
danielfeismann Jul 23, 2024
eb15119
Merge branch 'dev' into df/#827_fix_hp_overheating_house
danielfeismann Jul 25, 2024
b655165
Merge branch 'refs/heads/dev' into df/#827_fix_hp_storage_refill
danielfeismann Jul 25, 2024
9c3dc92
Merge branch 'refs/heads/dev' into df/#827_fix_hp_storage_refill
danielfeismann Jul 26, 2024
22a7743
Merge branch 'refs/heads/dev' into df/#827_fix_hp_storage_refill
danielfeismann Jul 26, 2024
08499be
Merge branch 'refs/heads/dev' into df/#827_fix_hp_overheating_house
danielfeismann Jul 26, 2024
dc8ce19
Refactor ThermalGrid, distinguishes between house supply and storage
danielfeismann Jul 26, 2024
bb2bcc4
fmt
danielfeismann Jul 30, 2024
59d70af
setup framework for ThermalGridIT
danielfeismann Jul 31, 2024
5349900
using updatedState for energyDemand
danielfeismann Aug 1, 2024
ad2bac9
fmt
danielfeismann Aug 1, 2024
d85279a
codacy
danielfeismann Aug 1, 2024
65d768c
Merge branch 'refs/heads/dev' into df/#000-thermalGridIT
danielfeismann Aug 4, 2024
4b2e643
create thermalGridIT testframe
danielfeismann Aug 4, 2024
a0ecdb6
changelog
danielfeismann Aug 4, 2024
79a92c3
Merge branch 'refs/heads/df/#827_fix_hp_storage_refill' into df/#878-…
danielfeismann Aug 5, 2024
3635241
Provide actual ambient temperature of tick to HpModel when calculate …
danielfeismann Aug 5, 2024
a14bac2
Merge branch 'refs/heads/df/#882-ambient-temperature' into df/#878-th…
danielfeismann Aug 5, 2024
5ba6f59
fmt
danielfeismann Aug 5, 2024
bdf4c9d
introduce storage in HpInputTestData
danielfeismann Aug 5, 2024
1a4bde8
resolve merge conflict
danielfeismann Aug 5, 2024
97a4577
update ThermalGridIT
danielfeismann Aug 5, 2024
11c8acb
further update ThermalGridIT
danielfeismann Aug 5, 2024
3e27bf7
Merge branch 'refs/heads/df/#827_fix_hp_overheating_house' into df/#8…
danielfeismann Aug 5, 2024
547f81c
Merge branch 'refs/heads/df/#882-ambient-temperature' into df/#878-th…
danielfeismann Aug 5, 2024
3235e02
Merge branch 'refs/heads/df/#844_fix_thermal_house_results' into df/#…
danielfeismann Aug 5, 2024
b21bbc3
update changelog
danielfeismann Aug 5, 2024
cf448e0
Merge branch 'refs/heads/dev' into df/#827_fix_hp_storage_refill
danielfeismann Aug 5, 2024
b14f4ab
refactor tests for result events within ThermalGridIT
danielfeismann Aug 5, 2024
cecd940
fixed ThermalGridIT
danielfeismann Aug 7, 2024
6f11666
ThermalGridIT till tick 31106
danielfeismann Aug 7, 2024
3d43014
fix condition if hp should be turned on in next tick
danielfeismann Aug 7, 2024
a093ac7
Merge branch 'refs/heads/df/#827_fix_hp_storage_refill' into df/#878-…
danielfeismann Aug 7, 2024
97e3bd8
refator HpModel.operatesInNextState, enrich energyDemand method of Th…
danielfeismann Aug 7, 2024
26b22c0
fmt
danielfeismann Aug 7, 2024
6f220a9
handle case where thermal storage heat the house and we get activated…
danielfeismann Aug 7, 2024
ab52715
adapt ThermalGridIT to changes for case storage heat house
danielfeismann Aug 7, 2024
264210a
update tests to thermalStorage with zero storageMinimumLvl
danielfeismann Aug 8, 2024
701aaf5
fix thermal storage recharging condition
danielfeismann Aug 8, 2024
14d2b05
finalise ThermalGridIT
danielfeismann Aug 8, 2024
ca0179a
Merge branch 'refs/heads/dev' into df/#878-thermalGridIT
danielfeismann Aug 8, 2024
d9609da
Merge branch 'refs/heads/dev' into df/#827_fix_hp_storage_refill
danielfeismann Aug 8, 2024
5a89c3d
Merge remote-tracking branch 'refs/remotes/origin/df/#894-storage-zer…
danielfeismann Aug 8, 2024
8563328
finalise ThermalGridIT
danielfeismann Aug 8, 2024
68075ac
fmt
danielfeismann Aug 8, 2024
22a7bc9
Merge branch 'refs/heads/dev' into df/#827_fix_hp_storage_refill
danielfeismann Aug 12, 2024
b46f1e3
Merge branch 'refs/heads/dev' into df/#878-thermalGridIT
danielfeismann Aug 12, 2024
ff16555
Merge branch 'refs/heads/dev' into df/#827_fix_hp_storage_refill
danielfeismann Aug 13, 2024
625e46b
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Aug 13, 2024
0d2e353
Merge branch 'refs/heads/dev' into df/#878-thermalGridIT
danielfeismann Aug 20, 2024
031ebb8
add lastAmbientTemperature to energyDemandAndUpdateState
danielfeismann Aug 20, 2024
d44fc85
change thermalDemands to boolean and introduce hp isRunning to therma…
danielfeismann Aug 20, 2024
bca8fa3
missing thermalDemand changes and refactor logic for handling infeed …
danielfeismann Aug 20, 2024
bac1375
provide lastAmbientTemperature to determineState
danielfeismann Aug 20, 2024
db0aa48
provide lastAmbientTemperature as well to tests
danielfeismann Aug 20, 2024
7812aeb
fmt
danielfeismann Aug 20, 2024
0c36ce5
update ThermalGridIT to last changes
danielfeismann Aug 20, 2024
188418f
rollback unnecessary change
danielfeismann Aug 21, 2024
3405e78
adapt EmAgentIT
danielfeismann Aug 21, 2024
6c9e988
Merge branch 'refs/heads/dev' into df/#827_fix_hp_storage_refill
danielfeismann Aug 21, 2024
9da307e
remove unneccessary imports
danielfeismann Aug 21, 2024
fe7f1b2
Merge remote-tracking branch 'refs/remotes/origin/df/#729-additional-…
danielfeismann Aug 21, 2024
95d4907
fix merge conflict
danielfeismann Aug 21, 2024
c1891a0
remove storage min lvl in HpInputTestData
danielfeismann Aug 21, 2024
0886111
move operation conditions of hp into operatesInNextState and adapt Hp…
danielfeismann Aug 21, 2024
441dfdb
adapt condition for hasAdditionalDemand
danielfeismann Aug 21, 2024
8ee3b77
refactor ThermalEnergyDemand
danielfeismann Aug 21, 2024
ced3b55
fmt
danielfeismann Aug 21, 2024
b07c1f8
Revert "adapt condition for hasAdditionalDemand"
danielfeismann Aug 21, 2024
3696479
Merge remote-tracking branch 'refs/remotes/origin/df/#917-Refactor-Th…
danielfeismann Aug 21, 2024
8321411
remove broken test
danielfeismann Aug 21, 2024
3ed4fed
remove demand of heat storage from condtion for checking when hp can …
danielfeismann Aug 21, 2024
a4895ae
fix HpModelSpec
danielfeismann Aug 21, 2024
1f829e6
codacy
danielfeismann Aug 21, 2024
d2c433b
Merge branch 'refs/heads/dev' into df/#878-thermalGridIT
danielfeismann Aug 22, 2024
25de224
Merge remote-tracking branch 'refs/remotes/origin/df/#827_fix_hp_stor…
danielfeismann Aug 22, 2024
882d8fb
adaptions after merging thermal storage refill PR
danielfeismann Aug 22, 2024
ebdc0dc
fmt
danielfeismann Aug 22, 2024
07e5825
Merge branch 'refs/heads/dev' into df/#878-thermalGridIT
danielfeismann Aug 24, 2024
baabf85
Merge remote-tracking branch 'refs/remotes/origin/df/#926-Fix-determi…
danielfeismann Aug 24, 2024
7659750
Merge remote-tracking branch 'refs/remotes/origin/df/#924-ThermalStor…
danielfeismann Aug 24, 2024
0b1868d
Merge remote-tracking branch 'refs/remotes/origin/df/#922-Fix-activat…
danielfeismann Aug 24, 2024
e2d7133
Merge remote-tracking branch 'refs/remotes/origin/df/#928-Refactor-Th…
danielfeismann Aug 24, 2024
64a67ec
Refactoring of ThermalGrid.handleInfeed to fix thermal storage rechar…
danielfeismann Aug 24, 2024
1d17e18
small changes and fmt
danielfeismann Aug 24, 2024
d815763
fmt
danielfeismann Aug 24, 2024
5ebc65d
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Aug 29, 2024
6c5477a
fixing merge conflicts
danielfeismann Aug 29, 2024
bbe4c0a
remove changelog entry that is no longer valid
danielfeismann Aug 29, 2024
5e5b5c1
Merge branch 'refs/heads/dev' into df/#878-thermalGridIT
danielfeismann Aug 29, 2024
d5c0195
Merge remote-tracking branch 'origin/df/#878-thermalGridIT' into df/#…
danielfeismann Aug 29, 2024
cb34618
Merge branch 'refs/heads/dev' into df/#930-refactor-handleInfeed
danielfeismann Aug 29, 2024
9ce13f9
Merge branch 'refs/heads/dev' into df/#930-refactor-handleInfeed
danielfeismann Aug 29, 2024
0333902
Merge branch 'refs/heads/dev' into df/#878-thermalGridIT
danielfeismann Aug 29, 2024
1573bcc
Merge branch 'refs/heads/dev' into df/#930-refactor-handleInfeed
danielfeismann Sep 16, 2024
355d765
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Sep 17, 2024
c1e37ee
Merge branch 'refs/heads/dev' into df/#930-refactor-handleInfeed
danielfeismann Sep 17, 2024
3df14e4
rollback change to fallback to latest weatherData
danielfeismann Sep 19, 2024
ae87f53
Merge branch 'refs/heads/dev' into df/#878-thermalGridIT
danielfeismann Sep 19, 2024
350e904
Merge branch 'refs/heads/dev' into df/#878-thermalGridIT
danielfeismann Sep 26, 2024
47e4052
Merge branch 'refs/heads/dev' into df/#930-refactor-handleInfeed
danielfeismann Sep 26, 2024
e9a590f
Merge branch 'refs/heads/dev' into df/#878-thermalGridIT
danielfeismann Oct 1, 2024
de1b0c5
Merge branch 'refs/heads/dev' into df/#930-refactor-handleInfeed
danielfeismann Oct 1, 2024
392d040
Merge branch 'refs/heads/dev' into df/#878-thermalGridIT
danielfeismann Oct 14, 2024
b6c596f
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Oct 28, 2024
e3807b8
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Oct 29, 2024
2ed6f02
Merge branch 'df/#1008-thermalResultsFilter' into df/#878-thermalGridIT
danielfeismann Oct 29, 2024
5500119
rename lastTimeTick into tick and use updatedState for thermalResults
danielfeismann Oct 29, 2024
393d19f
make store of ValueStore non-private
danielfeismann Oct 29, 2024
099838a
adapt ThermalGridIT to results processed in the currentTick
danielfeismann Oct 29, 2024
0e28577
rollback changes at ThermalGrid.results()
danielfeismann Oct 29, 2024
2bc339e
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Nov 1, 2024
e1df392
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 1, 2024
339a020
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 7, 2024
20664ab
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 13, 2024
165371d
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 14, 2024
ba6b581
Merge branch 'df/#928-Refactor-ThermalGird-energyDemand' into df/#930…
danielfeismann Nov 14, 2024
b40cfe0
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Nov 14, 2024
441359c
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 14, 2024
a669b5b
remove double entry in changelog
danielfeismann Nov 14, 2024
7884541
Revert "remove double entry in changelog"
danielfeismann Nov 14, 2024
86b3256
remove correct double entry in changelog
danielfeismann Nov 14, 2024
f4fa810
reintroduce demand booleans indicating demand when handle thermal infeed
danielfeismann Nov 14, 2024
963670c
add some scala doc
danielfeismann Nov 14, 2024
bfd633b
handle sonar code smell
danielfeismann Nov 14, 2024
9eee886
Revert "handle sonar code smell"
danielfeismann Nov 14, 2024
122cb69
handle sonar code smell
danielfeismann Nov 14, 2024
eba3b89
fmt
danielfeismann Nov 15, 2024
1f6311f
fix scala doc
danielfeismann Nov 15, 2024
95d0562
refactor demand booleans of thermal units into ThermalDemandIndicator…
danielfeismann Nov 15, 2024
f33fc1a
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Nov 15, 2024
6b74778
Merge branch 'refs/heads/df/#930-refactor-handleInfeed' into df/#878-…
danielfeismann Nov 15, 2024
96a7dfb
fmt
danielfeismann Nov 15, 2024
b7ebbe2
Merge branch 'df/#934-thermalHouseResults' into df/#878-thermalGridIT
danielfeismann Nov 15, 2024
6631b67
remove comment from merge conflict
danielfeismann Nov 15, 2024
30e4318
Merge branch 'df/#1023-zeroKW-and-kWh-in-test' into df/#930-refactor-…
danielfeismann Nov 15, 2024
9fb1523
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 15, 2024
94397ee
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 15, 2024
7341e10
remove unnecessary value
danielfeismann Nov 15, 2024
97b4a15
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Nov 15, 2024
b69dd06
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 15, 2024
98d7511
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Nov 15, 2024
36ce30a
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 19, 2024
0d40632
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Nov 19, 2024
05bebe4
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Nov 19, 2024
aa2db68
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 19, 2024
41e2441
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 19, 2024
7292171
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Nov 19, 2024
04f0207
fix import
danielfeismann Nov 21, 2024
d44e19f
fix thermal demand determination
danielfeismann Nov 21, 2024
a567d0b
simplify methods to compare temperatures
danielfeismann Nov 21, 2024
3cccc33
fmt
danielfeismann Nov 21, 2024
995818e
correct test cases of HpModelSpec
danielfeismann Nov 22, 2024
1b9375f
refactoring thermal demand indicators
danielfeismann Nov 22, 2024
be2452a
fix turnHpOn determination
danielfeismann Nov 22, 2024
1e25d3b
fix comment in HpModelSpec
danielfeismann Nov 22, 2024
135ea15
fix turnHpOn in HpModel
danielfeismann Nov 22, 2024
debae48
refactoring thermal demand indicators
danielfeismann Nov 22, 2024
a95a242
Merge branch 'refs/heads/dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 22, 2024
5c00a89
fix thermalPower determination in calcState of HpModel
danielfeismann Nov 22, 2024
cbd997e
fix EmAgentIT
danielfeismann Nov 22, 2024
a0e95af
Merge branch 'df/#930-refactor-handleInfeed' into df/#878-thermalGridIT
danielfeismann Nov 22, 2024
a07b626
also turn Hp on in case house has additional demand and the Hp was ru…
danielfeismann Nov 22, 2024
752f755
Merge branch 'df/#930-refactor-handleInfeed' into df/#878-thermalGridIT
danielfeismann Nov 22, 2024
7516d7b
fmt
danielfeismann Nov 22, 2024
31c73d9
fix handleInfeed of thermal energy
danielfeismann Nov 22, 2024
85594d3
correct direction of thermal power of thermal heat storage
danielfeismann Nov 22, 2024
391b49d
fix ThermalGridWithStorageOnlySpec test where putting energy into sto…
danielfeismann Nov 22, 2024
ba9aeea
add ThermalGridWithStorageOnlySpec test where taking energy from storage
danielfeismann Nov 22, 2024
f7b1c1d
fix ThermalGridWithHouseAndStorageSpec
danielfeismann Nov 23, 2024
bdd63f6
fmt
danielfeismann Nov 23, 2024
aac4297
adapt EmAgentIT
danielfeismann Nov 23, 2024
092a6c9
fmt
danielfeismann Nov 23, 2024
92e6c51
fix EmAgentIT
danielfeismann Nov 23, 2024
481da32
fmt
danielfeismann Nov 23, 2024
b03b576
correct direction of thermal power of thermal heat storage
danielfeismann Nov 23, 2024
7b58297
fix handleInfeed of thermal energy
danielfeismann Nov 23, 2024
c763b72
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 23, 2024
8d452ec
enhance ThermalGridSpec when checking for required and additional demand
danielfeismann Nov 23, 2024
07746a4
fix inputs for thermalGridWith specs plus add another test case
danielfeismann Nov 23, 2024
da0dd0b
Merge branch 'df/#930-refactor-handleInfeed' into df/#878-thermalGridIT
danielfeismann Nov 23, 2024
aa9ffc9
remove unused parameter
danielfeismann Nov 23, 2024
8115cf2
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Nov 25, 2024
07503fa
fix after merge conflict
danielfeismann Nov 25, 2024
8c005bb
fix ThermalGridWithHouseAndStorageSpec after merging dev
danielfeismann Nov 25, 2024
6dabaf7
Merge branch 'df/#1049-Introduce-ThermalDemandWrapper' into df/#930-r…
danielfeismann Nov 25, 2024
0d157db
fix after merging
danielfeismann Nov 25, 2024
e059f31
Merge branch 'df/#1049-Introduce-ThermalDemandWrapper' into df/#878-t…
danielfeismann Nov 25, 2024
9a9096d
fmt
danielfeismann Nov 25, 2024
7e8afb0
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 25, 2024
6ec32b8
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Nov 25, 2024
51741cc
adapt ChpModelSpec and CylindricalThermalStorageSpec to zero for mini…
danielfeismann Nov 25, 2024
8e19705
hard fix for zero values as minimum storage volume level to prevent n…
danielfeismann Nov 25, 2024
d567b81
adapt cases for handling thermal infeed into ThermalGrid
danielfeismann Nov 25, 2024
0ab7ade
fmt
danielfeismann Nov 25, 2024
81694cc
hard fix for zero values as minimum storage volume level to prevent n…
danielfeismann Nov 25, 2024
d9f859c
adapt ChpModelSpec and CylindricalThermalStorageSpec to zero for mini…
danielfeismann Nov 25, 2024
bed4f7b
adapt cases for handling thermal infeed into ThermalGrid
danielfeismann Nov 25, 2024
badd6d9
fix consider qDot as heat result of hp only when hp is running
danielfeismann Nov 25, 2024
ae84f16
fmt
danielfeismann Nov 25, 2024
f371e2e
fix consider qDot as heat result of hp only when hp is running
danielfeismann Nov 25, 2024
6bb59f9
fmt
danielfeismann Nov 26, 2024
02edbf5
fix wrong case within thermalGrid
danielfeismann Nov 26, 2024
6051f39
split handleInfeed method a tiny bit
danielfeismann Nov 26, 2024
dab5a85
fix wrong case within thermalGrid
danielfeismann Nov 26, 2024
0adc6c9
split handleInfeed method a tiny bit
danielfeismann Nov 26, 2024
1586bd3
fmt
danielfeismann Nov 26, 2024
88c6e3a
Merge branch 'dev' into df/#930-refactor-handleInfeed
danielfeismann Nov 26, 2024
be3b094
fix after merging dev
danielfeismann Nov 26, 2024
6163afd
fix tests after merging dev
danielfeismann Nov 26, 2024
b90144d
Merge branch 'df/#930-refactor-handleInfeed' into df/#878-thermalGridIT
danielfeismann Nov 26, 2024
6d3a5c7
fmt
danielfeismann Nov 26, 2024
f6d0faa
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Dec 10, 2024
21c50cf
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Dec 11, 2024
79c3994
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Dec 18, 2024
604ee63
Merge branch 'dev' into df/#878-thermalGridIT
danielfeismann Dec 30, 2024
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Create `CITATION.cff` [#1035](https://github.com/ie3-institute/simona/issues/1035)
- Introduce ThermalDemandWrapper [#1049](https://github.com/ie3-institute/simona/issues/1049)
- Added Marius Staudt to list of reviewers [#1057](https://github.com/ie3-institute/simona/issues/1057)
- Integration test for thermal grids [#878](https://github.com/ie3-institute/simona/issues/878)

### Changed
- Adapted to changed data source in PSDM [#435](https://github.com/ie3-institute/simona/issues/435)
Expand Down Expand Up @@ -155,6 +156,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Correct wrong use of term "wall clock time" [#727](https://github.com/ie3-institute/simona/issues/727)
- Fixed Deployment of `simona` to `Maven Central` in new GHA Pipeline [#1029](https://github.com/ie3-institute/simona/issues/1029)
- Fixed SonarQube quality gate using the right link for PRs or Branches [#1061](https://github.com/ie3-institute/simona/issues/1061)
- Refactoring of `ThermalGrid.handleInfeed` to fix thermal storage recharge correctly when empty [#930](https://github.com/ie3-institute/simona/issues/930)

## [3.0.0] - 2023-08-07

Expand Down
42 changes: 35 additions & 7 deletions src/main/scala/edu/ie3/simona/model/participant/HpModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ final case class HpModel(
tick: Long,
currentState: HpState,
data: HpRelevantData,
): Power = currentState.qDot
): Power =
// only if Hp is running qDot will be from Hp, else qDot results from other source, e.g. some storage
if (currentState.isRunning)
currentState.qDot
else
zeroKW

/** Given a [[HpRelevantData]] object and the last [[HpState]], this function
* calculates the heat pump's next state to get the actual active power of
Expand Down Expand Up @@ -149,7 +154,7 @@ final case class HpModel(

// Updating the HpState
val updatedState =
calcState(lastHpState, relevantData, turnOn)
calcState(lastHpState, relevantData, turnOn, thermalDemandWrapper)
(canOperate, canBeOutOfOperation, updatedState)
}

Expand Down Expand Up @@ -212,32 +217,45 @@ final case class HpModel(
* data of heat pump including state of the heat pump
* @param isRunning
* determines whether the heat pump is running or not
* @param demandWrapper
* holds the thermal demands of the thermal units (house, storage)
* @return
* next [[HpState]]
*/
private def calcState(
lastState: HpState,
relevantData: HpRelevantData,
isRunning: Boolean,
demandWrapper: ThermalDemandWrapper,
): HpState = {
val lastStateStorageQDot = lastState.thermalGridState.storageState
.map(_.qDot)
.getOrElse(zeroKW)

val (newActivePower, newThermalPower) =
val (newActivePower, newThermalPower) = {
if (isRunning)
(pRated, pThermal)
else if (lastStateStorageQDot < zeroKW)
(zeroKW, lastStateStorageQDot * -1)
(zeroKW, lastStateStorageQDot * (-1))
else if (
lastStateStorageQDot == zeroKW && (demandWrapper.houseDemand.hasRequiredDemand || demandWrapper.heatStorageDemand.hasRequiredDemand)
)
(
zeroKW,
thermalGrid.storage.map(_.getChargingPower: squants.Power).get,
)
else (zeroKW, zeroKW)
}

/* Push thermal energy to the thermal grid and get its updated state in return */
val (thermalGridState, maybeThreshold) =
thermalGrid.updateState(
relevantData,
lastState.thermalGridState,
lastState.ambientTemperature.getOrElse(relevantData.ambientTemperature),
isRunning,
newThermalPower,
demandWrapper,
)

HpState(
Expand Down Expand Up @@ -285,7 +303,7 @@ final case class HpModel(
* operating state and give back the next tick in which something will
* change.
*
* @param data
* @param relevantData
* Relevant data for model calculation
* @param lastState
* The last known model state
Expand All @@ -296,17 +314,27 @@ final case class HpModel(
* options will change next
*/
override def handleControlledPowerChange(
data: HpRelevantData,
relevantData: HpRelevantData,
lastState: HpState,
setPower: Power,
): (HpState, FlexChangeIndicator) = {
/* If the set point value is above 50 % of the electrical power, turn on the heat pump otherwise turn it off */
val turnOn = setPower > (sRated.toActivePower(cosPhiRated) * 0.5)

val (
thermalDemandWrapper,
_,
) =
thermalGrid.energyDemandAndUpdatedState(
relevantData,
lastState,
)

val updatedHpState = calcState(
lastState,
data,
relevantData,
turnOn,
thermalDemandWrapper,
)

(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@
input: CylindricalStorageInput,
initialStoredEnergy: Energy = DefaultQuantities.zeroKWh,
): CylindricalThermalStorage = {
val minEnergyThreshold: Energy =
CylindricalThermalStorage.volumeToEnergy(
val minEnergyThreshold: Energy = {
// Temporary fix until changes in PSDM are released, Some minimumEnergyThreshold would lead to non-plausible behaviour
zeroKWh
/*CylindricalThermalStorage.volumeToEnergy(

Check warning on line 193 in src/main/scala/edu/ie3/simona/model/thermal/CylindricalThermalStorage.scala

View check run for this annotation

SonarQubeGithubPRChecks / simona Sonarqube Results

src/main/scala/edu/ie3/simona/model/thermal/CylindricalThermalStorage.scala#L193

Remove this commented out code.
CubicMeters(
input.getStorageVolumeLvlMin
.to(Units.CUBIC_METRE)
Expand All @@ -204,6 +206,8 @@
Celsius(input.getInletTemp.to(Units.CELSIUS).getValue.doubleValue()),
Celsius(input.getReturnTemp.to(Units.CELSIUS).getValue.doubleValue()),
)
*/
}

val maxEnergyThreshold: Energy =
CylindricalThermalStorage.volumeToEnergy(
Expand Down
Loading
Loading