Skip to content
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

Adapting to psdm LoadProfileSource. #961

Draft
wants to merge 11 commits into
base: dev
Choose a base branch
from
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix implausible test cases of HpModelSpec [#1042](https://github.com/ie3-institute/simona/issues/1042)
- Refactoring to only use 'lastHpState' and 'relevantData' for 'ThermalGrid' calculations [#916](https://github.com/ie3-institute/simona/issues/916)
- Refactor thermal calcRelevantData [#1051](https://github.com/ie3-institute/simona/issues/1051)
- Changed to the psdm `LoadProfileSource` [#951](https://github.com/ie3-institute/simona/issues/951)

### Fixed
- Fix rendering of references in documentation [#505](https://github.com/ie3-institute/simona/issues/505)
Expand Down
4 changes: 4 additions & 0 deletions input/samples/vn_simona/vn_simona.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ simona.input.grid.datasource.csvParams = {
isHierarchic: false
}

simona.input.loadprofile.datasource = {
loadBuildIns = true
}

simona.input.weather.datasource = {
scheme = "icon"
sampleParams.use = true
Expand Down
22 changes: 17 additions & 5 deletions src/main/resources/config/config-template.conf
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,23 @@ simona.input.weather.datasource = {
gridModel = "string" | "icon"
#@optional
csvParams = BaseCsvParams
#@optional
sampleParams = {
use: "boolean" | true # dummy parameter to allow sample data
}
#@optional
sampleParams = {
use: "boolean" | true # dummy parameter to allow sample data
}
#@optional
sqlParams = {
jdbcUrl: string
userName: string
password: string
tableName: string
schemaName: string | "public"
}
}
}
simona.input.loadprofile.datasource = {
#@optional
csvParams = BaseCsvParams
#@optional
sqlParams = {
jdbcUrl: string
Expand All @@ -253,7 +266,6 @@ simona.input.weather.datasource = {
tableName: string
schemaName: string | "public"
}
}
}
##################################################################
# Output Parameters
Expand Down
97 changes: 0 additions & 97 deletions src/main/resources/load/random_load_parameters.csv

This file was deleted.

97 changes: 0 additions & 97 deletions src/main/resources/load/standard_load_profiles.csv

This file was deleted.

3 changes: 3 additions & 0 deletions src/main/scala/edu/ie3/simona/agent/EnvironmentRefs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import org.apache.pekko.actor.{ActorRef => ClassicRef}
* Reference to the primary service proxy
* @param weather
* Reference to the service, that provides weather information
* @param loadProfiles
* Reference to the service, that provides load profile information
* @param evDataService
* Reference to the EV data service, if existing
*/
Expand All @@ -30,5 +32,6 @@ final case class EnvironmentRefs(
runtimeEventListener: ActorRef[RuntimeEvent],
primaryServiceProxy: ClassicRef,
weather: ClassicRef,
loadProfiles: ClassicRef,
evDataService: Option[ClassicRef],
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import edu.ie3.simona.agent.em.EmAgent
import edu.ie3.simona.agent.participant.ParticipantAgent.ParticipantMessage
import edu.ie3.simona.agent.participant.data.secondary.SecondaryDataService.{
ActorExtEvDataService,
ActorLoadProfileService,
ActorWeatherService,
}
import edu.ie3.simona.agent.participant.evcs.EvcsAgent
Expand All @@ -31,6 +32,7 @@ import edu.ie3.simona.event.ResultEvent
import edu.ie3.simona.event.notifier.NotifierConfig
import edu.ie3.simona.exceptions.CriticalFailureException
import edu.ie3.simona.exceptions.agent.GridAgentInitializationException
import edu.ie3.simona.model.participant.load.LoadModelBehaviour
import edu.ie3.simona.ontology.messages.SchedulerMessage.ScheduleActivation
import edu.ie3.simona.ontology.messages.flex.FlexibilityMessage.FlexResponse
import edu.ie3.simona.util.ConfigUtil
Expand Down Expand Up @@ -345,6 +347,7 @@ class GridAgentController(
input.getUuid
),
environmentRefs.primaryServiceProxy,
environmentRefs.loadProfiles,
simulationStartDate,
simulationEndDate,
resolution,
Expand Down Expand Up @@ -530,6 +533,7 @@ class GridAgentController(
loadInput: LoadInput,
modelConfiguration: LoadRuntimeConfig,
primaryServiceProxy: ClassicRef,
loadProfileService: ClassicRef,
simulationStartDate: ZonedDateTime,
simulationEndDate: ZonedDateTime,
resolution: Long,
Expand All @@ -545,7 +549,7 @@ class GridAgentController(
loadInput,
modelConfiguration,
primaryServiceProxy,
Iterable.empty,
Iterable(ActorLoadProfileService(loadProfileService)),
simulationStartDate,
simulationEndDate,
resolution,
Expand Down
Loading
Loading