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 8 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Replace mutable var in ChpModelSpec [#1002](https://github.com/ie3-institute/simona/issues/1002)
- Move compression of output files into `ResultEventListener`[#965](https://github.com/ie3-institute/simona/issues/965)
- Rewrote StorageModelTest from groovy to scala [#646](https://github.com/ie3-institute/simona/issues/646)

- Changed to the psdm `LoadProfileSource` [#951](https://github.com/ie3-institute/simona/issues/951)

### Fixed
- Removed a repeated line in the documentation of vn_simona config [#658](https://github.com/ie3-institute/simona/issues/658)
- Removed version number "2.0" from the logo printed to console [#642](https://github.com/ie3-institute/simona/issues/642)
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