Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f1e862f
PVModelSpec ScalaTest
SimonHuette Jan 9, 2024
e24dcf7
PVModelSpec ScalaTest v2
SimonHuette Jan 13, 2024
7260555
PVModelSpec ScalaTest v3 (added functions)
SimonHuette Jan 14, 2024
d101ed6
PVModelSpec ScalaTest v4
SimonHuette Jan 14, 2024
a139fd6
added functions in PVModelSpec
SimonHuette Jan 20, 2024
8817d14
all test functions implemented
SimonHuette Jan 21, 2024
cf1cf1d
fixes in PVModelSpec
SimonHuette Jan 22, 2024
2560d14
fixed errors
SimonHuette Jan 25, 2024
c5aa4dd
all test functions now work in PvModelSpec.scala
SimonHuette Jan 26, 2024
0bec4c8
ready for review
SimonHuette Feb 7, 2024
a46d189
Merge branch 'dev' into sh/#646-rewrite-groovy-test-to-scala-test
sebastian-peter Feb 9, 2024
d28bb0a
Merge branch 'dev' into sh/#646-rewrite-groovy-test-to-scala-test
danielfeismann Feb 20, 2024
dafe4b0
Re-introducing given-when-then for one test
sebastian-peter Mar 4, 2024
33e862a
Testing approximate squants value (demonstration for 1 test)
sebastian-peter Mar 4, 2024
45b3528
Merge branch 'dev' into sh/#646-rewrite-groovy-test-to-scala-test
SimonHuette Mar 5, 2024
4708998
removed unused imports
SimonHuette Mar 13, 2024
f645822
adapted new GivenWhenThen-Syntax
SimonHuette Mar 13, 2024
52652d8
removed [Europe/Berlin] everywhere
SimonHuette Mar 16, 2024
5505f46
fixed typo "priciples"
SimonHuette Mar 16, 2024
bed45b7
implemented approximate function (only for angles)
SimonHuette Mar 16, 2024
27af89a
approximate function for irradiation
SimonHuette Mar 16, 2024
bce4427
approximate function for power and reactive power
SimonHuette Mar 16, 2024
4283540
added comment in air mass test
SimonHuette Mar 16, 2024
985abc8
more expressive title
SimonHuette Mar 16, 2024
af5755d
sorted out mixed up test cases from old test
SimonHuette Mar 20, 2024
380ccf7
implemented Daniel's title idea
SimonHuette Mar 20, 2024
9045619
fmt
danielfeismann Mar 25, 2024
37f8d8c
Merge branch 'dev' into sh/#646-rewrite-groovy-test-to-scala-test
danielfeismann Mar 25, 2024
02603ee
ScalaDoc
SimonHuette Mar 30, 2024
02e8729
added em input
SimonHuette Mar 30, 2024
b92ccf0
Merge branch 'dev' into sh/#646-rewrite-groovy-test-to-scala-test
danielfeismann Apr 2, 2024
b602d0d
fmt
danielfeismann Apr 2, 2024
97e3029
added changelog entry
SimonHuette Apr 12, 2024
ee3b04f
deleted PVModelTest.groovy
SimonHuette Apr 12, 2024
a64f9ea
Merge branch 'refs/heads/dev' into sh/#646-rewrite-groovy-test-to-sca…
danielfeismann Apr 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Converting the `GridAgent` and the `DBFSAlgorithm` to `pekko typed` [#666](https://github.com/ie3-institute/simona/issues/666)
- Validation of grid will throw exception instead of just logging errors [#463](https://github.com/ie3-institute/simona/issues/463)
- Refactoring of `GridAgent` messages [#736](https://github.com/ie3-institute/simona/issues/736)
- Rewrote PVModelTest from groovy to scala [#646](https://github.com/ie3-institute/simona/issues/646)

### Fixed
- Removed a repeated line in the documentation of vn_simona config [#658](https://github.com/ie3-institute/simona/issues/658)
Expand Down
28 changes: 14 additions & 14 deletions src/main/scala/edu/ie3/simona/model/participant/PvModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ final case class PvModel private (
/** Override sMax as the power output of a pv unit could become easily up to
* 10% higher than the sRated value found in the technical sheets
*/
override protected val sMax: Power = sRated * 1.1
override val sMax: Power = sRated * 1.1

/** Permissible maximum active power feed in (therefore negative) */
protected val pMax: Power = sMax * cosPhiRated * -1d
Expand Down Expand Up @@ -154,7 +154,7 @@ final case class PvModel private (
* @return
* day angle J
*/
private def calcAngleJ(time: ZonedDateTime): Angle = {
def calcAngleJ(time: ZonedDateTime): Angle = {
val day = time.getDayOfYear // day of the year
val j = 2d * Math.PI * ((day - 1d) / 365)
Radians(j)
Expand All @@ -170,7 +170,7 @@ final case class PvModel private (
* @return
* declination angle
*/
private def calcSunDeclinationDelta(
def calcSunDeclinationDelta(
angleJ: Angle
): Angle = {
val jInRad = angleJ.toRadians
Expand Down Expand Up @@ -198,7 +198,7 @@ final case class PvModel private (
* @return
* hour angle omega
*/
private def calcHourAngleOmega(
def calcHourAngleOmega(
time: ZonedDateTime,
angleJ: Angle,
longitude: Angle,
Expand Down Expand Up @@ -228,7 +228,7 @@ final case class PvModel private (
* @return
* sunset angle omegaSS
*/
private def calcSunsetAngleOmegaSS(
def calcSunsetAngleOmegaSS(
latitude: Angle,
delta: Angle,
): Angle = {
Expand Down Expand Up @@ -256,7 +256,7 @@ final case class PvModel private (
* @return
* solar altitude angle alphaS
*/
private def calcSolarAltitudeAngleAlphaS(
def calcSolarAltitudeAngleAlphaS(
omega: Angle,
delta: Angle,
latitude: Angle,
Expand Down Expand Up @@ -285,7 +285,7 @@ final case class PvModel private (
* @return
* the zenith angle
*/
private def calcZenithAngleThetaZ(
def calcZenithAngleThetaZ(
alphaS: Angle
): Angle = {
val alphaSInRad = alphaS.toRadians
Expand All @@ -303,7 +303,7 @@ final case class PvModel private (
* @return
* air mass
*/
private def calcAirMass(thetaZ: Angle): Double = {
def calcAirMass(thetaZ: Angle): Double = {
val thetaZInRad = thetaZ.toRadians

// radius of the earth in kilometers
Expand All @@ -326,7 +326,7 @@ final case class PvModel private (
* @return
* extraterrestrial radiation I0
*/
private def calcExtraterrestrialRadiationI0(
def calcExtraterrestrialRadiationI0(
angleJ: Angle
): Irradiation = {
val jInRad = angleJ.toRadians
Expand Down Expand Up @@ -361,7 +361,7 @@ final case class PvModel private (
* @return
* angle of incidence thetaG
*/
private def calcAngleOfIncidenceThetaG(
def calcAngleOfIncidenceThetaG(
delta: Angle,
latitude: Angle,
gammaE: Angle,
Expand Down Expand Up @@ -401,7 +401,7 @@ final case class PvModel private (
* omega1 and omega encapsulated in an Option, if applicable. None
* otherwise
*/
private def calculateBeamOmegas(
def calculateBeamOmegas(
thetaG: Angle,
omega: Angle,
omegaSS: Angle,
Expand Down Expand Up @@ -462,7 +462,7 @@ final case class PvModel private (
* @return
* the beam radiation on the sloped surface
*/
private def calcBeamRadiationOnSlopedSurface(
def calcBeamRadiationOnSlopedSurface(
eBeamH: Irradiation,
omegas: Option[(Angle, Angle)],
delta: Angle,
Expand Down Expand Up @@ -531,7 +531,7 @@ final case class PvModel private (
* @return
* the diffuse radiation on the sloped surface
*/
private def calcDiffuseRadiationOnSlopedSurfacePerez(
def calcDiffuseRadiationOnSlopedSurfacePerez(
eDifH: Irradiation,
eBeamH: Irradiation,
airMass: Double,
Expand Down Expand Up @@ -634,7 +634,7 @@ final case class PvModel private (
* @return
* the reflected radiation on the sloped surface eRefS
*/
private def calcReflectedRadiationOnSlopedSurface(
def calcReflectedRadiationOnSlopedSurface(
eBeamH: Irradiation,
eDifH: Irradiation,
gammaE: Angle,
Expand Down
Loading