Correct small bug in merge city
This commit is contained in:
parent
658c44389e
commit
5637f219f8
|
@ -459,6 +459,7 @@ class City:
|
||||||
for surface in city_object.surfaces:
|
for surface in city_object.surfaces:
|
||||||
radiation = surface.global_irradiance
|
radiation = surface.global_irradiance
|
||||||
if 'year' not in radiation and 'month' not in radiation:
|
if 'year' not in radiation and 'month' not in radiation:
|
||||||
|
|
||||||
continue
|
continue
|
||||||
elif "year" in radiation:
|
elif "year" in radiation:
|
||||||
building_radiation += radiation["year"].iloc[0]
|
building_radiation += radiation["year"].iloc[0]
|
||||||
|
@ -468,11 +469,11 @@ class City:
|
||||||
if building_radiation < min_radiation:
|
if building_radiation < min_radiation:
|
||||||
min_radiation = building_radiation
|
min_radiation = building_radiation
|
||||||
selected_city_object = city_object
|
selected_city_object = city_object
|
||||||
# merge the city object with the minimum radiation
|
# merge the city object with the minimum radiation
|
||||||
if selected_city_object is not None:
|
if selected_city_object is not None:
|
||||||
_merge_city.add_city_object(selected_city_object)
|
_merge_city.add_city_object(selected_city_object)
|
||||||
else:
|
else:
|
||||||
_merge_city.add_city_object(building)
|
_merge_city.add_city_object(building)
|
||||||
return _merge_city
|
return _merge_city
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in New Issue
Block a user