Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle missing type and subtype of Generators #35

Closed
gplssm opened this issue Sep 4, 2017 · 19 comments
Closed

Handle missing type and subtype of Generators #35

gplssm opened this issue Sep 4, 2017 · 19 comments

Comments

@gplssm
Copy link
Contributor

gplssm commented Sep 4, 2017

Problem

Some generators imported from Ding0 data do not have specified and type and/or subtype. We need this information for several things

  • Determine names of the components
  • Aggregated capacity according to type and subtype
  • Assign the right time series for each generator
  • ...

Thus, we somehow need to define type/subtype if this information is missing.

Ideas/ Questions

  1. We can solve it either in Ding0, eDisGo or in the data processing (DP)
    @birgits votes for solving the issue in the DP. In general, I agree on that, but I will take us a while until we have a versioned version of this data (meanwhile we can work with model_draft but even this takes time).
    Thus the idea would be to temporarily implement a workaround in eDisGo that assign data for missing type and subtype.
  2. What should the pattern be like?
    We could replace each missing type/subtype by 'other' or 'unknown'. This is simply straightfoward but causes other issues. For example if the type is missing, we should anyhow guess its type in order to find the right time series for this generator. For this we can create a translation dict that re-maps subtypes (when type is missing) to the actual type.
@nesnoj
Copy link
Member

nesnoj commented Sep 5, 2017

I'd like to get a better understanding why this happens in DP. Is it a bug or a feature?
Which DP version are you using? The current (unstable) one?
(in MVGD 134 (former 3545) the type/subtype exists).

@nesnoj
Copy link
Member

nesnoj commented Sep 5, 2017

I will check if problem occurs with unstable dataset.

@nesnoj
Copy link
Member

nesnoj commented Sep 5, 2017

The type-subtype list in both versions match.
I'm wondering why there are missing types. Executing

SELECT count(id), generation_type, generation_subtype
  FROM supply.ego_dp_res_powerplant
  WHERE version='v0.2.10'
  GROUP BY generation_type, generation_subtype
  ORDER BY generation_type, generation_subtype;

all types are filled, there's only one empty subtype in type solar... @gplssm

@gplssm
Copy link
Contributor Author

gplssm commented Sep 5, 2017

Thanks for the investigation on this!

I'm wondering that missing type specification only occurs at subtype of solar. @miguelparadacontzen found missing subtype of run_of_river

Besides that, I gives sense that both RES datasets in open_eGo have the same missing subtype (solar). Both table found on the same EE Anlagenregister.

Further questions/ thoughts

  1. If only the subtype of solar is sometimes missing, we could use a shortcut and just do an exception handling for this type. Good idea?
  2. I guess the missing subtypes is caused by missing data in the EE Anlagenregister. Based on my current knowledge, I would suggest to handle missing subtypes in the DP, when the RES tables are created.
  3. How to we handle solar generators with missing subtype in Ding0?

@nesnoj
Copy link
Member

nesnoj commented Sep 5, 2017

@miguelparadacontzen Is the subtype still missing in the current data? (see link above)

Concerning your questions:

I'd set the subtype in ding0, not in eDisGo.
Explanation:

  1. We do not use the subtypes in dingo. Instead, we allocate generators using the nominal power. In this procedure, we implicity assume a subtype. Therefore, I'd set the subtype of solar in ding0. A detailed investigation reveals that we have solar plants without subtype in voltage levels 4..7.
    Procedure:
  • v_level 7: P <= 30kW: roof mounted, 30kW < P <= 100kW: roof mounted, P > 100kW: either roof- or ground-mounted ???
  • v_level 6: roof mounted (since 86% of all solar plants in v_level 6 are roof mounted)
  • v_level 5+4: ground mounted (these plants are, in most cases, too large to fit on a roof)
  1. We cannot really solve this problem in DP, can we? (I assume the method described above does not affect our project partners?!)
  2. Furthermore, other users would not get this information in the dingo datasets if we used a workaround in eDisGo.

@miguelparadacontzen
Copy link

miguelparadacontzen commented Sep 6, 2017

With the current version of the dev branch, running dingo over all MV districts from 4 to 3607, gives the following generation type/subtypes at MV level:

Occurances of biomass/biofuel                      69
Occurances of biomass/biogas                     1464
Occurances of biomass/biogas_dry_fermentation       7
Occurances of biomass/biogas_from_grid            170
Occurances of biomass/biomass                     745
Occurances of biomass/other                        32
Occurances of biomass/waste_wood                    8
Occurances of biomass/wood                         24
Occurances of coal/other                            2
Occurances of gas/gas                              89
Occurances of gas/gas_landfill                     83
Occurances of gas/gas_mine                         23
Occurances of gas/gas_sewage                       48
Occurances of gas/other                            50
Occurances of geothermal/geothermal                10
Occurances of lignite/other                         4
Occurances of oil/other                             8
Occurances of other_non_renewable/other             5
Occurances of reservoir/other                       1
Occurances of run_of_river/hydro                  427
Occurances of run_of_river/other                   35
Occurances of solar/other                        1191
Occurances of solar/solar_ground_mounted         1227
Occurances of solar/solar_roof_mounted           1714
Occurances of waste/other                          31
Occurances of wind/wind_onshore                  1408

"other" comes whenever subtype==None

@miguelparadacontzen
Copy link

At LV level:

Occurances of biomass/biofuel                  203
Occurances of biomass/biogas                  3835
Occurances of biomass/biogas_from_grid         459
Occurances of biomass/biomass                 2808
Occurances of biomass/wood                       9
Occurances of gas/gas                          144
Occurances of gas/gas_landfill                  97
Occurances of gas/gas_mine                       1
Occurances of gas/gas_sewage                   157
Occurances of geothermal/geothermal             20
Occurances of run_of_river/hydro              6149
Occurances of solar/other                   170631
Occurances of solar/solar_ground_mounted     37327
Occurances of solar/solar_roof_mounted      299170
Occurances of wind/wind_onshore               1245

@nesnoj
Copy link
Member

nesnoj commented Sep 6, 2017

Thx!
The missing data (except the solar plants discussed above) origin from the conv. PP table! In this table we do not have data on type/subtype, that's why we use column fuel in dingo..so all "other"-subtypes origin from conv. PP table.
It looks like we have to set the subtype manually if needed.

@gplssm
Copy link
Contributor Author

gplssm commented Sep 11, 2017

Had short chat with @wolfbunke: Missing subtypes of solar PP originates from from missing data in EE Anlagenregister which cannot be resolved that easily in DP. Means, we need to use assumptions in order to this. Hence, we can resolve it entirely in Ding0.

@nesnoj
Copy link
Member

nesnoj commented Sep 12, 2017

I can take care of it..

@nesnoj
Copy link
Member

nesnoj commented Sep 14, 2017

@miguelparadacontzen How can I get these statistics

Occurances of biomass/biofuel                      69
Occurances of biomass/biogas                     1464
Occurances of biomass/biogas_dry_fermentation       7
Occurances of biomass/biogas_from_grid            170
Occurances of biomass/biomass                     745
Occurances of biomass/other                        32
Occurances of biomass/waste_wood                    8
Occurances of biomass/wood                         24
...

in dingo? I tried your stats branch but got only CSVs with detailed data..

@miguelparadacontzen
Copy link

I wrote a small script to get those numbers from the saved .csv file with the stats that I have locally in my hard drive:

#############################################
    ########## MV stats
    stats = pd.DataFrame.from_csv('dingo_grids_1_to_3607_mv_stats.csv')
    cols  = [c for c in stats.columns if c[:15] == 'Gen. Cap. of MV']
    stats = stats[cols]
    cols  = [c for c in stats.columns if c[:20] != 'Gen. Cap. of MV at v']
    stats = stats[cols]

    stats.columns = [ 'Occurances of '+c[16:] for c in stats.columns]

    stats = stats.T.astype(bool).sum(axis=1)
    print(stats)

    ########## LV stats
    stats = pd.DataFrame.from_csv('dingo_grids_1_to_3607_lv_stats.csv')
    cols  = [c for c in stats.columns if c[:14] == 'Gen. Cap. type']
    stats = stats[cols]

    stats.columns = [ 'Occurances of '+c[15:] for c in stats.columns]

    stats = stats.T.astype(bool).sum(axis=1)
    print(stats)

@nesnoj
Copy link
Member

nesnoj commented Sep 18, 2017

Thanks!

@gplssm I'm running out of time and have to dig deeper into #21, could you please take care of the type & subtype stuff?

@gplssm
Copy link
Contributor Author

gplssm commented Sep 18, 2017

@gplssm I'm running out of time and have to dig deeper into #21, could you please take care of the type & subtype stuff?

Yes, but not immediately.

@gplssm gplssm assigned gplssm and unassigned nesnoj Sep 18, 2017
@nesnoj
Copy link
Member

nesnoj commented Sep 18, 2017

Cheers!

gplssm pushed a commit to openego/ding0 that referenced this issue Sep 21, 2017
If a subtype of a RES generator is unknow it is set to 'unknown'.
Conventional generators' subtype is set to 'unknown' by default.

Tested with MV grid districts in Ding0 and eDisGo.
* 391
* 2507
* 1066
* 1117
* 1167

Above MVGDs include both RES generators with unknown subtype and
conventional generators.

For further discussion details see
[here](openego/eDisGo#35).
@gplssm
Copy link
Contributor Author

gplssm commented Sep 22, 2017

This should be fixed by openego/ding0@effb54e. If it's still an issue, please reopen.

@gplssm gplssm closed this as completed Sep 22, 2017
@nesnoj
Copy link
Member

nesnoj commented Sep 22, 2017

Great! But why didn't you work with the assumptions from above?

Do you want to be strict not to use further assumptions additionally to the original data provided by OPSD?

@gplssm
Copy link
Contributor Author

gplssm commented Sep 22, 2017

To be honoest, I overlooked it. I'm undecided if we want to mix up data provided by OPSD dataset and own assumptions. They are quite valid (I would guess) but we cannot be sure... I'll give you a call on that soon

@nesnoj
Copy link
Member

nesnoj commented Sep 22, 2017

We keep it for now.
Reopen as soon as we need assumptions on subtypes..(e.g. for LV paper)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants