Closed khelfen closed 6 months ago
@ClaraBuettner or @CarlosEpia besides conventional power plants other power plants are loaded from the DB (e.g. hydro). These are also not filtered for EinheitBetriebsstatus
. Are these filtered before they are written in the DB table (e.g. supply.egon_power_plants_hydro
) which they are read from?
@khelfen I agree with your observation. I will take care of this issue.
There are two attributes that should be considered here:
Additionally, I will delete this filter. This will allow us to calculate several scenarios (still a pending decision) and filter the generators according to the requirements of each of them.
@khelfen After implementing the changes I concluded that using the attribute "EinheitBetriebsstatus" == "InBetrieb" is something that we don't want in general. The value presented there corresponds to the current status of the power plant by the moment the data is downloaded. For instance, for the Status2019 we would lose all the generators that were decommissioned after 2020, since they are marked as "DauerhaftStillgelegt".
In conclusion, I think that using the decommissioned date is enough to guarantee the accuracy of the data.
@khelfen After implementing the changes I concluded that using the attribute "EinheitBetriebsstatus" == "InBetrieb" is something that we don't want in general. The value presented there corresponds to the current status of the power plant by the moment the data is downloaded. For instance, for the Status2019 we would lose all the generators that were decommissioned after 2020, since they are marked as "DauerhaftStillgelegt".
In conclusion, I think that using the decommissioned date is enough to guarantee the accuracy of the data.
Hey @CarlosEpia :) I'm not sure if I would trust the MaStR to that degree. Did you check if all plants that are "DauerhaftStillgelegt" have a date DatumEndgueltigeStilllegung
? I did not, but I would suspect that it is not the case. That's why I added this part which should work as desired in your case.
If you implement it for all MaStR data could you also update the filter for pv rooftop here?
Sure. I could also apply it there. Just in case I will mention that we are not currently using that code for "Status20XX" scenarios. We are dealing with solar rooftop here
Issue Description
In the
power_plants_status_quo
function, it appears that there's a missing filter for theEinheitBetriebsstatus
attribute to ensure that only power plants with a status of "InBetrieb" (In Operation) are represented in the model. Currently, decommissioned conventional power plants are also included, which leads to inaccuracies in the energy model's outcomes.Expected Behavior
The function should include a filter that selects only the power plants with an
EinheitBetriebsstatus
of "InBetrieb" to ensure that the model accurately represents operational power plants only.Current Behavior
Decommissioned conventional power plants are represented in the model due to the absence of a filter for the
EinheitBetriebsstatus
attribute in thepower_plants_status_quo
function.Possible Solution
Implement a filter in the
power_plants_status_quo
function that checks theEinheitBetriebsstatus
attribute of each power plant and includes only those with a status of "InBetrieb" in the model.