Skip to content

Commit

Permalink
Merge branch 'dev' into sp/#959-new-participant-agent
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/scala/edu/ie3/simona/agent/grid/GridAgentMessages.scala
  • Loading branch information
sebastian-peter committed Nov 15, 2024
2 parents de60e0c + c77f60c commit 9ed582d
Show file tree
Hide file tree
Showing 110 changed files with 1,036 additions and 533 deletions.
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 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)
- Add some quote to 'printGoodbye' [#997](https://github.com/ie3-institute/simona/issues/997)
- Add unapply method for ThermalHouseResults [#934](https://github.com/ie3-institute/simona/issues/934)

### Changed
- Adapted to changed data source in PSDM [#435](https://github.com/ie3-institute/simona/issues/435)
Expand Down Expand Up @@ -75,6 +76,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated dependabot reviewers [#888](https://github.com/ie3-institute/simona/issues/888)
- Merged `HpModelTestData` with `HpTestData` to `HpInputTestData` [#872](https://github.com/ie3-institute/simona/issues/872)
- Harmonised both methods that check the inner temperature of thermal house against the boundaries [#880](https://github.com/ie3-institute/simona/issues/880)
- Changed implementation of actor naming for unique name generation [#103](https://github.com/ie3-institute/simona/issues/103)
- Convert all `eval-rst` instances in rtd to myst syntax [#901](https://github.com/ie3-institute/simona/issues/901)
- External simulation should provide information about next tick of MobSim [#776](https://github.com/ie3-institute/simona/issues/776)
- Reverted temporary workaround in `spotless.gradle` [#681](https://github.com/ie3-institute/simona/issues/681)
Expand All @@ -94,9 +96,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Replace mutable var in ChpModelSpec [#1002](https://github.com/ie3-institute/simona/issues/1002)
- Move compression of output files into `ResultEventListener`[#965](https://github.com/ie3-institute/simona/issues/965)
- Rewrote StorageModelTest from groovy to scala [#646](https://github.com/ie3-institute/simona/issues/646)
- Updated `ExtEvSimulationClasses` [#898](https://github.com/ie3-institute/simona/issues/898)
- Updated `ExtEvSimulationClasses` [#898](https://github.com/ie3-institute/simona/issues/898)
- Refactoring of `ThermalGrid.energyGrid` to distinguish between demand of house and storage [#928](https://github.com/ie3-institute/simona/issues/928)
- Refactoring to use zeroKW and zeroKWH in thermal grid unit tests [#1023](https://github.com/ie3-institute/simona/issues/1023)

### Fixed
- Fix rendering of references in documentation [#505](https://github.com/ie3-institute/simona/issues/505)
- Removed a repeated line in the documentation of vn_simona config [#658](https://github.com/ie3-institute/simona/issues/658)
- Removed version number "2.0" from the logo printed to console [#642](https://github.com/ie3-institute/simona/issues/642)
- Fixed PV Model documentation [#684](https://github.com/ie3-institute/simona/issues/684), [#686](https://github.com/ie3-institute/simona/issues/686)
Expand Down Expand Up @@ -128,6 +133,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix CheckWindow duration [#921](https://github.com/ie3-institute/simona/issues/921)
- Fixed ThermalStorageResults having multiple entries [#924](https://github.com/ie3-institute/simona/issues/924)
- Fix filter for thermal result checking for lastTick not for currentTick [#1008](https://github.com/ie3-institute/simona/issues/1008)
- Fixed `CHANGELOG` entry for issue ([#103](https://github.com/ie3-institute/simona/issues/103)) [#941](https://github.com/ie3-institute/simona/issues/941)
- Fix grammar and spelling in docs and comments [#1022](https://github.com/ie3-institute/simona/issues/1022)

## [3.0.0] - 2023-08-07

Expand Down Expand Up @@ -190,7 +197,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed format of example grid `vn_simona` [#216](https://github.com/ie3-institute/simona/issues/216)
- Renamed ChpData to ChpRelevantData [#494](https://github.com/ie3-institute/simona/issues/494)
- Updated gradle to 8.2.1, cleaned up `build.gradle` and `Jenkinsfile` [#572](https://github.com/ie3-institute/simona/issues/572)
- Changed implementation of actor naming for unique name generation [#103](https://github.com/ie3-institute/simona/issues/103)

### Fixed
- Location of `vn_simona` test grid (was partially in Berlin and Dortmund) [#72](https://github.com/ie3-institute/simona/issues/72)
Expand Down Expand Up @@ -221,12 +227,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for three winding transformers [#63](https://github.com/ie3-institute/simona/issues/63)
- Handle incoming slack voltage accordingly
- Allow multiple sub grid gates at one node (also allows multiple two winding transformers at one node)
- Perform power flow calculation in highest grid, if a three winding transformer is apparent
- Perform power flow calculation in the highest grid, if a three winding transformer is apparent
- Write out results
- Fixed broken layout in RTD documentation [#500](https://github.com/ie3-institute/simona/issues/500)
- Corrected tests in RefSystemTest [#560](https://github.com/ie3-institute/simona/issues/560)
- Take log file event filters from `logback.xml` when defining the run log appender [#108](https://github.com/ie3-institute/simona/issues/108)
- Fix rendering of references in documentation [#505](https://github.com/ie3-institute/simona/issues/505)

### Removed
- Remove workaround for tscfg tmp directory [#178](https://github.com/ie3-institute/simona/issues/178)
Expand Down
2 changes: 1 addition & 1 deletion docs/readthedocs/developersguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Developer’s Guide

The SIMONA repository can be found [on Github](https://github.com/ie3-institute/simona).
The SIMONA repository can be found [on GitHub](https://github.com/ie3-institute/simona).

```{contents}
---
Expand Down
2 changes: 1 addition & 1 deletion docs/readthedocs/models/chp_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This page documents the functionality of the CHP Model (combined heat and power

## Assumptions

The CHP unit is able to operate either at full load or not at all. Uncovered heat demand of former time-steps is not considered in the following steps, as the CHP unit does not posses a memory. Losses of the heat storage are not considered.
The CHP unit is able to operate either at full load or not at all. Uncovered heat demand of former time-steps is not considered in the following steps, as the CHP unit does not possess a memory. Losses of the heat storage are not considered.

## Parameters

Expand Down
2 changes: 1 addition & 1 deletion docs/readthedocs/models/cts_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This page documents the functionality of the cylindrical thermal storage available in SIMONA.

## Behaviour
This storage model operates on volumes, although the functions it provides for other models all operate with energy. Internally the storage model converts energy to volume and vice versa with formulas specified below. Furthermore it is assumed that the storage medium is water. Also the model holds a variable for the current storage level.
This storage model operates on volumes, although the functions it provides for other models all operate with energy. Internally the storage model converts energy to volume and vice versa with formulas specified below. Furthermore, it is assumed that the storage medium is water. Also, the model holds a variable for the current storage level.

## Attributes, Units and Remarks

Expand Down
2 changes: 1 addition & 1 deletion docs/readthedocs/models/em.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If an EmAgent is itself controlled by another EmAgent, it also behaves like a sy
Every EmAgent aggregates flex options and power of its connected assets and disaggregates flex control among the connected assets.
It also functions as a scheduler for all connected assets by processing information on the ticks of the next desired activations and conveying such information to the controlling EmAgent or a central scheduler respectively.

Uncontrolled EmAgents answer to a scheduler with regards to their activation.
Uncontrolled EmAgents answer to a scheduler with regard to their activation.

![](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/ie3-institute/simona/dev/docs/uml/protocol/em/UncontrolledEm.puml)

Expand Down
4 changes: 2 additions & 2 deletions docs/readthedocs/models/hp_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This page documents the functionality of the Heat Pump Model (HP model) availabl

## Assumptions

The HP unit is able to operate either at full load or not at all. Uncovered heat demand of former time-steps is not considered in the following steps, as the HP unit does not posses a memory.
The HP unit is able to operate either at full load or not at all. Uncovered heat demand of former time-steps is not considered in the following steps, as the HP unit does not possess a memory.

## Parameters

Expand All @@ -17,6 +17,6 @@ Please refer to {doc}`PowerSystemDataModel - HP Model <psdm:models/input/partici
## Implemented Behaviour

- Agent Objectives
The objective of the HP agent is to cover the given heat demand of it's thermal bus in each time-step.
The objective of the HP agent is to cover the given heat demand of its thermal bus in each time-step.

The implemented behaviour is shown in the program sequence plan below. In general, the unit will turn on, if the thermal bus is demanding heat. During operation, the HP unit operates at full utilization.
2 changes: 1 addition & 1 deletion docs/readthedocs/models/load_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ F_t = -3.92 \cdot 10^{-10} \cdot t^4 + 3.2 \cdot 10^{-7}
\cdot t + 1.24
$$

The factor $F_t$, after calculation, shall be rounded to four decimal places. After multiplication with the profile value for given quarter hour, the result should again be rounded to one decimal place.
The factor $F_t$, after calculation, shall be rounded to four decimal places. After multiplication with the profile value for given quarter-hour, the result should again be rounded to one decimal place.

#### Maximum value

Expand Down
2 changes: 1 addition & 1 deletion docs/readthedocs/models/thermal_house_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This page documents the functionality of the thermal house available in SIMONA.

## Behaviour

This house model represents the thermal behaviour of a building. This reflects a simple shoe box with a thermal capacity and with transmission losses.
This house model represents the thermal behaviour of a building. This reflects a simple shoebox with a thermal capacity and with transmission losses.

## Attributes, Units and Remarks

Expand Down
2 changes: 1 addition & 1 deletion docs/readthedocs/models/two_winding_transformer_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ When the load flow calculation asks for the values with regard to the low voltag
3. Main field resistance: $R_{M,LV} = \frac{R_{M}}{\gamma^{2}}$
4. Main field reactance: $X_{M,LV} = \frac{X_{M}}{\gamma^{2}}$

Finally all values are delivered as per unit-values and ready to use in the fundamental $\pi$circuit:
Finally, all values are delivered as per unit-values and ready to use in the fundamental $\pi$circuit:

1. Short circuit conductance: $g_{ij} = \frac{Z_{Ref}}{R_{SC}}$
2. Short circuit susceptance: $b_{ij} = \frac{Z_{Ref}}{X_{SC}}$
Expand Down
2 changes: 1 addition & 1 deletion docs/readthedocs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Sphinx==8.1.3
sphinx-rtd-theme==3.0.1
sphinx-rtd-theme==3.0.2
sphinxcontrib-plantuml==0.30
myst-parser==4.0.0
markdown-it-py==3.0.0
Expand Down
2 changes: 1 addition & 1 deletion docs/readthedocs/usersguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You can either delegate the job to your preferred IDE or build an executable jar
In order to be able to execute SIMONA from a CLI, you need an executable fat jar. A fat jar contains all compiled classes and dependencies, ready for execution. For building one, you can use a Gradle task of the project.

1. Open a CLI and change directories to the top level directory of the project.
2. Execute ``gradlew shadowJar`` within the CLI. This creates a fat jar of SIMONA inside of the directory ``build/libs``.
2. Execute ``gradlew shadowJar`` within the CLI. This creates a fat jar of SIMONA inside the directory ``build/libs``.
3. For executing a fat jar you need to specify the classpath of the entrypoint of your application. Assuming we are still in the top level directory of our project, the execution command would look as follows:


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ object SimonaActorNaming {
refFactory.actorOf(props, actorName(props, simonaActorId(actorId)))
}

/** Constructs an Id for convenience actor naming. Although this is dangerous
/** Constructs an id for convenience actor naming. Although this is dangerous
* as duplicates might be possible, it should be sufficient in our case as
* the uniqueness is only required in one actor system
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/edu/ie3/simona/agent/ValueStore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ object ValueStore {
def forResult[D](maxTickSpan: Long, multiplier: Long): ValueStore[D] =
new ValueStore[D](maxTickSpan * multiplier)

/** Updates the value store. Additionally the size of the store is limited to
/** Updates the value store. Additionally, the size of the store is limited to
* it's defined maximum capacity. Therefore, the oldest entries are removed.
*
* @param valueStore
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/edu/ie3/simona/agent/em/EmAgent.scala
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ object EmAgent {
}

/* We do not need to handle ScheduleFlexRequests here, since active agents
can schedule themselves with there completions and inactive agents should
can schedule themselves with their completions and inactive agents should
be sleeping right now
*/
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/edu/ie3/simona/agent/em/EmDataCore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ object EmDataCore {
awaitedConnectedAgents.excl(flexOptions.modelUuid),
)

/** Checks whether all awaited flex options have been received and we can
/** Checks whether all awaited flex options have been received, and we can
* continue by calculating flex control. This method does not change the
* state of the [[AwaitingFlexOptions]] data core.
* @return
Expand Down
40 changes: 20 additions & 20 deletions src/main/scala/edu/ie3/simona/agent/grid/DBFSAlgorithm.scala
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ trait DBFSAlgorithm extends PowerFlowSupport with GridResultsSupport {
case None =>
// this happens if this agent is either a) the superior grid agent, because it will always get a request for
// the next sweep, as it triggers calculations for the next sweep or b) at all other
// (non last downstream grid agents) in sweep 0
// (non-last downstream grid agents) in sweep 0
ctx.log.debug(
"Unable to find slack voltage for nodes '{}' in sweep '{}'. Try to get voltage of previous sweep.",
nodeUuids,
Expand Down Expand Up @@ -386,7 +386,7 @@ trait DBFSAlgorithm extends PowerFlowSupport with GridResultsSupport {

// update the sweep value store and clear all received maps
// note: normally it is expected that this has to be done after power flow calculations but for the sake
// of having it only once in the code we put this here. Otherwise it would have to been put before EVERY
// of having it only once in the code we put this here. Otherwise, it would have to be put before EVERY
// return with a valid power flow result (currently happens already in two situations)
val updatedGridAgentBaseData =
if (stillPendingRequestAnswers.isEmpty) {
Expand Down Expand Up @@ -737,7 +737,7 @@ trait DBFSAlgorithm extends PowerFlowSupport with GridResultsSupport {
gridAgentBaseData.powerFlowParams.sweepTimeout,
)(ctx)

// when we don't have inferior grids and no assets both methods return None and we can skip doing another power
// when we don't have inferior grids and no assets both methods return None, and we can skip doing another power
// flow calculation otherwise we go back to simulate grid and wait for the answers
if (!askForAssetPowersOpt && !askForInferiorGridPowersOpt) {
ctx.log.debug(
Expand Down Expand Up @@ -832,7 +832,7 @@ trait DBFSAlgorithm extends PowerFlowSupport with GridResultsSupport {
)

/* Regarding the power flow result of this grid, there are two cases. If this is the "highest" grid in a
* simulation without a three winding transformer, the grid consists of only one node and we can mock the power
* simulation without a three winding transformer, the grid consists of only one node, and we can mock the power
* flow results. If there is a three winding transformer apparent, we actually have to perform power flow
* calculations, as the high voltage branch of the transformer is modeled here. */
(if (gridModel.gridComponents.transformers3w.isEmpty) {
Expand Down Expand Up @@ -955,13 +955,13 @@ trait DBFSAlgorithm extends PowerFlowSupport with GridResultsSupport {
}
}

/** Checks if all data has been received and if yes checks if the there are
* any failed power flow indications from inferior grids. If both == true,
* then no [[Behavior]] change is triggered but the sweep value store is
* updated with a [[FailedPowerFlow]] information as well, the now used data
* is set to [[PowerFlowDoneData]] and this is escalated to the superior
* grid(s). If there is no [[FailedPowerFlow]] in the [[GridAgentBaseData]] a
* behavior transition to [[handlePowerFlowCalculations]] is triggered.
/** Checks if all data has been received and if yes checks if there are any
* failed power flow indications from inferior grids. If both == true, then
* no [[Behavior]] change is triggered but the sweep value store is updated
* with a [[FailedPowerFlow]] information as well, the now used data is set
* to [[PowerFlowDoneData]] and this is escalated to the superior grid(s). If
* there is no [[FailedPowerFlow]] in the [[GridAgentBaseData]] a behavior
* transition to [[handlePowerFlowCalculations]] is triggered.
*
* If allReceived == false, no [[Behavior]] transition is triggered
*
Expand Down Expand Up @@ -1023,11 +1023,11 @@ trait DBFSAlgorithm extends PowerFlowSupport with GridResultsSupport {

/** Normally only reached by the superior (dummy) agent!
*
* Checks if all data has been received and if yes checks if the there are
* any failed power flow indications from inferior grids. If both == true,
* then a finish simulation is triggered and depending on the configuration
* this step is skipped and the simulation goes on or this leads to a
* termination of the simulation due to a failed power flow calculation.
* Checks if all data has been received and if yes checks if there are any
* failed power flow indications from inferior grids. If both == true, then a
* finish simulation is triggered and depending on the configuration this
* step is skipped and the simulation goes on or this leads to a termination
* of the simulation due to a failed power flow calculation.
*
* If there is no [[FailedPowerFlow]] in the [[GridAgentBaseData]] a
* [[Behavior]] transition to [[checkPowerDifferences]] is triggered.
Expand Down Expand Up @@ -1153,7 +1153,7 @@ trait DBFSAlgorithm extends PowerFlowSupport with GridResultsSupport {
* @param askTimeout
* a timeout for the request
* @return
* true if this grids contains assets or false if no request has been send
* true if this grids contains assets or false if no request has been sent
* due to non-existence of assets
*/
private def askForAssetPowers(
Expand Down Expand Up @@ -1383,11 +1383,11 @@ trait DBFSAlgorithm extends PowerFlowSupport with GridResultsSupport {
}

/** This method uses [[ActorContext.pipeToSelf()]] to send a future message to
* itself. If the future is a [[Success]] the message is send, else a
* [[WrappedFailure]] with the thrown error is send.
* itself. If the future is a [[Success]] the message is sent, else a
* [[WrappedFailure]] with the thrown error is sent.
*
* @param future
* future message that should be send to the agent after it was processed
* future message that should be sent to the agent after it was processed
* @param ctx
* [[ActorContext]] of the receiving actor
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/edu/ie3/simona/agent/grid/GridAgent.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ object GridAgent extends DBFSAlgorithm {
// val initialization
val resolution: Long = simonaConfig.simona.powerflow.resolution.get(
ChronoUnit.SECONDS
) // this determines the agents regular time bin it wants to be triggered e.g one hour
) // this determines the agents regular time bin it wants to be triggered e.g. one hour

val simStartTime: ZonedDateTime = TimeUtil.withDefaults
.toZonedDateTime(simonaConfig.simona.time.startDateTime)
Expand Down
Loading

0 comments on commit 9ed582d

Please sign in to comment.