Skip to content

Commit

Permalink
Merge branch 'dev' into sp/#350-ResultEventListener-missing-messages
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfeismann authored Feb 1, 2023
2 parents 580b208 + 5b3a09f commit 9915332
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
id 'pmd' // code check, working on source code
id 'com.diffplug.spotless' version '6.14.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.44.0'
id "com.github.ben-manes.versions" version '0.45.0'
id "de.undercouch.download" version "5.3.0" // downloads plugin
id "kr.motd.sphinx" version "2.10.1" // documentation generation
id "com.github.johnrengelman.shadow" version "7.1.2" // fat jar
Expand Down Expand Up @@ -85,7 +85,7 @@ dependencies {
/* Exclude our own nested dependencies */
exclude group: 'com.github.ie3-institute'
}
implementation('com.github.ie3-institute:powerflow:0.1') {
implementation('com.github.ie3-institute:powerflow:0.2') {
exclude group: 'org.apache.logging.log4j'
exclude group: 'org.slf4j'
/* Exclude our own nested dependencies */
Expand Down Expand Up @@ -156,7 +156,7 @@ dependencies {
implementation 'javax.measure:unit-api:2.1.3'
implementation 'tech.units:indriya:2.1.4' // quantities
implementation 'org.apache.commons:commons-csv:1.9.0'
implementation 'org.scalanlp:breeze_2.13:1.3' // scientific calculations (http://www.scalanlp.org/)
implementation 'org.scalanlp:breeze_2.13:2.1.0' // scientific calculations (http://www.scalanlp.org/)
implementation 'de.lmu.ifi.dbs.elki:elki:0.7.5' // Statistics (for random load model)
implementation 'org.jgrapht:jgrapht-core:1.5.1'
}
Expand Down
Binary file modified docs/readthedocs/images/usersguide/copy-path.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/readthedocs/images/usersguide/edit-conf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/readthedocs/images/usersguide/edit-conf2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/readthedocs/usersguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You can either delegate the job to your preferred IDE or build an executable jar
In order to be able to execute SIMONA from a CLI, you need an executable fat jar. A fat jar contains all compiled classes and dependencies, ready for execution. For building one, you can use a Gradle task of the project.

1. Open a CLI and change directories to the top level directory of the project.
2. Execute ``./gradlew shadowJar`` within the CLI. This creates a fat jar of SIMONA inside of the directory ``build/libs``.
2. Execute ``gradlew shadowJar`` within the CLI. This creates a fat jar of SIMONA inside of the directory ``build/libs``.
3. For executing a fat jar you need to specify the classpath of the entrypoint of your application. Assuming we are still in the top level directory of our project, the execution command would look as follows:


Expand Down Expand Up @@ -67,7 +67,7 @@ Let's pretend you want to start a simulation with the default ``vn_simona`` conf

When you want to start a simulation run from the command line interface you have to pass the directory of the config file as a command-line argument. That would look as follows:

java -cp build/libs/simona-2.1-all.jar edu.ie3.simona.main.RunSimonaStandalone --config=input/samples/vn_simona/vn_simona.conf
java -cp build/libs/simona-2.1.0-all.jar edu.ie3.simona.main.RunSimonaStandalone --config=input/samples/vn_simona/vn_simona.conf


#### Using IntelliJ IDEA
Expand Down Expand Up @@ -178,7 +178,7 @@ The external simulation is loaded via class loader. Thus, SIMONA and the externa

These steps have to be performed each time updates to the external simulation need to be deployed.

- Execute ``./gradlew shadowJar`` inside the external simulation project.
- Execute ``gradlew shadowJar`` inside the external simulation project.
- Copy the resulting *jar* (usually placed inside ``<external project>/build/libs``) to ``./input/ext_sim/``.

Now, when a simulation with SIMONA is started (see [above](#running-a-standalone-simulation), the external simulation is triggered at each tick that it requested.
Expand Down
6 changes: 2 additions & 4 deletions src/main/scala/edu/ie3/simona/agent/grid/DBFSAlgorithm.scala
Original file line number Diff line number Diff line change
Expand Up @@ -856,8 +856,7 @@ trait DBFSAlgorithm extends PowerFlowSupport with GridResultsSupport {
val allowedDeviation =
gridAgentBaseData.powerFlowParams.maxSweepPowerDeviation

(previousSweepNodePower - currentSweepNodePower)
.toScalaVector()
(previousSweepNodePower - currentSweepNodePower).toScalaVector
.find(complex => {
Math.abs(complex.real) >= allowedDeviation |
Math.abs(complex.imag) >= allowedDeviation
Expand All @@ -876,8 +875,7 @@ trait DBFSAlgorithm extends PowerFlowSupport with GridResultsSupport {

log.debug(
"Final deviation: {}",
(previousSweepNodePower - currentSweepNodePower)
.toScalaVector()
(previousSweepNodePower - currentSweepNodePower).toScalaVector
)

// go back to SimulateGrid and trigger a finish
Expand Down

0 comments on commit 9915332

Please sign in to comment.