Skip to content

Commit 964d0c4

Browse files
Merge branch 'dev' into pp/#825-enhance-documentation-for-csv-timeseries
# Conflicts: # CHANGELOG.md
2 parents ec6c4bf + db6f516 commit 964d0c4

File tree

391 files changed

+8572
-7341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

391 files changed

+8572
-7341
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,4 +242,9 @@ docs/readthedocs/_build
242242
**/*.synctex.gz
243243
**/*.synctex(busy)
244244

245-
docs/javadoc
245+
### Metals ###
246+
.metals/
247+
.bloop/
248+
project/**/metals.sbt
249+
250+
docs/javadoc

build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ext {
1818
javaVersion = JavaVersion.VERSION_17
1919
groovyVersion = "4.0"
2020
groovyBinaryVersion = "4.0.18"
21-
testcontainersVersion = '1.19.4'
21+
testcontainersVersion = '1.19.6'
2222

2323
scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins
2424
}
@@ -53,7 +53,7 @@ repositories {
5353
dependencies {
5454

5555
// ie³ power system utils
56-
implementation 'com.github.ie3-institute:PowerSystemUtils:2.0'
56+
implementation 'com.github.ie3-institute:PowerSystemUtils:2.2'
5757

5858
implementation 'tech.units:indriya:2.2'
5959

@@ -70,10 +70,10 @@ dependencies {
7070
// testing
7171
testImplementation "org.apache.groovy:groovy:$groovyBinaryVersion"
7272

73-
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
73+
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
7474
testImplementation "org.spockframework:spock-core:2.3-groovy-$groovyVersion"
7575
testImplementation 'org.objenesis:objenesis:3.3' // Mock creation with constructor parameters
76-
testImplementation 'net.bytebuddy:byte-buddy:1.14.11' // Mocks of classes
76+
testImplementation 'net.bytebuddy:byte-buddy:1.14.12' // Mocks of classes
7777

7878
// testcontainers (docker framework for testing)
7979
testImplementation "org.testcontainers:testcontainers:$testcontainersVersion"
@@ -83,19 +83,19 @@ dependencies {
8383
testImplementation "org.testcontainers:couchbase:$testcontainersVersion"
8484

8585
// logging
86-
implementation platform('org.apache.logging.log4j:log4j-bom:2.22.1')
86+
implementation platform('org.apache.logging.log4j:log4j-bom:2.23.0')
8787
implementation 'org.apache.logging.log4j:log4j-api' // log4j
8888
implementation 'org.apache.logging.log4j:log4j-core' // log4j
8989
implementation 'org.apache.logging.log4j:log4j-slf4j-impl' // log4j -> slf4j
9090

9191
// Databases
9292
implementation 'org.influxdb:influxdb-java:2.24'
93-
implementation 'com.couchbase.client:java-client:3.5.2'
94-
runtimeOnly 'org.postgresql:postgresql:42.7.1' // postgresql jdbc driver required during runtime
93+
implementation 'com.couchbase.client:java-client:3.5.3'
94+
runtimeOnly 'org.postgresql:postgresql:42.7.2' // postgresql jdbc driver required during runtime
9595

9696
implementation 'commons-io:commons-io:2.15.1' // I/O functionalities
97-
implementation 'org.apache.commons:commons-compress:1.25.0' // I/O functionalities
98-
implementation 'org.apache.commons:commons-lang3:3.14.0'
97+
implementation 'commons-codec:commons-codec:1.16.1' // needed by commons-compress
98+
implementation 'org.apache.commons:commons-compress:1.26.0' // I/O functionalities
9999
}
100100

101101
tasks.withType(JavaCompile) {

docs/readthedocs/gettingstarted.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Getting started
2-
32
Welcome, dear fellow of bottom up power system modelling!
43
This section is meant to give you some help getting hands on our project.
54
If you feel, something is missing, please contact us!
@@ -45,3 +44,32 @@ and add the dependency:
4544
<version>3.0-SNAPSHOT</version>
4645
</dependency>
4746
```
47+
48+
## Important changes
49+
50+
With the release of `PowerSystemDataModel` version `5.0` the support for the old csv file format will be fully removed.
51+
It was already marked as `deprecated` back in version `1.1.0`. For those who are still using a model in the old csv format
52+
the following guide will provide a fast and easy way to convert old format into the new one.
53+
54+
- Since the support is removed in version `5.0`, the `PowerSystemDataModel` version `3.x` or `4.x` must be
55+
used to read the old format. The `PSDM` will automatically write the output model in the new csv format.
56+
57+
58+
``` java
59+
/* Parameterization */
60+
String gridName = "gridWithOldFormat";
61+
String csvSep = ",";
62+
Path folderPath = Path.of("PATH_TO_THE_FOLDER");
63+
boolean isHierarchic = false;
64+
Path output = Path.of("PATH_OF_THE_OUTPUT_FOLDER");
65+
FileNamingStrategy namingStrategy = new FileNamingStrategy();
66+
67+
/* Reading the old format */
68+
JointGridContainer container = CsvJointGridContainerSource.read(gridName, csvSep, folderPath, isHierarchic);
69+
70+
/* Writing in the new format */
71+
CsvFileSink sink = new CsvFileSink(output, namingStrategy, csvSep);
72+
sink.persistJointGrid(container);
73+
```
74+
75+

docs/readthedocs/io/ValidationUtils.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,31 @@
22
This page gives an overview about the ValidationUtils in the *PowerSystemDataModel*.
33

44
## What are the ValidationUtils?
5-
The methods in ValidationUtils and subclasses can be used to check that objects are valid, meaning their parameters have valid values and they are correctly connected.
5+
The methods in ValidationUtils and subclasses can be used to check that objects are valid. The checks can be separated into two types:
6+
1. General validation
7+
2. Uniqueness validation
8+
69

710
## What is checked?
8-
- The check methods include checks that assigned values are valid, e.g. lines are not allowed to have negative lengths or the rated power factor of any unit must be between 0 and 1.
9-
- Furthermore, several connections are checked, e.g. that lines only connect nodes of the same voltage level or that the voltage levels indicated for the transformer sides match the voltage levels of the nodes they are connected to.
11+
The general validation checks:
12+
- if assigned values are valid, e.g. lines are not allowed to have negative lengths or the rated power factor of any unit must be between 0 and 1
13+
- furthermore, several connections are checked, e.g. that lines only connect nodes of the same voltage level or that the voltage levels indicated for the transformer sides match the voltage levels of the nodes they are connected to.
14+
15+
The uniqueness validation checks if a collection of given objects are unique in either:
16+
- a specific field
17+
- or in a combination of multiple fields
18+
19+
For example `AssetInputs` needs to be unique in their `uuid` and in their `id` while
20+
`weather values` needs to be unique in the combination of their `time` and their `coordinate`.
21+
22+
23+
## How to use?
24+
- To use the general validation the user should call the method `ValidationUtils.check(Object)`.
25+
- To use the uniqueness validation the user should call a method of `UniquenessValidationUtils` to check the uniqueness.
26+
27+
## How does the general validation work?
1028

11-
## How does it work?
12-
- The method `ValidationUtils.check(Object)` is the only method that should be called by the user.
13-
- This check method identifies the object class and forwards it to a specific check method for the given object
29+
- The method `ValidationUtils.check(Object)` identifies the object class and forwards it to a specific check method for the given object
1430
- The overall structure of the ValidationUtils methods follows a cascading scheme, orientated along the class tree
1531
- Example: A `LineInput lineInput` should be checked
1632
1. `ValidationUtils.check(lineInput)` is called
@@ -49,15 +65,14 @@ The ValidationUtils include validation checks for...
4965
- PvInput
5066
- StorageInput
5167
- WecInput
52-
- (missing: EvcsInput)
68+
- EvcsInput (also checks ChargingPointType)
5369
- SystemParticipantTypeInput
5470
- BmTypeInput
5571
- ChpTypeInput
5672
- EvTypeInput
5773
- HpTypeInput
5874
- StorageTypeInput
5975
- WecTypeInput
60-
- (missing: EvcsTypeInput/ChargingPointType)
6176
- ThermalUnitValidationUtils
6277
- ThermalUnitInput
6378
- ThermalSinkInput

docs/readthedocs/io/csvfiles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ You may extend / alter the naming with pre- or suffix by calling `new EntityPers
9999
Let's spend a few more words on the individual time series:
100100
Those files are meant to carry different types of content - one might give information about wholesale market prices,
101101
the other is a record of power values provided by a real system.
102-
To be able to understand, what's inside of the file, the *columnScheme* part of the file name gives insight of it's
102+
To be able to understand, what's inside of the file, the *columnScheme* part of the file name gives insight of its
103103
content.
104104

105105
For example, you have an IndividualTimeSeries CSV file for energy prices, then you use the key `c` from the table below
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
(em_model)=
2+
3+
# Energy Management Unit
4+
5+
A model of an Energy Management Unit that controls the power of connected system participants.
6+
Participants are connected to an EM each via their `em` field.
7+
8+
## Attributes, Units and Remarks
9+
10+
```{eval-rst}
11+
.. list-table::
12+
:widths: 33 33 33
13+
:header-rows: 0
14+
15+
16+
* - Attribute
17+
- Unit
18+
- Remarks
19+
20+
* - uuid
21+
- --
22+
-
23+
24+
* - id
25+
- --
26+
- Human readable identifier
27+
28+
* - operator
29+
- --
30+
-
31+
32+
* - operationTime
33+
- --
34+
- Timely restriction of operation
35+
36+
* - controlStrategy
37+
- --
38+
- String representation (e.g. name) of a control strategy
39+
40+
* - parentEm
41+
- --
42+
- | Reference to a superior Energy Management Unit that is controlling this EM.
43+
| Field can be empty or missing, if this EM itself is not controlled.
44+
45+
```
46+
47+
## Caveats
48+
49+
Nothing - at least not known.
50+
If you found something, please contact us!

docs/readthedocs/models/input/participant/bm.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ Model of a biomass power plant.
107107
- € / MWh
108108
- Fixed feed in tariff
109109
110+
* - em
111+
- --
112+
- | UUID reference to an :ref:`Energy Management Unit<em_model>` that is controlling
113+
| this system participant. Field can be empty or missing, if this participant
114+
| is not controlled.
115+
110116
```
111117

112118
## Caveats

docs/readthedocs/models/input/participant/chp.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ Combined heat and power plant.
114114
- | Whether to adapt output based on (volatile)
115115
| market price or not
116116
117+
* - em
118+
- --
119+
- | UUID reference to an :ref:`Energy Management Unit<em_model>` that is controlling
120+
| this system participant. Field can be empty or missing, if this participant
121+
| is not controlled.
122+
117123
```
118124

119125
## Caveats

docs/readthedocs/models/input/participant/ev.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Model of an electric vehicle, that is occasionally connected to the grid via an
2020
2121
* - uuid
2222
- --
23-
-
23+
-
2424
2525
* - id
2626
- --
@@ -45,12 +45,16 @@ Model of an electric vehicle, that is occasionally connected to the grid via an
4545
4646
* - sRated
4747
- kVA
48-
- Rated apparent power
48+
- Rated apparent power for AC
49+
50+
* - sRatedDC
51+
- kW
52+
- power for DC
4953
5054
* - cosPhiRated
5155
- --
5256
- Rated power factor
53-
57+
5458
```
5559

5660
### Entity Model
@@ -67,27 +71,37 @@ Model of an electric vehicle, that is occasionally connected to the grid via an
6771
6872
* - uuid
6973
- --
70-
-
74+
-
7175
7276
* - id
7377
- --
7478
- Human readable identifier
7579
7680
* - operator
7781
- --
78-
-
82+
-
7983
8084
* - operationTime
8185
- --
8286
- Timely restriction of operation
8387
8488
* - node
8589
- --
86-
-
90+
-
91+
92+
* - qCharacteristics
93+
- --
94+
- :ref:`Reactive power characteristic<participant-general-q-characteristic>` to follow
8795
8896
* - type
8997
- --
90-
-
98+
-
99+
100+
* - em
101+
- --
102+
- | UUID reference to an :ref:`Energy Management Unit<em_model>` that is controlling
103+
| this system participant. Field can be empty or missing, if this participant
104+
| is not controlled.
91105
92106
```
93107

docs/readthedocs/models/input/participant/evcs.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ station and has some limitations outlined below.
5959
- --
6060
- :ref:`Charging station location types<location-types>`
6161
62+
* - em
63+
- --
64+
- | UUID reference to an :ref:`Energy Management Unit<em_model>` that is controlling
65+
| this system participant. Field can be empty or missing, if this participant
66+
| is not controlled.
67+
6268
```
6369

6470
### Type Model

0 commit comments

Comments
 (0)