Skip to content

Commit c9fc47d

Browse files
committed
Merge branch 'dev' into ms/#795-remove-support-for-old-csv-format
# Conflicts: # CHANGELOG.md # src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java # src/test/resources/edu/ie3/datamodel/io/source/csv/_joint_grid/line_input.csv
2 parents 8755730 + 9f95a66 commit c9fc47d

File tree

260 files changed

+5669
-5152
lines changed

Some content is hidden

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

260 files changed

+5669
-5152
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- Implementing missing typical methods in `Try` [#970](https://github.com/ie3-institute/PowerSystemDataModel/issues/970)
1212
- Added log warning when using `SwitchInputs` with `parallelDevices` parameter [#840](https://github.com/ie3-institute/PowerSystemDataModel/issues/840)
1313
- Validation for `EvcsInput` [#1000](https://github.com/ie3-institute/PowerSystemDataModel/issues/1000)
14+
- Scaling method in system participant copy builders [#1011](https://github.com/ie3-institute/PowerSystemDataModel/issues/1011)
15+
- Added separate field for maximum power limit for DC to evtype [#876](https://github.com/ie3-institute/PowerSystemDataModel/issues/876)
16+
- Added test for invalid input data in `CsvRawGridSource` [#1021](https://github.com/ie3-institute/PowerSystemDataModel/issues/1021)
1417

1518
### Fixed
1619
- Fixed Couchbase integration tests that randomly failed [#755](https://github.com/ie3-institute/PowerSystemDataModel/issues/755)
@@ -19,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1922
- Fixed thermal-house-documentation [#873](https://github.com/ie3-institute/PowerSystemDataModel/issues/873)
2023
- Fixed ElectricVehicle Documentation [#875](https://github.com/ie3-institute/PowerSystemDataModel/issues/875)
2124
- Fixed Equal behavior of `ConnectorResult` [#1001](https://github.com/ie3-institute/PowerSystemDataModel/issues/1001)
25+
- Fixed test for invalid input data in `CsvGraphicSource` [#1022](https://github.com/ie3-institute/PowerSystemDataModel/issues/1022)
2226

2327
### Changed
2428
- Changing from comparing strings to comparing uuids in `EntitySource.findFirstEntityByUuid` [#829](https://github.com/ie3-institute/PowerSystemDataModel/issues/829)
@@ -33,6 +37,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3337
- Refactored and abstracted `EntitySource`s and `EntityData` creation [#969](https://github.com/ie3-institute/PowerSystemDataModel/issues/969)
3438
- Updated contributing.md [#737](https://github.com/ie3-institute/PowerSystemDataModel/issues/737)
3539
- Don't throw exceptions for not yet implemented validations [#879](https://github.com/ie3-institute/PowerSystemDataModel/issues/879)
40+
- `CsvDataSource` throws exceptions on error [#954](https://github.com/ie3-institute/PowerSystemDataModel/issues/954)
41+
- Removing `uuid` as required column from input and result time series [#826](https://github.com/ie3-institute/PowerSystemDataModel/issues/826)
3642
- Removing the support for the old csv format that was marked `deprecated` back in version `1.1.0` [#795](https://github.com/ie3-institute/PowerSystemDataModel/issues/795)
3743

3844
## [4.1.0] - 2023-11-02

build.gradle

Lines changed: 7 additions & 7 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
}
@@ -73,7 +73,7 @@ dependencies {
7373
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/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
@@ -58,7 +58,7 @@ You may extend / alter the naming with pre- or suffix by calling `new EntityPers
5858
Let's spend a few more words on the individual time series:
5959
Those files are meant to carry different types of content - one might give information about wholesale market prices,
6060
the other is a record of power values provided by a real system.
61-
To be able to understand, what's inside of the file, the *columnScheme* part of the file name gives insight of it's
61+
To be able to understand, what's inside of the file, the *columnScheme* part of the file name gives insight of its
6262
content.
6363
The following keys are supported until now:
6464

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ If you found something, please contact us!
7777

7878
## Load Profiles
7979

80-
The {code}`LoadProfile` is an interface, that forces it's implementing classes to have a {code}`String` *key*
80+
The {code}`LoadProfile` is an interface, that forces its implementing classes to have a {code}`String` *key*
8181
and being able to parse a {code}`String` to a {code}`LoadProfile`.
8282
Its only purpose is to give note, which load profile has to be used by the simulation.
8383
The actual profile has to be provided by the simulation itself.

docs/readthedocs/models/models.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,26 @@ We designed the models in a way, that does not allow for adaptions of the repres
1818
objects.
1919
Thereby you can be sure, that your models are *thread-safe* and no unwanted or unobserved changes are made.
2020

21-
**Copyable** <br>
21+
**Clonability** <br>
2222
With the general design principle of immutability, entity modifications (e.g. updates of field values) can become
2323
hard and annoying. To avoid generating methods to update each field value, we provide an adapted version of the
2424
[Builder pattern](https://en.wikipedia.org/wiki/Builder_pattern/) to make entity modifications as easy as possible.
25-
Each entity holds it's own copy builder class, which follows the same inheritance as the entity class itself. With a
26-
call of `.copy()` on an entity instance a builder instance is returned, that allows for modification of fields and
27-
can be terminated with `.build()` which will return an instance of the entity with modified field values as required.
28-
For the moment, this pattern is only implemented for a small amount of `AssetInput` entities (all entities held by a
29-
`GridContainer` except thermal units to be precise), but we plan to extend this capability to all input entities in the
30-
future.
25+
Each entity holds its own copy builder class, which follows the same inheritance as the entity class itself. With a
26+
call of `.copy()` on an entity instance a builder instance is returned, which allows for modification of fields and
27+
can be terminated with `.build()`. This will return an instance of the entity with modified field values as indicated.
28+
For the moment, this pattern is only implemented for a limited set of entities, but we plan to extend this capability
29+
to all input entities in the future.
30+
31+
**Scaling entity properties** <br>
32+
Using the copy builders (as described above) we provide a convenience method that helps with scaling system
33+
participants and respective type inputs. Scaling entities tries to preserve proportions that are related to power.
34+
This means that capacity, consumption etc. are scaled with the same factor as power.
3135

3236
**Single Point of Truth** <br>
3337
Throughout all models you can be sure, that no information is given twice, reducing the possibility to have ambiguous
3438
information in your simulation set up.
3539
"Missing" information can be received through the grids relational information - e.g. if you intend to model a wind
36-
energy converter in detail, you may find information of it's geographical location in the model of it's common
40+
energy converter in detail, you may find information of its geographical location in the model of its common
3741
coupling point ([node](/models/input/grid/node)).
3842

3943
**Harmonized Units System** <br>

docs/readthedocs/models/result/grid/connector.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ Representation of all kinds of connectors.
1616
- Unit
1717
- Remarks
1818
19-
* - uuid
20-
- --
21-
- uuid for the result entity
22-
2319
* - time
2420
- ZonedDateTime
2521
- date and time for the produced result

docs/readthedocs/models/result/grid/line.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ Representation of an AC line.
1616
- Unit
1717
- Remarks
1818
19-
* - uuid
20-
- --
21-
- uuid for the result entity
22-
2319
* - time
2420
- ZonedDateTime
2521
- date and time for the produced result

docs/readthedocs/models/result/grid/node.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ Representation of an electrical node, with no further distinction into bus bar,
1616
- Unit
1717
- Remarks
1818
19-
* - uuid
20-
- --
21-
- uuid for the result entity
22-
2319
* - time
2420
- ZonedDateTime
2521
- date and time for the produced result

0 commit comments

Comments
 (0)