recordControllerInputGeneration
Record for the construction of controller parameter inputs using known InstanceRecords
Extends from Modelica.Icons.Record (Icon for records).
Information
1. Purpose of model
Record that transforms certain data from InstanceRecords in Superstructures_PortfolioMask into parameter arrays that are needed in the superstructure controller.
2. Level of detail, physical effects considered, and physical insight
(Purely technical component without physical modeling.)
3. Limits of validity
(Purely technical component without physical modeling.)
4.Interfaces
Outputs needed:
- regionOfPowerPlant_List
- typeOfPowerplant_List
- P_nom_Powerplants_List
- P_min_const_Powerplants_List
- P_max_const_Powerplants_List
- P_grad_max_star_Powerplants_List
- regionOfPtG_List
- typeOfPtG_List
- P_nom_load_PtG_List
- regionOfElectricalStorages_List
- typeOfElectricalStorage_List
- P_nom_load_ElectricStorage_List
- P_nom_unload_ElectricStorage_List
- regionOfElectricHeaters_List
- typeOfElectricHeater_List
Inputs to be set
- powerPlantInstancesRecord
- electricalStorageInstancesRecord
- powerToGasInstancesRecord
- heatingGridSystemStorageInstancesRecord
5. Nomenclature
(no elements)
6. Governing Equations
(no equations)
7. Remarks for Usage
(no remarks)
8. Validation
(no validation or testing necessary)
9. References
(no remarks)
10. Version History
Model created by Jon Babst (babst@xrg-simulation.de), 06.09.2021
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Input | |||
| Integer | nRegions | 1 | |
| Integer | MaximumDifferentTypesOfPowerPlants | max(DifferentTypesOfPowerPlants) | |
| Integer | MaximumDifferentTypesOfElectricalStorages | max(DifferentTypesOfElectricalStorages) | |
| Integer | MaximumDifferentTypesOfPtG | max(DifferentTypesOfPowerToGasPlants) | |
| Integer | MaximumDifferentTypesOfElectricHeaters | max(DifferentTypesOfElectricHeater) | |
| Integer[nRegions] | DifferentTypesOfPowerPlants | {powerPlantInstancesRecord[i].nPowerPlants for i in 1:nRegions} | Amount of different power plant types |
| Integer[nRegions] | DifferentTypesOfElectricalStorages | {electricalStorageInstancesRecord[i].nElectricalStorages for i in 1:nRegions} | Amount of different electrical storage types |
| Integer[nRegions] | DifferentTypesOfPowerToGasPlants | {powerToGasInstancesRecord[i].nPowerToGasPlants for i in 1:nRegions} | Amount of different power to gas plant types |
| Integer[nRegions] | DifferentTypesOfElectricHeater | {heatingGridSystemStorageInstancesRecord[i].nHeatingGrid*heatingGridSystemStorageInstancesRecord[i].heatingGridSystemStorageRecord.ElHeater_quantity for i in 1:nRegions} | Amount of different electrical heater types |
| Config.Records.InstancesRecords.PowerPlantInstancesRecord[nRegions] | powerPlantInstancesRecord | fill(Config.Records.InstancesRecords.PowerPlantInstancesRecord(), nRegions) | parametrization of all systems in SS, one per Region |
| Config.Records.InstancesRecords.ElectricalStorageInstancesRecord[nRegions] | electricalStorageInstancesRecord | fill(Config.Records.InstancesRecords.ElectricalStorageInstancesRecord(), nRegions) | |
| Config.Records.InstancesRecords.PowerToGasInstancesRecord | powerToGasInstancesRecord | fill(Config.Records.InstancesRecords.PowerToGasInstancesRecord(), nRegions) | |
| Config.Records.InstancesRecords.HeatingGridSystemStorageInstancesRecord | heatingGridSystemStorageInstancesRecord | fill(Config.Records.InstancesRecords.HeatingGridSystemStorageInstancesRecord(), nRegions) | |
| Integer | NumberOfPowerplantsOverAllRegions | sum(DifferentTypesOfPowerPlants) | |
| Integer | NumberOfElectricalStoragesOverAllRegions | sum(DifferentTypesOfElectricalStorages) | |
| Integer | NumberOfPowerToGasPlantsOverAllRegions | sum(DifferentTypesOfPowerToGasPlants) | |
| Integer | NumberOfElectricalHeatersOverAllRegions | sum(DifferentTypesOfElectricHeater) | |
| Helper Paramters | |||
| Integer[nRegions] | sumOfPowerplantsUpToRegion | {sum({powerPlantInstancesRecord[k].nPowerPlants for k in 1:(i)}) for i in 1:nRegions} | |
| Integer[MaximumDifferentTypesOfPowerPlants*nRegions,2] | MatrixToFullList_Indices_Powerplants | {{integer(ceil(k/MaximumDifferentTypesOfPowerPlants)), mod(k - 1, MaximumDifferentTypesOfPowerPlants) + 1} for k in 1:MaximumDifferentTypesOfPowerPlants*nRegions} | |
| Boolean[nRegions,MaximumDifferentTypesOfPowerPlants] | NonEmptyIndexBooleanMatrix_Powerplants | {{(if j <= DifferentTypesOfPowerPlants[i] then true else false) for j in 1:MaximumDifferentTypesOfPowerPlants} for i in 1:nRegions} | |
| Integer[max(1, NumberOfPowerplantsOverAllRegions)] | NonEmptyIndexList_Powerplants | Modelica.Math.BooleanVectors.index({NonEmptyIndexBooleanMatrix_Powerplants[integer(ceil(k/MaximumDifferentTypesOfPowerPlants)), mod(k - 1, MaximumDifferentTypesOfPowerPlants) + 1] for k in 1:MaximumDifferentTypesOfPowerPlants*nRegions}) | |
| Integer[nRegions,MaximumDifferentTypesOfPowerPlants] | typeOfPowerplant_Matrix | {{(if j <= DifferentTypesOfPowerPlants[i] then j else 0) for j in 1:MaximumDifferentTypesOfPowerPlants} for i in 1:nRegions} | |
| Integer[MaximumDifferentTypesOfPowerPlants*nRegions] | typeOfPowerplant_ListFull | {typeOfPowerplant_Matrix[MatrixToFullList_Indices_Powerplants[k, 1], MatrixToFullList_Indices_Powerplants[k, 2]] for k in 1:MaximumDifferentTypesOfPowerPlants*nRegions} | |
| Real[nRegions,MaximumDifferentTypesOfPowerPlants] | P_nom_Powerplants_Matrix | {{(if j <= DifferentTypesOfPowerPlants[i] then powerPlantInstancesRecord[i].powerPlantRecord[j].P_el_n else 0) for j in 1:MaximumDifferentTypesOfPowerPlants} for i in 1:nRegions} | |
| Real[MaximumDifferentTypesOfPowerPlants*nRegions] | P_nom_Powerplants_ListFull | {P_nom_Powerplants_Matrix[MatrixToFullList_Indices_Powerplants[k, 1], MatrixToFullList_Indices_Powerplants[k, 2]] for k in 1:MaximumDifferentTypesOfPowerPlants*nRegions} | |
| Real[nRegions,MaximumDifferentTypesOfPowerPlants] | P_min_const_Powerplants_Matrix | {{(if j <= DifferentTypesOfPowerPlants[i] then powerPlantInstancesRecord[i].powerPlantRecord[j].P_min_star*powerPlantInstancesRecord[i].powerPlantRecord[j].P_el_n else 0) for j in 1:MaximumDifferentTypesOfPowerPlants} for i in 1:nRegions} | |
| Real[MaximumDifferentTypesOfPowerPlants*nRegions] | P_min_const_Powerplants_ListFull | {P_min_const_Powerplants_Matrix[MatrixToFullList_Indices_Powerplants[k, 1], MatrixToFullList_Indices_Powerplants[k, 2]] for k in 1:MaximumDifferentTypesOfPowerPlants*nRegions} | |
| Real[nRegions,MaximumDifferentTypesOfPowerPlants] | P_grad_max_star_Powerplants_Matrix | {{(if j <= DifferentTypesOfPowerPlants[i] then powerPlantInstancesRecord[i].powerPlantRecord[j].P_grad_max_star else 0) for j in 1:MaximumDifferentTypesOfPowerPlants} for i in 1:nRegions} | |
| Real[MaximumDifferentTypesOfPowerPlants*nRegions] | P_grad_max_star_Powerplants_ListFull | {P_grad_max_star_Powerplants_Matrix[MatrixToFullList_Indices_Powerplants[k, 1], MatrixToFullList_Indices_Powerplants[k, 2]] for k in 1:MaximumDifferentTypesOfPowerPlants*nRegions} | |
| Integer[nRegions] | sumOfPtGUpToRegion | {sum({powerToGasInstancesRecord[k].nPowerToGasPlants for k in 1:(i)}) for i in 1:nRegions} | |
| Integer[MaximumDifferentTypesOfPtG*nRegions,2] | MatrixToFullList_Indices_PtG | {{integer(ceil(k/MaximumDifferentTypesOfPtG)), mod(k - 1, MaximumDifferentTypesOfPtG) + 1} for k in 1:MaximumDifferentTypesOfPtG*nRegions} | |
| Boolean[nRegions,MaximumDifferentTypesOfPtG] | NonEmptyIndexBooleanMatrix_PtG | {{(if j <= DifferentTypesOfPowerToGasPlants[i] then true else false) for j in 1:MaximumDifferentTypesOfPtG} for i in 1:nRegions} | |
| Integer[NumberOfPowerToGasPlantsOverAllRegions] | NonEmptyIndexList_PtG | Modelica.Math.BooleanVectors.index({NonEmptyIndexBooleanMatrix_PtG[integer(ceil(k/MaximumDifferentTypesOfPtG)), mod(k - 1, MaximumDifferentTypesOfPtG) + 1] for k in 1:MaximumDifferentTypesOfPtG*nRegions}) | |
| Integer[nRegions,MaximumDifferentTypesOfPtG] | typeOfPtG_Matrix | {{(if j <= DifferentTypesOfPowerToGasPlants[i] then j else 0) for j in 1:MaximumDifferentTypesOfPtG} for i in 1:nRegions} | |
| Integer[MaximumDifferentTypesOfPtG*nRegions] | typeOfPtG_ListFull | {typeOfPtG_Matrix[MatrixToFullList_Indices_PtG[k, 1], MatrixToFullList_Indices_PtG[k, 2]] for k in 1:MaximumDifferentTypesOfPtG*nRegions} | |
| Real[nRegions,MaximumDifferentTypesOfPtG] | P_nom_load_PtG_Matrix | {{(if j <= DifferentTypesOfPowerToGasPlants[i] then powerToGasInstancesRecord[i].powerToGasRecord.P_el_n else 0) for j in 1:MaximumDifferentTypesOfPtG} for i in 1:nRegions} | |
| Real[MaximumDifferentTypesOfPtG*nRegions] | P_nom_load_PtG_ListFull | {P_nom_load_PtG_Matrix[MatrixToFullList_Indices_PtG[k, 1], MatrixToFullList_Indices_PtG[k, 2]] for k in 1:MaximumDifferentTypesOfPtG*nRegions} | |
| Integer[nRegions] | sumOfElectricStoragesUpToRegion | {sum({electricalStorageInstancesRecord[k].nElectricalStorages for k in 1:(i)}) for i in 1:nRegions} | |
| Integer[MaximumDifferentTypesOfElectricalStorages*nRegions,2] | MatrixToFullList_Indices_ElectricStorages | {{integer(ceil(k/MaximumDifferentTypesOfElectricalStorages)), mod(k - 1, MaximumDifferentTypesOfElectricalStorages) + 1} for k in 1:MaximumDifferentTypesOfElectricalStorages*nRegions} | |
| Boolean[nRegions,MaximumDifferentTypesOfElectricalStorages] | NonEmptyIndexBooleanMatrix_ElectricStorages | {{(if j <= DifferentTypesOfElectricalStorages[i] then true else false) for j in 1:MaximumDifferentTypesOfElectricalStorages} for i in 1:nRegions} | |
| Integer[NumberOfElectricalStoragesOverAllRegions] | NonEmptyIndexList_ElectricStorages | Modelica.Math.BooleanVectors.index({NonEmptyIndexBooleanMatrix_ElectricStorages[integer(ceil(k/MaximumDifferentTypesOfElectricalStorages)), mod(k - 1, MaximumDifferentTypesOfElectricalStorages) + 1] for k in 1:MaximumDifferentTypesOfElectricalStorages*nRegions}) | |
| Integer[nRegions,MaximumDifferentTypesOfElectricalStorages] | typeOfElectricalStorage_Matrix | {{(if j <= DifferentTypesOfElectricalStorages[i] then j else 0) for j in 1:MaximumDifferentTypesOfElectricalStorages} for i in 1:nRegions} | |
| Integer[MaximumDifferentTypesOfElectricalStorages*nRegions] | typeOfElectricalStorage_ListFull | {typeOfElectricalStorage_Matrix[MatrixToFullList_Indices_ElectricStorages[k, 1], MatrixToFullList_Indices_ElectricStorages[k, 2]] for k in 1:MaximumDifferentTypesOfElectricalStorages*nRegions} | |
| Real[nRegions,MaximumDifferentTypesOfElectricalStorages] | P_nom_load_ElectricStorage_Matrix | {{(if j <= DifferentTypesOfElectricalStorages[i] then electricalStorageInstancesRecord[i].electricalStorageRecord[j].P_max_load else 0) for j in 1:MaximumDifferentTypesOfElectricalStorages} for i in 1:nRegions} | |
| Real[MaximumDifferentTypesOfElectricalStorages*nRegions] | P_nom_load_ElectricStorage_ListFull | {P_nom_load_ElectricStorage_Matrix[MatrixToFullList_Indices_ElectricStorages[k, 1], MatrixToFullList_Indices_ElectricStorages[k, 2]] for k in 1:MaximumDifferentTypesOfElectricalStorages*nRegions} | |
| Real[nRegions,MaximumDifferentTypesOfElectricalStorages] | P_nom_unload_ElectricStorage_Matrix | {{(if j <= DifferentTypesOfElectricalStorages[i] then electricalStorageInstancesRecord[i].electricalStorageRecord[j].P_max_unload else 0) for j in 1:MaximumDifferentTypesOfElectricalStorages} for i in 1:nRegions} | |
| Real[MaximumDifferentTypesOfElectricalStorages*nRegions] | P_nom_unload_ElectricStorage_ListFull | {P_nom_unload_ElectricStorage_Matrix[MatrixToFullList_Indices_ElectricStorages[k, 1], MatrixToFullList_Indices_ElectricStorages[k, 2]] for k in 1:MaximumDifferentTypesOfElectricalStorages*nRegions} | |
| Integer[nRegions] | sumOfElectricHeatersUpToRegion | {sum({heatingGridSystemStorageInstancesRecord[k].nHeatingGrid*heatingGridSystemStorageInstancesRecord[k].heatingGridSystemStorageRecord.ElHeater_quantity for k in 1:(i)}) for i in 1:nRegions} | |
| Integer[MaximumDifferentTypesOfElectricHeaters*nRegions,2] | MatrixToFullList_Indices_ElectricHeaters | {{integer(ceil(k/MaximumDifferentTypesOfElectricHeaters)), mod(k - 1, MaximumDifferentTypesOfElectricHeaters) + 1} for k in 1:MaximumDifferentTypesOfElectricHeaters*nRegions} | |
| Boolean[nRegions,MaximumDifferentTypesOfElectricHeaters] | NonEmptyIndexBooleanMatrix_ElectricHeaters | {{(if j <= DifferentTypesOfElectricHeater[i] then true else false) for j in 1:MaximumDifferentTypesOfElectricHeaters} for i in 1:nRegions} | |
| Integer[NumberOfElectricalHeatersOverAllRegions] | NonEmptyIndexList_ElectricHeaters | Modelica.Math.BooleanVectors.index({NonEmptyIndexBooleanMatrix_ElectricHeaters[integer(ceil(k/MaximumDifferentTypesOfElectricHeaters)), mod(k - 1, MaximumDifferentTypesOfElectricHeaters) + 1] for k in 1:MaximumDifferentTypesOfElectricHeaters*nRegions}) | |
| Integer[nRegions,MaximumDifferentTypesOfElectricHeaters] | typeOfElectricHeater_Matrix | {{(if j <= DifferentTypesOfElectricHeater[i] then j else 0) for j in 1:MaximumDifferentTypesOfElectricHeaters} for i in 1:nRegions} | |
| Integer[max(1, MaximumDifferentTypesOfElectricHeaters*nRegions)] | typeOfElectricHeater_ListFull | if NumberOfElectricalHeatersOverAllRegions > 0 then {typeOfElectricHeater_Matrix[MatrixToFullList_Indices_ElectricHeaters[k, 1], MatrixToFullList_Indices_ElectricHeaters[k, 2]] for k in 1:MaximumDifferentTypesOfElectricHeaters*nRegions} else {0} | |
| Outputs | |||
| Integer[max(1, NumberOfPowerplantsOverAllRegions)] | regionOfPowerPlant_List | if NumberOfPowerplantsOverAllRegions > 0 then {Modelica.Math.BooleanVectors.firstTrueIndex({sumOfPowerplantsUpToRegion[m] >= i for m in 1:nRegions}) for i in 1:NumberOfPowerplantsOverAllRegions} else {1} | |
| Integer[max(1, NumberOfPowerplantsOverAllRegions)] | typeOfPowerplant_List | if NumberOfPowerplantsOverAllRegions > 0 then typeOfPowerplant_ListFull[NonEmptyIndexList_Powerplants] else {0} | |
| Real[max(1, NumberOfPowerplantsOverAllRegions)] | P_nom_Powerplants_List | if NumberOfPowerplantsOverAllRegions > 0 then P_nom_Powerplants_ListFull[NonEmptyIndexList_Powerplants] else {0} | |
| Real[max(1, NumberOfPowerplantsOverAllRegions)] | P_min_const_Powerplants_List | if NumberOfPowerplantsOverAllRegions > 0 then P_min_const_Powerplants_ListFull[NonEmptyIndexList_Powerplants] else {0} | |
| Real[max(1, NumberOfPowerplantsOverAllRegions)] | P_max_const_Powerplants_List | P_nom_Powerplants_List | |
| Real[max(1, NumberOfPowerplantsOverAllRegions)] | P_grad_max_star_Powerplants_List | if NumberOfPowerplantsOverAllRegions > 0 then P_grad_max_star_Powerplants_ListFull[NonEmptyIndexList_Powerplants] else {0} | |
| Integer[max(1, NumberOfPowerToGasPlantsOverAllRegions)] | regionOfPtG_List | if NumberOfPowerToGasPlantsOverAllRegions > 0 then {Modelica.Math.BooleanVectors.firstTrueIndex({sumOfPtGUpToRegion[m] >= i for m in 1:nRegions}) for i in 1:NumberOfPowerToGasPlantsOverAllRegions} else {1} | |
| Integer[max(1, NumberOfPowerToGasPlantsOverAllRegions)] | typeOfPtG_List | if NumberOfPowerToGasPlantsOverAllRegions > 0 then typeOfPtG_ListFull[NonEmptyIndexList_PtG] else {0} | |
| Real[max(1, NumberOfPowerToGasPlantsOverAllRegions)] | P_nom_load_PtG_List | if NumberOfPowerToGasPlantsOverAllRegions > 0 then P_nom_load_PtG_ListFull[NonEmptyIndexList_PtG] else {0} | |
| Integer[max(1, NumberOfElectricalStoragesOverAllRegions)] | regionOfElectricalStorages_List | if NumberOfElectricalStoragesOverAllRegions > 0 then {Modelica.Math.BooleanVectors.firstTrueIndex({sumOfElectricStoragesUpToRegion[m] >= i for m in 1:nRegions}) for i in 1:NumberOfElectricalStoragesOverAllRegions} else {1} | |
| Integer[max(1, NumberOfElectricalStoragesOverAllRegions)] | typeOfElectricalStorage_List | if NumberOfElectricalStoragesOverAllRegions > 0 then typeOfElectricalStorage_ListFull[NonEmptyIndexList_ElectricStorages] else {0} | |
| Real[max(1, NumberOfElectricalStoragesOverAllRegions)] | P_nom_load_ElectricStorage_List | if NumberOfElectricalStoragesOverAllRegions > 0 then P_nom_load_ElectricStorage_ListFull[NonEmptyIndexList_ElectricStorages] else {0} | |
| Real[max(1, NumberOfElectricalStoragesOverAllRegions)] | P_nom_unload_ElectricStorage_List | if NumberOfElectricalStoragesOverAllRegions > 0 then P_nom_unload_ElectricStorage_ListFull[NonEmptyIndexList_ElectricStorages] else {0} | |
| Integer[max(1, NumberOfElectricalHeatersOverAllRegions)] | regionOfElectricHeaters_List | if NumberOfElectricalHeatersOverAllRegions > 0 then {Modelica.Math.BooleanVectors.firstTrueIndex({sumOfElectricHeatersUpToRegion[m] >= i for m in 1:nRegions}) for i in 1:NumberOfElectricalHeatersOverAllRegions} else {1} | |
| Integer[max(1, NumberOfElectricalHeatersOverAllRegions)] | typeOfElectricHeater_List | if NumberOfElectricalHeatersOverAllRegions > 0 then typeOfElectricHeater_ListFull[NonEmptyIndexList_ElectricHeaters] else {0} | |
Contents
| Name | Description |
|---|---|