Skip to content

Commit

Permalink
Merge branch 'dev' into ms/#666-convert-GridAgent-and-DBFSAlgorithm-t…
Browse files Browse the repository at this point in the history
…o-pekko-typed

# Conflicts:
#	src/main/scala/edu/ie3/simona/agent/grid/DBFSAlgorithm.scala
#	src/main/scala/edu/ie3/simona/agent/grid/GridAgent.scala
#	src/main/scala/edu/ie3/simona/agent/grid/GridAgentController.scala
#	src/main/scala/edu/ie3/simona/agent/grid/GridAgentData.scala
#	src/main/scala/edu/ie3/simona/agent/grid/GridEnvironment.scala
#	src/main/scala/edu/ie3/simona/agent/grid/GridResultsSupport.scala
#	src/main/scala/edu/ie3/simona/agent/grid/PowerFlowSupport.scala
#	src/main/scala/edu/ie3/simona/agent/grid/ReceivedValuesStore.scala
#	src/main/scala/edu/ie3/simona/ontology/messages/PowerMessage.scala
#	src/main/scala/edu/ie3/simona/ontology/messages/VoltageMessage.scala
#	src/main/scala/edu/ie3/simona/sim/SimonaSim.scala
#	src/main/scala/edu/ie3/simona/sim/setup/SetupHelper.scala
#	src/main/scala/edu/ie3/simona/sim/setup/SimonaSetup.scala
#	src/main/scala/edu/ie3/simona/sim/setup/SimonaStandaloneSetup.scala
#	src/test/scala/edu/ie3/simona/agent/grid/DBFSAlgorithmCenGridSpec.scala
#	src/test/scala/edu/ie3/simona/agent/grid/DBFSAlgorithmFailedPowerFlowSpec.scala
#	src/test/scala/edu/ie3/simona/agent/grid/DBFSAlgorithmParticipantSpec.scala
#	src/test/scala/edu/ie3/simona/agent/grid/DBFSAlgorithmSupGridSpec.scala
#	src/test/scala/edu/ie3/simona/agent/grid/DBFSMockGridAgents.scala
#	src/test/scala/edu/ie3/simona/agent/grid/GridAgentSetup2WSpec.scala
#	src/test/scala/edu/ie3/simona/agent/grid/GridAgentSetup3WSpec.scala
#	src/test/scala/edu/ie3/simona/agent/grid/PowerFlowSupportSpec.scala
#	src/test/scala/edu/ie3/simona/agent/grid/ReceivedValuesStoreSpec.scala
#	src/test/scala/edu/ie3/simona/sim/SimonaSimFailSpec.scala
#	src/test/scala/edu/ie3/simona/sim/setup/SimonaSetupSpec.scala
  • Loading branch information
sebastian-peter committed Feb 12, 2024
2 parents 04bf42c + 5478b69 commit c490cd3
Show file tree
Hide file tree
Showing 291 changed files with 5,379 additions and 5,375 deletions.
4 changes: 4 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version = 3.7.3
runner.dialect = scala213

rewrite.trailingCommas.style = multiple
2 changes: 1 addition & 1 deletion gradle/scripts/spotless.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spotless {

//sets a license header, removes unused imports and formats conforming to the scala fmt formatter
scala {
scalafmt()
scalafmt().configFile(".scalafmt.conf")
licenseHeader ie3LicHead, "package.*\\n"
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/edu/ie3/simona/actor/ActorUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors}
object ActorUtil {
def stopOnError[M](
ctx: ActorContext[M],
msg: String
msg: String,
): Behavior[M] = {
ctx.log.error(s"$msg. Stopping.")
Behaviors.stopped
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/edu/ie3/simona/agent/EnvironmentRefs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ final case class EnvironmentRefs(
runtimeEventListener: ActorRef,
primaryServiceProxy: ActorRef,
weather: ActorRef,
evDataService: Option[ActorRef]
evDataService: Option[ActorRef],
)
2 changes: 1 addition & 1 deletion src/main/scala/edu/ie3/simona/agent/SimonaAgent.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ trait SimonaAgent[D]
case Event(Status.Failure(ex), _) =>
log.error(
ex,
"Received a failure status message with following exception."
"Received a failure status message with following exception.",
)
self ! PoisonPill
stay()
Expand Down
8 changes: 4 additions & 4 deletions src/main/scala/edu/ie3/simona/agent/ValueStore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import scala.collection.SortedMap
*/
final case class ValueStore[+D](
maxTickSpan: Long,
private val store: SortedMap[Long, D] = SortedMap.empty[Long, D]
private val store: SortedMap[Long, D] = SortedMap.empty[Long, D],
) {

/** Determine the lastly known data tick, if available. Includes the given
Expand Down Expand Up @@ -105,11 +105,11 @@ object ValueStore {
*/
def forVoltage(
maxTickSpan: Long,
initialPerUnit: Dimensionless
initialPerUnit: Dimensionless,
): ValueStore[Dimensionless] =
new ValueStore(
maxTickSpan,
SortedMap(SimonaConstants.FIRST_TICK_IN_SIMULATION -> initialPerUnit)
SortedMap(SimonaConstants.FIRST_TICK_IN_SIMULATION -> initialPerUnit),
)

/** Create a value store for result values. A result value store requires a
Expand Down Expand Up @@ -144,7 +144,7 @@ object ValueStore {
def updateValueStore[D](
valueStore: ValueStore[D],
tick: Long,
newEntry: D
newEntry: D,
): ValueStore[D] = {
val updatedStore = valueStore.store ++ SortedMap(tick -> newEntry)

Expand Down
Loading

0 comments on commit c490cd3

Please sign in to comment.