Skip to content

Commit

Permalink
Merge branch 'refs/heads/dev' into df/#856-tap-water
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	src/test/scala/edu/ie3/simona/model/participant/HpModelSpec.scala
  • Loading branch information
danielfeismann committed Aug 26, 2024
2 parents 744154c + 32c4258 commit 80b88af
Show file tree
Hide file tree
Showing 5 changed files with 337 additions and 263 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated AUTHORS.md [#904](https://github.com/ie3-institute/simona/issues/904)
- Updated `Gradle` to version V8.10 [#829](https://github.com/ie3-institute/simona/issues/829)
- Updated AUTHORS.md [#905](https://github.com/ie3-institute/simona/issues/905)
- Rewrote BMModelTest from groovy to scala [#646](https://github.com/ie3-institute/simona/issues/646)
- Prepare ThermalStorageTestData for Storage without storageVolumeLvlMin [#894](https://github.com/ie3-institute/simona/issues/894)

### Fixed
Expand Down
18 changes: 9 additions & 9 deletions src/main/scala/edu/ie3/simona/model/participant/BMModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ final case class BMModel(

/** Saves power output of last cycle. Needed for load gradient
*/
private var _lastPower: Option[Power] = None
var _lastPower: Option[Power] = None

override def calculatePower(
tick: Long,
Expand All @@ -73,7 +73,7 @@ final case class BMModel(
* @return
* Active power
*/
override protected def calculateActivePower(
override def calculateActivePower(
modelState: ConstantState.type,
data: BMCalcRelevantData,
): Power = {
Expand All @@ -100,7 +100,7 @@ final case class BMModel(
* @return
* factor k1
*/
private def calculateK1(time: ZonedDateTime): Double = {
def calculateK1(time: ZonedDateTime): Double = {
val weekendCorr = Vector(0.98, 0.985, 0.982, 0.982, 0.97, 0.96, 0.95, 0.93,
0.925, 0.95, 0.98, 1.01, 1.018, 1.01, 1.01, 0.995, 1, 0.995, 0.99, 0.985,
0.99, 0.98, 0.975, 0.99)
Expand All @@ -120,7 +120,7 @@ final case class BMModel(
* @return
* factor k2
*/
private def calculateK2(time: ZonedDateTime): Double = {
def calculateK2(time: ZonedDateTime): Double = {
time.getDayOfYear match {
case x if x < 150 || x > 243 =>
1.03 // correction factor in heating season
Expand All @@ -138,7 +138,7 @@ final case class BMModel(
* @return
* heat demand in Megawatt
*/
private def calculatePTh(
def calculatePTh(
temp: Temperature,
k1: Double,
k2: Double,
Expand All @@ -158,7 +158,7 @@ final case class BMModel(
* @return
* usage
*/
private def calculateUsage(pTh: Power): Double = {
def calculateUsage(pTh: Power): Double = {
// if demand exceeds capacity -> activate peak load boiler (no effect on electrical output)
val maxHeat = Megawatts(43.14)
val usageUnchecked = pTh / maxHeat
Expand All @@ -173,7 +173,7 @@ final case class BMModel(
* @return
* efficiency
*/
private def calculateEff(usage: Double): Double =
def calculateEff(usage: Double): Double =
min(0.18 * pow(usage, 3) - 0.595 * pow(usage, 2) + 0.692 * usage + 0.724, 1)

/** Calculates electrical output from usage and efficiency
Expand All @@ -184,7 +184,7 @@ final case class BMModel(
* @return
* electrical output as Power
*/
private def calculateElOutput(
def calculateElOutput(
usage: Double,
eff: Double,
): Power = {
Expand All @@ -206,7 +206,7 @@ final case class BMModel(
* @return
* electrical output after load gradient has been applied
*/
private def applyLoadGradient(
def applyLoadGradient(
pEl: Power
): Power = {
_lastPower match {
Expand Down
253 changes: 0 additions & 253 deletions src/test/groovy/edu/ie3/simona/model/participant/BMModelTest.groovy

This file was deleted.

Loading

0 comments on commit 80b88af

Please sign in to comment.