diff --git a/CHANGELOG.md b/CHANGELOG.md index 403720557..39c59fd23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] ### Added +- Enhance `TimeSeriesSource` with method to retrieve all time keys after a given key [#543](https://github.com/ie3-institute/PowerSystemDataModel/issues/543) +- Enhance `WeatherSource` with method to retrieve all time keys after a given key [#572](https://github.com/ie3-institute/PowerSystemDataModel/issues/572) ### Fixed ### Changed - Storage minimum level parameter removed from cylindrical thermal storage [#1123](https://github.com/ie3-institute/PowerSystemDataModel/issues/1123) +- Converted eval-rst to myst syntax in ReadTheDocs, fixed line wrapping and widths[#1137](https://github.com/ie3-institute/PowerSystemDataModel/issues/1137) ## [5.1.0] - 2024-06-24 diff --git a/build.gradle b/build.gradle index 9fd15dd45..a2a4bb6de 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'signing' id 'pmd' // code check, working on source code id 'com.diffplug.spotless' version '6.25.0' //code format - id 'com.github.spotbugs' version '6.0.20' // code check, working on byte code + id 'com.github.spotbugs' version '6.0.22' // code check, working on byte code id 'de.undercouch.download' version '5.6.0' id 'kr.motd.sphinx' version '2.10.1' // documentation generation id 'jacoco' // java code coverage plugin @@ -17,7 +17,7 @@ ext { //version (changing these should be considered thoroughly!) javaVersion = JavaVersion.VERSION_17 groovyVersion = "4.0" - groovyBinaryVersion = "4.0.22" + groovyBinaryVersion = "4.0.23" testcontainersVersion = '1.20.1' scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins @@ -58,11 +58,11 @@ dependencies { implementation 'tech.units:indriya:2.2' // JTS Topology Suite for GeoPositions, License: EPL 1.0 / EDL 1.0 - implementation ('org.locationtech.jts:jts-core:1.19.0'){ + implementation ('org.locationtech.jts:jts-core:1.20.0'){ exclude group: 'junit', module: 'junit' } - implementation 'org.locationtech.jts.io:jts-io-common:1.19.0' + implementation 'org.locationtech.jts.io:jts-io-common:1.20.0' // Graphs implementation 'org.jgrapht:jgrapht-core:1.5.2' @@ -73,7 +73,7 @@ dependencies { testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0' testImplementation "org.spockframework:spock-core:2.3-groovy-$groovyVersion" testImplementation 'org.objenesis:objenesis:3.4' // Mock creation with constructor parameters - testImplementation 'net.bytebuddy:byte-buddy:1.14.18' // Mocks of classes + testImplementation 'net.bytebuddy:byte-buddy:1.15.1' // Mocks of classes // testcontainers (docker framework for testing) testImplementation "org.testcontainers:testcontainers:$testcontainersVersion" @@ -83,7 +83,7 @@ dependencies { testImplementation "org.testcontainers:couchbase:$testcontainersVersion" // logging - implementation platform('org.apache.logging.log4j:log4j-bom:2.23.1') + implementation platform('org.apache.logging.log4j:log4j-bom:2.24.0') implementation 'org.apache.logging.log4j:log4j-api' // log4j implementation 'org.apache.logging.log4j:log4j-core' // log4j implementation 'org.apache.logging.log4j:log4j-slf4j-impl' // log4j -> slf4j @@ -91,11 +91,11 @@ dependencies { // Databases implementation 'org.influxdb:influxdb-java:2.24' implementation 'com.couchbase.client:java-client:3.7.2' - runtimeOnly 'org.postgresql:postgresql:42.7.3' // postgresql jdbc driver required during runtime + runtimeOnly 'org.postgresql:postgresql:42.7.4' // postgresql jdbc driver required during runtime implementation 'commons-io:commons-io:2.16.1' // I/O functionalities implementation 'commons-codec:commons-codec:1.17.1' // needed by commons-compress - implementation 'org.apache.commons:commons-compress:1.27.0' // I/O functionalities + implementation 'org.apache.commons:commons-compress:1.27.1' // I/O functionalities } tasks.withType(JavaCompile) { diff --git a/docs/readthedocs/_static/css/theme_override.css b/docs/readthedocs/_static/css/theme_override.css index 914a12811..47be427c3 100644 --- a/docs/readthedocs/_static/css/theme_override.css +++ b/docs/readthedocs/_static/css/theme_override.css @@ -10,4 +10,8 @@ } .wy-table-responsive table th p { margin-bottom: 0; -} \ No newline at end of file +} + +table.wrapping td { + white-space: normal; +} diff --git a/docs/readthedocs/io/csvfiles.md b/docs/readthedocs/io/csvfiles.md index 54a6b7369..afeb737d8 100644 --- a/docs/readthedocs/io/csvfiles.md +++ b/docs/readthedocs/io/csvfiles.md @@ -24,61 +24,59 @@ You may extend / alter the naming with pre- or suffix by calling `new EntityPers ### Input -```{eval-rst} -.. list-table:: - :widths: auto +```{list-table} :header-rows: 1 + :widths: auto - * - Model - - File Name - * - operator - - *prefix_* operator_input *_suffix* - * - node - - *prefix_* node_input *_suffix* - * - line - - | *prefix_* line_input *_suffix* - | *prefix_* line_type_input *_suffix* - * - switch - - *prefix_* switch_input *_suffix* - * - two winding transformer - - | *prefix_* transformer2w_input *_suffix* - | *prefix_* transformer2w_type_input *_suffix* - * - three winding transformer - - | *prefix_* transformer3w_input *_suffix* - | *prefix_* transformer3w_type_input *_suffix* - * - measurement unit - - *prefix_* measurement_unit_input *_suffix* - * - biomass plant - - | *prefix_* bm_input *_suffix* - | *prefix_* bm_type_input *_suffix* - * - combined heat and power plant - - | *prefix_* chp_input *_suffix* - | *prefix_* chp_type_input *_suffix* - * - electric vehicle - - | *prefix_* ev_input *_suffix* - | *prefix_* ev_type_input *_suffix* - * - electric vehicle charging station - - *prefix_* evcs_input *_suffix* - * - fixed feed in facility - - *prefix_* fixed_feed_in_input *_suffix* - * - heat pump - - | *prefix_* hp_input *_suffix* - | *prefix_* hp_type_input *_suffix* - * - load - - *prefix_* load_input *_suffix* - * - photovoltaic power plant - - *prefix_* pv_input *_suffix* - * - electrical energy storage - - | *prefix_* storage_input *_suffix* - | *prefix_* storage_type_input *_suffix* - * - wind energy converter - - | *prefix_* wec_input *_suffix* - | *prefix_* wec_type_input *_suffix* - * - schematic node graphic - - *prefix_* node_graphic_input *_suffix* - * - schematic line graphic - - *prefix_* line_graphic_input *_suffix* - +* - Model + - File Name +* - operator + - *prefix_* operator_input *_suffix* +* - node + - *prefix_* node_input *_suffix* +* - line + - *prefix_* line_input *_suffix* + *prefix_* line_type_input *_suffix* +* - switch + - *prefix_* switch_input *_suffix* +* - two winding transformer + - *prefix_* transformer2w_input *_suffix* + *prefix_* transformer2w_type_input *_suffix* +* - three winding transformer + - *prefix_* transformer3w_input *_suffix* + *prefix_* transformer3w_type_input *_suffix* +* - measurement unit + - *prefix_* measurement_unit_input *_suffix* +* - biomass plant + - *prefix_* bm_input *_suffix* + *prefix_* bm_type_input *_suffix* +* - combined heat and power plant + - *prefix_* chp_input *_suffix* + *prefix_* chp_type_input *_suffix* +* - electric vehicle + - *prefix_* ev_input *_suffix* + *prefix_* ev_type_input *_suffix* +* - electric vehicle charging station + - *prefix_* evcs_input *_suffix* +* - fixed feed in facility + - *prefix_* fixed_feed_in_input *_suffix* +* - heat pump + - *prefix_* hp_input *_suffix* + *prefix_* hp_type_input *_suffix* +* - load + - *prefix_* load_input *_suffix* +* - photovoltaic power plant + - *prefix_* pv_input *_suffix* +* - electrical energy storage + - *prefix_* storage_input *_suffix* + *prefix_* storage_type_input *_suffix* +* - wind energy converter + - *prefix_* wec_input *_suffix* + *prefix_* wec_type_input *_suffix* +* - schematic node graphic + - *prefix_* node_graphic_input *_suffix* +* - schematic line graphic + - *prefix_* line_graphic_input *_suffix* ``` ### Id Coordinate @@ -89,8 +87,7 @@ Csv id coordinate sources can have two different ways to represent their coordin ### Time Series -```{eval-rst} -.. list-table:: +```{list-table} :widths: 50 50 :header-rows: 1 @@ -123,41 +120,39 @@ You can also use the Method `java.util.UUID#randomUUID` to create a UUID. This is the UUID from the example above `2fcb3e53-b94a-4b96-bea4-c469e499f1a1`. The following keys are supported until now: -```{eval-rst} -.. list-table:: +```{list-table} :widths: auto :header-rows: 1 * - Key - Information and supported head line * - c - - | An energy price (e.g. in €/MWh; c stands for charge). - | Permissible head line: ``time,price`` + - An energy price (e.g. in €/MWh; c stands for charge). + Permissible head line: ``time,price`` * - p - - | Active power - | Permissible head line: ``time,p`` + - Active power + Permissible head line: ``time,p`` * - pq - - | Active and reactive power - | Permissible head line: ``time,p,q`` + - Active and reactive power + Permissible head line: ``time,p,q`` * - h - - | Heat power demand - | Permissible head line: ``time,h`` + - Heat power demand + Permissible head line: ``time,h`` * - ph - - | Active and heat power - | Permissible head line: ``time,p,h`` + - Active and heat power + Permissible head line: ``time,p,h`` * - pqh - - | Active, reactive and heat power - | Permissible head line: ``time,p,q,h`` + - Active, reactive and heat power + Permissible head line: ``time,p,q,h`` * - weather - - | Weather information - | Permissible head line: ``time,coordinate,direct_irradiation,diffuse_irradiation,temperature,wind_velocity,wind_direction`` + - Weather information + Permissible head line: ``time,coordinate,direct_irradiation,diffuse_irradiation,temperature,wind_velocity,wind_direction`` ``` ### Results -```{eval-rst} -.. list-table:: +```{list-table} :widths: auto :header-rows: 1 diff --git a/docs/readthedocs/models/input/additionaldata/idcoordinatesource.md b/docs/readthedocs/models/input/additionaldata/idcoordinatesource.md index 4196d0736..b8f356cb2 100644 --- a/docs/readthedocs/models/input/additionaldata/idcoordinatesource.md +++ b/docs/readthedocs/models/input/additionaldata/idcoordinatesource.md @@ -7,9 +7,9 @@ coordinates. ## Information -```{eval-rst} -.. list-table:: - :widths: 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 * - Attribute diff --git a/docs/readthedocs/models/input/additionaldata/timeseries.md b/docs/readthedocs/models/input/additionaldata/timeseries.md index d486f78ca..a082ba2fb 100644 --- a/docs/readthedocs/models/input/additionaldata/timeseries.md +++ b/docs/readthedocs/models/input/additionaldata/timeseries.md @@ -17,9 +17,9 @@ In addition to actual data, a mapping function has to be known. To be as flexible, as possible, the actual content of the time series is given as children of the `Value` class. The following different values are available: -```{eval-rst} -.. list-table:: - :widths: 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 * - Value Class diff --git a/docs/readthedocs/models/input/em.md b/docs/readthedocs/models/input/em.md index 5f9c698c6..cbb562109 100644 --- a/docs/readthedocs/models/input/em.md +++ b/docs/readthedocs/models/input/em.md @@ -7,10 +7,10 @@ Participants are connected to an EM each via their `em` field. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto :header-rows: 1 + :class: wrapping * - Attribute @@ -18,29 +18,29 @@ Participants are connected to an EM each via their `em` field. - Remarks * - uuid - - -- - - + - + - * - id - - -- + - - Human readable identifier * - operator - - -- - - + - + - * - operationTime - - -- + - - Timely restriction of operation * - controlStrategy - - -- + - - String representation (e.g. name) of a control strategy * - parentEm - - -- - - | Reference to a superior Energy Management Unit that is controlling this EM. - | Field can be empty or missing, if this EM itself is not controlled. + - + - Reference to a superior Energy Management Unit that is controlling this EM. + Field can be empty or missing, if this EM itself is not controlled. ``` diff --git a/docs/readthedocs/models/input/grid/gridcontainer.md b/docs/readthedocs/models/input/grid/gridcontainer.md index 85cad16a9..24f8e66c4 100644 --- a/docs/readthedocs/models/input/grid/gridcontainer.md +++ b/docs/readthedocs/models/input/grid/gridcontainer.md @@ -37,9 +37,9 @@ A synoptic overview of both classes' attributes is given here: ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 diff --git a/docs/readthedocs/models/input/grid/line.md b/docs/readthedocs/models/input/grid/line.md index 1f0ebebee..814427d0d 100644 --- a/docs/readthedocs/models/input/grid/line.md +++ b/docs/readthedocs/models/input/grid/line.md @@ -6,9 +6,9 @@ Representation of an AC line. ### Type Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 * - Attribute @@ -53,9 +53,9 @@ A list with some standard line types can be found here: [Standard Line Types](#s ### Entity Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -89,9 +89,9 @@ A list with some standard line types can be found here: [Standard Line Types](#s * - parallelDevices - – - - | overall amount of parallel lines to automatically construct - | (e.g. parallelDevices = 2 will build a total of two lines - | using the specified parameters) + - overall amount of parallel lines to automatically construct + (e.g. parallelDevices = 2 will build a total of two lines + using the specified parameters) * - type - – @@ -108,9 +108,9 @@ A list with some standard line types can be found here: [Standard Line Types](#s * - olmCharacteristic - – - - | Characteristic of possible overhead line monitoring Can be - | given in the form of ``olm:{}``. The pairs - | are wind velocity in x and permissible loading in y. + - Characteristic of possible overhead line monitoring Can be + given in the form of ``olm:{}``. The pairs + are wind velocity in x and permissible loading in y. ``` @@ -126,9 +126,9 @@ The lines which source is ``simBench`` are from [here](https://simbench.de/en/do Some standard overhead lines. -```{eval-rst} -.. list-table:: - :widths: 11 11 11 11 11 11 11 11 11 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -309,9 +309,9 @@ Some standard overhead lines. Some standard cables. -```{eval-rst} -.. list-table:: - :widths: 11 11 11 11 11 11 11 11 11 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 diff --git a/docs/readthedocs/models/input/grid/linegraphic.md b/docs/readthedocs/models/input/grid/linegraphic.md index f23fa1b16..e8f30c102 100644 --- a/docs/readthedocs/models/input/grid/linegraphic.md +++ b/docs/readthedocs/models/input/grid/linegraphic.md @@ -6,9 +6,9 @@ Schematic drawing information for a line model. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -17,20 +17,20 @@ Schematic drawing information for a line model. - Remarks * - uuid - - -- + - - * - graphicLayer - - -- - - | Human readable identifier of the graphic layer to draw - | this element on + - + - Human readable identifier of the graphic layer to draw + this element on * - path - - -- + - - Line string of coordinates describing the drawing * - line - - -- + - - Reference to the physical line model ``` diff --git a/docs/readthedocs/models/input/grid/measurementunit.md b/docs/readthedocs/models/input/grid/measurementunit.md index aa5a58195..69aea3086 100644 --- a/docs/readthedocs/models/input/grid/measurementunit.md +++ b/docs/readthedocs/models/input/grid/measurementunit.md @@ -8,9 +8,9 @@ The measured information are indicated by boolean fields. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -19,39 +19,39 @@ The measured information are indicated by boolean fields. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - node - - -- + - - * - vMag - - -- + - - Voltage magnitude measurements are available * - vAng - - -- + - - Voltage angle measurements are available * - p - - -- + - - Active power measurements are available * - q - - -- + - - Reactive power measurements are available ``` diff --git a/docs/readthedocs/models/input/grid/node.md b/docs/readthedocs/models/input/grid/node.md index d409c3141..a70cd3363 100644 --- a/docs/readthedocs/models/input/grid/node.md +++ b/docs/readthedocs/models/input/grid/node.md @@ -6,9 +6,9 @@ Representation of an electrical node, with no further distinction into bus bar, ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -17,19 +17,19 @@ Representation of an electrical node, with no further distinction into bus bar, - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - vTarget @@ -37,20 +37,20 @@ Representation of an electrical node, with no further distinction into bus bar, - Target voltage magnitude to be used by voltage regulation entities * - slack - - -- - - | Boolean indicator, if this nodes serves as a slack node in power - | flow calculation + - + - Boolean indicator, if this nodes serves as a slack node in power + flow calculation * - geoPosition - - -- + - - Geographical location * - voltLvl - - -- + - - Information of the voltage level (id and nominal voltage) * - subnet - - -- + - - Sub grid number ``` diff --git a/docs/readthedocs/models/input/grid/nodegraphic.md b/docs/readthedocs/models/input/grid/nodegraphic.md index 07a55a948..4420c198c 100644 --- a/docs/readthedocs/models/input/grid/nodegraphic.md +++ b/docs/readthedocs/models/input/grid/nodegraphic.md @@ -6,9 +6,9 @@ Schematic drawing information for a node model. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -17,24 +17,24 @@ Schematic drawing information for a node model. - Remarks * - uuid - - -- + - - * - graphicLayer - - -- - - | Human readable identifier of the graphic layer to draw - | this element on + - + - Human readable identifier of the graphic layer to draw + this element on * - path - - -- + - - Line string of coordinates describing the drawing, e.g. for bus bars * - point - - -- + - - Alternative to line string, only drawing a point coordinate * - node - - -- + - - Reference to the physical node model ``` diff --git a/docs/readthedocs/models/input/grid/switch.md b/docs/readthedocs/models/input/grid/switch.md index 6a4ae4db1..33534401a 100644 --- a/docs/readthedocs/models/input/grid/switch.md +++ b/docs/readthedocs/models/input/grid/switch.md @@ -6,9 +6,9 @@ Model of an ideal switch connecting two node models of the same voltage level ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -17,31 +17,31 @@ Model of an ideal switch connecting two node models of the same voltage level - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - nodeA - - -- + - - * - nodeB - - -- + - - * - closed - - -- + - - true, if the switch is closed diff --git a/docs/readthedocs/models/input/grid/transformer2w.md b/docs/readthedocs/models/input/grid/transformer2w.md index 32be9b754..056969933 100644 --- a/docs/readthedocs/models/input/grid/transformer2w.md +++ b/docs/readthedocs/models/input/grid/transformer2w.md @@ -10,9 +10,9 @@ It is assumed, that node A is the node with higher voltage. All impedances and admittances are given with respect to the higher voltage side. As obvious, the parameter can be used in T- as in 𝜋-equivalent circuit representations. -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 * - Attribute @@ -82,9 +82,9 @@ A list with some standard transformer types can be found here: [Standard Two Win ### Entity Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 * - Attribute @@ -117,9 +117,9 @@ A list with some standard transformer types can be found here: [Standard Two Win * - parallelDevices - – - - | overall amount of parallel transformers to automatically - | construct (e.g. parallelDevices = 2 will build a total of - | two transformers using the specified parameters) + - overall amount of parallel transformers to automatically + construct (e.g. parallelDevices = 2 will build a total of + two transformers using the specified parameters) * - type - – @@ -142,9 +142,9 @@ below can be found [here](https://github.com/ie3-institute/PowerSystemDataModel/ file can be used directly for any simulation with ``simona``. The transformers which source is ``simBench`` are from [here](https://simbench.de/en/download/datasets/). -```{eval-rst} -.. list-table:: - :widths: 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 * - uuid diff --git a/docs/readthedocs/models/input/grid/transformer3w.md b/docs/readthedocs/models/input/grid/transformer3w.md index ec2c21b3f..652706df5 100644 --- a/docs/readthedocs/models/input/grid/transformer3w.md +++ b/docs/readthedocs/models/input/grid/transformer3w.md @@ -22,9 +22,9 @@ name: Equivalent circuit diagram of a three winding transformer All impedances and admittances are given with respect to the higher voltage side. -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -120,9 +120,9 @@ All impedances and admittances are given with respect to the higher voltage side ### Entity Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -131,49 +131,49 @@ All impedances and admittances are given with respect to the higher voltage side - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - nodeA - - -- + - - Higher voltage node * - nodeB - - -- + - - Intermediate voltage node * - nodeC - - -- + - - Lowest voltage node * - parallelDevices - - -- - - | overall amount of parallel transformers to automatically - | construct (e.g. parallelDevices = 2 will build a - | total of two transformers using the specified parameters) + - + - overall amount of parallel transformers to automatically + construct (e.g. parallelDevices = 2 will build a + total of two transformers using the specified parameters) * - type - - -- + - - * - tapPos - - -- + - - Current position of the tap changer * - autoTap - - -- + - - true, if there is a tap regulation apparent and active ``` diff --git a/docs/readthedocs/models/input/operator.md b/docs/readthedocs/models/input/operator.md index 30d29374c..1674de745 100644 --- a/docs/readthedocs/models/input/operator.md +++ b/docs/readthedocs/models/input/operator.md @@ -7,9 +7,9 @@ having control over one or more physical entitites. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -18,11 +18,11 @@ having control over one or more physical entitites. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier ``` diff --git a/docs/readthedocs/models/input/participant/bm.md b/docs/readthedocs/models/input/participant/bm.md index 913c0f5a5..f75407f12 100644 --- a/docs/readthedocs/models/input/participant/bm.md +++ b/docs/readthedocs/models/input/participant/bm.md @@ -8,9 +8,9 @@ Model of a biomass power plant. ### Type Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -19,11 +19,11 @@ Model of a biomass power plant. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - capex @@ -32,8 +32,8 @@ Model of a biomass power plant. * - opex - € / MWh - - | Operational expenditure to operate one entity of - | this type + - Operational expenditure to operate one entity of + this type * - activePowerGradient - % / h @@ -44,7 +44,7 @@ Model of a biomass power plant. - Rated apparent power * - cosPhiRated - - -- + - - Rated power factor * - etaConv @@ -55,9 +55,9 @@ Model of a biomass power plant. ### Entity Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -66,52 +66,52 @@ Model of a biomass power plant. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - node - - -- + - - * - qCharacteristics - - -- - - :ref:`Reactive power characteristic` to follow + - + - [Reactive power characteristic](#participant-general-q-characteristic) to follow * - type - - -- + - - * - marketReaction - - -- - - | Whether to adapt output based on (volatile) - | market price or not + - + - Whether to adapt output based on (volatile) + market price or not * - costControlled - - -- - - | Whether to adapt output based on the difference - | between production costs and fixed feed in tariff or not + - + - Whether to adapt output based on the difference + between production costs and fixed feed in tariff or not * - feedInTariff - € / MWh - Fixed feed in tariff * - em - - -- - - | UUID reference to an :ref:`Energy Management Unit` that is controlling - | this system participant. Field can be empty or missing, if this participant - | is not controlled. + - + - UUID reference to an [Energy Management Unit](#em_model) that is controlling + this system participant. Field can be empty or missing, if this participant + is not controlled. ``` diff --git a/docs/readthedocs/models/input/participant/chp.md b/docs/readthedocs/models/input/participant/chp.md index b9012a02a..9be96519d 100644 --- a/docs/readthedocs/models/input/participant/chp.md +++ b/docs/readthedocs/models/input/participant/chp.md @@ -8,9 +8,9 @@ Combined heat and power plant. ### Type Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -19,11 +19,11 @@ Combined heat and power plant. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - capex @@ -32,8 +32,8 @@ Combined heat and power plant. * - opex - € / MWh - - | Operational expenditure to operate one entity of - | this type + - Operational expenditure to operate one entity of + this type * - etaEl - % @@ -48,7 +48,7 @@ Combined heat and power plant. - Rated apparent power * - cosPhiRated - - -- + - - Rated power factor * - pThermal @@ -63,9 +63,9 @@ Combined heat and power plant. ### Entity Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -74,51 +74,51 @@ Combined heat and power plant. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - node - - -- + - - * - thermalBus - - -- + - - Connection point to the thermal system * - qCharacteristics - - -- - - :ref:`Reactive power characteristic` to follow + - + - [Reactive power characteristic](#participant-general-q-characteristic) to follow * - type - - -- + - - * - thermalStorage - - -- + - - Reference to thermal storage * - marketReaction - - -- - - | Whether to adapt output based on (volatile) - | market price or not + - + - Whether to adapt output based on (volatile) + market price or not * - em - - -- - - | UUID reference to an :ref:`Energy Management Unit` that is controlling - | this system participant. Field can be empty or missing, if this participant - | is not controlled. + - + - UUID reference to an [Energy Management Unit](em_model) that is controlling + this system participant. Field can be empty or missing, if this participant + is not controlled. ``` diff --git a/docs/readthedocs/models/input/participant/ev.md b/docs/readthedocs/models/input/participant/ev.md index aeee017ab..b9669eed6 100644 --- a/docs/readthedocs/models/input/participant/ev.md +++ b/docs/readthedocs/models/input/participant/ev.md @@ -8,9 +8,9 @@ Model of an electric vehicle, that is occasionally connected to the grid via an ### Type Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -19,11 +19,11 @@ Model of an electric vehicle, that is occasionally connected to the grid via an - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - capex @@ -32,8 +32,8 @@ Model of an electric vehicle, that is occasionally connected to the grid via an * - opex - € / MWh - - | Operational expenditure to operate one entity of - | this type + - Operational expenditure to operate one entity of + this type * - eStorage - kWh @@ -52,16 +52,16 @@ Model of an electric vehicle, that is occasionally connected to the grid via an - power for DC * - cosPhiRated - - -- + - - Rated power factor ``` ### Entity Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -70,38 +70,38 @@ Model of an electric vehicle, that is occasionally connected to the grid via an - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - node - - -- + - - * - qCharacteristics - - -- - - :ref:`Reactive power characteristic` to follow + - + - [Reactive power characteristic](#participant-general-q-characteristic) to follow * - type - - -- + - - * - em - - -- - - | UUID reference to an :ref:`Energy Management Unit` that is controlling - | this system participant. Field can be empty or missing, if this participant - | is not controlled. + - + - UUID reference to an [Energy Management Unit](#em_model) that is controlling + this system participant. Field can be empty or missing, if this participant + is not controlled. ``` diff --git a/docs/readthedocs/models/input/participant/evcs.md b/docs/readthedocs/models/input/participant/evcs.md index f4b836ebe..f3f8585b7 100644 --- a/docs/readthedocs/models/input/participant/evcs.md +++ b/docs/readthedocs/models/input/participant/evcs.md @@ -9,9 +9,9 @@ station and has some limitations outlined below. ### Entity Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -20,50 +20,50 @@ station and has some limitations outlined below. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - node - - -- + - - * - qCharacteristics - - -- - - :ref:`Reactive power characteristic` to follow + - + - [Reactive power characteristic](#participant-general-q-characteristic) to follow * - type - - -- - - :ref:`Charging point type` (valid for all installed points) + - + - [Charging point type](#evcs-point-types) (valid for all installed points) * - chargingPoints - - -- + - - no of installed charging points @ the specific station * - cosPhiRated - - -- + - - Rated power factor * - locationType - - -- - - :ref:`Charging station location types` + - + - [Charging station location types](#location-types) * - em - - -- - - | UUID reference to an :ref:`Energy Management Unit` that is controlling - | this system participant. Field can be empty or missing, if this participant - | is not controlled. + - + - UUID reference to an [Energy Management Unit](#em_model) that is controlling + this system participant. Field can be empty or missing, if this participant + is not controlled. ``` @@ -78,9 +78,9 @@ available standard types and how to use custom types. The actual model definition for charging point types looks as follows: -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -89,7 +89,7 @@ The actual model definition for charging point types looks as follows: - Remarks * - id - - -- + - - Human readable identifier * - sRated @@ -97,11 +97,11 @@ The actual model definition for charging point types looks as follows: - Rated apparent power * - electricCurrentType - - -- + - - Electric current type * - synonymousIds - - -- + - - Set of alternative human readable identifiers ``` @@ -116,9 +116,9 @@ To simplify the application of electric vehicle charging stations, some common s They can either by used code wise or directly from database or file input by referencing their id or one of their synonymous ids. All standard types can be found in {code}`edu.ie3.datamodel.models.input.system.type.chargingpoint.ChargingPointTypeUtils`. -```{eval-rst} -.. list-table:: - :widths: 25 25 25 25 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -220,9 +220,9 @@ be in kVA! Evcs location types describe the type of charging location of a charging station. Parsing of these types is case-insensitive and underscores and minuses are ignored, that means "charginghubtown" is parsed as type {code}`CHARGING_HUB_TOWN`. -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 diff --git a/docs/readthedocs/models/input/participant/fixedfeedin.md b/docs/readthedocs/models/input/participant/fixedfeedin.md index a6348a7ed..c83570a04 100644 --- a/docs/readthedocs/models/input/participant/fixedfeedin.md +++ b/docs/readthedocs/models/input/participant/fixedfeedin.md @@ -7,9 +7,9 @@ model can be derived. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -18,42 +18,42 @@ model can be derived. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - node - - -- + - - * - qCharacteristics - - -- - - :ref:`Reactive power characteristic` to follow + - + - [Reactive power characteristic](#participant-general-q-characteristic) to follow * - sRated - kVA - Rated apparent power * - cosPhiRated - - -- + - - Rated power factor * - em - - -- - - | UUID reference to an :ref:`Energy Management Unit` that is controlling - | this system participant. Field can be empty or missing, if this participant - | is not controlled. + - + - UUID reference to an [Energy Management Unit](#em_model) that is controlling + this system participant. Field can be empty or missing, if this participant + is not controlled. ``` diff --git a/docs/readthedocs/models/input/participant/hp.md b/docs/readthedocs/models/input/participant/hp.md index 08a092992..2559c79c5 100644 --- a/docs/readthedocs/models/input/participant/hp.md +++ b/docs/readthedocs/models/input/participant/hp.md @@ -8,9 +8,9 @@ Model of a heat pump. ### Type Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -19,11 +19,11 @@ Model of a heat pump. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - capex @@ -32,15 +32,15 @@ Model of a heat pump. * - opex - € / MWh - - | Operational expenditure to operate one entity of - | this type + - Operational expenditure to operate one entity of + this type * - sRated - kVA - Rated apparent power * - cosPhiRated - - -- + - - Rated power factor * - pThermal @@ -51,9 +51,9 @@ Model of a heat pump. ### Entity Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -62,42 +62,42 @@ Model of a heat pump. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - node - - -- + - - * - thermalBus - - -- + - - Connection point to the thermal system * - qCharacteristics - - -- - - :ref:`Reactive power characteristic` to follow + - + - [Reactive power characteristic](#participant-general-q-characteristic) to follow * - type - - -- + - - * - em - - -- - - | UUID reference to an :ref:`Energy Management Unit` that is controlling - | this system participant. Field can be empty or missing, if this participant - | is not controlled. + - + - UUID reference to an [Energy Management Unit](#em_model) that is controlling + this system participant. Field can be empty or missing, if this participant + is not controlled. ``` diff --git a/docs/readthedocs/models/input/participant/load.md b/docs/readthedocs/models/input/participant/load.md index a153e8392..782e3c495 100644 --- a/docs/readthedocs/models/input/participant/load.md +++ b/docs/readthedocs/models/input/participant/load.md @@ -6,9 +6,9 @@ Model of (mainly) domestic loads. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -17,35 +17,35 @@ Model of (mainly) domestic loads. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - node - - -- + - - * - qCharacteristics - - -- - - :ref:`Reactive power characteristic` to follow + - + - [Reactive power characteristic](#participant-general-q-characteristic) to follow * - loadProfile - - -- - - :ref:`Load profile` as model behaviour + - + - [Load profile](#load-lp) as model behaviour * - dsm - - -- + - - Whether the load is able to follow demand side management signals * - eConsAnnual @@ -57,14 +57,14 @@ Model of (mainly) domestic loads. - Rated apparent power * - cosPhiRated - - -- + - - Rated power factor * - em - - -- - - | UUID reference to an :ref:`Energy Management Unit` that is controlling - | this system participant. Field can be empty or missing, if this participant - | is not controlled. + - + - UUID reference to an [Energy Management Unit](#em_model) that is controlling + this system participant. Field can be empty or missing, if this participant + is not controlled. ``` diff --git a/docs/readthedocs/models/input/participant/pv.md b/docs/readthedocs/models/input/participant/pv.md index 3e0946fd6..f91f1801b 100644 --- a/docs/readthedocs/models/input/participant/pv.md +++ b/docs/readthedocs/models/input/participant/pv.md @@ -4,9 +4,9 @@ Detailed model of a photovoltaic power plant. -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -15,37 +15,37 @@ Detailed model of a photovoltaic power plant. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - node - - -- + - - * - qCharacteristics - - -- - - :ref:`Reactive power characteristic` to follow + - + - [Reactive power characteristic](#participant-general-q-characteristic) to follow * - albedo - - -- - - `Albedo `_ of the plant's surrounding + - + - [Albedo](https://en.wikipedia.org/wiki/Albedo) of the plant's surrounding * - azimuth - ° - - | Inclination in a compass direction - | South = 0°, West = 90°, East = -90° + - Inclination in a compass direction + South = 0°, West = 90°, East = -90° * - etaConv - % @@ -56,31 +56,31 @@ Detailed model of a photovoltaic power plant. - Tilted inclination from horizontal [0°, 90°] * - kG - - -- + - - Generator correction factor merging technical influences * - kT - - -- + - - Temperature correction factor merging thermal influences * - marketReaction - - -- - - | Whether to adapt output based on (volatile) - | market price or not + - + - Whether to adapt output based on (volatile) + market price or not * - sRated - kVA - Rated apparent power * - cosPhiRated - - -- + - - Rated power factor * - em - - -- - - | UUID reference to an :ref:`Energy Management Unit` that is controlling - | this system participant. Field can be empty or missing, if this participant - | is not controlled. + - + - UUID reference to an [Energy Management Unit](#em_model) that is controlling + this system participant. Field can be empty or missing, if this participant + is not controlled. ``` diff --git a/docs/readthedocs/models/input/participant/storage.md b/docs/readthedocs/models/input/participant/storage.md index 9c3df5d93..51c25f359 100644 --- a/docs/readthedocs/models/input/participant/storage.md +++ b/docs/readthedocs/models/input/participant/storage.md @@ -8,9 +8,9 @@ Model of an ideal electrical battery energy storage. ### Type Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -19,11 +19,11 @@ Model of an ideal electrical battery energy storage. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - capex @@ -32,8 +32,8 @@ Model of an ideal electrical battery energy storage. * - opex - € / MWh - - | Operational expenditure to operate one entity of - | this type + - Operational expenditure to operate one entity of + this type * - eStorage - kWh @@ -44,13 +44,13 @@ Model of an ideal electrical battery energy storage. - Rated apparent power * - cosPhiRated - - -- + - - Rated power factor * - pMax - kW - - | Maximum permissible active power - | infeed or consumption + - Maximum permissible active power + infeed or consumption * - activePowerGradient - % / h @@ -64,9 +64,9 @@ Model of an ideal electrical battery energy storage. ### Entity Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -75,43 +75,43 @@ Model of an ideal electrical battery energy storage. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - node - - -- + - - * - qCharacteristics - - -- - - :ref:`Reactive power characteristic` to follow + - + - [Reactive power characteristic](#participant-general-q-characteristic) to follow * - type - - -- + - - * - behaviour - - -- - - | Foreseen operation strategy of the storage. - | Eligible input: *"market"*, *"grid"*, *"self"* + - + - Foreseen operation strategy of the storage. + Eligible input: *"market"*, *"grid"*, *"self"* * - em - - -- - - | UUID reference to an :ref:`Energy Management Unit` that is controlling - | this system participant. Field can be empty or missing, if this participant - | is not controlled. + - + - UUID reference to an [Energy Management Unit](#em_model) that is controlling + this system participant. Field can be empty or missing, if this participant + is not controlled. ``` diff --git a/docs/readthedocs/models/input/participant/wec.md b/docs/readthedocs/models/input/participant/wec.md index e0330669e..b7d62498c 100644 --- a/docs/readthedocs/models/input/participant/wec.md +++ b/docs/readthedocs/models/input/participant/wec.md @@ -8,9 +8,9 @@ Model of a wind energy converter. ### Type Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -19,11 +19,11 @@ Model of a wind energy converter. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - capex @@ -32,20 +32,20 @@ Model of a wind energy converter. * - opex - € / MWh - - | Operational expenditure to operate one entity of - | this type + - Operational expenditure to operate one entity of + this type * - sRated - kVA - Rated apparent power * - cosPhiRated - - -- + - - Rated power factor * - cpCharacteristic - - -- - - Wind velocity dependent :ref:`Betz factors`. + - + - Wind velocity dependent [Betz factors](#wec-cp-characteristic). * - etaConv - % @@ -63,9 +63,9 @@ Model of a wind energy converter. ### Entity Model -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -74,43 +74,43 @@ Model of a wind energy converter. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - node - - -- + - - * - qCharacteristics - - -- - - :ref:`Reactive power characteristic` to follow + - + - [Reactive power characteristic](#participant-general-q-characteristic) to follow * - type - - -- + - - * - marketReaction - - -- - - | Whether to adapt output based on (volatile) - | market price or not + - + - Whether to adapt output based on (volatile) + market price or not * - em - - -- - - | UUID reference to an :ref:`Energy Management Unit` that is controlling - | this system participant. Field can be empty or missing, if this participant - | is not controlled. + - + - UUID reference to an [Energy Management Unit](#em_model) that is controlling + this system participant. Field can be empty or missing, if this participant + is not controlled. ``` diff --git a/docs/readthedocs/models/input/thermal/cylindricalstorage.md b/docs/readthedocs/models/input/thermal/cylindricalstorage.md index 5790a040e..7ae0994da 100644 --- a/docs/readthedocs/models/input/thermal/cylindricalstorage.md +++ b/docs/readthedocs/models/input/thermal/cylindricalstorage.md @@ -6,9 +6,9 @@ Model of a cylindrical thermal storage using a fluent to store thermal energy. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -17,23 +17,23 @@ Model of a cylindrical thermal storage using a fluent to store thermal energy. - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - thermalBus - - -- + - - Connection point to the thermal system * - storageVolumeLvl diff --git a/docs/readthedocs/models/input/thermal/thermalbus.md b/docs/readthedocs/models/input/thermal/thermalbus.md index acffc8379..12740d858 100644 --- a/docs/readthedocs/models/input/thermal/thermalbus.md +++ b/docs/readthedocs/models/input/thermal/thermalbus.md @@ -7,9 +7,9 @@ A coupling point to thermal system - equivalent to [electrical node](../grid/nod ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -18,23 +18,23 @@ A coupling point to thermal system - equivalent to [electrical node](../grid/nod - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - bus - - -- + - - Connection point to the thermal system ``` diff --git a/docs/readthedocs/models/input/thermal/thermalhouse.md b/docs/readthedocs/models/input/thermal/thermalhouse.md index decd10639..8b0083eb4 100644 --- a/docs/readthedocs/models/input/thermal/thermalhouse.md +++ b/docs/readthedocs/models/input/thermal/thermalhouse.md @@ -7,9 +7,9 @@ This reflects a simple shoe box with transmission losses ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: - :widths: 33 33 33 +```{list-table} + :widths: auto + :class: wrapping :header-rows: 1 @@ -18,23 +18,23 @@ This reflects a simple shoe box with transmission losses - Remarks * - uuid - - -- + - - * - id - - -- + - - Human readable identifier * - bus - - -- + - - Thermal bus, the model is connected to * - operator - - -- + - - * - operationTime - - -- + - - Timely restriction of operation * - ethLosses diff --git a/docs/readthedocs/models/models.md b/docs/readthedocs/models/models.md index f49d958b6..390d650cb 100644 --- a/docs/readthedocs/models/models.md +++ b/docs/readthedocs/models/models.md @@ -210,6 +210,7 @@ result/participant/thermalstorage result/participant/thermalunit result/participant/thermalhouse result/participant/cylindricalstorage +result/participant/domestichotwaterstorage result/participant/systemparticipant result/participant/flexoption result/participant/em diff --git a/docs/readthedocs/models/result/grid/congestion.md b/docs/readthedocs/models/result/grid/congestion.md index f55886613..e0f687fa4 100644 --- a/docs/readthedocs/models/result/grid/congestion.md +++ b/docs/readthedocs/models/result/grid/congestion.md @@ -6,8 +6,7 @@ Representation of a congestion result for a given subnet. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -21,7 +20,7 @@ Representation of a congestion result for a given subnet. - date and time for the produced result * - subgrid - - -- + - - Sub grid number * - vMin @@ -33,15 +32,15 @@ Representation of a congestion result for a given subnet. - maximal voltage of the subnet * - voltage - - -- + - - Boolean indicator, if a voltage congestion occurred * - line - - -- + - - Boolean indicator, if a line congestion occurred * - transformer - - -- + - - Boolean indicator, if a transformer congestion occurred ``` diff --git a/docs/readthedocs/models/result/grid/connector.md b/docs/readthedocs/models/result/grid/connector.md index 19cd58ec3..ff3e65203 100644 --- a/docs/readthedocs/models/result/grid/connector.md +++ b/docs/readthedocs/models/result/grid/connector.md @@ -6,8 +6,7 @@ Representation of all kinds of connectors. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -21,7 +20,7 @@ Representation of all kinds of connectors. - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - iAMag diff --git a/docs/readthedocs/models/result/grid/line.md b/docs/readthedocs/models/result/grid/line.md index e88f323ab..72ca71ce3 100644 --- a/docs/readthedocs/models/result/grid/line.md +++ b/docs/readthedocs/models/result/grid/line.md @@ -6,8 +6,7 @@ Representation of an AC line. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -21,7 +20,7 @@ Representation of an AC line. - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - iAMag diff --git a/docs/readthedocs/models/result/grid/node.md b/docs/readthedocs/models/result/grid/node.md index b65e739d8..8a9578f8c 100644 --- a/docs/readthedocs/models/result/grid/node.md +++ b/docs/readthedocs/models/result/grid/node.md @@ -6,8 +6,7 @@ Representation of an electrical node, with no further distinction into bus bar, ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -21,7 +20,7 @@ Representation of an electrical node, with no further distinction into bus bar, - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - vMag diff --git a/docs/readthedocs/models/result/grid/switch.md b/docs/readthedocs/models/result/grid/switch.md index ae79fb2f0..63b00035c 100644 --- a/docs/readthedocs/models/result/grid/switch.md +++ b/docs/readthedocs/models/result/grid/switch.md @@ -6,8 +6,7 @@ Representation of electrical switches. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -21,7 +20,7 @@ Representation of electrical switches. - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - closed diff --git a/docs/readthedocs/models/result/grid/transformer.md b/docs/readthedocs/models/result/grid/transformer.md index 8f3784a6a..48620f9fe 100644 --- a/docs/readthedocs/models/result/grid/transformer.md +++ b/docs/readthedocs/models/result/grid/transformer.md @@ -6,8 +6,7 @@ Representation of transformers. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -21,7 +20,7 @@ Representation of transformers. - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - iAMag @@ -41,7 +40,7 @@ Representation of transformers. - * - tapPos - - -- + - - ``` diff --git a/docs/readthedocs/models/result/grid/transformer2w.md b/docs/readthedocs/models/result/grid/transformer2w.md index c19550d50..967cc9eaf 100644 --- a/docs/readthedocs/models/result/grid/transformer2w.md +++ b/docs/readthedocs/models/result/grid/transformer2w.md @@ -6,8 +6,7 @@ Representation of two winding transformers. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -21,7 +20,7 @@ Representation of two winding transformers. - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - iAMag @@ -41,7 +40,7 @@ Representation of two winding transformers. - * - tapPos - - -- + - - ``` diff --git a/docs/readthedocs/models/result/grid/transformer3w.md b/docs/readthedocs/models/result/grid/transformer3w.md index 61b27a789..6ba3684d3 100644 --- a/docs/readthedocs/models/result/grid/transformer3w.md +++ b/docs/readthedocs/models/result/grid/transformer3w.md @@ -6,8 +6,7 @@ Representation of three winding transformers. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -21,7 +20,7 @@ Representation of three winding transformers. - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - iAMag @@ -49,7 +48,7 @@ Representation of three winding transformers. - * - tapPos - - -- + - - ``` diff --git a/docs/readthedocs/models/result/participant/bm.md b/docs/readthedocs/models/result/participant/bm.md index b36165809..ec49e84e0 100644 --- a/docs/readthedocs/models/result/participant/bm.md +++ b/docs/readthedocs/models/result/participant/bm.md @@ -6,8 +6,7 @@ Result of a biomass power plant. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of a biomass power plant. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - p diff --git a/docs/readthedocs/models/result/participant/chp.md b/docs/readthedocs/models/result/participant/chp.md index 410ff9e55..69960aa18 100644 --- a/docs/readthedocs/models/result/participant/chp.md +++ b/docs/readthedocs/models/result/participant/chp.md @@ -6,8 +6,7 @@ Result of a combined heat and power plant. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of a combined heat and power plant. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - p diff --git a/docs/readthedocs/models/result/participant/cylindricalstorage.md b/docs/readthedocs/models/result/participant/cylindricalstorage.md index 84784f6a8..b8a83dbf7 100644 --- a/docs/readthedocs/models/result/participant/cylindricalstorage.md +++ b/docs/readthedocs/models/result/participant/cylindricalstorage.md @@ -6,8 +6,7 @@ Result of a cylindrical thermal storage using a fluent to store thermal energy. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of a cylindrical thermal storage using a fluent to store thermal energy. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - energy @@ -33,7 +32,7 @@ Result of a cylindrical thermal storage using a fluent to store thermal energy. - heat demand of the sink * - fillLevel - - -- + - - ``` diff --git a/docs/readthedocs/models/result/participant/domestichotwaterstorage.md b/docs/readthedocs/models/result/participant/domestichotwaterstorage.md new file mode 100644 index 000000000..122841944 --- /dev/null +++ b/docs/readthedocs/models/result/participant/domestichotwaterstorage.md @@ -0,0 +1,44 @@ +(domestichotwaterstorage-result)= + +# Domestic Hot Water Storage + +Result of a domestic hot water storage using a fluent to store thermal energy. + +## Attributes, Units and Remarks + +```{eval-rst} +.. list-table:: + :widths: 33 33 33 + :header-rows: 1 + + + * - Attribute + - Unit + - Remarks + + * - time + - -- + - date and time for the produced result + + * - inputModel + - -- + - uuid for the associated input model + + * - energy + - MWh + - + + * - qDot + - MW + - heat demand of the sink + + * - fillLevel + - -- + - + +``` + +## Caveats + +Nothing - at least not known. +If you found something, please contact us! diff --git a/docs/readthedocs/models/result/participant/em.md b/docs/readthedocs/models/result/participant/em.md index 58bf773ba..ec4a20b6a 100644 --- a/docs/readthedocs/models/result/participant/em.md +++ b/docs/readthedocs/models/result/participant/em.md @@ -6,8 +6,7 @@ Result of an energy management entity. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of an energy management entity. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - p diff --git a/docs/readthedocs/models/result/participant/ev.md b/docs/readthedocs/models/result/participant/ev.md index d8cce0d25..9307ff613 100644 --- a/docs/readthedocs/models/result/participant/ev.md +++ b/docs/readthedocs/models/result/participant/ev.md @@ -6,8 +6,7 @@ Result of an electric vehicle, that is occasionally connected to the grid via an ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of an electric vehicle, that is occasionally connected to the grid via an - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - p diff --git a/docs/readthedocs/models/result/participant/evcs.md b/docs/readthedocs/models/result/participant/evcs.md index a42c1bd5f..306b5f02a 100644 --- a/docs/readthedocs/models/result/participant/evcs.md +++ b/docs/readthedocs/models/result/participant/evcs.md @@ -6,8 +6,7 @@ This model is currently only a dummy implementation of an electric vehicle charg ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ This model is currently only a dummy implementation of an electric vehicle charg - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - p diff --git a/docs/readthedocs/models/result/participant/fixedfeedin.md b/docs/readthedocs/models/result/participant/fixedfeedin.md index 4dc0ab47f..bbf741b06 100644 --- a/docs/readthedocs/models/result/participant/fixedfeedin.md +++ b/docs/readthedocs/models/result/participant/fixedfeedin.md @@ -7,8 +7,7 @@ model can be derived. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -18,11 +17,11 @@ model can be derived. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - p diff --git a/docs/readthedocs/models/result/participant/flexoption.md b/docs/readthedocs/models/result/participant/flexoption.md index 4c08755b6..acfa88a20 100644 --- a/docs/readthedocs/models/result/participant/flexoption.md +++ b/docs/readthedocs/models/result/participant/flexoption.md @@ -6,8 +6,7 @@ Result of a flexibility option. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of a flexibility option. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - pRef diff --git a/docs/readthedocs/models/result/participant/hp.md b/docs/readthedocs/models/result/participant/hp.md index 233a0b64f..f0207be0a 100644 --- a/docs/readthedocs/models/result/participant/hp.md +++ b/docs/readthedocs/models/result/participant/hp.md @@ -6,8 +6,7 @@ Result of a heat pump. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of a heat pump. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - p diff --git a/docs/readthedocs/models/result/participant/load.md b/docs/readthedocs/models/result/participant/load.md index 067795c17..a2557f338 100644 --- a/docs/readthedocs/models/result/participant/load.md +++ b/docs/readthedocs/models/result/participant/load.md @@ -6,8 +6,7 @@ Result of (mainly) domestic loads. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of (mainly) domestic loads. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - p diff --git a/docs/readthedocs/models/result/participant/pv.md b/docs/readthedocs/models/result/participant/pv.md index d1378864c..e127def89 100644 --- a/docs/readthedocs/models/result/participant/pv.md +++ b/docs/readthedocs/models/result/participant/pv.md @@ -6,8 +6,7 @@ Result of a photovoltaic power plant. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of a photovoltaic power plant. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - p diff --git a/docs/readthedocs/models/result/participant/storage.md b/docs/readthedocs/models/result/participant/storage.md index 5c5767dcd..ad55716c8 100644 --- a/docs/readthedocs/models/result/participant/storage.md +++ b/docs/readthedocs/models/result/participant/storage.md @@ -6,8 +6,7 @@ Result of an electrochemical storage ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of an electrochemical storage - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - p @@ -33,7 +32,7 @@ Result of an electrochemical storage - * - soc - - -- + - - ``` diff --git a/docs/readthedocs/models/result/participant/systemparticipant.md b/docs/readthedocs/models/result/participant/systemparticipant.md index 6b44abe6e..85f2e9d23 100644 --- a/docs/readthedocs/models/result/participant/systemparticipant.md +++ b/docs/readthedocs/models/result/participant/systemparticipant.md @@ -6,8 +6,7 @@ Groups together all system participants such as PV, Storage etc. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Groups together all system participants such as PV, Storage etc. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - p diff --git a/docs/readthedocs/models/result/participant/thermalhouse.md b/docs/readthedocs/models/result/participant/thermalhouse.md index 942c7e39b..4660c28b2 100644 --- a/docs/readthedocs/models/result/participant/thermalhouse.md +++ b/docs/readthedocs/models/result/participant/thermalhouse.md @@ -7,8 +7,7 @@ This reflects a simple shoe box with transmission losses ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -18,11 +17,11 @@ This reflects a simple shoe box with transmission losses - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - qDot diff --git a/docs/readthedocs/models/result/participant/thermalsink.md b/docs/readthedocs/models/result/participant/thermalsink.md index 92d19b9b8..e7fa5583d 100644 --- a/docs/readthedocs/models/result/participant/thermalsink.md +++ b/docs/readthedocs/models/result/participant/thermalsink.md @@ -6,8 +6,7 @@ Result of a thermal sink. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of a thermal sink. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - qDot diff --git a/docs/readthedocs/models/result/participant/thermalstorage.md b/docs/readthedocs/models/result/participant/thermalstorage.md index abbad4e92..b8ed500d2 100644 --- a/docs/readthedocs/models/result/participant/thermalstorage.md +++ b/docs/readthedocs/models/result/participant/thermalstorage.md @@ -6,8 +6,7 @@ Result of a thermal storage. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of a thermal storage. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - energy diff --git a/docs/readthedocs/models/result/participant/thermalunit.md b/docs/readthedocs/models/result/participant/thermalunit.md index bedaa368d..9757a915c 100644 --- a/docs/readthedocs/models/result/participant/thermalunit.md +++ b/docs/readthedocs/models/result/participant/thermalunit.md @@ -6,8 +6,7 @@ Result of a thermal unit. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of a thermal unit. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - qDot diff --git a/docs/readthedocs/models/result/participant/wec.md b/docs/readthedocs/models/result/participant/wec.md index b4e8e44ce..a117d2d14 100644 --- a/docs/readthedocs/models/result/participant/wec.md +++ b/docs/readthedocs/models/result/participant/wec.md @@ -6,8 +6,7 @@ Result of a wind turbine. ## Attributes, Units and Remarks -```{eval-rst} -.. list-table:: +```{list-table} :widths: 33 33 33 :header-rows: 1 @@ -17,11 +16,11 @@ Result of a wind turbine. - Remarks * - time - - -- + - - date and time for the produced result * - inputModel - - -- + - - uuid for the associated input model * - p diff --git a/src/main/java/edu/ie3/datamodel/io/factory/result/ThermalResultFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/result/ThermalResultFactory.java index 0ff9180d0..8bb06ba54 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/result/ThermalResultFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/result/ThermalResultFactory.java @@ -10,6 +10,7 @@ import edu.ie3.datamodel.models.Entity; import edu.ie3.datamodel.models.StandardUnits; import edu.ie3.datamodel.models.result.thermal.CylindricalStorageResult; +import edu.ie3.datamodel.models.result.thermal.DomesticHotWaterStorageResult; import edu.ie3.datamodel.models.result.thermal.ThermalHouseResult; import edu.ie3.datamodel.models.result.thermal.ThermalUnitResult; import java.time.ZonedDateTime; @@ -28,7 +29,10 @@ public class ThermalResultFactory extends ModelResultFactory private static final String FILL_LEVEL = "fillLevel"; public ThermalResultFactory() { - super(ThermalHouseResult.class, CylindricalStorageResult.class); + super( + ThermalHouseResult.class, + CylindricalStorageResult.class, + DomesticHotWaterStorageResult.class); } /** @@ -38,7 +42,11 @@ public ThermalResultFactory() { * @param dateTimeFormatter parse date time strings */ public ThermalResultFactory(DateTimeFormatter dateTimeFormatter) { - super(dateTimeFormatter, ThermalHouseResult.class, CylindricalStorageResult.class); + super( + dateTimeFormatter, + ThermalHouseResult.class, + CylindricalStorageResult.class, + DomesticHotWaterStorageResult.class); } @Override @@ -75,6 +83,14 @@ protected ThermalUnitResult buildModel(EntityData data) { return new CylindricalStorageResult( zdtTime, inputModelUuid, energyQuantity, qDotQuantity, fillLevelQuantity); + } else if (clazz.equals(DomesticHotWaterStorageResult.class)) { + ComparableQuantity energyQuantity = + data.getQuantity(ENERGY, StandardUnits.ENERGY_RESULT); + ComparableQuantity fillLevelQuantity = + data.getQuantity(FILL_LEVEL, StandardUnits.FILL_LEVEL); + + return new DomesticHotWaterStorageResult( + zdtTime, inputModelUuid, energyQuantity, qDotQuantity, fillLevelQuantity); } else { throw new FactoryException("Cannot process " + clazz.getSimpleName() + ".class."); } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactory.java index f70d3dfd3..09048fb89 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactory.java @@ -45,11 +45,6 @@ public CosmoTimeBasedWeatherValueFactory() { super(); } - @Override - public String getTimeFieldString() { - return TIME; - } - @Override protected List> getFields(Class entityClass) { Set minConstructorParams = diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactory.java index c6833cf86..189e40c57 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactory.java @@ -42,11 +42,6 @@ public IconTimeBasedWeatherValueFactory(DateTimeFormatter dateTimeFormatter) { super(dateTimeFormatter); } - @Override - public String getTimeFieldString() { - return TIME; - } - @Override protected List> getFields(Class entityClass) { Set minParameters = diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactory.java index ecbc89dd5..ab128d1e6 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactory.java @@ -11,7 +11,6 @@ import edu.ie3.datamodel.models.StandardUnits; import edu.ie3.datamodel.models.timeseries.individual.TimeBasedValue; import edu.ie3.datamodel.models.value.*; -import edu.ie3.util.TimeUtil; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.util.*; @@ -26,26 +25,13 @@ public class TimeBasedSimpleValueFactory private static final String REACTIVE_POWER = "q"; private static final String HEAT_DEMAND = "heatDemand"; - private final TimeUtil timeUtil; - public TimeBasedSimpleValueFactory(Class valueClasses) { super(valueClasses); - this.timeUtil = TimeUtil.withDefaults; } public TimeBasedSimpleValueFactory( Class valueClasses, DateTimeFormatter dateTimeFormatter) { - super(valueClasses); - this.timeUtil = new TimeUtil(dateTimeFormatter); - } - - /** - * Return the field name for the date time - * - * @return the field name for the date time - */ - public String getTimeFieldString() { - return TIME; + super(valueClasses, dateTimeFormatter); } @Override diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedValueFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedValueFactory.java index 9fa785ae6..724ac2c24 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedValueFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedValueFactory.java @@ -8,6 +8,10 @@ import edu.ie3.datamodel.io.factory.Factory; import edu.ie3.datamodel.models.timeseries.individual.TimeBasedValue; import edu.ie3.datamodel.models.value.Value; +import edu.ie3.util.TimeUtil; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Map; /** * Abstract class that is able to build {@link TimeBasedValue}s from "flat" information @@ -18,7 +22,52 @@ public abstract class TimeBasedValueFactory, V extends Value> extends Factory> { + protected static final String TIME = "time"; + + protected final TimeUtil timeUtil; + protected TimeBasedValueFactory(Class... valueClasses) { super(valueClasses); + this.timeUtil = TimeUtil.withDefaults; + } + + protected TimeBasedValueFactory( + Class valueClasses, DateTimeFormatter dateTimeFormatter) { + super(valueClasses); + this.timeUtil = new TimeUtil(dateTimeFormatter); + } + + protected TimeBasedValueFactory(Class valueClasses, TimeUtil timeUtil) { + super(valueClasses); + this.timeUtil = timeUtil; + } + + /** + * Return the field name for the date time + * + * @return the field name for the date time + */ + public String getTimeFieldString() { + return TIME; + } + + /** + * Method to extract a time string from a given map and convert into a {@link ZonedDateTime}. + * + * @param fieldsToAttributes map with time field + * @return a {@link ZonedDateTime} + */ + public ZonedDateTime extractTime(Map fieldsToAttributes) { + return toZonedDateTime(fieldsToAttributes.get(getTimeFieldString())); + } + + /** + * Method to convert a given string into a {@link ZonedDateTime}. + * + * @param time string to convert + * @return a {@link ZonedDateTime} + */ + public ZonedDateTime toZonedDateTime(String time) { + return timeUtil.toZonedDateTime(time); } } diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedWeatherValueFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedWeatherValueFactory.java index b83d4dd97..c281dd270 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedWeatherValueFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedWeatherValueFactory.java @@ -15,24 +15,18 @@ */ public abstract class TimeBasedWeatherValueFactory extends TimeBasedValueFactory { - protected static final String TIME = "time"; protected static final String COORDINATE_ID = "coordinateId"; - protected final TimeUtil timeUtil; - protected TimeBasedWeatherValueFactory() { super(WeatherValue.class); - this.timeUtil = TimeUtil.withDefaults; } protected TimeBasedWeatherValueFactory(DateTimeFormatter dateTimeFormatter) { - super(WeatherValue.class); - this.timeUtil = new TimeUtil(dateTimeFormatter); + super(WeatherValue.class, dateTimeFormatter); } protected TimeBasedWeatherValueFactory(TimeUtil timeUtil) { - super(WeatherValue.class); - this.timeUtil = timeUtil; + super(WeatherValue.class, timeUtil); } /** @@ -43,11 +37,4 @@ protected TimeBasedWeatherValueFactory(TimeUtil timeUtil) { public String getCoordinateIdFieldString() { return COORDINATE_ID; } - - /** - * Return the field name for the date time - * - * @return the field name for the date time - */ - public abstract String getTimeFieldString(); } diff --git a/src/main/java/edu/ie3/datamodel/io/processor/result/ResultEntityProcessor.java b/src/main/java/edu/ie3/datamodel/io/processor/result/ResultEntityProcessor.java index 0e347aa5f..224b75850 100644 --- a/src/main/java/edu/ie3/datamodel/io/processor/result/ResultEntityProcessor.java +++ b/src/main/java/edu/ie3/datamodel/io/processor/result/ResultEntityProcessor.java @@ -18,6 +18,7 @@ import edu.ie3.datamodel.models.result.connector.Transformer3WResult; import edu.ie3.datamodel.models.result.system.*; import edu.ie3.datamodel.models.result.thermal.CylindricalStorageResult; +import edu.ie3.datamodel.models.result.thermal.DomesticHotWaterStorageResult; import edu.ie3.datamodel.models.result.thermal.ThermalHouseResult; import edu.ie3.datamodel.utils.Try; import edu.ie3.datamodel.utils.Try.*; @@ -58,6 +59,7 @@ public class ResultEntityProcessor extends EntityProcessor { NodeResult.class, ThermalHouseResult.class, CylindricalStorageResult.class, + DomesticHotWaterStorageResult.class, EmResult.class, FlexOptionsResult.class, CongestionResult.class); diff --git a/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesSource.java b/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesSource.java index 994f0f440..a9ade054e 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/TimeSeriesSource.java @@ -51,4 +51,12 @@ public abstract IndividualTimeSeries getTimeSeries(ClosedInterval getValue(ZonedDateTime time) throws SourceException; + + /** + * Method to return all time keys after a given timestamp. + * + * @param time given time + * @return a list of time keys + */ + public abstract List getTimeKeysAfter(ZonedDateTime time); } diff --git a/src/main/java/edu/ie3/datamodel/io/source/WeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/WeatherSource.java index 959613b7c..a7a056d85 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/WeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/WeatherSource.java @@ -18,6 +18,7 @@ import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; +import org.apache.commons.lang3.tuple.Pair; import org.locationtech.jts.geom.Point; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -29,8 +30,6 @@ public abstract class WeatherSource extends EntitySource { protected TimeBasedWeatherValueFactory weatherFactory; - protected Map> coordinateToTimeSeries; - protected IdCoordinateSource idCoordinateSource; protected static final String COORDINATE_ID = "coordinateid"; @@ -65,6 +64,14 @@ public abstract Map> getWeather( public abstract Optional> getWeather( ZonedDateTime date, Point coordinate) throws SourceException; + public abstract Map> getTimeKeysAfter(ZonedDateTime time) + throws SourceException; + + public List getTimeKeysAfter(ZonedDateTime time, Point coordinate) + throws SourceException { + return getTimeKeysAfter(time).getOrDefault(coordinate, Collections.emptyList()); + } + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- /** @@ -111,6 +118,37 @@ protected Map> mapWeatherValuesToPoint return coordinateToTimeSeriesMap; } + protected Map> toTimeKeys( + Stream> fieldMaps, TimeBasedWeatherValueFactory factory) { + return groupTime( + fieldMaps.map( + fieldMap -> { + String coordinateValue = fieldMap.get(COORDINATE_ID); + int coordinateId = Integer.parseInt(coordinateValue); + Optional coordinate = idCoordinateSource.getCoordinate(coordinateId); + ZonedDateTime time = factory.extractTime(fieldMap); + + if (coordinate.isEmpty()) { + log.warn("Unable to match coordinate ID {} to a point", coordinateId); + } + return Pair.of(coordinate, time); + })); + } + + protected Map> groupTime( + Stream, ZonedDateTime>> values) { + return values + .filter(pair -> pair.getKey().isPresent()) + .map(pair -> Pair.of(pair.getKey().get(), pair.getValue())) + .collect(Collectors.groupingBy(Pair::getKey, Collectors.toSet())) + .entrySet() + .stream() + .collect( + Collectors.toMap( + Map.Entry::getKey, + e -> e.getValue().stream().map(Pair::getValue).sorted().toList())); + } + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- /** diff --git a/src/main/java/edu/ie3/datamodel/io/source/couchbase/CouchbaseWeatherSource.java b/src/main/java/edu/ie3/datamodel/io/source/couchbase/CouchbaseWeatherSource.java index 74732dbb0..8dc56cafe 100644 --- a/src/main/java/edu/ie3/datamodel/io/source/couchbase/CouchbaseWeatherSource.java +++ b/src/main/java/edu/ie3/datamodel/io/source/couchbase/CouchbaseWeatherSource.java @@ -25,6 +25,7 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; import java.util.stream.Collectors; +import org.apache.commons.lang3.tuple.Pair; import org.locationtech.jts.geom.Point; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -165,6 +166,37 @@ public Optional> getWeather(ZonedDateTime date, Poi } } + @Override + public Map> getTimeKeysAfter(ZonedDateTime time) { + String query = createQueryStringForFollowingTimeKeys(time); + CompletableFuture futureResult = connector.query(query); + QueryResult queryResult = futureResult.join(); + List jsonWeatherInputs = Collections.emptyList(); + try { + jsonWeatherInputs = queryResult.rowsAsObject(); + } catch (DecodingFailureException ex) { + logger.error("Querying weather inputs failed!", ex); + } + if (jsonWeatherInputs != null && !jsonWeatherInputs.isEmpty()) { + return groupTime( + jsonWeatherInputs.stream() + .map( + json -> { + int coordinateId = json.getInt(COORDINATE_ID); + Optional coordinate = idCoordinateSource.getCoordinate(coordinateId); + ZonedDateTime timestamp = + weatherFactory.toZonedDateTime( + json.getString(weatherFactory.getTimeFieldString())); + if (coordinate.isEmpty()) { + log.warn("Unable to match coordinate ID {} to a point", coordinateId); + } + return Pair.of(coordinate, timestamp); + }) + .filter(value -> value.getValue().isAfter(time))); + } + return Collections.emptyMap(); + } + /** * Generates a key for weather documents with the pattern: {@code * weather::::