Skip to content

Commit

Permalink
Merge pull request #956 from ie3-institute/df/#955-fix-secondary-data
Browse files Browse the repository at this point in the history
Fix expected secondaryData in baseStateData
  • Loading branch information
sebastian-peter authored Sep 13, 2024
2 parents b6ee736 + e41cdb3 commit f7f2e99
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Handle MobSim requests for current prices [#892](https://github.com/ie3-institute/simona/issues/892)
- Fix determineState of ThermalHouse [#926](https://github.com/ie3-institute/simona/issues/926)
- Fix activation of Hp when not under control of an EM [#922](https://github.com/ie3-institute/simona/issues/922)
- Fix expected secondaryData in baseStateData [#955](https://github.com/ie3-institute/simona/issues/955)

## [3.0.0] - 2023-08-07

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,17 @@ abstract class ParticipantAgent[
_,
),
) =>
val updatedReceivedSecondaryData = ValueStore.updateValueStore(
participantStateData.receivedSecondaryDataStore,
currentTick,
data.map { case (actorRef, Some(data: SecondaryData)) =>
actorRef -> data
},
)
val updatedReceivedSecondaryData = data match {
case nonEmptyData if nonEmptyData.nonEmpty =>
ValueStore.updateValueStore(
participantStateData.receivedSecondaryDataStore,
currentTick,
nonEmptyData.collect { case (actorRef, Some(data: SecondaryData)) =>
actorRef -> data
},
)
case _ => participantStateData.receivedSecondaryDataStore
}

/* At least parts of the needed data has been received or it is an additional activation, that has been triggered.
* Anyways, the calculation routine has also to take care of filling up missing data. */
Expand Down

0 comments on commit f7f2e99

Please sign in to comment.