Skip to content

Commit 91ffe82

Browse files
committed
Merge branch 'dev' into ms/#53-upgrate-to-scala3
# Conflicts: # src/main/scala/edu/ie3/simona/config/RuntimeConfig.scala # src/main/scala/edu/ie3/simona/model/participant/BmModel.scala
2 parents 9852d0c + 7ca3b1e commit 91ffe82

File tree

9 files changed

+188
-91
lines changed

9 files changed

+188
-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: 85 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ import scala.deriving.Mirror
1717

1818
/** Runtime configurations for simona.
1919
* @param em
20-
* runtime configs for energy management systems
20+
* Runtime configs for energy management systems.
2121
* @param listener
22-
* runtime listener configuration
22+
* Runtime listener configuration.
2323
* @param participant
24-
* runtime configuration
24+
* Runtime configuration.
2525
* @param selectedSubgrids
26-
* option for selected sub grids (default: None)
26+
* Option for selected sub grids (default: None).
2727
* @param selectedVoltLvls
28-
* option for selected voltage levels (default: None)
28+
* Option for selected voltage levels (default: None).
2929
*/
3030
final case class RuntimeConfig(
3131
em: AssetConfigs[EmRuntimeConfig] = AssetConfigs(EmRuntimeConfig()),
@@ -46,11 +46,11 @@ object RuntimeConfig {
4646
/** Wraps an [[BaseRuntimeConfig]] with a [[ParticipantRuntimeConfigs]].
4747
*
4848
* @param config
49-
* to wrap
49+
* To wrap.
5050
* @tparam T
51-
* type of config
51+
* Type of config.
5252
* @return
53-
* a [[AssetConfigs]]
53+
* A [[AssetConfigs]].
5454
*/
5555
implicit def wrap[T <: BaseRuntimeConfig](config: T): AssetConfigs[T] =
5656
AssetConfigs(config)
@@ -61,24 +61,27 @@ object RuntimeConfig {
6161
) derives ConfigConvert
6262

6363
/** Runtime configurations for participants.
64+
* @param bm
65+
* Runtime configs for biomass power plants.
6466
* @param evcs
65-
* runtime configs for electrical vehicle charging stations
67+
* Runtime configs for electrical vehicle charging stations.
6668
* @param fixedFeedIn
67-
* runtime configs for fixed feed ins
69+
* Runtime configs for fixed feed ins.
6870
* @param hp
69-
* runtime configs for heat pumps
71+
* Runtime configs for heat pumps.
7072
* @param load
71-
* runtime configs for loads
73+
* Runtime configs for loads.
7274
* @param pv
73-
* runtime configs for photovoltaic plants
75+
* Runtime configs for photovoltaic plants.
7476
* @param requestVoltageDeviationThreshold
75-
* threshold for the voltage deviation
77+
* Threshold for the voltage deviation.
7678
* @param storage
77-
* runtime configs for electrical storages
79+
* Runtime configs for electrical storages.
7880
* @param wec
79-
* runtime configs for wind energy converters
81+
* Runtime configs for wind energy converters.
8082
*/
8183
final case class Participant(
84+
bm: AssetConfigs[BmRuntimeConfig] = BmRuntimeConfig(),
8285
evcs: AssetConfigs[EvcsRuntimeConfig] = EvcsRuntimeConfig(),
8386
fixedFeedIn: AssetConfigs[FixedFeedInRuntimeConfig] =
8487
FixedFeedInRuntimeConfig(),
@@ -100,17 +103,17 @@ object RuntimeConfig {
100103

101104
/** Runtime configuration for electric vehicle charging stations.
102105
* @param calculateMissingReactivePowerWithModel
103-
* if missing reactive power may be filled up with model function (default:
104-
* false)
106+
* If missing reactive power may be filled up with model function (default:
107+
* false).
105108
* @param scaling
106-
* the scaling factor of the power output (default: 1.0)
109+
* The scaling factor of the power output (default: 1.0).
107110
* @param uuids
108-
* of the models that should use this config, for the default config this
109-
* value is ignored
111+
* Of the models that should use this config, for the default config this
112+
* value is ignored.
110113
* @param chargingStrategy
111-
* the charging strategy to use
114+
* The charging strategy to use.
112115
* @param lowestEvSoc
113-
* the lowest SOC possible for EV batteries (inverse of max dod)
116+
* The lowest SOC possible for EV batteries (inverse of max dod).
114117
*/
115118
final case class EvcsRuntimeConfig(
116119
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -123,17 +126,17 @@ object RuntimeConfig {
123126

124127
/** Runtime configuration for energy management systems.
125128
* @param calculateMissingReactivePowerWithModel
126-
* if missing reactive power may be filled up with model function (default:
127-
* false)
129+
* If missing reactive power may be filled up with model function (default:
130+
* false).
128131
* @param scaling
129-
* the scaling factor of the power output (default: 1.0)
132+
* The scaling factor of the power output (default: 1.0).
130133
* @param uuids
131-
* of the models that should use this config, for the default config this
132-
* value is ignored
134+
* Of the models that should use this config, for the default config this
135+
* value is ignored.
133136
* @param aggregateFlex
134-
* strategy for aggregating flexibilities (default: SELF_OPT_EXCL_REG)
137+
* Strategy for aggregating flexibilities (default: SELF_OPT_EXCL_REG).
135138
* @param curtailRegenerative
136-
* if regenerative generation can be curtailed (default: false)
139+
* If regenerative generation can be curtailed (default: false).
137140
*/
138141
final case class EmRuntimeConfig(
139142
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -146,13 +149,13 @@ object RuntimeConfig {
146149

147150
/** Runtime configuration for fixed feed ins.
148151
* @param calculateMissingReactivePowerWithModel
149-
* if missing reactive power may be filled up with model function (default:
150-
* false)
152+
* If missing reactive power may be filled up with model function (default:
153+
* false).
151154
* @param scaling
152-
* the scaling factor of the power output (default: 1.0)
155+
* The scaling factor of the power output (default: 1.0).
153156
* @param uuids
154-
* of the models that should use this config, for the default config this
155-
* value is ignored
157+
* Of the models that should use this config, for the default config this
158+
* value is ignored.
156159
*/
157160
final case class FixedFeedInRuntimeConfig(
158161
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -163,13 +166,13 @@ object RuntimeConfig {
163166

164167
/** Runtime configuration for heat pumps.
165168
* @param calculateMissingReactivePowerWithModel
166-
* if missing reactive power may be filled up with model function (default:
167-
* false)
169+
* If missing reactive power may be filled up with model function (default:
170+
* false).
168171
* @param scaling
169-
* the scaling factor of the power output (default: 1.0)
172+
* The scaling factor of the power output (default: 1.0).
170173
* @param uuids
171-
* of the models that should use this config, for the default config this
172-
* value is ignored
174+
* Of the models that should use this config, for the default config this
175+
* value is ignored.
173176
*/
174177
final case class HpRuntimeConfig(
175178
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -180,18 +183,18 @@ object RuntimeConfig {
180183

181184
/** Runtime configuration for loads.
182185
* @param calculateMissingReactivePowerWithModel
183-
* if missing reactive power may be filled up with model function (default:
184-
* false)
186+
* If missing reactive power may be filled up with model function (default:
187+
* false).
185188
* @param scaling
186-
* the scaling factor of the power output (default: 1.0)
189+
* The scaling factor of the power output (default: 1.0).
187190
* @param uuids
188-
* of the models that should use this config, for the default config this
189-
* value is ignored
191+
* Of the models that should use this config, for the default config this
192+
* value is ignored.
190193
* @param modelBehaviour
191-
* the behaviour of the loads (default: fix)
194+
* The behaviour of the loads (default: fix).
192195
* @param reference
193-
* defined to which reference a load model behaviour might be scaled
194-
* (default: power)
196+
* Defined to which reference a load model behaviour might be scaled
197+
* (default: power).
195198
*/
196199
final case class LoadRuntimeConfig(
197200
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -204,13 +207,13 @@ object RuntimeConfig {
204207

205208
/** Runtime configuration for photovoltaic plants.
206209
* @param calculateMissingReactivePowerWithModel
207-
* if missing reactive power may be filled up with model function (default:
208-
* false)
210+
* If missing reactive power may be filled up with model function (default:
211+
* false).
209212
* @param scaling
210-
* the scaling factor of the power output (default: 1.0)
213+
* The scaling factor of the power output (default: 1.0).
211214
* @param uuids
212-
* of the models that should use this config, for the default config this
213-
* value is ignored
215+
* Of the models that should use this config, for the default config this
216+
* value is ignored.
214217
*/
215218
final case class PvRuntimeConfig(
216219
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -221,17 +224,17 @@ object RuntimeConfig {
221224

222225
/** Runtime configuration for electrical storages.
223226
* @param calculateMissingReactivePowerWithModel
224-
* if missing reactive power may be filled up with model function (default:
225-
* false)
227+
* If missing reactive power may be filled up with model function (default:
228+
* false).
226229
* @param scaling
227-
* the scaling factor of the power output (default: 1.0)
230+
* The scaling factor of the power output (default: 1.0).
228231
* @param uuids
229-
* of the models that should use this config, for the default config this
230-
* value is ignored
232+
* Of the models that should use this config, for the default config this
233+
* value is ignored.
231234
* @param initialSoc
232-
* the initial state of charge in percent of the storage (default: 0.0)
235+
* The initial state of charge in percent of the storage (default: 0.0).
233236
* @param targetSoc
234-
* option for a targeted state of charge (default: None)
237+
* Option for a targeted state of charge (default: None).
235238
*/
236239
final case class StorageRuntimeConfig(
237240
override val calculateMissingReactivePowerWithModel: Boolean = false,
@@ -244,18 +247,35 @@ object RuntimeConfig {
244247

245248
/** Runtime configuration for wind energy converters.
246249
* @param calculateMissingReactivePowerWithModel
247-
* if missing reactive power may be filled up with model function (default:
248-
* false)
250+
* If missing reactive power may be filled up with model function (default:
251+
* false).
249252
* @param scaling
250-
* the scaling factor of the power output (default: 1.0)
253+
* The scaling factor of the power output (default: 1.0).
251254
* @param uuids
252-
* of the models that should use this config, for the default config this
253-
* value is ignored
255+
* Of the models that should use this config, for the default config this
256+
* value is ignored.
254257
*/
255258
final case class WecRuntimeConfig(
256259
override val calculateMissingReactivePowerWithModel: Boolean = false,
257260
override val scaling: Double = 1.0,
258261
override val uuids: List[String] = List.empty,
259262
) extends BaseRuntimeConfig
260263
derives ConfigConvert
264+
265+
/** Runtime configuration for biomass plants.
266+
* @param calculateMissingReactivePowerWithModel
267+
* If missing reactive power may be filled up with model function (default:
268+
* false).
269+
* @param scaling
270+
* The scaling factor of the power output (default: 1.0).
271+
* @param uuids
272+
* Of the models that should use this config, for the default config this
273+
* value is ignored.
274+
*/
275+
final case class BmRuntimeConfig(
276+
override val calculateMissingReactivePowerWithModel: Boolean = false,
277+
override val scaling: Double = 1.0,
278+
override val uuids: List[String] = List.empty,
279+
) extends BaseRuntimeConfig
280+
derives ConfigConvert
261281
}

0 commit comments

Comments
 (0)