Skip to content
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Printing logs of failed tests [#747](https://github.com/ie3-institute/simona/issues/747)
- Models for measurements within the grid structure [#89](https://github.com/ie3-institute/simona/issues/89)
- Config possibility for transformer control groups [#90](https://github.com/ie3-institute/simona/issues/90)
- Implemented scaling of all relevant input parameters [#764](https://github.com/ie3-institute/simona/issues/764)
- Consider scaling factor with flex options [#734](https://github.com/ie3-institute/simona/issues/734)

### Changed
- Adapted to changed data source in PSDM [#435](https://github.com/ie3-institute/simona/issues/435)
Expand Down
2 changes: 1 addition & 1 deletion docs/readthedocs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Using the default configuration the universally unique identifier can be set to

uuids = ["default"]

Choosing the scaling factor of the power output:
Choosing the scaling factor of relevant participant parameters such as rated power or annual power consumption:

scaling = 1.0

Expand Down
2 changes: 1 addition & 1 deletion docs/readthedocs/models/load_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ A list of valid UUIDs of load models, the following configuration should be appl

#### ``scaling``

Universal multiplication factor, that is applied to the models' calculation results. It may be a positive real number.
Universal factor that is applied to the models' relevant parameters such as maximum power or energy consumption. It may be a positive real number.

#### ``modelBehaviour``

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ trait ApparentPowerAndHeatParticipant[
calculateApparentPower(tick, voltage, modelState, data)
val heat =
if (isInOperation(tick))
calculateHeat(tick, modelState, data) * scalingFactor
calculateHeat(tick, modelState, data)
else
Megawatts(0d)

Expand Down
2 changes: 0 additions & 2 deletions src/main/scala/edu/ie3/simona/model/participant/BMModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ final case class BMModel(
uuid: UUID,
id: String,
operationInterval: OperationInterval,
override val scalingFactor: Double,
qControl: QControl,
sRated: Power,
cosPhi: Double,
Expand All @@ -44,7 +43,6 @@ final case class BMModel(
uuid,
id,
operationInterval,
scalingFactor,
qControl,
sRated,
cosPhi,
Expand Down
19 changes: 8 additions & 11 deletions src/main/scala/edu/ie3/simona/model/participant/ChpModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ import java.time.ZonedDateTime
* the element's human readable id
* @param operationInterval
* Interval, in which the system is in operation
* @param scalingFactor
* Scaling the output of the system
* @param qControl
* Type of reactive power control
* @param sRated
Expand All @@ -51,7 +49,6 @@ final case class ChpModel(
uuid: UUID,
id: String,
operationInterval: OperationInterval,
override val scalingFactor: Double,
qControl: QControl,
sRated: Power,
cosPhiRated: Double,
Expand All @@ -61,7 +58,6 @@ final case class ChpModel(
uuid,
id,
operationInterval,
scalingFactor,
qControl,
sRated,
cosPhiRated,
Expand Down Expand Up @@ -378,27 +374,28 @@ object ChpModel {
scalingFactor: Double,
thermalStorage: ThermalStorage with MutableStorage,
): ChpModel = {
val scaledInput = chpInput.copy().scale(scalingFactor).build()

val operationInterval = SystemComponent.determineOperationInterval(
simulationStartDate,
simulationEndDate,
chpInput.getOperationTime,
scaledInput.getOperationTime,
)

val model = new ChpModel(
chpInput.getUuid,
chpInput.getId,
scaledInput.getUuid,
scaledInput.getId,
operationInterval,
scalingFactor,
qControl,
Kilowatts(
chpInput.getType.getsRated
scaledInput.getType.getsRated
.to(PowerSystemUnits.KILOWATT)
.getValue
.doubleValue
),
chpInput.getType.getCosPhiRated,
scaledInput.getType.getCosPhiRated,
Kilowatts(
chpInput.getType.getpThermal
scaledInput.getType.getpThermal
.to(PowerSystemUnits.KILOWATT)
.getValue
.doubleValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ import java.util.UUID
* the element's human readable id
* @param operationInterval
* Interval, in which the system is in operation
* @param scalingFactor
* Scaling the output of the system
* @param qControl
* Type of reactive power control
* @param sRated
Expand All @@ -45,7 +43,6 @@ final case class FixedFeedInModel(
uuid: UUID,
id: String,
operationInterval: OperationInterval,
override val scalingFactor: Double,
qControl: QControl,
sRated: Power,
cosPhiRated: Double,
Expand All @@ -57,7 +54,6 @@ final case class FixedFeedInModel(
uuid,
id,
operationInterval,
scalingFactor,
qControl,
sRated,
cosPhiRated,
Expand Down Expand Up @@ -102,28 +98,30 @@ object FixedFeedInModel extends LazyLogging {
simulationStartDate: ZonedDateTime,
simulationEndDate: ZonedDateTime,
): FixedFeedInModel = {
val scaledInput =
inputModel.copy().scale(modelConfiguration.scaling).build()

/* Determine the operation interval */
val operationInterval: OperationInterval =
SystemComponent.determineOperationInterval(
simulationStartDate,
simulationEndDate,
inputModel.getOperationTime,
scaledInput.getOperationTime,
)

// build the fixed feed in model
val model = FixedFeedInModel(
inputModel.getUuid,
inputModel.getId,
scaledInput.getUuid,
scaledInput.getId,
operationInterval,
modelConfiguration.scaling,
QControl.apply(inputModel.getqCharacteristics),
QControl.apply(scaledInput.getqCharacteristics),
Kilowatts(
inputModel.getsRated
scaledInput.getsRated
.to(PowerSystemUnits.KILOWATT)
.getValue
.doubleValue
),
inputModel.getCosPhiRated,
scaledInput.getCosPhiRated,
)
model.enable()
model
Expand Down
36 changes: 17 additions & 19 deletions src/main/scala/edu/ie3/simona/model/participant/HpModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ import java.util.UUID
* the element's human readable id
* @param operationInterval
* Interval, in which the system is in operation
* @param scalingFactor
* Scaling the output of the system
* @param qControl
* Type of reactive power control
* @param sRated
Expand All @@ -53,7 +51,6 @@ final case class HpModel(
uuid: UUID,
id: String,
operationInterval: OperationInterval,
override val scalingFactor: Double,
qControl: QControl,
sRated: Power,
cosPhiRated: Double,
Expand All @@ -67,7 +64,6 @@ final case class HpModel(
uuid,
id,
operationInterval,
scalingFactor,
qControl,
sRated,
cosPhiRated,
Expand Down Expand Up @@ -285,31 +281,32 @@ object HpModel {
simulationEndDate: ZonedDateTime,
thermalGrid: ThermalGrid,
): HpModel = {
val scaledInput = inputModel.copy().scale(scaling).build()

/* Determine the operation interval */
val operationInterval: OperationInterval =
SystemComponent.determineOperationInterval(
simulationStartDate,
simulationEndDate,
inputModel.getOperationTime,
scaledInput.getOperationTime,
)

val qControl = QControl(inputModel.getqCharacteristics())
val qControl = QControl(scaledInput.getqCharacteristics())

val model = new HpModel(
inputModel.getUuid,
inputModel.getId,
scaledInput.getUuid,
scaledInput.getId,
operationInterval,
scaling,
qControl,
Kilowatts(
inputModel.getType.getsRated
scaledInput.getType.getsRated
.to(PowerSystemUnits.KILOWATT)
.getValue
.doubleValue
),
inputModel.getType.getCosPhiRated,
scaledInput.getType.getCosPhiRated,
Kilowatts(
inputModel.getType.getpThermal
scaledInput.getType.getpThermal
.to(PowerSystemUnits.KILOWATT)
.getValue
.doubleValue
Expand Down Expand Up @@ -391,27 +388,28 @@ object HpModel {
scalingFactor: Double,
thermalGrid: ThermalGrid,
): HpModel = {
val scaledInput = hpInput.copy().scale(scalingFactor).build()

val operationInterval = SystemComponent.determineOperationInterval(
simulationStartDate,
simulationEndDate,
hpInput.getOperationTime,
scaledInput.getOperationTime,
)

val model = new HpModel(
hpInput.getUuid,
hpInput.getId,
scaledInput.getUuid,
scaledInput.getId,
operationInterval,
scalingFactor,
qControl,
Kilowatts(
hpInput.getType.getsRated
scaledInput.getType.getsRated
.to(PowerSystemUnits.KILOWATT)
.getValue
.doubleValue
),
hpInput.getType.getCosPhiRated,
scaledInput.getType.getCosPhiRated,
Kilowatts(
hpInput.getType.getpThermal
scaledInput.getType.getpThermal
.to(PowerSystemUnits.KILOWATT)
.getValue
.doubleValue
Expand Down
30 changes: 15 additions & 15 deletions src/main/scala/edu/ie3/simona/model/participant/PvModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ final case class PvModel private (
uuid: UUID,
id: String,
operationInterval: OperationInterval,
override val scalingFactor: Double,
qControl: QControl,
sRated: Power,
cosPhiRated: Double,
Expand All @@ -47,7 +46,6 @@ final case class PvModel private (
uuid,
id,
operationInterval,
scalingFactor,
qControl,
sRated,
cosPhiRated,
Expand Down Expand Up @@ -756,45 +754,47 @@ object PvModel {
simulationStartDate: ZonedDateTime,
simulationEndDate: ZonedDateTime,
): PvModel = {

val scaledInput = inputModel.copy().scale(scalingFactor).build()

/* Determine the operation interval */
val operationInterval: OperationInterval =
SystemComponent.determineOperationInterval(
simulationStartDate,
simulationEndDate,
inputModel.getOperationTime,
scaledInput.getOperationTime,
)

// moduleSurface and yieldSTC are left out for now
val model = apply(
inputModel.getUuid,
inputModel.getId,
scaledInput.getUuid,
scaledInput.getId,
operationInterval,
scalingFactor,
QControl(inputModel.getqCharacteristics),
QControl(scaledInput.getqCharacteristics),
Kilowatts(
inputModel.getsRated
scaledInput.getsRated
.to(PowerSystemUnits.KILOWATT)
.getValue
.doubleValue
),
inputModel.getCosPhiRated,
Degrees(inputModel.getNode.getGeoPosition.getY),
Degrees(inputModel.getNode.getGeoPosition.getX),
inputModel.getAlbedo,
scaledInput.getCosPhiRated,
Degrees(scaledInput.getNode.getGeoPosition.getY),
Degrees(scaledInput.getNode.getGeoPosition.getX),
scaledInput.getAlbedo,
Each(
inputModel.getEtaConv
scaledInput.getEtaConv
.to(PowerSystemUnits.PU)
.getValue
.doubleValue
),
Radians(
inputModel.getAzimuth
scaledInput.getAzimuth
.to(RADIAN)
.getValue
.doubleValue
),
Radians(
inputModel.getElevationAngle
scaledInput.getElevationAngle
.to(RADIAN)
.getValue
.doubleValue
Expand Down
Loading