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

Introducing energy demand for warm water heating #865

Draft
wants to merge 236 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
236 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
c1f6e2e
add energyDemand calculation for warm water heating, plus first steps…
danielfeismann Jul 29, 2024
308255c
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Jul 29, 2024
bb2bcc4
fmt
danielfeismann Jul 30, 2024
1eebc64
tests for water demand of thermal house
danielfeismann Jul 30, 2024
86bb6b6
fmt
danielfeismann Jul 30, 2024
544ab48
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Jul 30, 2024
f2c092d
complete energyDemandWater plus test
danielfeismann Jul 30, 2024
8ba11b0
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
33a2be9
Merge branch 'refs/heads/dev' into df/#856-tap-water
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
f50e027
Merge branch 'refs/heads/df/#827_fix_hp_storage_refill' into df/#856-…
danielfeismann Aug 8, 2024
eaa5ec8
Merge branch 'refs/heads/df/#878-thermalGridIT' into df/#856-tap-water
danielfeismann Aug 8, 2024
81ab309
dummyfix
danielfeismann Aug 8, 2024
6ad7f53
more changes to include DomesticHotWaterStorage
danielfeismann Aug 9, 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
3615ec4
adapt to psdm changes for thermal house and DomesticHotWaterStorageInput
danielfeismann Aug 12, 2024
93ae513
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Aug 12, 2024
e00d19f
include logic for considering domestic hot water demand and further a…
danielfeismann Aug 13, 2024
97758da
fmt
danielfeismann Aug 13, 2024
9fb2bc2
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Aug 13, 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
8213012
fix WaterHeatingSystemSpec
danielfeismann Aug 14, 2024
927e856
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Aug 14, 2024
343cdbd
adapt handleConsumption to domestic hot water storage
danielfeismann Aug 14, 2024
a05fe51
fix handleInfeedStorage
danielfeismann Aug 14, 2024
257d1ef
fix some test data
danielfeismann Aug 14, 2024
3de1f26
introduce domestic hot water storage into HpModelSpec
danielfeismann Aug 14, 2024
0c20c2b
fmt
danielfeismann Aug 14, 2024
18356c3
adapt tests of ThermalGridWith...
danielfeismann Aug 14, 2024
fc93131
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Aug 14, 2024
30adf0f
one more adapt tests of ThermalGridWith
danielfeismann Aug 14, 2024
321c1d6
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Aug 15, 2024
54a64d4
set storedEnergy at startingState of DomesticHotWaterStorage to full
danielfeismann Aug 15, 2024
df13f75
adapt tests to full DomesticHotWaterStorage in startingState
danielfeismann Aug 15, 2024
757683f
fix tests after full DomesticHotWaterStorage in startingState
danielfeismann Aug 15, 2024
c6e79c7
rollback unnecessary change in HpModelSpec
danielfeismann Aug 16, 2024
fd31d9c
Revert "rollback unnecessary change in HpModelSpec"
danielfeismann Aug 16, 2024
532f00d
adapt energyDemand calculation of domestic hot water storage
danielfeismann Aug 16, 2024
7b63ecb
removal of unused method
danielfeismann Aug 16, 2024
efb73b4
adapt tests to domestic hot water storage
danielfeismann Aug 16, 2024
15e8f63
fmt
danielfeismann Aug 16, 2024
cdfc915
fmt
danielfeismann Aug 16, 2024
907a063
Revert "fmt"
danielfeismann Aug 16, 2024
7d1e400
fmt
danielfeismann Aug 16, 2024
3f51f34
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Aug 16, 2024
0e5ab19
fix tests of ThermalGridWithHouseOnlySpec
danielfeismann Aug 16, 2024
3103427
harmonise variables
danielfeismann Aug 16, 2024
82fda3d
fmt
danielfeismann Aug 19, 2024
26b3c74
fix edge case of energyDemandWater
danielfeismann Aug 19, 2024
bf7560d
concise version of enrgyDemandDomesticHotWater
danielfeismann Aug 19, 2024
b48e805
fix test solely heat up the house for ThermalGridWithHouseOnlySpec
danielfeismann Aug 19, 2024
10a78b1
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Aug 19, 2024
9860856
enhancing tests of thermalGridWith... to check as well the tick after…
danielfeismann Aug 19, 2024
a11f4a3
correct name of variable
danielfeismann Aug 19, 2024
62df4db
Merge branch 'dev' into df/#856-tap-water
danielfeismann Aug 19, 2024
bd2d3f8
fix HpAgentModelCalculationSpec
danielfeismann Aug 20, 2024
e770997
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Aug 20, 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
c584f84
Merge branch 'refs/heads/df/#878-thermalGridIT' into df/#856-tap-water
danielfeismann Aug 20, 2024
be1b45a
fix conflicts after merging
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
feefb09
Merge remote-tracking branch 'refs/remotes/origin/df/#729-additional-…
danielfeismann Aug 21, 2024
49bb285
cherrypick EmAgentIT from ThermalGridIT pull request
danielfeismann Aug 21, 2024
a6b5031
start fixing determineFlexOptions
danielfeismann Aug 21, 2024
bd92823
start adapting HpModelSpec
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
6dd24a7
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Aug 22, 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
7455b80
Merge branch 'refs/heads/df/#878-thermalGridIT' into df/#856-tap-water
danielfeismann Aug 22, 2024
38f84e4
adaptions after merging thermal storage refill PR
danielfeismann Aug 22, 2024
d03ad49
adapt HpModel and HpModelSpec to domestic hot water storage
danielfeismann Aug 22, 2024
606893f
format and code quality
danielfeismann Aug 22, 2024
8466c48
fmt
danielfeismann Aug 23, 2024
744154c
add domesticHotWaterStorageInput to HpInputTestData
danielfeismann Aug 23, 2024
80b88af
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Aug 26, 2024
bcc486e
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Aug 26, 2024
4ba4dff
remove type specs for testCases table
danielfeismann Aug 26, 2024
395ce15
refactor handleInfeed
danielfeismann Aug 26, 2024
748d8f3
scalaDoc, fmt, renamings etc
danielfeismann Aug 26, 2024
d467581
refactor determineMostRecentThreshold
danielfeismann Aug 26, 2024
52f4342
fix handleInfeedStorage
danielfeismann Aug 26, 2024
f120f54
fmt
danielfeismann Aug 26, 2024
a9c267e
remove redundant headOption
danielfeismann Aug 26, 2024
2f35b84
fix tests ThermalGridWith..
danielfeismann Aug 26, 2024
4d35214
adapt test since the conditions doesnt realy make sense
danielfeismann Aug 26, 2024
d6b2b3a
harmonise InputTestData
danielfeismann Aug 26, 2024
9d69563
enrich thermalResults by results of domestic hot water storage
danielfeismann Aug 26, 2024
6e72130
fmt
danielfeismann Aug 26, 2024
9a287f6
change to thermalDemands in tests
danielfeismann Aug 27, 2024
9538580
change to thermalDemands in HpModel and coresponting refactoring in T…
danielfeismann Aug 27, 2024
88a7b8e
format and coding styles
danielfeismann Aug 27, 2024
a14178e
updating ThermalGridIT to include domestic hot water storage first part
danielfeismann Aug 27, 2024
0062712
typo
danielfeismann Aug 28, 2024
a38f814
refactor discharging power of domestic hot water storage to match pre…
danielfeismann Aug 28, 2024
91873b9
fmt
danielfeismann Aug 28, 2024
6ae74f2
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Aug 29, 2024
994b7cc
fmt
danielfeismann Aug 29, 2024
18ff9b2
fixing some tests
danielfeismann Aug 29, 2024
a329610
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Aug 29, 2024
6559093
fixing more tests
danielfeismann Aug 29, 2024
10f9fba
fix calcuation of energy demand for hot water for the hours between t…
danielfeismann Aug 30, 2024
e2e2b9b
fix threshold calculation of domestic hot water storage
danielfeismann Aug 30, 2024
9aba960
use wildcard for unneccessary vals
danielfeismann Aug 30, 2024
d1e50c9
fixing tests
danielfeismann Aug 30, 2024
c0c2042
updating parts of ThermalGridIT
danielfeismann Aug 30, 2024
547534c
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Sep 13, 2024
7f46a28
update ThermalGridIT till tick 45000
danielfeismann Sep 13, 2024
5ab69b6
update rtd
danielfeismann Sep 15, 2024
7f2945c
declare demand for recharing domestic hot water storage below 20 perc…
danielfeismann Sep 16, 2024
e33796b
fix qDot for domestic hot water storage
danielfeismann Sep 16, 2024
221e389
fix ThermalGridIT
danielfeismann Sep 16, 2024
abd820d
adapt comments
danielfeismann Sep 16, 2024
f8ac1ff
comments for remaining ticks in ThermalGridIT
danielfeismann Sep 17, 2024
199f7b9
fmt
danielfeismann Sep 17, 2024
eca2902
fix some tests
danielfeismann Sep 17, 2024
f915164
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Sep 17, 2024
e2b7cd1
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Sep 17, 2024
6b30a5d
fmt
danielfeismann Sep 17, 2024
77fba08
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Sep 17, 2024
df2153a
adapt EmAgentIT
danielfeismann Sep 17, 2024
9c1334a
rollback change to fallback to latest weatherData
danielfeismann Sep 19, 2024
a45a7b1
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Sep 19, 2024
1d1355e
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Sep 26, 2024
fe470ca
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Oct 1, 2024
611b701
override def getTimeKeysAfter in WeatherSourceWrapperSpec
danielfeismann Oct 30, 2024
ce64339
Merge branch 'refs/heads/dev' into df/#856-tap-water
danielfeismann Oct 30, 2024
9c742de
resolve merge conflicts in ThermalGrid
danielfeismann Oct 30, 2024
509b6db
fmt
danielfeismann Oct 30, 2024
c892eea
pick changes from pr 1009 to fix filter ThermalGridResults
danielfeismann Oct 30, 2024
a4e6fd4
fix for psdm changes on thermal storages
danielfeismann Oct 30, 2024
cfac4cc
fix after merging ThermalGrid
danielfeismann Oct 30, 2024
cc2f566
adapting ThermalGridIT to changes in thermal grid result calculation
danielfeismann Oct 30, 2024
e03d0ad
adapt scala doc of DomesticHotWaterStorage
danielfeismann Oct 30, 2024
f522c82
fix initial stored energy of DomesticHotWaterStorage
danielfeismann Oct 30, 2024
de52f6e
Merge branch 'dev' into df/#856-tap-water
danielfeismann Nov 1, 2024
d3357f6
Merge branch 'dev' into df/#856-tap-water
danielfeismann Nov 14, 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added option to directly zip the output files [#793](https://github.com/ie3-institute/simona/issues/793)
- Added weatherData HowTo for Copernicus ERA5 data [#967](https://github.com/ie3-institute/simona/issues/967)
- Add some quote to 'printGoodbye' [#997](https://github.com/ie3-institute/simona/issues/997)
- 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 @@ -131,6 +132,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed ThermalStorageResults having multiple entries [#924](https://github.com/ie3-institute/simona/issues/924)
- Fix filter for thermal result checking for lastTick not for currentTick [#1008](https://github.com/ie3-institute/simona/issues/1008)
- Fixed `CHANGELOG` entry for issue ([#103](https://github.com/ie3-institute/simona/issues/103)) [#941](https://github.com/ie3-institute/simona/issues/941)
- Fixed Hp results leading to overheating house and other effects [#827](https://github.com/ie3-institute/simona/issues/827)
- Fixed thermal storage getting recharged when empty [#827](https://github.com/ie3-institute/simona/issues/827)

## [3.0.0] - 2023-08-07

Expand Down
1 change: 1 addition & 0 deletions docs/readthedocs/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ maxdepth: 1
models/bm_model
models/chp_model
models/cts_model
models/dhws_model
models/evcs_model
models/hp_model
models/load_model
Expand Down
2 changes: 1 addition & 1 deletion docs/readthedocs/models/cts_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This page documents the functionality of the cylindrical thermal storage available in SIMONA.

## Behaviour
This storage model operates on volumes, although the functions it provides for other models all operate with energy. Internally the storage model converts energy to volume and vice versa with formulas specified below. Furthermore it is assumed that the storage medium is water. Also the model holds a variable for the current storage level.
This storage model operates on volumes, although the functions it provides for other models all operate with energy. Internally the storage model converts energy to volume and vice versa with formulas specified below. Furthermore it is assumed that the storage medium is water. Also the model holds a variable for the current storage level. At initialisation the storage will be empty.

## Attributes, Units and Remarks

Expand Down
56 changes: 56 additions & 0 deletions docs/readthedocs/models/dhws_model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
(dhws_model)=
# Domestic Hot Water Storage
This page documents the functionality of the domestic hot water storage available in SIMONA.

## Behaviour
This storage model operates on volumes, although the functions it provides for other models all operate with energy. Internally the storage model converts energy to volume and vice versa with formulas specified below. Furthermore it is assumed that the storage medium is water. Also the model holds a variable for the current storage level. At initialisation the storage will be full. Domestic hot water storage will be refilled when the state of charge will be below 20 % or when the required water demand can not be covered by the stored energy in the storage itself.

## Attributes, Units and Remarks

Please refer to {doc}`PowerSystemDataModel - CTS Model <psdm:models/input/thermal/domestichotwaterstorage>` for Attributes and Units used in this Model.

## Calculations
### Maximal storage capacity
As the name suggests this storage has a cylindric form, hence its maximum storage capacity $V_{st, max}$ can be given by:

$$
V_{st, max} = \pi \cdot r^2 \cdot h
$$

### Conversions of energy and volume

In this model the change of stored energy (heat) is represented by the change of the volume of the storage medium. This relation between stored heat and volume change is given by:

$$
V = (\frac{W}{c \cdot (tE - tA)})
$$

with
W = energy to be converted to volume
V = resulting volume
tE = return temperature
tA = inlet temperature
c = $1,15 \frac{kWh}{m^3 \cdot K}$

The original equation is given by:

$$
\Delta V_{st} = (\frac{\dot{Q_{th}} \cdot \Delta t}{c \cdot (tA - tE)})
$$

Reference:

* {cite:cts}`Quaschning.2013`


That is the mathematical description of loading and unloading processes concerning the buffer storage. Whenever heat is stored within the storage or removed from the storage this equation is used. This includes the case that the whole heat demand is satisfied by the storage.

The same relationship is used to determine the quantity of heat which is stored in the storage by converting the equation to:

$$
W = V \cdot c \cdot (tE - tA)
$$

## Store/Take energy

This calculation is performed as follows: An amount of energy is specified for storing or taking. The model then changes the storage level and returns if it exceeded the maximum (when storing energy) or the minimum (when taking energy).
2 changes: 1 addition & 1 deletion docs/readthedocs/models/thermal_house_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This page documents the functionality of the thermal house available in SIMONA.

## Behaviour

This house model represents the thermal behaviour of a building. This reflects a simple shoe box with a thermal capacity and with transmission losses.
This house model represents the thermal behaviour of a building. This reflects a simple shoe box with a thermal capacity and with transmission losses for its heating demand. As well the hot water demand (tap water) based on the number of inhabitants and the housing type on hourly basis is considered.

## Attributes, Units and Remarks

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config/config-template.conf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ EvcsRuntimeConfig {
baseRuntimeConfig: BaseRuntimeConfig # this entry is ignored by the config generator,
# but cannot removed bc otherwise EvcsRuntimeConfig is handled as String
chargingStrategy: String | "maxPower" # can be one of maxPower, constantPower, gridOrientedScheduling or marketOrientedScheduling
lowestEvSoc: Double | 0.2 # Defines the lowest possible state of charge (SoC) that an EV is allowed to uncharge in vehicle to grid (V2G) mode
lowestEvSoc: Double | 0.2 # Defines the lowest possible state of charge (SoC) that an EV is allowed to discharge in vehicle to grid (V2G) mode
}

#@define extends BaseRuntimeConfig
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/edu/ie3/simona/agent/ValueStore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import scala.collection.SortedMap
*/
final case class ValueStore[+D](
maxTickSpan: Long,
private val store: SortedMap[Long, D] = SortedMap.empty[Long, D],
store: SortedMap[Long, D] = SortedMap.empty[Long, D],
) {

/** Determine the lastly known data tick, if available. Includes the given
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import edu.ie3.simona.event.ResultEvent
import edu.ie3.simona.event.ResultEvent.{
FlexOptionsResultEvent,
ParticipantResultEvent,
ThermalResultEvent,
}
import edu.ie3.simona.event.notifier.NotifierConfig
import edu.ie3.simona.exceptions.CriticalFailureException
Expand Down Expand Up @@ -1912,8 +1911,9 @@ protected trait ParticipantAgentFundamentals[
def buildResultEvent[R <: ResultEntity](
result: R
): Option[ResultEvent] = result match {
case thermalResult: ThermalUnitResult =>
Some(ThermalResultEvent(thermalResult))
case thermalUnitResult: ThermalUnitResult =>
Some(ResultEvent.ThermalResultEvent(thermalUnitResult))

case unsupported =>
log.debug(
s"Results of class '${unsupported.getClass.getSimpleName}' are currently not supported."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,11 @@ trait HpAgentFundamentals
calcRelevantData: HpRelevantData,
nodalVoltage: squants.Dimensionless,
model: HpModel,
): HpState = model.determineState(modelState, calcRelevantData)
): HpState = {
val (_, _, state) =
model.determineState(modelState, calcRelevantData)
state
}

/** Abstract definition, individual implementations found in individual agent
* fundamental classes
Expand Down Expand Up @@ -428,6 +432,12 @@ trait HpAgentFundamentals
HpRelevantData(
tick,
weatherData.temp.inKelvin,
baseStateData.startDate,
baseStateData.model.thermalGrid.house.map(_.houseInhabitants).getOrElse {
throw new InconsistentStateException(
s"The model ${baseStateData.model.thermalGrid.house} was not provided with the needed number of inhabitants."
)
},
)
}

Expand Down
84 changes: 83 additions & 1 deletion src/main/scala/edu/ie3/simona/event/ResultEvent.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,19 @@ import edu.ie3.datamodel.models.result.system.{
FlexOptionsResult,
SystemParticipantResult,
}
import edu.ie3.datamodel.models.result.thermal.ThermalUnitResult
import edu.ie3.datamodel.models.result.thermal.{
CylindricalStorageResult,
DomesticHotWaterStorageResult,
ThermalHouseResult,
ThermalUnitResult,
}
import edu.ie3.simona.agent.grid.GridResultsSupport.PartialTransformer3wResult
import edu.ie3.simona.event.listener.ResultEventListener
import tech.units.indriya.ComparableQuantity

import java.time.ZonedDateTime
import java.util.UUID
import javax.measure.quantity.{Energy, Power, Temperature}

sealed trait ResultEvent extends Event with ResultEventListener.Request

Expand All @@ -44,6 +54,78 @@ object ResultEvent {
thermalResult: ThermalUnitResult
) extends ResultEvent

object ThermalHouseResult {
def unapply(result: ThermalHouseResult): Option[
(
ZonedDateTime,
UUID,
ComparableQuantity[Power],
ComparableQuantity[Temperature],
)
] = {
if (result != null) {
Some(
(
result.getTime,
result.getInputModel,
result.getqDot,
result.getIndoorTemperature,
)
)
} else {
None
}
}
}

object CylindricalThermalStorageResult {
def unapply(result: CylindricalStorageResult): Option[
(
ZonedDateTime,
UUID,
ComparableQuantity[Power],
ComparableQuantity[Energy],
)
] = {
if (result != null) {
Some(
(
result.getTime,
result.getInputModel,
result.getqDot,
result.getEnergy,
)
)
} else {
None
}
}
}

object DomesticHotWaterStorageResult {
def unapply(result: DomesticHotWaterStorageResult): Option[
(
ZonedDateTime,
UUID,
ComparableQuantity[Power],
ComparableQuantity[Energy],
)
] = {
if (result != null) {
Some(
(
result.getTime,
result.getInputModel,
result.getqDot,
result.getEnergy,
)
)
} else {
None
}
}
}

/** Event that holds all grid calculation results of a power flow calculation.
* The usage of a type is necessary here, to avoid passing in other instances
* of [[edu.ie3.datamodel.models.result.ResultEntity]] except of the wanted
Expand Down
Loading