Skip to content

Commit

Permalink
insert repowering scn 'Volle Nutzung VR/EG' into queries
Browse files Browse the repository at this point in the history
  • Loading branch information
nesnoj committed Jun 25, 2019
1 parent 69609f6 commit ca3cd36
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import json
import hashlib
import pandas as pd
from uuid import UUID
from django.core.wsgi import get_wsgi_application

Expand Down Expand Up @@ -142,6 +143,23 @@ def insert_repowering_scenarios():
}
RepoweringScenario.objects.create(**scn)

# insert VR/EG scenario
mun_data_vreg = load_mun_data()[['gen_count_wind', 'gen_capacity_wind', 'reg_prio_area_wec_area']]
mun_data_vreg['gen_count_wind'] = (mun_data_vreg['reg_prio_area_wec_area'] / 20).round()
mun_data_vreg['gen_capacity_wind'] = (mun_data_vreg['gen_count_wind'] * 4.2).round(decimals=1)
mun_data_vreg.drop(columns=['reg_prio_area_wec_area'], inplace=True)

scn = {
'id': 2,
'name': 'Volle Nutzung VR/EG',
'description': 'In allen aktuellen Vorranggebieten (VR/EG) für '
'Windenergie wird ein Maximum an Neuanlagen '
'installiert. Alle Anlagen außerhalb dieser '
'Gebiete werden abgebaut.',
'data': json.dumps(mun_data_vreg.to_dict(orient='index'), sort_keys=True)
}
RepoweringScenario.objects.create(**scn)

# def insert_potential_areas():
# # test RE area object
# repot_area_params = {'repot_area_params': {'dist_resid': 1000,
Expand Down Expand Up @@ -188,7 +206,7 @@ def insert_status_quo_results():
scn.save()


#insert_repowering_scenarios()
insert_repowering_scenarios()
#insert_potential_areas()
#insert_status_quo_scenario()
insert_status_quo_results()
#insert_status_quo_results()

0 comments on commit ca3cd36

Please sign in to comment.