Skip to content

Commit

Permalink
Merge branch 'refs/heads/dev' into df/#856-tap-water
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfeismann committed Sep 17, 2024
2 parents 6b30a5d + 0adea42 commit 77fba08
Show file tree
Hide file tree
Showing 18 changed files with 67 additions and 66 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Refactoring EM messages [#947](https://github.com/ie3-institute/simona/issues/947)
- Simplifying ThermalHouse [#940](https://github.com/ie3-institute/simona/issues/940)
- Prepare ThermalStorageTestData for Storage without storageVolumeLvlMin [#894](https://github.com/ie3-institute/simona/issues/894)
- Renamed `ActivityStartTrigger`, `ScheduleTriggerMessage`, `CompletionMessage` in UML Diagrams[#675](https://github.com/ie3-institute/simona/issues/675)

### Fixed
- Removed a repeated line in the documentation of vn_simona config [#658](https://github.com/ie3-institute/simona/issues/658)
Expand Down
2 changes: 1 addition & 1 deletion docs/uml/main/ExtEvSimulationClasses.puml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ package simona-api {

interface ExtTriggerResponse
class CompletionMessage {
- List<Long> newTriggers
- Optional<Long> nextActivation
}
CompletionMessage --|> ExtTriggerResponse

Expand Down
2 changes: 1 addition & 1 deletion docs/uml/main/ParticipantInheritance.puml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
+ getAndCheckNodalVoltage(...): ComparableQuantity[Dimensionless]
+ initializeParticipant(...): FSM.State[AgentState, ParticipantStateData]
+ {abstract} determineBaseStateData(...): BaseStateData[ApparentPower]
+ determineTriggersThroughoutSimulation(...): Option[List[ScheduleTriggerMessage]]
+ determineTriggersThroughoutSimulation(...): Option[List[ScheduleActivation]]
+ baseStateDataForExternalDataProvision(...): FromOutsideBaseStateData
+ queryPrimaryDataAndChangeState(...): FSM.State[AgentState, ParticipantStateData]
+ querySecondaryDataAndChangeState(...): FSM.State[AgentState, ParticipantStateData]
Expand Down
4 changes: 2 additions & 2 deletions docs/uml/protocol/ExtEvSimulationSequence.puml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ Scheduler -> ExtEvDataService: <font color=red>!</font> Activation(t1)
deactivate Scheduler
activate ExtEvDataService

ExtSimulation -> ExtSimAdapter: <font color=red>!</font> CompletionMessage(newTriggers)
ExtSimulation -> ExtSimAdapter: <font color=red>!</font> CompletionMessage(newTick)
deactivate ExtSimulation
activate ExtSimAdapter

ExtSimAdapter -> Scheduler: <font color=red>!</font> <font color=green>Completion(newTriggers)</font>
ExtSimAdapter -> Scheduler: <font color=red>!</font> <font color=green>Completion(newTick)</font>
deactivate ExtSimAdapter

ExtEvDataService -> EvcsAgent1: <font color=red>!</font> RegistrationSuccessfulMessage(t1)
Expand Down
28 changes: 14 additions & 14 deletions docs/uml/protocol/InitializationPhase.puml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
@startuml
MainController -> Listener: create()
MainController -> SimScheduler: create()
MainController -> Services: create()
MainController -> SimScheduler: <font color=red>!</font> ScheduleTriggerMessage(\n\tInitializeServiceTrigger(0),\n\tweatherActorRef)
MainController -> GridAgents: create()
MainController -> SimScheduler: <font color=red>!</font> ScheduleTriggerMessage(\n\tInitializeGridAgentTrigger(0),\n\tgridAgentInitData,\n\tgridAgentRef)
MainController -> SimScheduler: <font color=red>?</font> StartScheduleMessage()
SimScheduler -> Services: <font color=red>!</font> TriggerWithIdMessage(\n\tInitializeServiceTrigger(_),\n\ttriggerId,\n\t_)
Services --> SimScheduler: <font color=red>!</font> CompletionMessage(\n\ttriggerId,\n\tScheduleTriggerMessage[...])
SimScheduler -> GridAgents: <font color=red>!</font> TriggerWithIdMessage(\n\tInitializeGridAgentTrigger(_),\n\ttriggerId,\n\t_)
GridAgents -> SimScheduler: <font color=red>!</font> ScheduleTriggerMessage(\n\tInitializeSystemComponentsTrigger(0),\n\tassetAgentRef)
GridAgents --> SimScheduler: <font color=red>!</font> CompletionMessage(triggerId, ScheduleTriggerMessage[...])
SimScheduler -> ParticipantAgents: <font color=red>!</font> TriggerWithIdMessage(\n\tIInitializeSystemComponentsTrigger(_),\n\ttriggerId,\n\t_)
SimonaSim -> Listener: create()
SimonaSim -> Scheduler: create()
SimonaSim -> Services: create()
Services -> Scheduler: <font color=red>!</font> ScheduleActivation(\n\tweatherActorRef, \n\tINIT_SIM_TICK)
SimonaSim -> GridAgents: create()
GridAgents -> Scheduler: <font color=red>!</font> ScheduleActivation(\n\tgridAgentRef, \n\tINIT_SIM_TICK)
SimonaSim -> Scheduler: <font color=red>?</font> StartScheduleMessage()
Scheduler -> Services: <font color=red>!</font> Activation(\n\tINIT_SIM_TICK)
Services --> Scheduler: <font color=red>!</font> Completion(\n\tweatherActorRef, \n\ttick)
Scheduler -> GridAgents: <font color=red>!</font> Activation(\n\tINIT_SIM_TICK)
GridAgents -> Scheduler: <font color=red>!</font> ScheduleActivation(\n\tassetAgentRef, \n\tINIT_SIM_TICK)
GridAgents --> Scheduler: <font color=red>!</font> Completion(\n\tgridAgentRef,\n\ttick)
Scheduler -> ParticipantAgents: <font color=red>!</font> Activation(\n\tINIT_SIM_TICK)
ParticipantAgents -> Services: <font color=red>!</font> RegisterForWeatherMessage(lat, lon)
ParticipantAgents -> Services: <font color=red>!</font> RegisterFor...
Services --> ParticipantAgents: <font color=red>!</font> RegistrationResponseMessages
ParticipantAgents --> SimScheduler: <font color=red>!</font> CompletionMessage(\n\ttriggerId,\n\tScheduleTriggerMessage[\n\t\tActivityStartTrigger(tick)\n\t])
ParticipantAgents --> Scheduler: <font color=red>!</font> Completion(\n\tassetAgentRef,\n\ttick)
@enduml
8 changes: 4 additions & 4 deletions docs/uml/protocol/ParticipantTriggeredByItself.puml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@startuml
SimScheduler -> ParticipantAgents: <font color=red>!</font> TriggerWithIdMessage(\n\tIInitializeSystemComponentsTrigger(_),\n\ttriggerId,\n\t_)
ParticipantAgents --> SimScheduler: <font color=red>!</font> CompletionMessage(triggerId, ScheduleTriggerMessage[...])
SimScheduler -> ParticipantAgents: <font color=red>!</font> TriggerWithIdMessage(\n\tActivityStartTrigger(tick),\n\t_,\n\t_)
ParticipantAgents --> SimScheduler: <font color=red>!</font> CompletionMessage(triggerId, None)
Scheduler -> ParticipantAgents: <font color=red>!</font> Activation(\n\tINIT_SIM_TICK)
ParticipantAgents --> Scheduler: <font color=red>!</font> Completion(\n\tactor, tick)
Scheduler -> ParticipantAgents: <font color=red>!</font> Activation(\n\ttick)
ParticipantAgents --> Scheduler: <font color=red>!</font> Completion(\n\tactor, newTick)
@enduml
8 changes: 4 additions & 4 deletions docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@startuml
SimScheduler -> PrimaryServiceWorker: <font color=red>!</font> TriggerWithIdMessage(\n\tActivityStartTrigger(tick),\n\t_,\n\t_)
Scheduler -> PrimaryServiceWorker: <font color=red>!</font> Activation(\n\tInit_SIM_TICK)
PrimaryServiceWorker -> ParticipantAgents: <font color=red>!</font> <i>ProvisionMessage</i>
PrimaryServiceWorker --> SimScheduler: <font color=red>!</font> CompletionMessage(triggerId, None)
SimScheduler -> ParticipantAgents: <font color=red>!</font> TriggerWithIdMessage(\n\tActivityStartTrigger(tick),\n\t_,\n\t_)
ParticipantAgents --> SimScheduler: <font color=red>!</font> CompletionMessage(triggerId, None)
PrimaryServiceWorker --> Scheduler: <font color=red>!</font> Completion(\n\tactor,None)
Scheduler -> ParticipantAgents: <font color=red>!</font> Activation(\n\ttick)
ParticipantAgents --> Scheduler: <font color=red>!</font> Completion(\n\tactor, newTick)
@enduml
8 changes: 4 additions & 4 deletions docs/uml/protocol/ParticipantTriggeredBySecondaryData.puml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@startuml
SimScheduler -> Services: <font color=red>!</font> TriggerWithIdMessage(\n\tActivityStartTrigger(tick),\n\t_,\n\t_)
Scheduler -> Services: <font color=red>!</font> Activation(\n\tINIT_SIM_TICK)
Services -> ParticipantAgents: <font color=red>!</font> ProvideWeatherMessage(\n\ttick,\n\tweatherData,\n\tnextDataTick)
SimScheduler -> ParticipantAgents: <font color=red>!</font> TriggerWithIdMessage(\n\tActivityStartTrigger(tick),\n\t_,\n\t_)
Scheduler -> ParticipantAgents: <font color=red>!</font> Activation(\n\ttick)
Services -> ParticipantAgents: <font color=red>!</font> <i>ProvisionMessage</i>
Services -> ParticipantAgents: <font color=red>!</font> <i>ProvisionMessage</i>
Services --> SimScheduler: <font color=red>!</font> CompletionMessage(triggerId, None)
Services --> Scheduler: <font color=red>!</font> Completion(\n\tactor, None)
ParticipantAgents -> ParticipantAgents: <font color=red>!</font> StartCalculationTrigger(tick)
ParticipantAgents --> SimScheduler: <font color=red>!</font> CompletionMessage(triggerId, None)
ParticipantAgents --> Scheduler: <font color=red>!</font> Completion(\n\tactor, newTick)
@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ protected trait ParticipantAgentFundamentals[
awaitRegistrationResponsesFrom,
)
} else {
/* Determine the next activation tick, create a ScheduleTriggerMessage and remove the recently triggered tick */
/* Determine the next activation tick, create a ScheduleActivation and remove the recently triggered tick */
val (newTick, nextBaseStateData) = popNextActivationTrigger(
baseStateData
)
Expand Down Expand Up @@ -905,7 +905,7 @@ protected trait ParticipantAgentFundamentals[
updatedState,
)

/* In this case, without secondary data, the agent has been triggered by an ActivityStartTrigger by itself,
/* In this case, without secondary data, the agent has been triggered by an Activation(tick) by itself,
* therefore pop the next one */
val baseStateDataWithUpdatedResultStore =
baseStateData.copy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class EvcsAgentModelCalculationSpec
RegistrationSuccessfulMessage(evService.ref, Some(900L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]

evcsAgent.stateName shouldBe Idle
Expand Down Expand Up @@ -434,7 +434,7 @@ class EvcsAgentModelCalculationSpec
RegistrationSuccessfulMessage(evService.ref, Some(0)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(evcsAgent.stateName shouldBe Idle)
/* State data is tested in another test */
Expand Down Expand Up @@ -568,7 +568,7 @@ class EvcsAgentModelCalculationSpec
RegistrationSuccessfulMessage(evService.ref, Some(0)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(evcsAgent.stateName shouldBe Idle)
/* State data is tested in another test */
Expand Down Expand Up @@ -699,7 +699,7 @@ class EvcsAgentModelCalculationSpec
RegistrationSuccessfulMessage(evService.ref, Some(10800)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(evcsAgent.stateName shouldBe Idle)

Expand Down Expand Up @@ -744,7 +744,7 @@ class EvcsAgentModelCalculationSpec
RegistrationSuccessfulMessage(evService.ref, Some(0)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the CompletionM */
scheduler.expectMsgType[Completion]
awaitAssert(evcsAgent.stateName shouldBe Idle)

Expand Down Expand Up @@ -825,7 +825,7 @@ class EvcsAgentModelCalculationSpec
RegistrationSuccessfulMessage(evService.ref, Some(0)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(evcsAgent.stateName shouldBe Idle)

Expand Down Expand Up @@ -903,7 +903,7 @@ class EvcsAgentModelCalculationSpec
RegistrationSuccessfulMessage(evService.ref, Some(0)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(evcsAgent.stateName shouldBe Idle)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class FixedFeedInAgentModelCalculationSpec
RegistrationFailedMessage(primaryServiceProxy.ref),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]

fixedFeedAgent.stateName shouldBe Idle
Expand Down Expand Up @@ -305,7 +305,7 @@ class FixedFeedInAgentModelCalculationSpec
RegistrationFailedMessage(primaryServiceProxy.ref),
)

/* I am not interested in the CompletionMessage */
/* I am not interested in the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(fixedFeedAgent.stateName shouldBe Idle)
/* State data is tested in another test */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ class HpAgentModelCalculationSpec
RegistrationSuccessfulMessage(weatherService.ref, Some(900L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]

hpAgent.stateName shouldBe Idle
Expand Down Expand Up @@ -441,7 +441,7 @@ class HpAgentModelCalculationSpec
RegistrationSuccessfulMessage(weatherService.ref, Some(0L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(hpAgent.stateName shouldBe Idle)
/* State data is tested in another test */
Expand Down Expand Up @@ -572,7 +572,7 @@ class HpAgentModelCalculationSpec
RegistrationSuccessfulMessage(weatherService.ref, Some(0L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(hpAgent.stateName shouldBe Idle)

Expand Down Expand Up @@ -701,7 +701,7 @@ class HpAgentModelCalculationSpec
RegistrationSuccessfulMessage(weatherService.ref, Some(3600L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(hpAgent.stateName shouldBe Idle)

Expand Down Expand Up @@ -772,7 +772,7 @@ class HpAgentModelCalculationSpec
RegistrationSuccessfulMessage(weatherService.ref, Some(0L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(hpAgent.stateName shouldBe Idle)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class LoadAgentFixedModelCalculationSpec
RegistrationFailedMessage(primaryServiceProxy.ref),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]

loadAgent.stateName shouldBe Idle
Expand Down Expand Up @@ -299,7 +299,7 @@ class LoadAgentFixedModelCalculationSpec
RegistrationFailedMessage(primaryServiceProxy.ref),
)

/* I am not interested in the CompletionMessage */
/* I am not interested in the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(loadAgent.stateName shouldBe Idle)
/* State data is tested in another test */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class LoadAgentProfileModelCalculationSpec
RegistrationFailedMessage(primaryServiceProxy.ref),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]

loadAgent.stateName shouldBe Idle
Expand Down Expand Up @@ -299,7 +299,7 @@ class LoadAgentProfileModelCalculationSpec
RegistrationFailedMessage(primaryServiceProxy.ref),
)

/* I am not interested in the CompletionMessage */
/* I am not interested in the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(loadAgent.stateName shouldBe Idle)
/* State data is tested in another test */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class ParticipantAgent2ListenerSpec
/* Trigger the data generation in tick 0 */
scheduler.send(mockAgent, Activation(0))

/* Appreciate the existence of two CompletionMessages */
/* Appreciate the existence of two Completion */
scheduler.expectMsg(Completion(mockAgent.toTyped))

/* Ask the agent for average power in tick 3000 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ class ParticipantAgentExternalSourceSpec
RegistrationSuccessfulMessage(primaryServiceProxy.ref, Some(900L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(mockAgent.stateName shouldBe Idle)

Expand Down Expand Up @@ -312,7 +312,7 @@ class ParticipantAgentExternalSourceSpec
RegistrationSuccessfulMessage(primaryServiceProxy.ref, Some(900L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(mockAgent.stateName shouldBe Idle)

Expand Down Expand Up @@ -413,7 +413,7 @@ class ParticipantAgentExternalSourceSpec
RegistrationSuccessfulMessage(primaryServiceProxy.ref, Some(900L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(mockAgent.stateName shouldBe Idle)

Expand Down Expand Up @@ -508,7 +508,7 @@ class ParticipantAgentExternalSourceSpec
RegistrationSuccessfulMessage(primaryServiceProxy.ref, Some(900L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(mockAgent.stateName shouldBe Idle)

Expand Down Expand Up @@ -624,7 +624,7 @@ class ParticipantAgentExternalSourceSpec
RegistrationSuccessfulMessage(primaryServiceProxy.ref, Some(900L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(mockAgent.stateName shouldBe Idle)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class PvAgentModelCalculationSpec
RegistrationSuccessfulMessage(weatherService.ref, Some(900L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]

pvAgent.stateName shouldBe Idle
Expand Down Expand Up @@ -439,7 +439,7 @@ class PvAgentModelCalculationSpec
RegistrationSuccessfulMessage(weatherService.ref, Some(0L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(pvAgent.stateName shouldBe Idle)
/* State data is tested in another test */
Expand Down Expand Up @@ -546,7 +546,7 @@ class PvAgentModelCalculationSpec
RegistrationSuccessfulMessage(weatherService.ref, Some(0L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(pvAgent.stateName shouldBe Idle)

Expand Down Expand Up @@ -651,7 +651,7 @@ class PvAgentModelCalculationSpec
RegistrationSuccessfulMessage(weatherService.ref, Some(3600L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(pvAgent.stateName shouldBe Idle)

Expand Down Expand Up @@ -722,7 +722,7 @@ class PvAgentModelCalculationSpec
RegistrationSuccessfulMessage(weatherService.ref, Some(0L)),
)

/* I'm not interested in the content of the CompletionMessage */
/* I'm not interested in the content of the Completion */
scheduler.expectMsgType[Completion]
awaitAssert(pvAgent.stateName shouldBe Idle)

Expand Down
Loading

0 comments on commit 77fba08

Please sign in to comment.