-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Math.floor when calcNextEventTick for charging entities #1257
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the discussion and the initiative.
Found some more examples that we should adapt at the same time:
simona/src/main/scala/edu/ie3/simona/model/thermal/CylindricalThermalStorage.scala
Lines 108 to 109 in 9c80601
val duration = (maxEnergyThreshold - updatedEnergy) / qDot | |
val durationInTicks = Math.round(duration.toSeconds) |
simona/src/main/scala/edu/ie3/simona/model/thermal/CylindricalThermalStorage.scala
Lines 115 to 116 in 9c80601
val duration = updatedEnergy / qDot * (-1) | |
val durationInTicks = Math.round(duration.toSeconds) |
simona/src/main/scala/edu/ie3/simona/model/thermal/ThermalHouse.scala
Lines 339 to 342 in 9c80601
val duration = Math.round( | |
(flexibleEnergy / (qDot * math.signum(qDot.toWatts))).toSeconds | |
) | |
Some(tick + duration) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, didn't realize that many tests needed to be adapted. Thanks though
# Conflicts: # CHANGELOG.md
resolves #1256