Skip to content

Commit

Permalink
Merge branch 'dev' into ck/#76-participantsDieOnFailedRegistration
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
sebastian-peter committed Jan 25, 2022
2 parents ebb3a5d + c5566e9 commit 5a4ddf6
Show file tree
Hide file tree
Showing 8 changed files with 283 additions and 282 deletions.
3 changes: 2 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ updates:
- dependency-name: org.spockframework:spock-core
versions:
- 2.1-groovy-3.0-SNAPSHOT
- 2.1-groovy-2.5-SNAPSHOT
- dependency-name: org.scalatest:scalatest_2.13
versions:
- 3.3.0-SNAP+
- dependency-name: org.scalatestplus:mockito-3-4_2.13
versions:
- 3.3.0.0-SNAP3
- 3.3.0.0-SNAP+
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improving code readability in EvcsAgent by moving FreeLotsRequest to separate methods

### Fixed
- Location of `vn_simona` test grid (was partially in Berlin and Dortmund)
- Let `ParticipantAgent` die after failed registration with secondary services (prevents stuck simulation)

[Unreleased]: https://github.com/ie3-institute/simona
[Unreleased]: https://github.com/ie3-institute/simona/compare/a14a093239f58fca9b2b974712686b33e5e5f939...HEAD
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id 'signing'
id 'maven-publish' // publish to a maven repo (local or mvn central, has to be defined)
id 'pmd' // code check, working on source code
id 'com.diffplug.spotless' version '6.1.2'// code format
id 'com.diffplug.spotless' version '6.2.0'// code format
id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar
id "com.github.ben-manes.versions" version '0.41.0'
id "de.undercouch.download" version "4.1.2" // downloads plugin
Expand All @@ -27,7 +27,7 @@ ext {
scalaVersion = '2.13'
scalaBinaryVersion = '2.13.7'
akkaVersion = '2.6.18'
tscfgVersion = '0.9.996'
tscfgVersion = '0.9.997'

scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator // location of script plugins
}
Expand Down Expand Up @@ -93,7 +93,7 @@ dependencies {

/* testing */
testImplementation 'org.spockframework:spock-core:2.1-M2-groovy-3.0'
testImplementation 'org.scalatestplus:mockito-3-4_2.13:3.2.9.0'
testImplementation 'org.scalatestplus:mockito-3-4_2.13:3.2.10.0'
implementation 'org.mockito:mockito-core:4.2.0' // mocking framework
testImplementation "org.scalatest:scalatest_${scalaVersion}:3.2.10"
testRuntimeClasspath 'com.vladsch.flexmark:flexmark-all:0.62.2'
Expand All @@ -108,7 +108,7 @@ dependencies {
implementation "com.typesafe.akka:akka-actor_${scalaVersion}:${akkaVersion}"
implementation "com.typesafe.akka:akka-slf4j_${scalaVersion}:${akkaVersion}"
implementation "com.typesafe.akka:akka-cluster_${scalaVersion}:${akkaVersion}"
implementation "com.lightbend.akka:akka-stream-alpakka-csv_${scalaVersion}:1.1.2"
implementation "com.lightbend.akka:akka-stream-alpakka-csv_${scalaVersion}:3.0.4"
implementation "com.typesafe.akka:akka-actor_${scalaVersion}:${akkaVersion}"
implementation "com.typesafe.akka:akka-cluster-sharding_${scalaVersion}:${akkaVersion}"
implementation "com.typesafe.akka:akka-cluster-tools_${scalaVersion}:${akkaVersion}"
Expand All @@ -125,11 +125,11 @@ dependencies {
implementation 'org.locationtech.jts.io:jts-io-common:1.18.2'

/* Scala compiler plugin for static code analysis */
implementation "com.sksamuel.scapegoat:scalac-scapegoat-plugin_${scalaBinaryVersion}:1.4.11"
implementation "com.sksamuel.scapegoat:scalac-scapegoat-plugin_${scalaBinaryVersion}:1.4.12"
scalaCompilerPlugin "com.sksamuel.scapegoat:scalac-scapegoat-plugin_${scalaBinaryVersion}:1.4.11"

implementation 'org.apache.commons:commons-math3:3.6.1' // apache commons math3
implementation 'org.apache.poi:poi-ooxml:5.1.0' // used for FilenameUtils
implementation 'org.apache.poi:poi-ooxml:5.2.0' // used for FilenameUtils
implementation 'javax.measure:unit-api:2.1.3'
implementation 'tech.units:indriya:2.1.2' // quantities
implementation 'org.apache.commons:commons-csv:1.9.0'
Expand Down
320 changes: 160 additions & 160 deletions input/samples/vn_simona/fullGrid/line_input.csv

Large diffs are not rendered by default.

208 changes: 104 additions & 104 deletions input/samples/vn_simona/fullGrid/node_input.csv

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/main/scala/edu/ie3/simona/api/ExtMessageUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ object ExtMessageUtils {
) {
def toSimona(triggerId: Long, triggerActor: ActorRef): CompletionMessage = {
val newTriggers =
Option.when(!extCompl.getNewTriggers.isEmpty) {
extCompl.getNewTriggers.asScala.map { tick =>
Option.when(!extCompl.newTriggers.isEmpty) {
extCompl.newTriggers.asScala.map { tick =>
ScheduleTriggerMessage(ActivityStartTrigger(tick), triggerActor)
}.toSeq
}
Expand Down
3 changes: 1 addition & 2 deletions src/main/scala/edu/ie3/simona/sim/setup/ExtSimLoader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ object ExtSimLoader extends LazyLogging {
name.substring(name.lastIndexOf('.') + 1).toLowerCase
)
}
.toIterable
}

def loadExtLink(myJar: File): ExtLinkInterface = {
Expand All @@ -59,7 +58,7 @@ object ExtSimLoader extends LazyLogging {
this.getClass.getClassLoader
)
val classToLoad = Class.forName(extLinkClassPath, true, classLoader)
classToLoad.newInstance match {
classToLoad.getDeclaredConstructor().newInstance() match {
case extSim: ExtLinkInterface =>
extSim
case other =>
Expand Down
12 changes: 6 additions & 6 deletions src/test/scala/edu/ie3/simona/api/ExtSimAdapterSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ class ExtSimAdapterSpec
)

awaitCond(
!extData.receiveTriggerQueue.isEmpty,
!extData.receiveMessageQueue.isEmpty,
max = 3.seconds,
message = "No message received"
)
extData.receiveTriggerQueue.size() shouldBe 1
extData.receiveTriggerQueue.take() shouldBe new ExtActivityStartTrigger(
extData.receiveMessageQueue.size() shouldBe 1
extData.receiveMessageQueue.take() shouldBe new ExtActivityStartTrigger(
INIT_SIM_TICK
)
scheduler.expectNoMessage()
Expand Down Expand Up @@ -195,12 +195,12 @@ class ExtSimAdapterSpec
)

awaitCond(
!extData.receiveTriggerQueue.isEmpty,
!extData.receiveMessageQueue.isEmpty,
max = 3.seconds,
message = "No message received"
)
extData.receiveTriggerQueue.size() shouldBe 1
extData.receiveTriggerQueue.take()
extData.receiveMessageQueue.size() shouldBe 1
extData.receiveMessageQueue.take()
scheduler.expectNoMessage()

extSimAdapter ! new ScheduleDataServiceMessage(
Expand Down

0 comments on commit 5a4ddf6

Please sign in to comment.