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

Fix for issue with 'area' parameter #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/new_building.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ def main(bui_new:dict, weather_type:str, path_weather_file_:str,
annual_results_df.to_csv(path_annual_sim_result)

# Generate Graphs
Graphs_and_report(df = hourly_sim,season ='heating_cooling').bui_analysis_page(
folder_directory=dir_chart_folder,
name_file=name_report)
# Graphs_and_report(df = hourly_sim,season ='heating_cooling').bui_analysis_page(
# folder_directory=dir_chart_folder,
# name_file=name_report)

return print(f"Simulation eneded!check results in {path_hourly_sim_result} and {path_annual_sim_result}")

Expand Down
12 changes: 6 additions & 6 deletions src/pybuildingenergy/source/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,12 @@ def Calculation_ISO_52010(building_object, path_weather_file) -> simdf_52010:
timezoneW = weatherData.utc_offset

# Change time index
if len(sim_df) > 8760: # In the case of a leap year, (ITA: anno bisestile)
if False: # In the case of a leap year, (ITA: anno bisestile)
pass
else:
sim_df.index = pd.to_datetime(
{
"year": 2009,
"year": sim_df.index.year,
"month": sim_df.index.month,
"day": sim_df.index.day,
"hour": sim_df.index.hour,
Expand Down Expand Up @@ -1010,10 +1010,10 @@ def Temp_calculation_of_ground(
If the value is nor provided by the user
"""
sog_area = building_object.__getattribute__("slab_on_ground")
if sog_area == -999:
if sog_area == None:
sog_area = sum(
Filter_list_by_indices(
building_object.__getattribute__("area"),
building_object.__getattribute__("area_elements"),
Get_positions(
building_object.__getattribute__("typology_elements"), "GR"
),
Expand All @@ -1031,7 +1031,7 @@ def Temp_calculation_of_ground(
# SOUTH FACADE
south_facade_area = sum(
Filter_list_by_indices(
building_object.__getattribute__("area"),
building_object.__getattribute__("area_elements"),
Get_positions(
building_object.__getattribute__("orientation_elements"), "SV"
),
Expand All @@ -1040,7 +1040,7 @@ def Temp_calculation_of_ground(
# EAST FACADE
east_facade_area = sum(
Filter_list_by_indices(
building_object.__getattribute__("area"),
building_object.__getattribute__("area_elements"),
Get_positions(
building_object.__getattribute__("orientation_elements"), "EV"
),
Expand Down