Skip to content

Commit

Permalink
Merge branch 'dev' into 338-add-github-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mltja authored Mar 13, 2023
2 parents 57ee89f + 90d87f0 commit 3c5de0e
Show file tree
Hide file tree
Showing 50 changed files with 8,916 additions and 1,185 deletions.
3 changes: 2 additions & 1 deletion dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ pytest
pytest-dependency
pytest-parallel
sphinx
sphinx_rtd_theme
sphinx_rtd_theme
Cython
6 changes: 6 additions & 0 deletions ding0/config/config_db_credentials.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[database_credentials]
name = name
host: ip_address
port: port
user: username
password: password
30 changes: 29 additions & 1 deletion ding0/config/config_db_tables.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,33 @@ re_generators = t_ego_dp_res_powerplant_sq_mview
conv_generators = t_ego_dp_conv_powerplant_sq_mview
version = v0.4.5

[local]
orm_mv_grid_districts = grid.egon_mv_grid_district
orm_mv_stations = grid.egon_hvmv_substation
orm_lv_load_areas = demand.egon_loadarea
# OSM ways for street graphs
osm_ways_with_segments = openstreetmap.osm_ways_with_segments
# All residential and cts buildings, geoms and peak loads
egon_map_zensus_mvgd_buildings = boundaries.egon_map_zensus_mvgd_buildings
osm_buildings_filtered = openstreetmap.osm_buildings_filtered
osm_buildings_synthetic = openstreetmap.osm_buildings_synthetic
building_peak_loads = demand.egon_building_electricity_peak_loads
household_electricity_profile = demand.egon_household_electricity_profile_of_buildings

# Industrial loads 1 and geoms
egon_sites_ind_load_curves_individual = demand.egon_sites_ind_load_curves_individual
egon_industrial_sites = demand.egon_industrial_sites
# Industrial loads 2 and geoms
egon_osm_ind_load_curves_individual = demand.egon_osm_ind_load_curves_individual
osm_landuse = openstreetmap.osm_landuse
# Generators
generators_pv = supply.egon_power_plants_pv
generators_pv_rooftop = supply.egon_power_plants_pv_roof_building
generators_wind = supply.egon_power_plants_wind
generators_biomass = supply.egon_power_plants_biomass
generators_water = supply.egon_power_plants_hydro
# Weather cells
weather_cells = supply.egon_era5_weather_cells

[input_data_source]
input_data = versioned
input_data = local
283 changes: 283 additions & 0 deletions ding0/config/config_lv_grids_osm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,283 @@
"""
config file for synthetic low voltage grids
parameterized by load profiles.
"""

def get_config_osm(key):

"""
return config for osm processing.
...
...
mv_lv_threshold_capacity: loads with capacity < 200 kW are connected in grid
loads wi. capacity >= 200 kW are separately
avg_cluster_capacity : n_cluster = sum(peak_load) / avg_cluster_capacity
Clusters are NOT homogenous
additional_trafo_capacity: e.g. 1.5; so, transformers have max load factor of 70%.
capacity_to_cover = capacity_of_area * 1.5
diversity_factor_not_residential: 0.6
src.: https://assets.new.siemens.com/siemens/assets/api/uuid:d683c81df25afb360b79c5d48441eeda8b23477b/planung-der-elektrischen-energieverteilung-technische-grundlagen.pdf, page 18. 23.12.2021.
"""

config_osm = {

'srid' : 3035,
'EARTH_RADIUS_M' : 6_371_009, # deprecated!? not mandatory anymore?!
'lv_threshold_capacity' : 100, # < 100kW connected to grid
'mv_lv_threshold_capacity' : 200, # 100 to < 200kW connected to station directly
'hv_mv_threshold_capacity' : 5500, # 200 to < 5.5MW own station with trafos
'additional_trafo_capacity' : 1.0,
'avg_trafo_size' : 500,
'avg_square_meters' : 100,
'quadrat_width' : 1000,
'dist_edge_segments' : 50,
'cluster_increment_counter_threshold' : 20,
'ons_dist_threshold' : 1500,
'buffer_distance' : [5, 25, 50, 100],
'unconn_nodes_ratio' : 0.02,
'major_ccs_ratio_threshold' : .30,
'get_fully_conn_graph_number_max_it' : 4,
'diversity_factor_not_residential' : 0.6,
}

return config_osm[key]



def get_charging_station_columns():

""" get columns for charging_stations """

return ["socket:type2:output", "charging_station:output", "socket:chademo:output",
"socket:type2_cable:output", "socket:type2_combo:output"]



def get_peak_loads():

"""
get dictionary containing categories and peak loads
due to each amenity as average square meters of 100
but for charging_stations we use 22 kW, divide by
average square meters.
"""



load_profiles = {

'lodging' : 73.0,
'education' : 62.2,
'office' : 64.9,
'retail' : 128.9,
'fire_brigade' : 12.93,
'research' : 91.51,
'health_care' : 109.3,
'industry' : 164.5,
'hotel' : 62.7,
'aggriculture' : 38.29,
'restaurant' : 91.51,
'swimming' : 88.50,
'sport' : 72.72,
'technical' : 13.25,
'public' : 115.8,
'charging_station' : 22000.0 / get_config_osm('avg_square_meters'),
'residential' : 17.0847,
'leftover' : 0.1

}

return load_profiles




def get_load_profile_categories():

""" get dictionary containing categorie types assigned to categories """
#TODO exclude leftover category from building import

load_profile_categories = {
"lodging": "lodging",
"education": "education",
"language_school": "education",
"childcare": "education",
"kindergarten": "education",
"school": "education",
"art_school": "education",
"university": "education",
"college": "education",
"driving_school": "education",
"music_school": "education",
"office": "office",
"money_transfer": "office",
"bank": "office",
"prep_school": "office",
"internet_cafe": "office",
"courthouse": "office",
"post_depot": "office",
"post_office": "office",
"studio": "office",
"reception_desk": "office",
"coworking_space": "office",
"conference_centre": "office",
"exhibition_centre": "office",
"customs": "office",
"supermarket": "office",
"car_rental": "office",
"car_wash": "office",
"commercial": "office",
"warehouse": "office",
"police": "office",
"retail": "retail",
"fire_station": "fire_brigade",
"research": "research",
"health_care": "health_care",
"hospital": "health_care",
"clinic": "health_care",
"dentist": "health_care",
"doctors": "health_care",
"pharmacy": "health_care",
"social_facility": "health_care",
"veterinary": "health_care",
"industrial": "industry",
"manufacture": "industry",
"industry": "industry",
"hotel": "hotel",
"aggriculture": "aggriculture",
"agricultural": "aggriculture",
"barn": "aggriculture",
"conservatory": "aggriculture",
"cowshed": "aggriculture",
"farm_auxiliary": "aggriculture",
"greenhouse": "aggriculture",
"stable": "aggriculture",
"restaurant": "restaurant",
"bar": "restaurant",
"biergarten": "restaurant",
"cafe": "restaurant",
"fast_food": "restaurant",
"food_court": "restaurant",
"ice_cream": "restaurant",
"pub": "restaurant",
"canteen": "restaurant",
"swimming_bath": "swimming",
"swimming_pool": "swimming",
"public_bath": "swimming",
"sport_building": "sport",
"sports_centre": "sport",
"grandstand": "sport",
"pavilion": "sport",
"riding_hall": "sport",
"sports_hall": "sport",
"stadium": "sport",
"technique_building": "technical",
"digester": "technical",
"service": "technical",
"transformer_tower": "technical",
"water_tower": "technical",
"vehicle_inspection": "technical",
"residential": "residential",
"retirement_home": "residential",
"apartments": "residential",
"house": "residential",
"brothel": "residential",
"bungalow": "residential",
"detached": "residential",
"semidetached_house": "residential",
"semi": "residential",
"dormitory": "residential",
"farm": "residential",
"terrace": "residential",
"yes": "residential",
"charging_station": "charging_station",
"public": "public",
"archive": "public",
"public_building": "public",
"events_venue": "public",
"civic": "public",
"bakehouse": "public",
"community_centre": "public",
"library": "public",
"toy_library": "public",
"social_centre": "public",
"parking": "public",
"townhall": "public",
"government": "public",
"train_station": "public",
"transportation": "public",
"theatre": "public",
"arts_centre": "public",
"casino": "public",
"cinema": "public",
"nightclub": "public",
"prison": "public",
"cathedral": "public",
"church": "public",
"monastery": "public",
"mosque": "public",
"religious": "public",
"synagogue": "public",
"temple": "public",
"fuel": "public",
"leftover": "leftover",
"chapel": "leftover",
"place_of_worship": "leftover",
"toilets": "leftover",
"recycling": "industry",
"waste_transfer_station": "industry",
"shelter": "leftover",
"kiosk": "retail",
"nursing_home": "health_care",
"planetarium": "public",
"gambling": "public",
"static_caravan": "leftover",
"bicycle_parking": "leftover",
"parish_hall": "public",
"embassy": "public",
"emergency_service": "health_care",
"bench": "leftover", #TODO: drop amenities with obviously no consumption
"love_hotel": "public",
"stripclub": "public",
"swingerclub": "public",
"research_institute": "research",
"school;driving_school": "education",
"sailing_school": "education",
"job_centre": "public",
"dive_centre": "swimming",
"student_accommodation": "lodging",
"animal_boarding": "leftover",
"bicycle_repair_station": "leftover",
"parking_space": "leftover", #TODO: drop amenities with obviously no consumption
"motorcycle_parking": "leftover", # TODO: drop amenities with obviously no consumption
"dressing_room": "leftover",
"funeral_hall": "leftover",
"waste_disposal": "leftover", # TODO: drop amenities with obviously no consumption
"station": "public",
"gatehouse": "leftover",
"fountain": "leftover",
"residentials_list": [
"residential",
"retirement_home",
"apartments",
"house",
"brothel",
"bungalow",
"detached",
"semidetached_house",
"semi",
"dormitory",
"farm",
"semidetached_house",
"terrace",
"yes",
],
}

return load_profile_categories

Loading

0 comments on commit 3c5de0e

Please sign in to comment.