-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Lv Coordinator according to updated concept
- Loading branch information
Showing
30 changed files
with
1,207 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@startuml | ||
'https://plantuml.com/state-diagram | ||
|
||
!theme plain | ||
hide empty description | ||
|
||
idle: Awaiting arbitrary requests | ||
awaitInputData: Await OSM and\nasset information | ||
awaitResults: Await results | ||
|
||
[*] --> idle | ||
idle --> awaitInputData: !ReqLvGrids | ||
idle --> [*]: !Terminate\n//unsupported msg// | ||
|
||
awaitInputData --> awaitInputData: !WrappedInputDataResponse\n//if data missing// | ||
awaitInputData --> awaitResults: !WrappedInputDataResponse\n//if data complete// | ||
awaitInputData --> [*]: !Terminate\n//unsupported msg// | ||
|
||
awaitResults --> awaitResults: !StartGeneration | ||
awaitResults --> [*]: !WrappedRegionResponse | ||
awaitResults --> [*]: !Terminate\n//unsupported msg// | ||
@enduml |
206 changes: 206 additions & 0 deletions
206
docs/readthedocs/_static/figures/puml/LvCoordinator.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* © 2022. TU Dortmund University, | ||
* Institute of Energy Systems, Energy Efficiency and Energy Economics, | ||
* Research group Distribution grid planning and operation | ||
*/ | ||
|
||
package edu.ie3.osmogrid | ||
|
||
import akka.actor.typed.Behavior | ||
import akka.actor.typed.scaladsl.Behaviors | ||
import edu.ie3.osmogrid.io.input.InputDataProvider.Request | ||
import org.slf4j.Logger | ||
|
||
trait ActorStopSupport[T] { | ||
|
||
/** Partial function to perform cleanup tasks while shutting down | ||
*/ | ||
protected val cleanUp: () => Unit | ||
|
||
protected def terminate(log: Logger): Behavior[T] = { | ||
log.info("Got request to terminate.") | ||
stopBehavior | ||
} | ||
|
||
/** Specific stop state with clean up actions issued | ||
*/ | ||
protected val stopBehavior: Behavior[T] = Behaviors.stopped(cleanUp) | ||
|
||
protected def postStopCleanUp(log: Logger): Behavior[T] = { | ||
log.info("Got terminated by ActorSystem.") | ||
stopBehavior | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/scala/edu/ie3/osmogrid/exception/RequestFailedException.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* © 2022. TU Dortmund University, | ||
* Institute of Energy Systems, Energy Efficiency and Energy Economics, | ||
* Research group Distribution grid planning and operation | ||
*/ | ||
|
||
package edu.ie3.osmogrid.exception | ||
|
||
case class RequestFailedException( | ||
msg: String = "", | ||
cause: Throwable = None.orNull | ||
) extends Exception(msg, cause) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.