Skip to content

Commit 7ca3b1e

Browse files
Merge pull request #1360 from ie3-institute/mh/#1332-introducing-BmModel-to-ParticipantAgent
Factory case class in BmModel and BmInput case in GridAgentBuilder
2 parents c8fdf61 + 7eb4110 commit 7ca3b1e

File tree

9 files changed

+187
-91
lines changed

9 files changed

+187
-91
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7272
- Implementing auto-merge for dependabot PRs [#1339](https://github.com/ie3-institute/simona/issues/1339)
7373
- Introduce operatingPoints also to `ThermalGrid` [#1338](https://github.com/ie3-institute/simona/issues/1338)
7474
- Added configuration for console log level [#1364](https://github.com/ie3-institute/simona/issues/1364)
75+
- Introduced `BmModel` to `ParticipantAgent` [#1332](https://github.com/ie3-institute/simona/issues/1332)
7576

7677
### Changed
7778
- Adapted to changed data source in PSDM [#435](https://github.com/ie3-institute/simona/issues/435)

src/main/scala/edu/ie3/simona/agent/grid/GridAgentBuilder.scala

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class GridAgentBuilder(
143143
curSysPart,
144144
) =>
145145
curSysPart match {
146-
case entity @ (_: BmInput | _: ChpInput | _: EvInput) =>
146+
case entity @ (_: ChpInput | _: EvInput) =>
147147
(
148148
notProcessedElements + entity.getClass.getSimpleName,
149149
availableSystemParticipants,
@@ -389,6 +389,18 @@ class GridAgentBuilder(
389389
environmentRefs.scheduler,
390390
maybeControllingEm,
391391
)
392+
case input: BmInput =>
393+
buildParticipant(
394+
SimpleInputContainer(input),
395+
participantConfigUtil.getOrDefault[BmRuntimeConfig](
396+
input.getUuid
397+
),
398+
outputConfigUtil.getOrDefault(NotifierIdentifier.BioMassPlant),
399+
participantRefs,
400+
simParams,
401+
environmentRefs.scheduler,
402+
maybeControllingEm,
403+
)
392404
case input: WecInput =>
393405
buildParticipant(
394406
SimpleInputContainer(input),

src/main/scala/edu/ie3/simona/config/RuntimeConfig.scala

Lines changed: 84 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ import scala.language.implicitConversions
1616

1717
/** Runtime configurations for simona.
1818
* @param em
19-
* runtime configs for energy management systems
19+
* Runtime configs for energy management systems.
2020
* @param listener
21-
* runtime listener configuration
21+
* Runtime listener configuration.
2222
* @param participant
23-
* runtime configuration
23+
* Runtime configuration.
2424
* @param selectedSubgrids
25-
* option for selected sub grids (default: None)
25+
* Option for selected sub grids (default: None).
2626
* @param selectedVoltLvls
27-
* option for selected voltage levels (default: None)
27+
* Option for selected voltage levels (default: None).
2828
*/
2929
final case class RuntimeConfig(
3030
em: AssetConfigs[EmRuntimeConfig] = AssetConfigs(EmRuntimeConfig()),
@@ -41,11 +41,11 @@ object RuntimeConfig {
4141
/** Wraps an [[BaseRuntimeConfig]] with a [[AssetConfigs]].
4242
*
4343
* @param config
44-
* to wrap
44+
* To wrap.
4545
* @tparam T
46-
* type of config
46+
* Type of config.
4747
* @return
48-
* a [[AssetConfigs]]
48+
* A [[AssetConfigs]].
4949
*/
5050
implicit def wrap[T <: BaseRuntimeConfig](config: T): AssetConfigs[T] =
5151
AssetConfigs(config)
@@ -56,24 +56,27 @@ object RuntimeConfig {
5656
)
5757

5858
/** Runtime configurations for participants.
59+
* @param bm
60+
* Runtime configs for biomass power plants.
5961
* @param evcs
60-
* runtime configs for electrical vehicle charging stations
62+
* Runtime configs for electrical vehicle charging stations.
6163
* @param fixedFeedIn
62-
* runtime configs for fixed feed ins
64+
* Runtime configs for fixed feed ins.
6365
* @param hp
64-
* runtime configs for heat pumps
66+
* Runtime configs for heat pumps.
6567
* @param load
66-
* runtime configs for loads
68+
* Runtime configs for loads.
6769
* @param pv
68-
* runtime configs for photovoltaic plants
70+
* Runtime configs for photovoltaic plants.
6971
* @param requestVoltageDeviationThreshold
70-
* threshold for the voltage deviation
72+
* Threshold for the voltage deviation.
7173
* @param storage
72-
* runtime configs for electrical storages
74+
* Runtime configs for electrical storages.
7375
* @param wec
74-
* runtime configs for wind energy converters
76+
* Runtime configs for wind energy converters.
7577
*/
7678
final case class Participant(
79+
bm: AssetConfigs[BmRuntimeConfig] = BmRuntimeConfig(),
7780
evcs: AssetConfigs[EvcsRuntimeConfig] = EvcsRuntimeConfig(),
7881
fixedFeedIn: AssetConfigs[FixedFeedInRuntimeConfig] =
7982
FixedFeedInRuntimeConfig(),
@@ -95,17 +98,17 @@ object RuntimeConfig {
9598

9699
/** Runtime configuration for electric vehicle charging stations.
97100
* @param calculateMissingReactivePowerWithModel
98-
* if missing reactive power may be filled up with model function (default:
99-
* false)
101+
* If missing reactive power may be filled up with model function (default:
102+
* false).
100103
* @param scaling
101-
* the scaling factor of the power output (default: 1.0)
104+
* The scaling factor of the power output (default: 1.0).
102105
* @param uuids
103-
* of the models that should use this config, for the default config this
104-
* value is ignored
106+
* Of the models that should use this config, for the default config this
107+
* value is ignored.
105108
* @param chargingStrategy
106-
* the charging strategy to use
109+
* The charging strategy to use.
107110
* @param lowestEvSoc
108-
* the lowest SOC possible for EV batteries (inverse of max dod)
111+
* The lowest SOC possible for EV batteries (inverse of max dod).
109112
*/
110113
final case class EvcsRuntimeConfig(
111114
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -117,17 +120,17 @@ object RuntimeConfig {
117120

118121
/** Runtime configuration for energy management systems.
119122
* @param calculateMissingReactivePowerWithModel
120-
* if missing reactive power may be filled up with model function (default:
121-
* false)
123+
* If missing reactive power may be filled up with model function (default:
124+
* false).
122125
* @param scaling
123-
* the scaling factor of the power output (default: 1.0)
126+
* The scaling factor of the power output (default: 1.0).
124127
* @param uuids
125-
* of the models that should use this config, for the default config this
126-
* value is ignored
128+
* Of the models that should use this config, for the default config this
129+
* value is ignored.
127130
* @param aggregateFlex
128-
* strategy for aggregating flexibilities (default: SELF_OPT_EXCL_REG)
131+
* Strategy for aggregating flexibilities (default: SELF_OPT_EXCL_REG).
129132
* @param curtailRegenerative
130-
* if regenerative generation can be curtailed (default: false)
133+
* If regenerative generation can be curtailed (default: false).
131134
*/
132135
final case class EmRuntimeConfig(
133136
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -139,13 +142,13 @@ object RuntimeConfig {
139142

140143
/** Runtime configuration for fixed feed ins.
141144
* @param calculateMissingReactivePowerWithModel
142-
* if missing reactive power may be filled up with model function (default:
143-
* false)
145+
* If missing reactive power may be filled up with model function (default:
146+
* false).
144147
* @param scaling
145-
* the scaling factor of the power output (default: 1.0)
148+
* The scaling factor of the power output (default: 1.0).
146149
* @param uuids
147-
* of the models that should use this config, for the default config this
148-
* value is ignored
150+
* Of the models that should use this config, for the default config this
151+
* value is ignored.
149152
*/
150153
final case class FixedFeedInRuntimeConfig(
151154
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -155,13 +158,13 @@ object RuntimeConfig {
155158

156159
/** Runtime configuration for heat pumps.
157160
* @param calculateMissingReactivePowerWithModel
158-
* if missing reactive power may be filled up with model function (default:
159-
* false)
161+
* If missing reactive power may be filled up with model function (default:
162+
* false).
160163
* @param scaling
161-
* the scaling factor of the power output (default: 1.0)
164+
* The scaling factor of the power output (default: 1.0).
162165
* @param uuids
163-
* of the models that should use this config, for the default config this
164-
* value is ignored
166+
* Of the models that should use this config, for the default config this
167+
* value is ignored.
165168
*/
166169
final case class HpRuntimeConfig(
167170
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -171,18 +174,18 @@ object RuntimeConfig {
171174

172175
/** Runtime configuration for loads.
173176
* @param calculateMissingReactivePowerWithModel
174-
* if missing reactive power may be filled up with model function (default:
175-
* false)
177+
* If missing reactive power may be filled up with model function (default:
178+
* false).
176179
* @param scaling
177-
* the scaling factor of the power output (default: 1.0)
180+
* The scaling factor of the power output (default: 1.0).
178181
* @param uuids
179-
* of the models that should use this config, for the default config this
180-
* value is ignored
182+
* Of the models that should use this config, for the default config this
183+
* value is ignored.
181184
* @param modelBehaviour
182-
* the behaviour of the loads (default: fix)
185+
* The behaviour of the loads (default: fix).
183186
* @param reference
184-
* defined to which reference a load model behaviour might be scaled
185-
* (default: power)
187+
* Defined to which reference a load model behaviour might be scaled
188+
* (default: power).
186189
*/
187190
final case class LoadRuntimeConfig(
188191
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -194,13 +197,13 @@ object RuntimeConfig {
194197

195198
/** Runtime configuration for photovoltaic plants.
196199
* @param calculateMissingReactivePowerWithModel
197-
* if missing reactive power may be filled up with model function (default:
198-
* false)
200+
* If missing reactive power may be filled up with model function (default:
201+
* false).
199202
* @param scaling
200-
* the scaling factor of the power output (default: 1.0)
203+
* The scaling factor of the power output (default: 1.0).
201204
* @param uuids
202-
* of the models that should use this config, for the default config this
203-
* value is ignored
205+
* Of the models that should use this config, for the default config this
206+
* value is ignored.
204207
*/
205208
final case class PvRuntimeConfig(
206209
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -210,17 +213,17 @@ object RuntimeConfig {
210213

211214
/** Runtime configuration for electrical storages.
212215
* @param calculateMissingReactivePowerWithModel
213-
* if missing reactive power may be filled up with model function (default:
214-
* false)
216+
* If missing reactive power may be filled up with model function (default:
217+
* false).
215218
* @param scaling
216-
* the scaling factor of the power output (default: 1.0)
219+
* The scaling factor of the power output (default: 1.0).
217220
* @param uuids
218-
* of the models that should use this config, for the default config this
219-
* value is ignored
221+
* Of the models that should use this config, for the default config this
222+
* value is ignored.
220223
* @param initialSoc
221-
* the initial state of charge in percent of the storage (default: 0.0)
224+
* The initial state of charge in percent of the storage (default: 0.0).
222225
* @param targetSoc
223-
* option for a targeted state of charge (default: None)
226+
* Option for a targeted state of charge (default: None).
224227
*/
225228
final case class StorageRuntimeConfig(
226229
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -232,17 +235,33 @@ object RuntimeConfig {
232235

233236
/** Runtime configuration for wind energy converters.
234237
* @param calculateMissingReactivePowerWithModel
235-
* if missing reactive power may be filled up with model function (default:
236-
* false)
238+
* If missing reactive power may be filled up with model function (default:
239+
* false).
237240
* @param scaling
238-
* the scaling factor of the power output (default: 1.0)
241+
* The scaling factor of the power output (default: 1.0).
239242
* @param uuids
240-
* of the models that should use this config, for the default config this
241-
* value is ignored
243+
* Of the models that should use this config, for the default config this
244+
* value is ignored.
242245
*/
243246
final case class WecRuntimeConfig(
244247
override val calculateMissingReactivePowerWithModel: Boolean = false,
245248
override val scaling: Double = 1.0,
246249
override val uuids: List[String] = List.empty,
247250
) extends BaseRuntimeConfig
251+
252+
/** Runtime configuration for biomass plants.
253+
* @param calculateMissingReactivePowerWithModel
254+
* If missing reactive power may be filled up with model function (default:
255+
* false).
256+
* @param scaling
257+
* The scaling factor of the power output (default: 1.0).
258+
* @param uuids
259+
* Of the models that should use this config, for the default config this
260+
* value is ignored.
261+
*/
262+
final case class BmRuntimeConfig(
263+
override val calculateMissingReactivePowerWithModel: Boolean = false,
264+
override val scaling: Double = 1.0,
265+
override val uuids: List[String] = List.empty,
266+
) extends BaseRuntimeConfig
248267
}

0 commit comments

Comments
 (0)