Skip to content

Commit

Permalink
Merge branch 'dev' into df/#965-compression-at-resultEventListener
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfeismann committed Sep 27, 2024
2 parents 8671800 + 88347e8 commit d21abff
Show file tree
Hide file tree
Showing 10 changed files with 470 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Additional tests to check flexibility options of thermal house and storage [#729](https://github.com/ie3-institute/simona/issues/729)
- EmAgents should be able to handle initialization [#945](https://github.com/ie3-institute/simona/issues/945)
- Added option to directly zip the output files [#793](https://github.com/ie3-institute/simona/issues/793)
- Added weatherData HowTo for Copernicus ERA5 data [#967](https://github.com/ie3-institute/simona/issues/967)

### Changed
- Adapted to changed data source in PSDM [#435](https://github.com/ie3-institute/simona/issues/435)
Expand Down Expand Up @@ -113,6 +114,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix expected secondaryData in baseStateData [#955](https://github.com/ie3-institute/simona/issues/955)
- Improve code quality in fixedloadmodelspec and other tests [#919](https://github.com/ie3-institute/simona/issues/919)
- Fix power flow calculation with em agents [#962](https://github.com/ie3-institute/simona/issues/962)
- Fix scheduling at Evcs with more than one Ev at a time without Em [#787](https://github.com/ie3-institute/simona/issues/787)

## [3.0.0] - 2023-08-07

Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ ext {
javaVersion = JavaVersion.VERSION_17

scalaVersion = '2.13'
scalaBinaryVersion = '2.13.14'
scalaBinaryVersion = '2.13.15'
pekkoVersion = '1.1.1'
jtsVersion = '1.20.0'
confluentKafkaVersion = '7.4.0'
tscfgVersion = '1.1.3'
scapegoatVersion = '3.0.0'
scapegoatVersion = '3.0.2'

testContainerVersion = '0.41.4'

Expand Down Expand Up @@ -149,7 +149,7 @@ dependencies {
implementation 'javax.measure:unit-api:2.2'
implementation 'tech.units:indriya:2.2' // quantities
implementation "org.typelevel:squants_${scalaVersion}:1.8.3"
implementation 'org.apache.commons:commons-csv:1.11.0'
implementation 'org.apache.commons:commons-csv:1.12.0'
implementation 'org.scalanlp:breeze_2.13:2.1.0' // scientific calculations (http://www.scalanlp.org/)
implementation 'de.lmu.ifi.dbs.elki:elki:0.7.5' // Statistics (for random load model)
implementation 'org.jgrapht:jgrapht-core:1.5.2'
Expand Down
6 changes: 6 additions & 0 deletions docs/readthedocs/_static/bibliography/bibtexAll.bib
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,10 @@ @Book{Kittl_2022
address = {Düren},
year = {2022},
doi = {10.17877/DE290R-22548}
}

@MISC{Radiation_ECMWF,
author = {Robin Hogan},
title = {Radiation Quantities in the ECMWF model and MARS},
howpublished = {\url{https://www.ecmwf.int/sites/default/files/elibrary/2015/18490-radiation-quantities-ecmwf-model-and-mars.pdf}}
}
34 changes: 34 additions & 0 deletions docs/readthedocs/howto/weatherDataHowToCopernicusERA5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
(weatherDataHowToCopernicusERA5)=

# How To use Copernicus ERA5 weather data in SIMONA

To use weather data from the past within SIMONA we recommend to use the dataset [ERA5 hourly data on single levels from 1940 to present](https://cds-beta.climate.copernicus.eu/datasets/reanalysis-era5-single-levels?tab=download) of [Copernicus Climate Data Store](https://cds-beta.climate.copernicus.eu/).

The following data parameter should be used

- Wind
- 100m u-component of wind
- 100m v-component of wind
- Radiation
- Total sky direct solar radiation at surface (FDIR)
- Surface solar radiation downwards (SSRD)
- Temperature
- 2m temperature

Since SIMONAs [PV Model](pv_model) requires direct and diffuse solar radiation, the diffuse solar radiation need to be determined from the ERA5 data.

## Pre-Processing solar radiation weather data

To obtain diffuse solar radiation data from ERA5 weather data, the necessary diffuse solar radiation (FDIFF) at surface can be calculated by

$$
FDIFF = SSRD - FDIR
$$

*with*\
**SSRD** = Surface solar radiation downwards\
**FDIR** = Total sky direct solar radiation at surface


**References:**
* {cite:cts}`Radiation_ECMWF`
7 changes: 7 additions & 0 deletions docs/readthedocs/usersguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ Besides a configuration and the actual grid and grid participants, SIMONA also e
There is an option to use sample weather data, but if you want sensible results, definitely consider supplying suitable data.
Information on the expected data format and different supported sources are given in the input parameters section of the {doc}`config` file.

The following How-To's are available:
```{toctree}
---
maxdepth: 1
---
howto/weatherDataHowToCopernicusERA5
```

## Simulation Outputs

Expand Down
2 changes: 1 addition & 1 deletion gradle/scripts/scoverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// https://github.com/scoverage/gradle-scoverage/issues/109 for details

scoverage {
scoverageVersion = "2.1.1"
scoverageVersion = "2.2.1"
scoverageScalaVersion = scalaBinaryVersion
coverageOutputHTML = false
coverageOutputXML = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import squants.{Dimensionless, Each, Power}

import java.time.ZonedDateTime
import java.util.UUID
import scala.collection.SortedSet
import scala.collection.immutable.SortedSet
import scala.reflect.{ClassTag, classTag}

protected trait EvcsAgentFundamentals
Expand Down Expand Up @@ -494,9 +494,10 @@ protected trait EvcsAgentFundamentals
val relevantData =
createCalcRelevantData(modelBaseStateData, tick)

val lastState = getLastOrInitialStateData(modelBaseStateData, tick)

val updatedBaseStateData = {
if (relevantData.arrivals.nonEmpty) {
val lastState = getLastOrInitialStateData(modelBaseStateData, tick)

val currentEvs = modelBaseStateData.model.determineCurrentEvs(
relevantData,
Expand Down Expand Up @@ -528,6 +529,15 @@ protected trait EvcsAgentFundamentals
modelBaseStateData
}

// if the lastState's tick is the same as the actual tick the results have already been determined and announced when we handled the departedEvs
if (lastState.tick != tick) {
determineResultsAnnounceUpdateValueStore(
lastState,
currentTick,
modelBaseStateData,
)
}

// We're only here if we're not flex-controlled, thus sending a Completion is always right
goToIdleReplyCompletionAndScheduleTriggerForNextAction(
updatedBaseStateData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import edu.ie3.simona.model.participant.evcs.uncontrolled.{
ConstantPowerCharging,
MaximumPowerCharging,
}
import edu.ie3.util.scala.quantities.DefaultQuantities._
import edu.ie3.simona.model.participant.{
CalcRelevantData,
FlexChangeIndicator,
Expand All @@ -32,7 +31,8 @@ import edu.ie3.simona.util.TickUtil.TickLong
import edu.ie3.util.quantities.PowerSystemUnits._
import edu.ie3.util.quantities.QuantityUtils.RichQuantityDouble
import edu.ie3.util.scala.OperationInterval
import squants.energy.{KilowattHours, Kilowatts}
import edu.ie3.util.scala.quantities.DefaultQuantities._
import squants.energy.Kilowatts
import squants.time.Seconds
import squants.{Dimensionless, Energy, Power}
import tech.units.indriya.unit.Units.PERCENT
Expand Down Expand Up @@ -514,13 +514,17 @@ final case class EvcsModel(
modelState: EvcsState,
data: EvcsRelevantData,
): ApparentPower =
throw new NotImplementedError("Use calculatePowerAndEvSoc() instead.")
throw new NotImplementedError(
"Use calculateNewScheduling() or chargeEv() instead."
)

override protected def calculateActivePower(
modelState: EvcsState,
data: EvcsRelevantData,
): Power =
throw new NotImplementedError("Use calculatePowerAndEvSoc() instead.")
throw new NotImplementedError(
"Use calculateNewScheduling() or chargeEv() instead."
)

override def determineFlexOptions(
data: EvcsRelevantData,
Expand Down
Loading

0 comments on commit d21abff

Please sign in to comment.