Skip to content

Commit

Permalink
Merge branch 'sp/#339-em-it' into all/#tbw
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-peter committed Oct 15, 2022
2 parents 75a79df + 90bf19f commit 4db4596
Show file tree
Hide file tree
Showing 114 changed files with 9,948 additions and 2,125 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
#
# These are explicitly windows files and should use crlf
*.bat text eol=crlf

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,9 @@ deploy.properties

# Ignore Gradle build output directory
build

# Remove unwanted input directories
input/ext_sim
input/market_price
input/mobilitySimulator/*
!input/mobilitySimulator/poi
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add troubleshooting section to Users guide [#160](https://github.com/ie3-institute/simona/issues/160)
- Added Kafka sink for results [#24](https://github.com/ie3-institute/simona/issues/24)
- Added Kafka sink for runtime events, re-implemented RuntimeEventListener in akka typed [#242](https://github.com/ie3-institute/simona/issues/242)
- Added listeners to DBFS tests to check the result output and check the handling of failed power flows [#269](https://github.com/ie3-institute/simona/issues/269)
- Added capability of SystemParticipants to handle flexibility requests regarding self-optimization [#308](https://github.com/ie3-institute/simona/issues/308)
- Implementation of Energy Management Agents [#204](https://github.com/ie3-institute/simona/issues/204)

Expand Down Expand Up @@ -47,6 +48,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Renaming sub-package directories [#141](https://github.com/ie3-institute/simona/issues/141)
- Updated authors in AUTHORS.md [#301](https://github.com/ie3-institute/simona/issues/301)
- Added faster data structures to SimScheduler [#282](https://github.com/ie3-institute/simona/issues/282)
- Adaption of abbreviations in PVModel and adjacent classes to naming convention [#326](https://github.com/ie3-institute/simona/issues/326)
- Fixed Latex equations [#264](https://github.com/ie3-institute/simona/issues/264)
- Documentation of the simulation configuration [#334](https://github.com/ie3-institute/simona/issues/334)

### Fixed
- Location of `vn_simona` test grid (was partially in Berlin and Dortmund) [#72](https://github.com/ie3-institute/simona/issues/72)
Expand All @@ -65,6 +69,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Await and send responses for distinct pairs of sender reference and target node
- Removed deprecations from `CsvGridSource` and added `TestGridFactory` [#304](https://github.com/ie3-institute/simona/issues/304)
- Fixed config of vn_146_lv_small [#290](https://github.com/ie3-institute/simona/issues/290)
- Adapted to changes of EvcsInput in PSDM [#377](https://github.com/ie3-institute/simona/pull/377)

### Removed
- Remove workaround for tscfg tmp directory [#178](https://github.com/ie3-institute/simona/issues/178)
Expand Down
18 changes: 10 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
id 'com.diffplug.spotless' version '6.11.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.42.0'
id "de.undercouch.download" version "5.2.0" // downloads plugin
id "de.undercouch.download" version "5.2.1" // downloads plugin
id "kr.motd.sphinx" version "2.10.1" // documentation generation
id "com.github.johnrengelman.shadow" version "7.1.2" // fat jar
id "org.sonarqube" version "3.4.0.2513" // sonarqube
Expand All @@ -28,10 +28,10 @@ ext {
scalaBinaryVersion = '2.13.8'
akkaVersion = '2.6.20'
jtsVersion = '1.19.0'
tscfgVersion = '1.0.0'
scapegoatVersion = '1.4.15'
tscfgVersion = '1.0.2'
scapegoatVersion = '1.4.17'

testContainerVersion = '0.40.10'
testContainerVersion = '0.40.11'

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

repositories {
mavenCentral() // searches in Sonatype's central repository
maven { url 'https://www.jitpack.io' } // allows github repos as dependencies
maven { url 'https://jitpack.io' } // allows github repos as dependencies
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } // sonatype snapshot repo
maven { url "https://packages.confluent.io/maven" } // confluent repo (kafka)
}
Expand Down Expand Up @@ -98,15 +98,17 @@ dependencies {
exclude group: 'edu.ie3'
}

implementation 'org.scala-lang.modules:scala-parallel-collections_2.13:1.0.4'

/* logging */
implementation "com.typesafe.scala-logging:scala-logging_${scalaVersion}:3.9.5" // akka scala logging
implementation "ch.qos.logback:logback-classic:1.4.1"
implementation "ch.qos.logback:logback-classic:1.4.4"

/* testing */
testImplementation 'org.spockframework:spock-core:2.2-groovy-4.0'
testImplementation 'org.spockframework:spock-core:2.3-groovy-4.0'
testImplementation 'org.scalatestplus:mockito-3-4_2.13:3.2.10.0'
implementation 'org.mockito:mockito-core:4.8.0' // mocking framework
testImplementation "org.scalatest:scalatest_${scalaVersion}:3.2.13"
testImplementation "org.scalatest:scalatest_${scalaVersion}:3.2.14"
testRuntimeOnly 'com.vladsch.flexmark:flexmark-all:0.64.0' //scalatest html output
testImplementation group: 'org.pegdown', name: 'pegdown', version: '1.6.0'
testImplementation "com.typesafe.akka:akka-testkit_${scalaVersion}:${akkaVersion}" // akka testkit
Expand Down
4 changes: 3 additions & 1 deletion docs/readthedocs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
'sphinxcontrib.plantuml',
'sphinx.ext.intersphinx',
'hoverxref.extension',
'sphinxcontrib.bibtex',
'sphinxcontrib.bibtex'
]

myst_enable_extensions = ["dollarmath", "amsmath"]

templates_path = ['_templates']
exclude_trees = ['.build']
source_suffix = ['.rst', '.md']
Expand Down
230 changes: 230 additions & 0 deletions docs/readthedocs/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
(config)=

# Configuration

To configure a SIMONA simulation, several parameters must be specified. Each simulation is performed within a reference system for a given runtime and is based on a power flow calculation using the Newton-Raphson algorithm. Individual steps for configuring the simulation are performed below.

## Configuration Parameters

### General simulation parameters
To create the output directory name, the name of the simulation is used as a string variable

`simona.simulationName = "vn_simona"`

### Time parameters
Starting date and time of the simulation
- Format: "YYYY-MM-DD HH:MM:SS"

`simona.time.startDateTime = "2011-01-01 00:00:00"`

Ending date and time of the simulation
- Format: "YYYY-MM-DD HH:MM:SS"

`simona.time.endDateTime = "2011-01-01 02:00:00"`

The preset ReadyCheckWindow should be maintained

`simona.time.schedulerReadyCheckWindow = 900`

If the simulation is to be ended in case of a failed power flow, set:

`simona.time.stopOnFailedPowerFlow = true`

If the simulation is to skip a failed power flow and continue to run, set:

`simona.time.stopOnFailedPowerFlow = false`

### Input parameters
Setting of the data source

`simona.input.grid.datasource.id = "csv"`

Specify the folder path containing the csv data of the grid components and the csv separator (e.g. "," or ";")

```
simona.input.primary.csvParams = {
directoryPath: "input/samples/vn_simona/fullGrid"
csvSep: ","
isHierarchic: false
}
```

Insert weather data source via:
```
simona.input.weather.datasource = {
scheme = "icon"
sampleParams.use = true
coordinateSource.sampleParams.use = true
}
```

- Schemes of weather data
- [icon](https://www.dwd.de/EN/research/weatherforecasting/num_modelling/01_num_weather_prediction_modells/icon_description.html)
- [cosmo](https://www.dwd.de/EN/research/weatherforecasting/num_modelling/01_num_weather_prediction_modells/regional_model_cosmo_de.html;jsessionid=57BC71602B46DDF067666F57C1889B5E.live11042?nn=484268)
- Use of sample values

`sampleParams.use = true`

`coordinateSource.sampleParams.use = true`

- The sample values should only be used to test the functionality. The performance of a reasonable simulation with sensitive results should be based on real weather data.
- Supported weather data sources are: influxdb1x, csv, sql, couchbase, sample

### Output parameters

Specify the output directory

`simona.output.base.dir = "output/vn_simona"`

A timestamp can be added to the output data through:

`simona.output.base.addTimestampToOutputDir = true`

Specification of the result type:

In order for the output to be processed as a file, the data sink must be specified accordingly by "sink.datatype" between prefix and suffix.

```
simona.output.sink.csv {
fileFormat = ".csv"
filePrefix = ""
fileSuffix = ""
}
```

#### Output configuration of the grid

The grid output configuration defines for which grid components simulation values are to be output.

```
simona.output.grid = {
notifier = "grid"
nodes = false
lines = false
switches = false
transformers2w = false
transformers3w = false
}
```

#### Output configuration of system participants

To use the default configuration the default notifier has to be used. By setting "simulationResult" to true, the participant is enabled to return its results.

```
simona.output.participant.defaultConfig = {
notifier = "default"
powerRequestReply = false
simulationResult = true
}
```

The default configuration applies to all models except the ones with individual configurations assigned.
If individual configurations have to be performed for certain system participants, these must be listed with the corresponding notifier as in the following example.

```
simona.output.participant.individualConfigs = [
{
notifier = "pv"
powerRequestReply = false
simulationResult = true
},
{
notifier = "wec"
powerRequestReply = false
simulationResult = true
},
{
notifier = "evcs"
powerRequestReply = false
simulationResult = true
}
]
```

## Runtime configuration

Specification of the runtime of subgrids and voltage levels:

`simona.runtime.selected_subgrids = []`

`simona.runtime.selected_volt_lvls = []`

The participant runtime can be either based on default configuration or individual configurations can be assigned.

```
simona.runtime.participant.load = {
defaultConfig = {
calculateMissingReactivePowerWithModel = false
uuids = ["default"]
scaling = 1.0
modelBehaviour = "fix"
reference = "power"
}
individualConfigs = []
}
```

The reactive power is determined based on the chosen Q-control of the participant, when:

calculateMissingReactivePowerWithModel = true

Using the default configuration the universally unique identifier can be set to "default".

uuids = ["default"]

Choosing the scaling factor of the power output:

scaling = 1.0

The model behaviour specifies which type of load model is used. The load model can equal a fixed set point ("fix"), a predefined profile ("profile") or a randomly created profile ("random").

modelBehaviour = "fix"

The load reference can scale the load model behaviour to reach the given annual energy consumption ("energyConsumption") or the foreseen active power ("power").

reference = "power"

If an individual configuration is to be assigned, the default configuration parameters must be adjusted accordingly.
Runtime configurations of other system participants are done similarly, except that model behavior and reference are not defined.

## Event configuration

Tba:

`simona.event.listener = []`

## Grid configuration

The reference system can be configured as follows:

```
simona.gridConfig.refSystems = [
{sNom = "100 kVA", vNom = "0.4 kV", voltLvls = [{id = "NS", vNom = "0.4 kV"}]},
{sNom = "60 MVA", vNom = "20 kV", voltLvls = [{id = "MS", vNom = "20 kV"}]},
{sNom = "600 MVA", vNom = "110 kV", voltLvls = [{id = "HS", vNom = "110 kV"}]},
{sNom = "1000 MVA", vNom = "380 kV", voltLvls = [{id = "HoeS", vNom = "380 kV"}]}
]
```

The reference system contains a list of voltage levels. Each element includes the nominal apparent power, the nominal voltage and the separate configuration of each voltage level. The voltage level configuration is composed of the identifier and the nominal voltage.

Further typical voltage levels which can be used in the simulation and the configuration of individual reference systems are described in the documentation of [reference system](models/reference_system).

## Power flow configuration

Maximum allowed deviation in power between two sweeps, before overall convergence is assumed:

`simona.powerflow.maxSweepPowerDeviation = 1E-5 `

Maximum deviation as convergence criterion for the power flow calculation:

`simona.powerflow.newtonraphson.epsilon = [1E-12]`

Secondary convergence criterion for the power flow calculation is the number of iterations:

`simona.powerflow.newtonraphson.iterations = 50`

Resolution of the power flow calculation:

`simona.powerflow.resolution = "3600s"`
32 changes: 2 additions & 30 deletions docs/readthedocs/developersguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,11 @@ The SIMONA repository on github [is here](https://github.com/ie3-institute/simon

The convention for merging into the developer branch is that it needs to pass all tests and at least two other active SIMONA developers need to review your changes before merging. Please do this by creating a pull request from any new feature branches into dev. We also encourage you to create pull requests early in your development cycle which gives others an opportunity to observe and/or provide feedback in real time. When you are ready for a review, invite one or more through the pull request.

Please use the following naming convention for feature branches, “<initials-or-username</#<issue-number<-<descriptive-feature-branch-name<”. E.g.: ab/#issue123-update-docs

Please use the following naming convention for feature branches, “<initials-or-username</#<issue-number<-<descriptive-feature-branch-name<”. E.g.: ab/#issue123-update-docs

## Models

This page gives an overview of the available models in *SIMONA*.

### Grid Related Models

```{eval-rst}
.. toctree::
:maxdepth: 1
models/line_model
models/switch_model
models/two_winding_transformer_model
models/three_winding_transformer_model
```

### System Participant Related Models

```{eval-rst}
.. toctree::
:maxdepth: 1
models/bm_model
models/chp_model
models/cts_model
models/evcs_model
models/load_model
models/pv_model
models/wec_model
```
[This page](models) gives an overview of the available models in SIMONA.

## Protocols

Expand Down
2 changes: 2 additions & 0 deletions docs/readthedocs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Institute of Energy Systems, Energy Efficiency and Energy Economics at TU Dortmu

about
usersguide
config
models
developersguide
references

Expand Down
Loading

0 comments on commit 4db4596

Please sign in to comment.