From fc1eeb9f6be9e6cd968c138dda2640517bce62b8 Mon Sep 17 00:00:00 2001 From: Toastwear Date: Tue, 20 Aug 2024 13:18:22 +0200 Subject: [PATCH 01/14] Renamed UML variables ActivityStartTrigger, ScheduleTriggerMessage, CompletionMessage --- docs/uml/main/ExtEvSimulationClasses.puml | 4 ++-- docs/uml/main/ParticipantInheritance.puml | 2 +- docs/uml/protocol/ExtEvSimulationSequence.puml | 4 ++-- docs/uml/protocol/InitializationPhase.puml | 12 ++++++------ docs/uml/protocol/ParticipantTriggeredByItself.puml | 6 +++--- .../protocol/ParticipantTriggeredByPrimaryData.puml | 8 ++++---- .../ParticipantTriggeredBySecondaryData.puml | 8 ++++---- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/uml/main/ExtEvSimulationClasses.puml b/docs/uml/main/ExtEvSimulationClasses.puml index 9543697f03..cde1b214d2 100644 --- a/docs/uml/main/ExtEvSimulationClasses.puml +++ b/docs/uml/main/ExtEvSimulationClasses.puml @@ -164,10 +164,10 @@ package simona-api { ActivationMessage --|> ExtTrigger interface ExtTriggerResponse - class CompletionMessage { + class Completion { - List newTriggers } - CompletionMessage --|> ExtTriggerResponse + Completion --|> ExtTriggerResponse ExtTrigger -[hidden]> ExtTriggerResponse ExtTrigger <- ExtSimAdapterData diff --git a/docs/uml/main/ParticipantInheritance.puml b/docs/uml/main/ParticipantInheritance.puml index 7a681fcb8d..ddd87cdc3b 100644 --- a/docs/uml/main/ParticipantInheritance.puml +++ b/docs/uml/main/ParticipantInheritance.puml @@ -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] diff --git a/docs/uml/protocol/ExtEvSimulationSequence.puml b/docs/uml/protocol/ExtEvSimulationSequence.puml index dde2f869d6..b10835efac 100644 --- a/docs/uml/protocol/ExtEvSimulationSequence.puml +++ b/docs/uml/protocol/ExtEvSimulationSequence.puml @@ -43,7 +43,7 @@ Scheduler -> ExtEvDataService: ! Activation(t1) deactivate Scheduler activate ExtEvDataService -ExtSimulation -> ExtSimAdapter: ! CompletionMessage(newTriggers) +ExtSimulation -> ExtSimAdapter: ! Completion(newTriggers) deactivate ExtSimulation activate ExtSimAdapter @@ -192,7 +192,7 @@ group Provide arriving EVs deactivate EvcsAgent2 end -ExtSimulation -> ExtSimAdapter: ! CompletionMessage(t2) +ExtSimulation -> ExtSimAdapter: ! Completion(t2) deactivate ExtSimulation activate ExtSimAdapter diff --git a/docs/uml/protocol/InitializationPhase.puml b/docs/uml/protocol/InitializationPhase.puml index a5cd1c48d0..0758c5d2e5 100644 --- a/docs/uml/protocol/InitializationPhase.puml +++ b/docs/uml/protocol/InitializationPhase.puml @@ -2,18 +2,18 @@ MainController -> Listener: create() MainController -> SimScheduler: create() MainController -> Services: create() -MainController -> SimScheduler: ! ScheduleTriggerMessage(\n\tInitializeServiceTrigger(0),\n\tweatherActorRef) +MainController -> SimScheduler: ! ScheduleActivation(\n\tInitializeServiceTrigger(0),\n\tweatherActorRef) MainController -> GridAgents: create() -MainController -> SimScheduler: ! ScheduleTriggerMessage(\n\tInitializeGridAgentTrigger(0),\n\tgridAgentInitData,\n\tgridAgentRef) +MainController -> SimScheduler: ! ScheduleActivation(\n\tInitializeGridAgentTrigger(0),\n\tgridAgentInitData,\n\tgridAgentRef) MainController -> SimScheduler: ? StartScheduleMessage() SimScheduler -> Services: ! TriggerWithIdMessage(\n\tInitializeServiceTrigger(_),\n\ttriggerId,\n\t_) -Services --> SimScheduler: ! CompletionMessage(\n\ttriggerId,\n\tScheduleTriggerMessage[...]) +Services --> SimScheduler: ! Completion(\n\ttriggerId,\n\tScheduleActivation[...]) SimScheduler -> GridAgents: ! TriggerWithIdMessage(\n\tInitializeGridAgentTrigger(_),\n\ttriggerId,\n\t_) -GridAgents -> SimScheduler: ! ScheduleTriggerMessage(\n\tInitializeSystemComponentsTrigger(0),\n\tassetAgentRef) -GridAgents --> SimScheduler: ! CompletionMessage(triggerId, ScheduleTriggerMessage[...]) +GridAgents -> SimScheduler: ! ScheduleActivation(\n\tInitializeSystemComponentsTrigger(0),\n\tassetAgentRef) +GridAgents --> SimScheduler: ! Completion(triggerId, ScheduleActivation[...]) SimScheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tIInitializeSystemComponentsTrigger(_),\n\ttriggerId,\n\t_) ParticipantAgents -> Services: ! RegisterForWeatherMessage(lat, lon) ParticipantAgents -> Services: ! RegisterFor... Services --> ParticipantAgents: ! RegistrationResponseMessages -ParticipantAgents --> SimScheduler: ! CompletionMessage(\n\ttriggerId,\n\tScheduleTriggerMessage[\n\t\tActivityStartTrigger(tick)\n\t]) +ParticipantAgents --> SimScheduler: ! Completion(\n\ttriggerId,\n\tScheduleActivation[\n\t\tActivation(tick)\n\t]) @enduml \ No newline at end of file diff --git a/docs/uml/protocol/ParticipantTriggeredByItself.puml b/docs/uml/protocol/ParticipantTriggeredByItself.puml index 94b5f84985..d3a93f0bcc 100644 --- a/docs/uml/protocol/ParticipantTriggeredByItself.puml +++ b/docs/uml/protocol/ParticipantTriggeredByItself.puml @@ -1,6 +1,6 @@ @startuml SimScheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tIInitializeSystemComponentsTrigger(_),\n\ttriggerId,\n\t_) -ParticipantAgents --> SimScheduler: ! CompletionMessage(triggerId, ScheduleTriggerMessage[...]) -SimScheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivityStartTrigger(tick),\n\t_,\n\t_) -ParticipantAgents --> SimScheduler: ! CompletionMessage(triggerId, None) +ParticipantAgents --> SimScheduler: ! Completion(triggerId, ScheduleActivation[...]) +SimScheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) +ParticipantAgents --> SimScheduler: ! Completion(triggerId, None) @enduml \ No newline at end of file diff --git a/docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml b/docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml index 03874b19bd..327269060a 100644 --- a/docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml +++ b/docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml @@ -1,7 +1,7 @@ @startuml -SimScheduler -> PrimaryServiceWorker: ! TriggerWithIdMessage(\n\tActivityStartTrigger(tick),\n\t_,\n\t_) +SimScheduler -> PrimaryServiceWorker: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) PrimaryServiceWorker -> ParticipantAgents: ! ProvisionMessage -PrimaryServiceWorker --> SimScheduler: ! CompletionMessage(triggerId, None) -SimScheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivityStartTrigger(tick),\n\t_,\n\t_) -ParticipantAgents --> SimScheduler: ! CompletionMessage(triggerId, None) +PrimaryServiceWorker --> SimScheduler: ! Completion(triggerId, None) +SimScheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) +ParticipantAgents --> SimScheduler: ! Completion(triggerId, None) @enduml \ No newline at end of file diff --git a/docs/uml/protocol/ParticipantTriggeredBySecondaryData.puml b/docs/uml/protocol/ParticipantTriggeredBySecondaryData.puml index bf79a7e891..e7a8a012c9 100644 --- a/docs/uml/protocol/ParticipantTriggeredBySecondaryData.puml +++ b/docs/uml/protocol/ParticipantTriggeredBySecondaryData.puml @@ -1,10 +1,10 @@ @startuml -SimScheduler -> Services: ! TriggerWithIdMessage(\n\tActivityStartTrigger(tick),\n\t_,\n\t_) +SimScheduler -> Services: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) Services -> ParticipantAgents: ! ProvideWeatherMessage(\n\ttick,\n\tweatherData,\n\tnextDataTick) -SimScheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivityStartTrigger(tick),\n\t_,\n\t_) +SimScheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) Services -> ParticipantAgents: ! ProvisionMessage Services -> ParticipantAgents: ! ProvisionMessage -Services --> SimScheduler: ! CompletionMessage(triggerId, None) +Services --> SimScheduler: ! Completion(triggerId, None) ParticipantAgents -> ParticipantAgents: ! StartCalculationTrigger(tick) -ParticipantAgents --> SimScheduler: ! CompletionMessage(triggerId, None) +ParticipantAgents --> SimScheduler: ! Completion(triggerId, None) @enduml \ No newline at end of file From d8d19e066310c87de41d3654de566cca360b351f Mon Sep 17 00:00:00 2001 From: Toastwear Date: Tue, 20 Aug 2024 13:24:43 +0200 Subject: [PATCH 02/14] Renamed ActivityStartTrigger, ScheduleTriggerMessage, CompletionMessage in comments --- .../participant/ParticipantAgentFundamentals.scala | 4 ++-- .../EvcsAgentModelCalculationSpec.scala | 14 +++++++------- .../FixedFeedInAgentModelCalculationSpec.scala | 4 ++-- .../participant/HpAgentModelCalculationSpec.scala | 10 +++++----- .../LoadAgentFixedModelCalculationSpec.scala | 4 ++-- .../LoadAgentProfileModelCalculationSpec.scala | 4 ++-- .../ParticipantAgent2ListenerSpec.scala | 2 +- .../ParticipantAgentExternalSourceSpec.scala | 10 +++++----- .../participant/PvAgentModelCalculationSpec.scala | 10 +++++----- .../participant/WecAgentModelCalculationSpec.scala | 10 +++++----- 10 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/main/scala/edu/ie3/simona/agent/participant/ParticipantAgentFundamentals.scala b/src/main/scala/edu/ie3/simona/agent/participant/ParticipantAgentFundamentals.scala index e9fef1ad20..2b25dea2f3 100644 --- a/src/main/scala/edu/ie3/simona/agent/participant/ParticipantAgentFundamentals.scala +++ b/src/main/scala/edu/ie3/simona/agent/participant/ParticipantAgentFundamentals.scala @@ -301,7 +301,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 ) @@ -902,7 +902,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( diff --git a/src/test/scala/edu/ie3/simona/agent/participant/EvcsAgentModelCalculationSpec.scala b/src/test/scala/edu/ie3/simona/agent/participant/EvcsAgentModelCalculationSpec.scala index 3e3a9c7a2c..dd35c2e5dc 100644 --- a/src/test/scala/edu/ie3/simona/agent/participant/EvcsAgentModelCalculationSpec.scala +++ b/src/test/scala/edu/ie3/simona/agent/participant/EvcsAgentModelCalculationSpec.scala @@ -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 @@ -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 */ @@ -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 */ @@ -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) @@ -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) @@ -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) @@ -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) diff --git a/src/test/scala/edu/ie3/simona/agent/participant/FixedFeedInAgentModelCalculationSpec.scala b/src/test/scala/edu/ie3/simona/agent/participant/FixedFeedInAgentModelCalculationSpec.scala index 35277823c6..bdaac6d366 100644 --- a/src/test/scala/edu/ie3/simona/agent/participant/FixedFeedInAgentModelCalculationSpec.scala +++ b/src/test/scala/edu/ie3/simona/agent/participant/FixedFeedInAgentModelCalculationSpec.scala @@ -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 @@ -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 */ diff --git a/src/test/scala/edu/ie3/simona/agent/participant/HpAgentModelCalculationSpec.scala b/src/test/scala/edu/ie3/simona/agent/participant/HpAgentModelCalculationSpec.scala index 79e64e7a12..3ff4229ab7 100644 --- a/src/test/scala/edu/ie3/simona/agent/participant/HpAgentModelCalculationSpec.scala +++ b/src/test/scala/edu/ie3/simona/agent/participant/HpAgentModelCalculationSpec.scala @@ -382,7 +382,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 @@ -446,7 +446,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 */ @@ -577,7 +577,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) @@ -706,7 +706,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) @@ -777,7 +777,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) diff --git a/src/test/scala/edu/ie3/simona/agent/participant/LoadAgentFixedModelCalculationSpec.scala b/src/test/scala/edu/ie3/simona/agent/participant/LoadAgentFixedModelCalculationSpec.scala index ca26c49cb7..a93d492e4b 100644 --- a/src/test/scala/edu/ie3/simona/agent/participant/LoadAgentFixedModelCalculationSpec.scala +++ b/src/test/scala/edu/ie3/simona/agent/participant/LoadAgentFixedModelCalculationSpec.scala @@ -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 @@ -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 */ diff --git a/src/test/scala/edu/ie3/simona/agent/participant/LoadAgentProfileModelCalculationSpec.scala b/src/test/scala/edu/ie3/simona/agent/participant/LoadAgentProfileModelCalculationSpec.scala index 5790868a44..2e9a180fea 100644 --- a/src/test/scala/edu/ie3/simona/agent/participant/LoadAgentProfileModelCalculationSpec.scala +++ b/src/test/scala/edu/ie3/simona/agent/participant/LoadAgentProfileModelCalculationSpec.scala @@ -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 @@ -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 */ diff --git a/src/test/scala/edu/ie3/simona/agent/participant/ParticipantAgent2ListenerSpec.scala b/src/test/scala/edu/ie3/simona/agent/participant/ParticipantAgent2ListenerSpec.scala index a768fdb73f..b061ae512d 100644 --- a/src/test/scala/edu/ie3/simona/agent/participant/ParticipantAgent2ListenerSpec.scala +++ b/src/test/scala/edu/ie3/simona/agent/participant/ParticipantAgent2ListenerSpec.scala @@ -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 */ diff --git a/src/test/scala/edu/ie3/simona/agent/participant/ParticipantAgentExternalSourceSpec.scala b/src/test/scala/edu/ie3/simona/agent/participant/ParticipantAgentExternalSourceSpec.scala index 79158df7e7..27823d38df 100644 --- a/src/test/scala/edu/ie3/simona/agent/participant/ParticipantAgentExternalSourceSpec.scala +++ b/src/test/scala/edu/ie3/simona/agent/participant/ParticipantAgentExternalSourceSpec.scala @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) diff --git a/src/test/scala/edu/ie3/simona/agent/participant/PvAgentModelCalculationSpec.scala b/src/test/scala/edu/ie3/simona/agent/participant/PvAgentModelCalculationSpec.scala index 9bda1b8b99..4d480f154c 100644 --- a/src/test/scala/edu/ie3/simona/agent/participant/PvAgentModelCalculationSpec.scala +++ b/src/test/scala/edu/ie3/simona/agent/participant/PvAgentModelCalculationSpec.scala @@ -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 @@ -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 */ @@ -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) @@ -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) @@ -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) diff --git a/src/test/scala/edu/ie3/simona/agent/participant/WecAgentModelCalculationSpec.scala b/src/test/scala/edu/ie3/simona/agent/participant/WecAgentModelCalculationSpec.scala index 08193e798c..2bcac7bc3c 100644 --- a/src/test/scala/edu/ie3/simona/agent/participant/WecAgentModelCalculationSpec.scala +++ b/src/test/scala/edu/ie3/simona/agent/participant/WecAgentModelCalculationSpec.scala @@ -356,7 +356,7 @@ class WecAgentModelCalculationSpec 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] wecAgent.stateName shouldBe Idle @@ -424,7 +424,7 @@ class WecAgentModelCalculationSpec 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] awaitAssert(wecAgent.stateName shouldBe Idle) /* State data is tested in another test */ @@ -546,7 +546,7 @@ class WecAgentModelCalculationSpec 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] awaitAssert(wecAgent.stateName shouldBe Idle) @@ -666,7 +666,7 @@ class WecAgentModelCalculationSpec 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] awaitAssert(wecAgent.stateName shouldBe Idle) @@ -737,7 +737,7 @@ class WecAgentModelCalculationSpec 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] awaitAssert(wecAgent.stateName shouldBe Idle) From ac9e26dd71f91215fafca0966d775745ffb6a9c8 Mon Sep 17 00:00:00 2001 From: Toastwear Date: Fri, 23 Aug 2024 14:01:03 +0200 Subject: [PATCH 03/14] Changed SimScheduler and MainController to Scheduler and SimonaSim --- docs/uml/protocol/InitializationPhase.puml | 28 +++++++++---------- .../ParticipantTriggeredByItself.puml | 8 +++--- .../ParticipantTriggeredByPrimaryData.puml | 8 +++--- .../ParticipantTriggeredBySecondaryData.puml | 8 +++--- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/uml/protocol/InitializationPhase.puml b/docs/uml/protocol/InitializationPhase.puml index 0758c5d2e5..4c23f9495b 100644 --- a/docs/uml/protocol/InitializationPhase.puml +++ b/docs/uml/protocol/InitializationPhase.puml @@ -1,19 +1,19 @@ @startuml -MainController -> Listener: create() -MainController -> SimScheduler: create() -MainController -> Services: create() -MainController -> SimScheduler: ! ScheduleActivation(\n\tInitializeServiceTrigger(0),\n\tweatherActorRef) -MainController -> GridAgents: create() -MainController -> SimScheduler: ! ScheduleActivation(\n\tInitializeGridAgentTrigger(0),\n\tgridAgentInitData,\n\tgridAgentRef) -MainController -> SimScheduler: ? StartScheduleMessage() -SimScheduler -> Services: ! TriggerWithIdMessage(\n\tInitializeServiceTrigger(_),\n\ttriggerId,\n\t_) -Services --> SimScheduler: ! Completion(\n\ttriggerId,\n\tScheduleActivation[...]) -SimScheduler -> GridAgents: ! TriggerWithIdMessage(\n\tInitializeGridAgentTrigger(_),\n\ttriggerId,\n\t_) -GridAgents -> SimScheduler: ! ScheduleActivation(\n\tInitializeSystemComponentsTrigger(0),\n\tassetAgentRef) -GridAgents --> SimScheduler: ! Completion(triggerId, ScheduleActivation[...]) -SimScheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tIInitializeSystemComponentsTrigger(_),\n\ttriggerId,\n\t_) +SimonaSim -> Listener: create() +SimonaSim -> Scheduler: create() +SimonaSim -> Services: create() +SimonaSim -> Scheduler: ! ScheduleActivation(\n\tInitializeServiceTrigger(0),\n\tweatherActorRef) +SimonaSim -> GridAgents: create() +SimonaSim -> Scheduler: ! ScheduleActivation(\n\tInitializeGridAgentTrigger(0),\n\tgridAgentInitData,\n\tgridAgentRef) +SimonaSim -> Scheduler: ? StartScheduleMessage() +Scheduler -> Services: ! TriggerWithIdMessage(\n\tInitializeServiceTrigger(_),\n\ttriggerId,\n\t_) +Services --> Scheduler: ! Completion(\n\ttriggerId,\n\tScheduleActivation[...]) +Scheduler -> GridAgents: ! TriggerWithIdMessage(\n\tInitializeGridAgentTrigger(_),\n\ttriggerId,\n\t_) +GridAgents -> Scheduler: ! ScheduleActivation(\n\tInitializeSystemComponentsTrigger(0),\n\tassetAgentRef) +GridAgents --> Scheduler: ! Completion(triggerId, ScheduleActivation[...]) +Scheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tIInitializeSystemComponentsTrigger(_),\n\ttriggerId,\n\t_) ParticipantAgents -> Services: ! RegisterForWeatherMessage(lat, lon) ParticipantAgents -> Services: ! RegisterFor... Services --> ParticipantAgents: ! RegistrationResponseMessages -ParticipantAgents --> SimScheduler: ! Completion(\n\ttriggerId,\n\tScheduleActivation[\n\t\tActivation(tick)\n\t]) +ParticipantAgents --> Scheduler: ! Completion(\n\ttriggerId,\n\tScheduleActivation[\n\t\tActivation(tick)\n\t]) @enduml \ No newline at end of file diff --git a/docs/uml/protocol/ParticipantTriggeredByItself.puml b/docs/uml/protocol/ParticipantTriggeredByItself.puml index d3a93f0bcc..1a6e8e7484 100644 --- a/docs/uml/protocol/ParticipantTriggeredByItself.puml +++ b/docs/uml/protocol/ParticipantTriggeredByItself.puml @@ -1,6 +1,6 @@ @startuml -SimScheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tIInitializeSystemComponentsTrigger(_),\n\ttriggerId,\n\t_) -ParticipantAgents --> SimScheduler: ! Completion(triggerId, ScheduleActivation[...]) -SimScheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) -ParticipantAgents --> SimScheduler: ! Completion(triggerId, None) +Scheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tIInitializeSystemComponentsTrigger(_),\n\ttriggerId,\n\t_) +ParticipantAgents --> Scheduler: ! Completion(triggerId, ScheduleActivation[...]) +Scheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) +ParticipantAgents --> Scheduler: ! Completion(triggerId, None) @enduml \ No newline at end of file diff --git a/docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml b/docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml index 327269060a..8706dc862d 100644 --- a/docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml +++ b/docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml @@ -1,7 +1,7 @@ @startuml -SimScheduler -> PrimaryServiceWorker: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) +Scheduler -> PrimaryServiceWorker: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) PrimaryServiceWorker -> ParticipantAgents: ! ProvisionMessage -PrimaryServiceWorker --> SimScheduler: ! Completion(triggerId, None) -SimScheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) -ParticipantAgents --> SimScheduler: ! Completion(triggerId, None) +PrimaryServiceWorker --> Scheduler: ! Completion(triggerId, None) +Scheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) +ParticipantAgents --> Scheduler: ! Completion(triggerId, None) @enduml \ No newline at end of file diff --git a/docs/uml/protocol/ParticipantTriggeredBySecondaryData.puml b/docs/uml/protocol/ParticipantTriggeredBySecondaryData.puml index e7a8a012c9..ab8fbdb182 100644 --- a/docs/uml/protocol/ParticipantTriggeredBySecondaryData.puml +++ b/docs/uml/protocol/ParticipantTriggeredBySecondaryData.puml @@ -1,10 +1,10 @@ @startuml -SimScheduler -> Services: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) +Scheduler -> Services: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) Services -> ParticipantAgents: ! ProvideWeatherMessage(\n\ttick,\n\tweatherData,\n\tnextDataTick) -SimScheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) +Scheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) Services -> ParticipantAgents: ! ProvisionMessage Services -> ParticipantAgents: ! ProvisionMessage -Services --> SimScheduler: ! Completion(triggerId, None) +Services --> Scheduler: ! Completion(triggerId, None) ParticipantAgents -> ParticipantAgents: ! StartCalculationTrigger(tick) -ParticipantAgents --> SimScheduler: ! Completion(triggerId, None) +ParticipantAgents --> Scheduler: ! Completion(triggerId, None) @enduml \ No newline at end of file From 089ef2a567c585ea35c0283742d01f17bc18c6d9 Mon Sep 17 00:00:00 2001 From: Toastwear Date: Mon, 26 Aug 2024 15:52:20 +0200 Subject: [PATCH 04/14] Adapted UML Class Completion to existing variables --- docs/uml/main/ExtEvSimulationClasses.puml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/uml/main/ExtEvSimulationClasses.puml b/docs/uml/main/ExtEvSimulationClasses.puml index cde1b214d2..bea1b6c654 100644 --- a/docs/uml/main/ExtEvSimulationClasses.puml +++ b/docs/uml/main/ExtEvSimulationClasses.puml @@ -165,7 +165,8 @@ package simona-api { interface ExtTriggerResponse class Completion { - - List newTriggers + - ActorRef Activation + - Option Long } Completion --|> ExtTriggerResponse From 7a99cb061f302fc998ba352ffee256279738ddbd Mon Sep 17 00:00:00 2001 From: Toastwear Date: Tue, 27 Aug 2024 16:08:15 +0200 Subject: [PATCH 05/14] Changed - to + in Completion Class --- docs/uml/main/ExtEvSimulationClasses.puml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/uml/main/ExtEvSimulationClasses.puml b/docs/uml/main/ExtEvSimulationClasses.puml index bea1b6c654..d2e56559ef 100644 --- a/docs/uml/main/ExtEvSimulationClasses.puml +++ b/docs/uml/main/ExtEvSimulationClasses.puml @@ -165,8 +165,8 @@ package simona-api { interface ExtTriggerResponse class Completion { - - ActorRef Activation - - Option Long + + ActorRef Activation + + Option Long } Completion --|> ExtTriggerResponse From d457cae2a6b60b4441bdef047f1ab899cc83ec7b Mon Sep 17 00:00:00 2001 From: Toastwear Date: Wed, 28 Aug 2024 17:10:11 +0200 Subject: [PATCH 06/14] Removed Triggers from ScheduleActivation and triggerID from Completion --- docs/uml/protocol/InitializationPhase.puml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/uml/protocol/InitializationPhase.puml b/docs/uml/protocol/InitializationPhase.puml index 4c23f9495b..ceb64aeff1 100644 --- a/docs/uml/protocol/InitializationPhase.puml +++ b/docs/uml/protocol/InitializationPhase.puml @@ -2,18 +2,18 @@ SimonaSim -> Listener: create() SimonaSim -> Scheduler: create() SimonaSim -> Services: create() -SimonaSim -> Scheduler: ! ScheduleActivation(\n\tInitializeServiceTrigger(0),\n\tweatherActorRef) +SimonaSim -> Scheduler: ! ScheduleActivation(\n\tTick(),\n\tweatherActorRef) SimonaSim -> GridAgents: create() -SimonaSim -> Scheduler: ! ScheduleActivation(\n\tInitializeGridAgentTrigger(0),\n\tgridAgentInitData,\n\tgridAgentRef) +SimonaSim -> Scheduler: ! ScheduleActivation(\n\tTick(),\n\tgridAgentInitData,\n\tgridAgentRef) SimonaSim -> Scheduler: ? StartScheduleMessage() Scheduler -> Services: ! TriggerWithIdMessage(\n\tInitializeServiceTrigger(_),\n\ttriggerId,\n\t_) -Services --> Scheduler: ! Completion(\n\ttriggerId,\n\tScheduleActivation[...]) +Services --> Scheduler: ! Completion(\n\tScheduleActivation[...]) Scheduler -> GridAgents: ! TriggerWithIdMessage(\n\tInitializeGridAgentTrigger(_),\n\ttriggerId,\n\t_) -GridAgents -> Scheduler: ! ScheduleActivation(\n\tInitializeSystemComponentsTrigger(0),\n\tassetAgentRef) -GridAgents --> Scheduler: ! Completion(triggerId, ScheduleActivation[...]) +GridAgents -> Scheduler: ! ScheduleActivation(\n\tTick(),\n\tassetAgentRef) +GridAgents --> Scheduler: ! Completion(ScheduleActivation[...]) Scheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tIInitializeSystemComponentsTrigger(_),\n\ttriggerId,\n\t_) ParticipantAgents -> Services: ! RegisterForWeatherMessage(lat, lon) ParticipantAgents -> Services: ! RegisterFor... Services --> ParticipantAgents: ! RegistrationResponseMessages -ParticipantAgents --> Scheduler: ! Completion(\n\ttriggerId,\n\tScheduleActivation[\n\t\tActivation(tick)\n\t]) +ParticipantAgents --> Scheduler: ! Completion(\n\tScheduleActivation[\n\t\tActivation(tick)\n\t]) @enduml \ No newline at end of file From 43a3e32efbb67b084de43a84b2f62c3ae72c8546 Mon Sep 17 00:00:00 2001 From: Sebastian Peter Date: Thu, 29 Aug 2024 11:17:14 +0200 Subject: [PATCH 07/14] Correcting CompletionMessage for external simulation Signed-off-by: Sebastian Peter --- docs/uml/main/ExtEvSimulationClasses.puml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/uml/main/ExtEvSimulationClasses.puml b/docs/uml/main/ExtEvSimulationClasses.puml index d2e56559ef..373387d8b8 100644 --- a/docs/uml/main/ExtEvSimulationClasses.puml +++ b/docs/uml/main/ExtEvSimulationClasses.puml @@ -164,11 +164,10 @@ package simona-api { ActivationMessage --|> ExtTrigger interface ExtTriggerResponse - class Completion { - + ActorRef Activation - + Option Long + class CompletionMessage { + - Optional nextActivation } - Completion --|> ExtTriggerResponse + CompletionMessage --|> ExtTriggerResponse ExtTrigger -[hidden]> ExtTriggerResponse ExtTrigger <- ExtSimAdapterData From 37ac2af715cc53873d416eacc19d0bc6cbdd64e7 Mon Sep 17 00:00:00 2001 From: marvinheintze Date: Tue, 3 Sep 2024 11:48:08 +0200 Subject: [PATCH 08/14] Removed TriggerIDMessage, Changed Completion and where ScheduleActivations come from --- docs/uml/protocol/InitializationPhase.puml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/uml/protocol/InitializationPhase.puml b/docs/uml/protocol/InitializationPhase.puml index ceb64aeff1..b46e4b3c06 100644 --- a/docs/uml/protocol/InitializationPhase.puml +++ b/docs/uml/protocol/InitializationPhase.puml @@ -2,18 +2,18 @@ SimonaSim -> Listener: create() SimonaSim -> Scheduler: create() SimonaSim -> Services: create() -SimonaSim -> Scheduler: ! ScheduleActivation(\n\tTick(),\n\tweatherActorRef) +Services -> Scheduler: ! ScheduleActivation(\n\tweatherActorRef, \n\tINIT_SIM_TICK) SimonaSim -> GridAgents: create() -SimonaSim -> Scheduler: ! ScheduleActivation(\n\tTick(),\n\tgridAgentInitData,\n\tgridAgentRef) +GridAgents -> Scheduler: ! ScheduleActivation(\n\tgridAgentRef, \n\tINIT_SIM_TICK) SimonaSim -> Scheduler: ? StartScheduleMessage() -Scheduler -> Services: ! TriggerWithIdMessage(\n\tInitializeServiceTrigger(_),\n\ttriggerId,\n\t_) -Services --> Scheduler: ! Completion(\n\tScheduleActivation[...]) -Scheduler -> GridAgents: ! TriggerWithIdMessage(\n\tInitializeGridAgentTrigger(_),\n\ttriggerId,\n\t_) -GridAgents -> Scheduler: ! ScheduleActivation(\n\tTick(),\n\tassetAgentRef) -GridAgents --> Scheduler: ! Completion(ScheduleActivation[...]) -Scheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tIInitializeSystemComponentsTrigger(_),\n\ttriggerId,\n\t_) +Scheduler -> Services: ! Activation(\n\tINIT_SIM_TICK) +Services --> Scheduler: ! Completion(\n\tweatherActorRef, \n\ttick) +Scheduler -> GridAgents: ! Activation(\n\tINIT_SIM_TICK) +GridAgents -> Scheduler: ! ScheduleActivation(\n\tassetAgentRef, \n\tINIT_SIM_TICK) +GridAgents --> Scheduler: ! Completion(\n\tgridAgentRef,\n\ttick) +Scheduler -> ParticipantAgents: ! Activation(\n\tINIT_SIM_TICK) ParticipantAgents -> Services: ! RegisterForWeatherMessage(lat, lon) ParticipantAgents -> Services: ! RegisterFor... Services --> ParticipantAgents: ! RegistrationResponseMessages -ParticipantAgents --> Scheduler: ! Completion(\n\tScheduleActivation[\n\t\tActivation(tick)\n\t]) +ParticipantAgents --> Scheduler: ! Completion(\n\tassetAgentRef,\n\ttick) @enduml \ No newline at end of file From 2568bf2308972a013a274763d8267b13201b69d3 Mon Sep 17 00:00:00 2001 From: marvinheintze Date: Mon, 9 Sep 2024 12:38:30 +0200 Subject: [PATCH 09/14] Remove TriggerWithIDMessage() and triggerIDs from Completion --- docs/uml/protocol/ParticipantTriggeredByItself.puml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/uml/protocol/ParticipantTriggeredByItself.puml b/docs/uml/protocol/ParticipantTriggeredByItself.puml index 1a6e8e7484..b476a6e232 100644 --- a/docs/uml/protocol/ParticipantTriggeredByItself.puml +++ b/docs/uml/protocol/ParticipantTriggeredByItself.puml @@ -1,6 +1,6 @@ @startuml -Scheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tIInitializeSystemComponentsTrigger(_),\n\ttriggerId,\n\t_) -ParticipantAgents --> Scheduler: ! Completion(triggerId, ScheduleActivation[...]) -Scheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) -ParticipantAgents --> Scheduler: ! Completion(triggerId, None) +Scheduler -> ParticipantAgents: ! Activation(\n\tINIT_SIM_TICK) +ParticipantAgents --> Scheduler: ! Completion(\n\tactor, tick) +Scheduler -> ParticipantAgents: ! Activation(\n\ttick) +ParticipantAgents --> Scheduler: ! Completion(\n\tactor, newTick) @enduml \ No newline at end of file From ddff841febff7f46f18c3caeae39720e000f5818 Mon Sep 17 00:00:00 2001 From: marvinheintze Date: Mon, 9 Sep 2024 12:38:38 +0200 Subject: [PATCH 10/14] Remove TriggerWithIDMessage() and triggerIDs from Completion --- docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml | 8 ++++---- .../uml/protocol/ParticipantTriggeredBySecondaryData.puml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml b/docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml index 8706dc862d..c9ee2e21bd 100644 --- a/docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml +++ b/docs/uml/protocol/ParticipantTriggeredByPrimaryData.puml @@ -1,7 +1,7 @@ @startuml -Scheduler -> PrimaryServiceWorker: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) +Scheduler -> PrimaryServiceWorker: ! Activation(\n\tInit_SIM_TICK) PrimaryServiceWorker -> ParticipantAgents: ! ProvisionMessage -PrimaryServiceWorker --> Scheduler: ! Completion(triggerId, None) -Scheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) -ParticipantAgents --> Scheduler: ! Completion(triggerId, None) +PrimaryServiceWorker --> Scheduler: ! Completion(\n\tactor,None) +Scheduler -> ParticipantAgents: ! Activation(\n\ttick) +ParticipantAgents --> Scheduler: ! Completion(\n\tactor, newTick) @enduml \ No newline at end of file diff --git a/docs/uml/protocol/ParticipantTriggeredBySecondaryData.puml b/docs/uml/protocol/ParticipantTriggeredBySecondaryData.puml index ab8fbdb182..a3837f60fb 100644 --- a/docs/uml/protocol/ParticipantTriggeredBySecondaryData.puml +++ b/docs/uml/protocol/ParticipantTriggeredBySecondaryData.puml @@ -1,10 +1,10 @@ @startuml -Scheduler -> Services: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) +Scheduler -> Services: ! Activation(\n\tINIT_SIM_TICK) Services -> ParticipantAgents: ! ProvideWeatherMessage(\n\ttick,\n\tweatherData,\n\tnextDataTick) -Scheduler -> ParticipantAgents: ! TriggerWithIdMessage(\n\tActivation(tick),\n\t_,\n\t_) +Scheduler -> ParticipantAgents: ! Activation(\n\ttick) Services -> ParticipantAgents: ! ProvisionMessage Services -> ParticipantAgents: ! ProvisionMessage -Services --> Scheduler: ! Completion(triggerId, None) +Services --> Scheduler: ! Completion(\n\tactor, None) ParticipantAgents -> ParticipantAgents: ! StartCalculationTrigger(tick) -ParticipantAgents --> Scheduler: ! Completion(triggerId, None) +ParticipantAgents --> Scheduler: ! Completion(\n\tactor, newTick) @enduml \ No newline at end of file From 1ccf1b81d57892e95ab5e6d00ef0e4f3558da40c Mon Sep 17 00:00:00 2001 From: marvinheintze Date: Mon, 16 Sep 2024 00:12:53 +0200 Subject: [PATCH 11/14] Changed newTrigger to newTick --- docs/uml/protocol/ExtEvSimulationSequence.puml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/uml/protocol/ExtEvSimulationSequence.puml b/docs/uml/protocol/ExtEvSimulationSequence.puml index b10835efac..872d42b92a 100644 --- a/docs/uml/protocol/ExtEvSimulationSequence.puml +++ b/docs/uml/protocol/ExtEvSimulationSequence.puml @@ -43,11 +43,11 @@ Scheduler -> ExtEvDataService: ! Activation(t1) deactivate Scheduler activate ExtEvDataService -ExtSimulation -> ExtSimAdapter: ! Completion(newTriggers) +ExtSimulation -> ExtSimAdapter: ! Completion(newTick) deactivate ExtSimulation activate ExtSimAdapter -ExtSimAdapter -> Scheduler: ! Completion(newTriggers) +ExtSimAdapter -> Scheduler: ! Completion(newTick) deactivate ExtSimAdapter ExtEvDataService -> EvcsAgent1: ! RegistrationSuccessfulMessage(t1) From 5d64f23ffb15c98831eccbc11e204de86032938b Mon Sep 17 00:00:00 2001 From: marvinheintze Date: Mon, 16 Sep 2024 12:13:57 +0200 Subject: [PATCH 12/14] Changed Completion to CompletionMessage --- .../uml/protocol/ExtEvSimulationSequence.puml | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/uml/protocol/ExtEvSimulationSequence.puml b/docs/uml/protocol/ExtEvSimulationSequence.puml index 872d42b92a..1c3cfccb8b 100644 --- a/docs/uml/protocol/ExtEvSimulationSequence.puml +++ b/docs/uml/protocol/ExtEvSimulationSequence.puml @@ -43,26 +43,26 @@ Scheduler -> ExtEvDataService: ! Activation(t1) deactivate Scheduler activate ExtEvDataService -ExtSimulation -> ExtSimAdapter: ! Completion(newTick) +ExtSimulation -> ExtSimAdapter: ! CompletionMessage(newTick) deactivate ExtSimulation activate ExtSimAdapter -ExtSimAdapter -> Scheduler: ! Completion(newTick) +ExtSimAdapter -> Scheduler: ! CompletionMessage(newTick) deactivate ExtSimAdapter ExtEvDataService -> EvcsAgent1: ! RegistrationSuccessfulMessage(t1) activate EvcsAgent1 -EvcsAgent1 -> Scheduler: ! Completion(t1) +EvcsAgent1 -> Scheduler: ! CompletionMessage(t1) deactivate EvcsAgent1 ExtEvDataService -> EvcsAgent2: ! RegistrationSuccessfulMessage(t1) activate EvcsAgent2 -EvcsAgent2 -> Scheduler: ! Completion(t1) +EvcsAgent2 -> Scheduler: ! CompletionMessage(t1) deactivate EvcsAgent2 -ExtEvDataService -> Scheduler: ! Completion(None) +ExtEvDataService -> Scheduler: ! CompletionMessage(None) deactivate ExtEvDataService ==Simulation== @@ -96,7 +96,7 @@ group Request free lots ExtEvDataService -> EvcsAgent2: ! EvFreeLotsRequest(t1) activate EvcsAgent2 - ExtEvDataService -> Scheduler: ! Completion(None) + ExtEvDataService -> Scheduler: ! CompletionMessage(None) EvcsAgent2 -> ExtEvDataService: ! FreeLotsResponse(_, _) deactivate EvcsAgent2 @@ -124,7 +124,7 @@ group Request current prices (dummy implementation) ExtEvDataService -> ExtSimulation: queue(ProvideCurrentPrices(_)) - ExtEvDataService -> Scheduler: ! Completion(None) + ExtEvDataService -> Scheduler: ! CompletionMessage(None) deactivate ExtEvDataService end @@ -149,7 +149,7 @@ group Request departing EVs ExtEvDataService -> EvcsAgent2: ! DepartingEvsRequest(t1) activate EvcsAgent2 - ExtEvDataService -> Scheduler: ! Completion(None) + ExtEvDataService -> Scheduler: ! CompletionMessage(None) EvcsAgent2 -> ExtEvDataService: ! DepartingEvsResponse(_, _) deactivate EvcsAgent2 @@ -182,21 +182,21 @@ group Provide arriving EVs ExtEvDataService -> EvcsAgent2: ! ProvideEvDataMessage(evs, t2) activate EvcsAgent2 - ExtEvDataService -> Scheduler: ! Completion(None) + ExtEvDataService -> Scheduler: ! CompletionMessage(None) deactivate ExtEvDataService - EvcsAgent1 -> Scheduler: ! Completion(t2) + EvcsAgent1 -> Scheduler: ! CompletionMessage(t2) deactivate EvcsAgent1 - EvcsAgent2 -> Scheduler: ! Completion(t2) + EvcsAgent2 -> Scheduler: ! CompletionMessage(t2) deactivate EvcsAgent2 end -ExtSimulation -> ExtSimAdapter: ! Completion(t2) +ExtSimulation -> ExtSimAdapter: ! CompletionMessage(t2) deactivate ExtSimulation activate ExtSimAdapter -ExtSimAdapter -> Scheduler: ! Completion(t2) +ExtSimAdapter -> Scheduler: ! CompletionMessage(t2) deactivate ExtSimAdapter @enduml \ No newline at end of file From 71d6dd85e55e96737d634f5d9286487260d8ebe6 Mon Sep 17 00:00:00 2001 From: marvinheintze Date: Mon, 16 Sep 2024 19:35:34 +0200 Subject: [PATCH 13/14] CompletionMessage only from SimonaAPI --- .../uml/protocol/ExtEvSimulationSequence.puml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/uml/protocol/ExtEvSimulationSequence.puml b/docs/uml/protocol/ExtEvSimulationSequence.puml index 1c3cfccb8b..b5d9ff3de4 100644 --- a/docs/uml/protocol/ExtEvSimulationSequence.puml +++ b/docs/uml/protocol/ExtEvSimulationSequence.puml @@ -47,22 +47,22 @@ ExtSimulation -> ExtSimAdapter: ! CompletionMessage(newTi deactivate ExtSimulation activate ExtSimAdapter -ExtSimAdapter -> Scheduler: ! CompletionMessage(newTick) +ExtSimAdapter -> Scheduler: ! Completion(newTick) deactivate ExtSimAdapter ExtEvDataService -> EvcsAgent1: ! RegistrationSuccessfulMessage(t1) activate EvcsAgent1 -EvcsAgent1 -> Scheduler: ! CompletionMessage(t1) +EvcsAgent1 -> Scheduler: ! Completion(t1) deactivate EvcsAgent1 ExtEvDataService -> EvcsAgent2: ! RegistrationSuccessfulMessage(t1) activate EvcsAgent2 -EvcsAgent2 -> Scheduler: ! CompletionMessage(t1) +EvcsAgent2 -> Scheduler: ! Completion(t1) deactivate EvcsAgent2 -ExtEvDataService -> Scheduler: ! CompletionMessage(None) +ExtEvDataService -> Scheduler: ! Completion(None) deactivate ExtEvDataService ==Simulation== @@ -96,7 +96,7 @@ group Request free lots ExtEvDataService -> EvcsAgent2: ! EvFreeLotsRequest(t1) activate EvcsAgent2 - ExtEvDataService -> Scheduler: ! CompletionMessage(None) + ExtEvDataService -> Scheduler: ! Completion(None) EvcsAgent2 -> ExtEvDataService: ! FreeLotsResponse(_, _) deactivate EvcsAgent2 @@ -124,7 +124,7 @@ group Request current prices (dummy implementation) ExtEvDataService -> ExtSimulation: queue(ProvideCurrentPrices(_)) - ExtEvDataService -> Scheduler: ! CompletionMessage(None) + ExtEvDataService -> Scheduler: ! Completion(None) deactivate ExtEvDataService end @@ -149,7 +149,7 @@ group Request departing EVs ExtEvDataService -> EvcsAgent2: ! DepartingEvsRequest(t1) activate EvcsAgent2 - ExtEvDataService -> Scheduler: ! CompletionMessage(None) + ExtEvDataService -> Scheduler: ! Completion(None) EvcsAgent2 -> ExtEvDataService: ! DepartingEvsResponse(_, _) deactivate EvcsAgent2 @@ -182,13 +182,13 @@ group Provide arriving EVs ExtEvDataService -> EvcsAgent2: ! ProvideEvDataMessage(evs, t2) activate EvcsAgent2 - ExtEvDataService -> Scheduler: ! CompletionMessage(None) + ExtEvDataService -> Scheduler: ! Completion(None) deactivate ExtEvDataService - EvcsAgent1 -> Scheduler: ! CompletionMessage(t2) + EvcsAgent1 -> Scheduler: ! Completion(t2) deactivate EvcsAgent1 - EvcsAgent2 -> Scheduler: ! CompletionMessage(t2) + EvcsAgent2 -> Scheduler: ! Completion(t2) deactivate EvcsAgent2 end @@ -196,7 +196,7 @@ ExtSimulation -> ExtSimAdapter: ! CompletionMessage(t2) deactivate ExtSimulation activate ExtSimAdapter -ExtSimAdapter -> Scheduler: ! CompletionMessage(t2) +ExtSimAdapter -> Scheduler: ! Completion(t2) deactivate ExtSimAdapter @enduml \ No newline at end of file From baf97f8bc1d60fddb00be1fcc013f583b2b4f2f9 Mon Sep 17 00:00:00 2001 From: marvinheintze Date: Tue, 17 Sep 2024 10:19:08 +0200 Subject: [PATCH 14/14] Changelog Entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 681b04b5dd..817810772e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Rewrote BMModelTest from groovy to scala [#646](https://github.com/ie3-institute/simona/issues/646) - Refactoring EM messages [#947](https://github.com/ie3-institute/simona/issues/947) - Simplifying ThermalHouse [#940](https://github.com/ie3-institute/simona/issues/940) +- 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)