From 29a2a035a5ab6f1bba5ee7c09707c9da9c3f07ba Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Fri, 25 Feb 2022 11:20:25 +0100 Subject: [PATCH 01/12] fix variable height to elevationAngle --- src/main/scala/edu/ie3/simona/model/participant/PVModel.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/edu/ie3/simona/model/participant/PVModel.scala b/src/main/scala/edu/ie3/simona/model/participant/PVModel.scala index 235f8a3981..aa3f746cc7 100644 --- a/src/main/scala/edu/ie3/simona/model/participant/PVModel.scala +++ b/src/main/scala/edu/ie3/simona/model/participant/PVModel.scala @@ -817,7 +817,7 @@ case object PVModel { inputModel.getAlbedo, inputModel.getEtaConv, inputModel.getAzimuth, - inputModel.getHeight + inputModel.getElevationAngle ) model.enable() From a1ad70dc85a353da68373f8729dee887ab1862c8 Mon Sep 17 00:00:00 2001 From: Daniel Feismann <98817556+danielfeismann@users.noreply.github.com> Date: Wed, 2 Mar 2022 10:39:39 +0100 Subject: [PATCH 02/12] Change Solar_Height to SOLAR_ELEVATION_ANGLE in PvInputTestData --- .../edu/ie3/simona/test/common/input/PvInputTestData.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/scala/edu/ie3/simona/test/common/input/PvInputTestData.scala b/src/test/scala/edu/ie3/simona/test/common/input/PvInputTestData.scala index 9d1fcbed43..415941a886 100644 --- a/src/test/scala/edu/ie3/simona/test/common/input/PvInputTestData.scala +++ b/src/test/scala/edu/ie3/simona/test/common/input/PvInputTestData.scala @@ -52,7 +52,7 @@ trait PvInputTestData 1, Quantities.getQuantity(12, StandardUnits.AZIMUTH), Quantities.getQuantity(10, StandardUnits.EFFICIENCY), - Quantities.getQuantity(100, StandardUnits.SOLAR_HEIGHT), + Quantities.getQuantity(100, StandardUnits.SOLAR_ELEVATION_ANGLE), 12, 11, false, From 9cf52c43cb345cc20f31f5e5a6c9245a0702c104 Mon Sep 17 00:00:00 2001 From: Daniel Feismann <98817556+danielfeismann@users.noreply.github.com> Date: Thu, 3 Mar 2022 10:52:14 +0100 Subject: [PATCH 03/12] height to elevationAngle in pv_input.csv --- input/samples/vn_simona/fullGrid/pv_input.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input/samples/vn_simona/fullGrid/pv_input.csv b/input/samples/vn_simona/fullGrid/pv_input.csv index 011dde4eca..41986cdd09 100644 --- a/input/samples/vn_simona/fullGrid/pv_input.csv +++ b/input/samples/vn_simona/fullGrid/pv_input.csv @@ -1,4 +1,4 @@ -"uuid","albedo","azimuth","cos_phi_rated","eta_conv","height","id","k_g","k_t","market_reaction","node","operates_from","operates_until","operator","q_characteristics","s_rated" +"uuid","albedo","azimuth","cos_phi_rated","eta_conv","elevationAngle","id","k_g","k_t","market_reaction","node","operates_from","operates_until","operator","q_characteristics","s_rated" 5b38af42-1ee4-4a41-b666-ea141187df37,0.20000000298023224,-11.463644027709961,0.8999999761581421,96.0,33.62879943847656,NS_NET146_F2_(3)_PV,0.8999999761581421,1.0,false,0170837a-1876-45f9-a613-666f9991964d,,,,cosPhiFixed:{(0.00,0.90)},10.0 e447506e-3d43-4bce-8aab-a7ca8b7fbc45,0.20000000298023224,3.8914573192596436,0.8999999761581421,98.0,42.77021408081055,NS_NET146_F4_(9)_PV,0.8999999761581421,1.0,false,9b889b73-c108-4b38-b6eb-3377841e0c83,,,,cosPhiFixed:{(0.00,0.90)},10.0 6cac0624-6336-4418-bcf0-990abcdb824b,0.20000000298023224,-8.097375869750977,0.8999999761581421,98.0,44.90728759765625,NS_NET146_F4_(16)_PV,0.8999999761581421,1.0,false,9f7599de-c488-46c5-b053-1279a511f7b9,,,,cosPhiFixed:{(0.00,0.90)},30.0 From fb5cceb4c1779c36f2928dd36abedac2e16b3c2b Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Fri, 4 Mar 2022 10:39:36 +0100 Subject: [PATCH 04/12] snake case for csv file --- input/samples/vn_simona/fullGrid/pv_input.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input/samples/vn_simona/fullGrid/pv_input.csv b/input/samples/vn_simona/fullGrid/pv_input.csv index 41986cdd09..a7c99726d2 100644 --- a/input/samples/vn_simona/fullGrid/pv_input.csv +++ b/input/samples/vn_simona/fullGrid/pv_input.csv @@ -1,4 +1,4 @@ -"uuid","albedo","azimuth","cos_phi_rated","eta_conv","elevationAngle","id","k_g","k_t","market_reaction","node","operates_from","operates_until","operator","q_characteristics","s_rated" +"uuid","albedo","azimuth","cos_phi_rated","eta_conv","elevation_angle","id","k_g","k_t","market_reaction","node","operates_from","operates_until","operator","q_characteristics","s_rated" 5b38af42-1ee4-4a41-b666-ea141187df37,0.20000000298023224,-11.463644027709961,0.8999999761581421,96.0,33.62879943847656,NS_NET146_F2_(3)_PV,0.8999999761581421,1.0,false,0170837a-1876-45f9-a613-666f9991964d,,,,cosPhiFixed:{(0.00,0.90)},10.0 e447506e-3d43-4bce-8aab-a7ca8b7fbc45,0.20000000298023224,3.8914573192596436,0.8999999761581421,98.0,42.77021408081055,NS_NET146_F4_(9)_PV,0.8999999761581421,1.0,false,9b889b73-c108-4b38-b6eb-3377841e0c83,,,,cosPhiFixed:{(0.00,0.90)},10.0 6cac0624-6336-4418-bcf0-990abcdb824b,0.20000000298023224,-8.097375869750977,0.8999999761581421,98.0,44.90728759765625,NS_NET146_F4_(16)_PV,0.8999999761581421,1.0,false,9f7599de-c488-46c5-b053-1279a511f7b9,,,,cosPhiFixed:{(0.00,0.90)},30.0 From a978077a6b72a657608efbccf5bde3854e17843f Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Fri, 4 Mar 2022 10:42:38 +0100 Subject: [PATCH 05/12] snake case for csv file --- .../ie3/simona/model/participant/pv/it/grid_data/pv_input.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/resources/edu/ie3/simona/model/participant/pv/it/grid_data/pv_input.csv b/src/test/resources/edu/ie3/simona/model/participant/pv/it/grid_data/pv_input.csv index a594598bfc..b4ff778eaf 100644 --- a/src/test/resources/edu/ie3/simona/model/participant/pv/it/grid_data/pv_input.csv +++ b/src/test/resources/edu/ie3/simona/model/participant/pv/it/grid_data/pv_input.csv @@ -1,4 +1,4 @@ -"uuid";"albedo";"azimuth";"cosphi_rated";"eta_conv";"height";"id";"k_g";"k_t";"market_reaction";"operates_from";"operates_until";"s_rated";"q_characteristics";"node";"operator" +"uuid";"albedo";"azimuth";"cosphi_rated";"eta_conv";"elevation_angle";"id";"k_g";"k_t";"market_reaction";"operates_from";"operates_until";"s_rated";"q_characteristics";"node";"operator" 7ac5bb15-36ee-42b0-902b-9cd520e241b3;0.2;16.09490984119475;0.95;91.23978812713176;51.75144341774285;pv_south_1;0.9;1;false;;;100;cosPhiFixed:{(0.00,1.0)};022a94c6-2d60-4400-875c-ab9db1ae2736; 939d254a-98b9-43d9-939d-dac9d91e7d73;0.2;-11.883286549709737;0.95;93.55452200165019;50.710754711180925;pv_south_2;0.9;1;false;;;100;cosPhiFixed:{(0.00,1.0)};9a2524f1-3639-4e90-a547-81a259712f8c; e3b34366-9a4b-4e8f-b46d-fccdd3c318b3;0.2;-3.6445723846554756;0.95;90.07983175106347;50.727743320167065;pv_south_3;0.9;1;false;;;100;cosPhiFixed:{(0.00,1.0)};9354b02c-a4a9-4e9d-905a-e48110b04d88; From 0f417f9469c1a80c78d1ff0c27c94be18be0e8e3 Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Fri, 4 Mar 2022 10:43:37 +0100 Subject: [PATCH 06/12] height to elevationAngle --- .../groovy/edu/ie3/simona/model/participant/PVModelIT.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/groovy/edu/ie3/simona/model/participant/PVModelIT.groovy b/src/test/groovy/edu/ie3/simona/model/participant/PVModelIT.groovy index 90002b66e6..d0dbdc8048 100644 --- a/src/test/groovy/edu/ie3/simona/model/participant/PVModelIT.groovy +++ b/src/test/groovy/edu/ie3/simona/model/participant/PVModelIT.groovy @@ -153,7 +153,7 @@ trait PVModelITHelper { inputModel.getAlbedo(), inputModel.getEtaConv(), inputModel.getAzimuth(), - inputModel.getHeight(), + inputModel.getElevationAngle(), getQuantity(1d, SQUARE_METRE) ) From a7c49e98c1e1f390baff7223218fef839d50a31e Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Fri, 4 Mar 2022 10:44:19 +0100 Subject: [PATCH 07/12] height to elevationAngle --- .../groovy/edu/ie3/simona/model/participant/PVModelTest.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/groovy/edu/ie3/simona/model/participant/PVModelTest.groovy b/src/test/groovy/edu/ie3/simona/model/participant/PVModelTest.groovy index 6cb8535c2c..6aac83d271 100644 --- a/src/test/groovy/edu/ie3/simona/model/participant/PVModelTest.groovy +++ b/src/test/groovy/edu/ie3/simona/model/participant/PVModelTest.groovy @@ -108,7 +108,7 @@ class PVModelTest extends Specification { pvInput.getAlbedo(), pvInput.getEtaConv() as ComparableQuantity, getQuantity(Math.toRadians(pvInput.getAzimuth().getValue().doubleValue()), RADIAN), - getQuantity(Math.toRadians(pvInput.getHeight().getValue().doubleValue()), RADIAN), + getQuantity(Math.toRadians(pvInput.getElevationAngle().getValue().doubleValue()), RADIAN), getQuantity(1d, SQUARE_METRE) ) } From 230a2e7dedf70fdb7bd25e1eb31c09f24e909916 Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Fri, 4 Mar 2022 11:11:31 +0100 Subject: [PATCH 08/12] Change PSDM Weather to Cosmo --- .../edu/ie3/simona/service/weather/WeatherSource.scala | 2 +- .../ie3/simona/service/weather/WeatherSourceWrapper.scala | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/scala/edu/ie3/simona/service/weather/WeatherSource.scala b/src/main/scala/edu/ie3/simona/service/weather/WeatherSource.scala index 6da1016db2..62c4856b41 100644 --- a/src/main/scala/edu/ie3/simona/service/weather/WeatherSource.scala +++ b/src/main/scala/edu/ie3/simona/service/weather/WeatherSource.scala @@ -559,7 +559,7 @@ object WeatherSource { */ object WeatherScheme extends ParsableEnumeration { val ICON: Value = Value("icon") - val PSDM: Value = Value("psdm") + val Cosmo: Value = Value("psdm") } } diff --git a/src/main/scala/edu/ie3/simona/service/weather/WeatherSourceWrapper.scala b/src/main/scala/edu/ie3/simona/service/weather/WeatherSourceWrapper.scala index baf41e6c9f..46e567b30c 100644 --- a/src/main/scala/edu/ie3/simona/service/weather/WeatherSourceWrapper.scala +++ b/src/main/scala/edu/ie3/simona/service/weather/WeatherSourceWrapper.scala @@ -14,7 +14,7 @@ import edu.ie3.datamodel.io.connectors.{ } import edu.ie3.datamodel.io.factory.timeseries.{ IconTimeBasedWeatherValueFactory, - PsdmTimeBasedWeatherValueFactory + CosmoTimeBasedWeatherValueFactory } import edu.ie3.datamodel.io.naming.FileNamingStrategy import edu.ie3.datamodel.io.source.couchbase.CouchbaseWeatherSource @@ -357,7 +357,7 @@ private[weather] object WeatherSourceWrapper extends LazyLogging { .mkString("\n\t")}'" ) case Success(WeatherScheme.ICON) => new IconTimeBasedWeatherValueFactory() - case Success(WeatherScheme.PSDM) => new PsdmTimeBasedWeatherValueFactory() + case Success(WeatherScheme.Cosmo) => new CosmoTimeBasedWeatherValueFactory() case Success(unknownScheme) => throw new InitializationException( s"Error while initializing WeatherFactory for weather source wrapper: weather scheme '$unknownScheme' is not an expected input." @@ -373,8 +373,8 @@ private[weather] object WeatherSourceWrapper extends LazyLogging { ) case Success(WeatherScheme.ICON) => new IconTimeBasedWeatherValueFactory(timeStampPattern) - case Success(WeatherScheme.PSDM) => - new PsdmTimeBasedWeatherValueFactory(timeStampPattern) + case Success(WeatherScheme.Cosmo) => + new CosmoTimeBasedWeatherValueFactory(timeStampPattern) case Success(unknownScheme) => throw new InitializationException( s"Error while initializing WeatherFactory for weather source wrapper: weather scheme '$unknownScheme' is not an expected input." From b861a999cf938c4b331a2010b7f7b48e615ab8b2 Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Fri, 4 Mar 2022 11:20:31 +0100 Subject: [PATCH 09/12] GSA --- .../edu/ie3/simona/service/weather/WeatherSourceWrapper.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/scala/edu/ie3/simona/service/weather/WeatherSourceWrapper.scala b/src/main/scala/edu/ie3/simona/service/weather/WeatherSourceWrapper.scala index 46e567b30c..736d00773a 100644 --- a/src/main/scala/edu/ie3/simona/service/weather/WeatherSourceWrapper.scala +++ b/src/main/scala/edu/ie3/simona/service/weather/WeatherSourceWrapper.scala @@ -357,7 +357,8 @@ private[weather] object WeatherSourceWrapper extends LazyLogging { .mkString("\n\t")}'" ) case Success(WeatherScheme.ICON) => new IconTimeBasedWeatherValueFactory() - case Success(WeatherScheme.Cosmo) => new CosmoTimeBasedWeatherValueFactory() + case Success(WeatherScheme.Cosmo) => + new CosmoTimeBasedWeatherValueFactory() case Success(unknownScheme) => throw new InitializationException( s"Error while initializing WeatherFactory for weather source wrapper: weather scheme '$unknownScheme' is not an expected input." From c35b7e426d2908c5cfb6473d98aa86f8cd2b6957 Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Fri, 4 Mar 2022 11:28:58 +0100 Subject: [PATCH 10/12] COSMO to uppercase --- .../scala/edu/ie3/simona/service/weather/WeatherSource.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/edu/ie3/simona/service/weather/WeatherSource.scala b/src/main/scala/edu/ie3/simona/service/weather/WeatherSource.scala index 62c4856b41..9e8b7c7065 100644 --- a/src/main/scala/edu/ie3/simona/service/weather/WeatherSource.scala +++ b/src/main/scala/edu/ie3/simona/service/weather/WeatherSource.scala @@ -559,7 +559,7 @@ object WeatherSource { */ object WeatherScheme extends ParsableEnumeration { val ICON: Value = Value("icon") - val Cosmo: Value = Value("psdm") + val COSMO: Value = Value("cosmo") } } From e3fd1f92e6835cb429dd53f977ae5f21823a087b Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Fri, 4 Mar 2022 11:38:25 +0100 Subject: [PATCH 11/12] COSMO to uppercase WeatherSourceWrapper --- .../edu/ie3/simona/service/weather/WeatherSourceWrapper.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/edu/ie3/simona/service/weather/WeatherSourceWrapper.scala b/src/main/scala/edu/ie3/simona/service/weather/WeatherSourceWrapper.scala index 736d00773a..ded598932e 100644 --- a/src/main/scala/edu/ie3/simona/service/weather/WeatherSourceWrapper.scala +++ b/src/main/scala/edu/ie3/simona/service/weather/WeatherSourceWrapper.scala @@ -357,7 +357,7 @@ private[weather] object WeatherSourceWrapper extends LazyLogging { .mkString("\n\t")}'" ) case Success(WeatherScheme.ICON) => new IconTimeBasedWeatherValueFactory() - case Success(WeatherScheme.Cosmo) => + case Success(WeatherScheme.COSMO) => new CosmoTimeBasedWeatherValueFactory() case Success(unknownScheme) => throw new InitializationException( @@ -374,7 +374,7 @@ private[weather] object WeatherSourceWrapper extends LazyLogging { ) case Success(WeatherScheme.ICON) => new IconTimeBasedWeatherValueFactory(timeStampPattern) - case Success(WeatherScheme.Cosmo) => + case Success(WeatherScheme.COSMO) => new CosmoTimeBasedWeatherValueFactory(timeStampPattern) case Success(unknownScheme) => throw new InitializationException( From ffc27875d486cfa47932e4e82442a3746ab9e281 Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Fri, 4 Mar 2022 14:37:57 +0100 Subject: [PATCH 12/12] Change Schemes --- .../ie3/simona/service/primary/PrimaryServiceProxy.scala | 8 ++++---- .../ie3/simona/service/primary/PrimaryServiceWorker.scala | 2 +- .../scala/edu/ie3/simona/config/ConfigFailFastSpec.scala | 2 +- .../simona/service/primary/PrimaryServiceProxySpec.scala | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/scala/edu/ie3/simona/service/primary/PrimaryServiceProxy.scala b/src/main/scala/edu/ie3/simona/service/primary/PrimaryServiceProxy.scala index 27c9808db9..010c0525dd 100644 --- a/src/main/scala/edu/ie3/simona/service/primary/PrimaryServiceProxy.scala +++ b/src/main/scala/edu/ie3/simona/service/primary/PrimaryServiceProxy.scala @@ -7,9 +7,9 @@ package edu.ie3.simona.service.primary import akka.actor.{Actor, ActorRef, PoisonPill, Props} -import edu.ie3.datamodel.io.connectors.CsvFileConnector.CsvIndividualTimeSeriesMetaInformation -import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme +import edu.ie3.datamodel.io.csv.CsvIndividualTimeSeriesMetaInformation import edu.ie3.datamodel.io.naming.FileNamingStrategy +import edu.ie3.datamodel.io.naming.timeseries.ColumnScheme import edu.ie3.datamodel.io.source.TimeSeriesMappingSource import edu.ie3.datamodel.io.source.csv.CsvTimeSeriesMappingSource import edu.ie3.datamodel.models.value.Value @@ -148,7 +148,7 @@ case class PrimaryServiceProxy( .distinct .flatMap { timeSeriesUuid => mappingSource - .getTimeSeriesMetaInformation(timeSeriesUuid) + .timeSeriesMetaInformation(timeSeriesUuid) .toScala match { case Some(metaInformation) => val columnScheme = metaInformation.getColumnScheme @@ -386,7 +386,7 @@ case class PrimaryServiceProxy( None ) => /* The mapping and actual data sources are from csv. At first, get the file name of the file to read. */ - Try(mappingSource.getTimeSeriesMetaInformation(timeSeriesUuid).get) + Try(mappingSource.timeSeriesMetaInformation(timeSeriesUuid).get) .flatMap { /* Time series meta information could be successfully obtained */ case csvMetaData: CsvIndividualTimeSeriesMetaInformation => diff --git a/src/main/scala/edu/ie3/simona/service/primary/PrimaryServiceWorker.scala b/src/main/scala/edu/ie3/simona/service/primary/PrimaryServiceWorker.scala index 8553ef5533..ec50abf716 100644 --- a/src/main/scala/edu/ie3/simona/service/primary/PrimaryServiceWorker.scala +++ b/src/main/scala/edu/ie3/simona/service/primary/PrimaryServiceWorker.scala @@ -7,9 +7,9 @@ package edu.ie3.simona.service.primary import akka.actor.{ActorRef, Props} -import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme import edu.ie3.datamodel.io.factory.timeseries.TimeBasedSimpleValueFactory import edu.ie3.datamodel.io.naming.FileNamingStrategy +import edu.ie3.datamodel.io.naming.timeseries.ColumnScheme import edu.ie3.datamodel.io.source.TimeSeriesSource import edu.ie3.datamodel.io.source.csv.CsvTimeSeriesSource import edu.ie3.datamodel.models.value.Value diff --git a/src/test/scala/edu/ie3/simona/config/ConfigFailFastSpec.scala b/src/test/scala/edu/ie3/simona/config/ConfigFailFastSpec.scala index decc6d59cd..57a4144cc0 100644 --- a/src/test/scala/edu/ie3/simona/config/ConfigFailFastSpec.scala +++ b/src/test/scala/edu/ie3/simona/config/ConfigFailFastSpec.scala @@ -875,7 +875,7 @@ class ConfigFailFastSpec extends UnitSpec with ConfigTestData { ConfigFailFast invokePrivate checkWeatherDataSource( weatherDataSource ) - }.getMessage shouldBe "The weather data scheme 'this won't work' is not supported. Supported schemes:\n\ticon\n\tpsdm" + }.getMessage shouldBe "The weather data scheme 'this won't work' is not supported. Supported schemes:\n\ticon\n\tcosmo" } } diff --git a/src/test/scala/edu/ie3/simona/service/primary/PrimaryServiceProxySpec.scala b/src/test/scala/edu/ie3/simona/service/primary/PrimaryServiceProxySpec.scala index dae2702292..94a27323b9 100644 --- a/src/test/scala/edu/ie3/simona/service/primary/PrimaryServiceProxySpec.scala +++ b/src/test/scala/edu/ie3/simona/service/primary/PrimaryServiceProxySpec.scala @@ -10,8 +10,8 @@ import akka.actor.{ActorRef, ActorSystem, PoisonPill} import akka.testkit.{TestActorRef, TestProbe} import akka.util.Timeout import com.typesafe.config.ConfigFactory -import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme import edu.ie3.datamodel.io.naming.FileNamingStrategy +import edu.ie3.datamodel.io.naming.timeseries.ColumnScheme import edu.ie3.datamodel.io.source.TimeSeriesMappingSource import edu.ie3.datamodel.io.source.csv.CsvTimeSeriesMappingSource import edu.ie3.datamodel.models.value.{SValue, Value}