Skip to content

Commit

Permalink
Merge branch 'dev' into df/#856-tap-water
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
danielfeismann committed Nov 14, 2024
2 parents de52f6e + 42deaab commit d3357f6
Show file tree
Hide file tree
Showing 5 changed files with 592 additions and 519 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated dependabot reviewers [#888](https://github.com/ie3-institute/simona/issues/888)
- Merged `HpModelTestData` with `HpTestData` to `HpInputTestData` [#872](https://github.com/ie3-institute/simona/issues/872)
- Harmonised both methods that check the inner temperature of thermal house against the boundaries [#880](https://github.com/ie3-institute/simona/issues/880)
- Changed implementation of actor naming for unique name generation [#103](https://github.com/ie3-institute/simona/issues/103)
- Convert all `eval-rst` instances in rtd to myst syntax [#901](https://github.com/ie3-institute/simona/issues/901)
- External simulation should provide information about next tick of MobSim [#776](https://github.com/ie3-institute/simona/issues/776)
- Reverted temporary workaround in `spotless.gradle` [#681](https://github.com/ie3-institute/simona/issues/681)
Expand All @@ -94,8 +95,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Rewrote CylindricalThermalStorageTest Test from groovy to scala [#646](https://github.com/ie3-institute/simona/issues/646)
- Replace mutable var in ChpModelSpec [#1002](https://github.com/ie3-institute/simona/issues/1002)
- Move compression of output files into `ResultEventListener`[#965](https://github.com/ie3-institute/simona/issues/965)
- Rewrote StorageModelTest from groovy to scala [#646](https://github.com/ie3-institute/simona/issues/646)
- Updated `ExtEvSimulationClasses` [#898](https://github.com/ie3-institute/simona/issues/898)

### Fixed
- Fix rendering of references in documentation [#505](https://github.com/ie3-institute/simona/issues/505)
- Removed a repeated line in the documentation of vn_simona config [#658](https://github.com/ie3-institute/simona/issues/658)
- Removed version number "2.0" from the logo printed to console [#642](https://github.com/ie3-institute/simona/issues/642)
- Fixed PV Model documentation [#684](https://github.com/ie3-institute/simona/issues/684), [#686](https://github.com/ie3-institute/simona/issues/686)
Expand Down Expand Up @@ -127,6 +131,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix CheckWindow duration [#921](https://github.com/ie3-institute/simona/issues/921)
- 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)

Expand Down Expand Up @@ -191,7 +196,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed format of example grid `vn_simona` [#216](https://github.com/ie3-institute/simona/issues/216)
- Renamed ChpData to ChpRelevantData [#494](https://github.com/ie3-institute/simona/issues/494)
- Updated gradle to 8.2.1, cleaned up `build.gradle` and `Jenkinsfile` [#572](https://github.com/ie3-institute/simona/issues/572)
- Changed implementation of actor naming for unique name generation [#103](https://github.com/ie3-institute/simona/issues/103)

### Fixed
- Location of `vn_simona` test grid (was partially in Berlin and Dortmund) [#72](https://github.com/ie3-institute/simona/issues/72)
Expand Down Expand Up @@ -227,7 +231,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed broken layout in RTD documentation [#500](https://github.com/ie3-institute/simona/issues/500)
- Corrected tests in RefSystemTest [#560](https://github.com/ie3-institute/simona/issues/560)
- Take log file event filters from `logback.xml` when defining the run log appender [#108](https://github.com/ie3-institute/simona/issues/108)
- Fix rendering of references in documentation [#505](https://github.com/ie3-institute/simona/issues/505)

### Removed
- Remove workaround for tscfg tmp directory [#178](https://github.com/ie3-institute/simona/issues/178)
Expand Down
2 changes: 1 addition & 1 deletion docs/readthedocs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Sphinx==8.1.3
sphinx-rtd-theme==3.0.1
sphinx-rtd-theme==3.0.2
sphinxcontrib-plantuml==0.30
myst-parser==4.0.0
markdown-it-py==3.0.0
Expand Down
278 changes: 136 additions & 142 deletions docs/uml/main/ExtEvSimulationClasses.puml
Original file line number Diff line number Diff line change
@@ -1,177 +1,149 @@
@startuml
'https://plantuml.com/class-diagram
skinparam linetype ortho
skinparam nodesep 50
skinparam ranksep 40

package ev-simulation {
class ExtLink
class ExternalSampleSim
class EvModelImpl

' adding hidden elements for layout purposes
class placeholderA {
w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w
}
hide placeholderA

class placeholderB {
w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w
}
hide placeholderB
skinparam node {
borderColor Transparent
fontColor Transparent
}

ExtLink -[hidden]> placeholderA
placeholderA -[hidden]> ExternalSampleSim
ExternalSampleSim -[hidden]> placeholderB
placeholderB -[hidden]> EvModelImpl
package MobilitySimulator {
class ExtLink
class MobilitySim
class ElectricVehicle
}

package simona-api {
' MIDDLE PART
class ExtEvData {
~ LinkedBlockingQueue<EvDataResponseMessageToExt> receiveTriggerQueue
- ActorRef dataService
- ActorRef extSimAdapter
+ List<UUID> requestAvailablePublicEvCs()
+ List<EvModel> sendEvPositions(EvMovementsMessage evMovementsMessage)
- void sendData(ExtEvMessage msg)
+ void queueExtMsg(ExtEvResponseMessage extEvResponse)
}

class ExtSimAdapterData {
~ LinkedBlockingQueue<ExtTrigger> receiveTriggerQueue
- ActorRef extSimAdapter
+ void queueExtMsg(ExtTrigger trigger)
+ void send(ExtTriggerResponse msg)
}

interface ExtData

abstract class ExtSimulation {
- ExtSimAdapterData data
+ void setup(ExtSimAdapterData data, List<ExtData> adapters)
+ void run()
# {abstract} List<Long> doActivity(long tick)
# {abstract} Optional<Long> doActivity(long tick)
# {abstract} Long initialize()
}
ExtSimulation --r> ExtData
MobilitySim -|> ExtSimulation

interface ExtLinkInterface {
+ ExtSimulation getExtSimulation()
+ List<ExtDataSimulation> getExtDataSimulations()
}

ExtLink --|> ExtLinkInterface

interface ExtEvSimulation {
+ void setExtEvData(ExtEvData evData)
+ void setExtEvData(ExtEvData evData)
}

MobilitySim --|> ExtEvSimulation

interface ExtDataSimulation

ExternalSampleSim --|> ExtSimulation
ExternalSampleSim --|> ExtEvSimulation
ExtEvSimulation --u|> ExtDataSimulation

ExtSimulation -[hidden]> ExtDataSimulation
ExtEvSimulation -|> ExtDataSimulation
ExtEvSimulation --> ExtEvData
interface EvModel {
+ UUID getUuid()
+ String getId()
+ ComparableQuantity<Power> getSRatedAC()
+ ComparableQuantity<Power> getSRatedDC()
+ ComparableQuantity<Energy> getEStorage()
+ ComparableQuantity<Energy> getStoredEnergy()
+ Long getDepartureTick()
+ EvModel copyWith(ComparableQuantity<Energy> newStoredEnergy)
}

ExtSimulation --> ExtData
ExtSimulation --> ExtSimAdapterData
ElectricVehicle --|> EvModel

ExtSimAdapterData -[hidden]> ExtEvData
ExtData <|-- ExtEvData
interface ExtData

' placeholder
class plchldr1 {
w-w-w-w-w
}
hide plchldr1
class placeholder2 {
w-w-w-w-w-w-w-w-w-w-w-w-w-w-w
}
hide placeholder2
class placeholder3 {
w-w-w-w-w-w-w-w-w-w-w
}
hide placeholder3
class placeholder4 {
w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w-w
class ExtEvData {
+ LinkedBlockingQueue<EvDataResponseMessageToExt> receiveTriggerQueue
- ActorRef dataService
- ActorRef extSimAdapter
+ Map<UUID, Integer> requestAvailablePublicEvcs()
+ Map<UUID, Double> requestCurrentPrices()
+ List<EvModel> requestDepartingEvs(Map<UUID, List<UUID>> departures)
+ void provideArrivingEvs(Map<UUID, List<EvModel>> arrivals, Optional<Long> maybeNextTick)
+ void sendExtMsg(EvDataMessageFromExt msg)
+ void queueExtResponseMsg(EvDataResponseMessageToExt extEvResponse)
}
hide placeholder4

ExtData -[hidden]> plchldr1
plchldr1 -[hidden]> placeholder4
placeholder4 -[hidden]> EvMovement
ExtSimulation -[hidden]-> placeholder2
placeholder2 -[hidden]-> placeholder3
placeholder3 -[hidden]-> ExtSimAdapterData
placeholder2 -[hidden]> ExtData
node sub2 {
interface EvDataMessageFromExt

interface DataMessageFromExt

' RIGHT PART
abstract class EvMovement
class Arrival
class Departure
Arrival --|> EvMovement
Departure --|> EvMovement
Arrival -[hidden]> Departure
class ProvideArrivingEvs

interface EvModel {
+ UUID getUuid()
+ String getId()
+ ComparableQuantity<Power> getSRated()
+ ComparableQuantity<Energy> getEStorage()
+ ComparableQuantity<Energy> getStoredEnergy()
+ EvModel copyWith(ComparableQuantity<Energy> newStoredEnergy)
class RequestCurrentPrices

class RequestDepartingEvs

class RequestEvcsFreeLots
}

ExtDataSimulation -[hidden]> Arrival
EvMovement *-> EvModel
EvModelImpl --|> EvModel
RequestDepartingEvs --u|> EvDataMessageFromExt
RequestEvcsFreeLots --u|> EvDataMessageFromExt
ProvideArrivingEvs --u|> EvDataMessageFromExt
RequestCurrentPrices --u|> EvDataMessageFromExt

DataMessageFromExt --d|> EvDataMessageFromExt
ExtEvData -----> EvDataMessageFromExt
ExtEvData --u|> ExtData
ExtEvSimulation -u> ExtEvData

interface EvDataMessageFromExt
class EvMovementsMessage {
- Map<UUID, List<EvMovement>> movements
}
class RequestEvcsFreeLots
RequestEvcsFreeLots --|> EvDataMessageFromExt
EvMovementsMessage --|> EvDataMessageFromExt
RequestEvcsFreeLots -[hidden]> EvMovementsMessage

interface EvDataResponseMessageToExt
class AllDepartedEvsRepsonse {
- Map<UUID, List<EvMovement>> movements
}
class ProvideEvcsFreeLots
ProvideEvcsFreeLots --|> EvDataResponseMessageToExt
AllDepartedEvsRepsonse --|> EvDataResponseMessageToExt
ExtEvData -> EvDataMessageFromExt
ExtEvData -> EvDataResponseMessageToExt
EvMovement -[hidden]-> RequestEvcsFreeLots
EvDataMessageFromExt -[hidden]> EvDataResponseMessageToExt
EvMovementsMessage -[hidden]> ProvideEvcsFreeLots
ProvideEvcsFreeLots -[hidden]> AllDepartedEvsRepsonse

class ScheduleDataServiceMessage {
- ExtEvDataService dataService
}
EvDataResponseMessageToExt -[hidden]> ScheduleDataServiceMessage
ExtEvData -> ScheduleDataServiceMessage
node sub1 {
interface DataResponseMessageToExt

interface EvDataResponseMessageToExt

' LEFT PART
interface ExtLinkInterface {
+ ExtSimulation getExtSimulation()
+ List<ExtDataSimulation> getExtDataSimulations()
}
ExtLinkInterface -[hidden]> ExtSimulation
ExtLink --|> ExtLinkInterface
class ProvideCurrentPrices {
+ Map<UUID, Double> prices
}

class ProvideDepartingEvs {
+ List<EvModel> departedEvs
}

class ProvideEvcsFreeLots {
+ Map<UUID, Integer> evcs
}

interface ExtTrigger
class ActivationMessage {
- Long tick
ProvideEvcsFreeLots --|> EvDataResponseMessageToExt
ProvideDepartingEvs --|> EvDataResponseMessageToExt
ProvideCurrentPrices --|> EvDataResponseMessageToExt
ExtEvData --> EvDataResponseMessageToExt
EvDataResponseMessageToExt --|> DataResponseMessageToExt
}
ActivationMessage --|> ExtTrigger

interface ExtTriggerResponse
class CompletionMessage {
- Optional<Long> nextActivation
node sub3 {
class ExtSimAdapterData {
+ LinkedBlockingQueue<ExtTrigger> receiveTriggerQueue
- ActorRef extSimAdapter
- String[] mainArgs
+ void queueExtMsg(ControlMessageToExt msg)
+ void send(ControlResponseMessageFromExt msg)
+ String[] getMainArgs()
}

interface ControlMessageToExt

interface ControlResponseMessageFromExt

class CompletionMessage

class ActivationMessage

ExtSimAdapterData --u> ControlMessageToExt
ExtSimAdapterData --u> ControlResponseMessageFromExt
CompletionMessage --d|> ControlResponseMessageFromExt
ActivationMessage --d|> ControlMessageToExt
ExtSimulation -----> ExtSimAdapterData
}
CompletionMessage --|> ExtTriggerResponse

ExtTrigger -[hidden]> ExtTriggerResponse
ExtTrigger <- ExtSimAdapterData
ExtTriggerResponse <- ExtSimAdapterData
}

package simona {
Expand All @@ -182,10 +154,22 @@ package simona {
class EvcsAgent

interface SecondaryData
class EvMovementData {
movements: Set[EvMovement]

class ArrivingEvs {
+ arrivals: Seq[EvModelWrapper]
}

class DepartingEvsRequest {
+ evcs: UUID
+ departingEvs: Seq[EvModelWrapper]
}

class EvFreeLotsRequest {
+ freeLots: Int
}

abstract EvData

class SimonaSim

class Scheduler
Expand All @@ -202,22 +186,32 @@ package simona {
SimonaSim *- SimonaStandaloneSetup
SimonaStandaloneSetup *- ExtSimLoader

ExtSimAdapter -- Scheduler
ExtSimAdapter - Scheduler
ExtEvDataService -- Scheduler

SecondaryData <|-- EvMovementData
ArrivingEvs --u|> EvData
EvFreeLotsRequest --u|> EvData
DepartingEvsRequest --u|> EvData
SecondaryData <|-- EvData

SimonaService <|- ExtEvDataService
ExtEvData <--- ExtEvDataService
ExtEvData --- ExtEvDataService

ExtSimAdapterData <--- ExtSimAdapter

' 1 and n are swapped here due to bug with linetype ortho and labels
ExtEvDataService "n" <-> "1" EvcsAgent
EvcsAgent --|> ParticipantAgent
EvcsAgent *- EvcsModel

ExtSimAdapter -[hidden]> SimonaService
}

'Order of classes/interfaces established through hidden connections:

ExtSimAdapter -[hidden]> SimonaService
sub1 ---[hidden]d> sub2
ExtLink -[hidden]> ElectricVehicle
ExtSimulation -[hidden]> ExtEvSimulation
ExtSimulation -[hidden]> DataResponseMessageToExt
ProvideArrivingEvs --[hidden]> ExtSimAdapter

@enduml
Loading

0 comments on commit d3357f6

Please sign in to comment.