Skip to content

Commit

Permalink
Merge branch 'dev' into df/#856-tap-water
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	docs/readthedocs/models/cts_model.md
#	docs/readthedocs/models/thermal_house_model.md
  • Loading branch information
danielfeismann committed Nov 15, 2024
2 parents ab42b3c + c77f60c commit 15f2f59
Show file tree
Hide file tree
Showing 102 changed files with 214 additions and 215 deletions.
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 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)
- Fixed Hp results leading to overheating house and other effects [#827](https://github.com/ie3-institute/simona/issues/827)
- Fixed thermal storage getting recharged when empty [#827](https://github.com/ie3-institute/simona/issues/827)
- 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 @@ -229,7 +228,7 @@ 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)
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. At initialisation the storage will be empty.
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. At initialisation the storage will be empty.

## 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 for its heating demand. As well the hot water demand (tap water) based on the number of inhabitants and the housing type on hourly basis is considered.
This house model represents the thermal behaviour of a building. This reflects a simple shoebox with a thermal capacity and with transmission losses for its heating demand. As well the hot water demand (tap water) based on the number of inhabitants and the housing type on hourly basis is considered.

## 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/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
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class GridAgentController(
/** Go through all provided input models, build agents for those and group the
* resulting actor references for each connection nodes. All participant
* agents are also introduced to the agent environment and the scheduler is
* requested to send a initialisation trigger.
* requested to send an initialisation trigger.
*
* @param participantsConfig
* Configuration information for participant models
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ object GridAgentData {
}
}

/** Data that is send to the [[GridAgent]] directly after startup. It contains
/** Data that is sent to the [[GridAgent]] directly after startup. It contains
* the main information for initialization. This data should include all
* [[GridAgent]] individual data, for data that is the same for all
* [[GridAgent]] s please use [[GridAgent.apply()]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ object GridAgentMessages {
/** Provide values as a reply to a
* [[edu.ie3.simona.agent.participant.ParticipantAgent.RequestAssetPowerMessage]].
* In contrast to [[AssetPowerChangedMessage]], this message indicates that
* the same values for [[p]] and [[q]] has been send again as in the previous
* the same values for [[p]] and [[q]] has been sent again as in the previous
* request
*
* @param p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private[grid] trait GridResultsSupport {
* and the corresponding sweep value data
*
* @param lines
* the set of lines which the result should be build for
* the set of lines which the result should be built for
* @param sweepValueStoreData
* the value store with all power flow result values of the provided lines
* @param iNominal
Expand Down Expand Up @@ -142,7 +142,7 @@ private[grid] trait GridResultsSupport {
* [[TransformerModel]] and the corresponding sweep value data
*
* @param transformers
* the set of transformers which the result should be build for
* the set of transformers which the result should be built for
* @param sweepValueStoreData
* the value store with all power flow result values of the provided
* transformers
Expand Down Expand Up @@ -190,7 +190,7 @@ private[grid] trait GridResultsSupport {
* [[Transformer3wModel]] and the corresponding sweep value data
*
* @param transformers3w
* the set of 3 winding transformers which the result should be build for
* the set of 3 winding transformers which the result should be built for
* @param sweepValueStoreData
* the value store with all power flow result values of the provided 3
* winding transformers
Expand Down Expand Up @@ -495,7 +495,7 @@ private[grid] trait GridResultsSupport {
/** Calculate the current magnitude and the current angle in physical units
* based on a provided electric current in p.u. and the nominal referenced
* electric current. The arctangent "only" calculates the angle between the
* complex current and it's real part. This means, that i = (i_real, i_imag)
* complex current, and it's real part. This means, that i = (i_real, i_imag)
* and i' = (-i_real, -i_imag) will lead to the same angle. However, for
* power system simulation, the absolute orientation in the complex plane
* with regard to the positive real axis is of interest. Therefore,
Expand Down
Loading

0 comments on commit 15f2f59

Please sign in to comment.