@@ -163,16 +163,16 @@ def export_besmod(
163163 for i , bldg in enumerate (buildings ):
164164 bldg .bldg_height = bldg .number_of_floors * bldg .height_of_floors
165165 start_time_zones = []
166- width_zones = []
167- amplitude_zones = []
166+ hours_set_back_zones = []
167+ d_temp_set_back_zones = []
168168 t_set_zone_nominal = []
169169 for tz in bldg .thermal_zones :
170170 heating_profile = tz .use_conditions .heating_profile
171- t_set_nominal , start_time , width , amplitude = _convert_heating_profile (heating_profile )
171+ t_set_nominal , start_time , hours_set_back , d_temp_set_back = _convert_heating_profile (heating_profile )
172172 t_set_zone_nominal .append (t_set_nominal )
173- amplitude_zones .append (amplitude )
173+ d_temp_set_back_zones .append (d_temp_set_back )
174174 start_time_zones .append (start_time )
175- width_zones .append (width )
175+ hours_set_back_zones .append (hours_set_back )
176176
177177 bldg_path = os .path .join (path , bldg .name )
178178 utilities .create_path (bldg_path )
@@ -195,9 +195,9 @@ def write_example_mo(example_template, example):
195195 TSetZone_nominal = t_set_zone_nominal ,
196196 QBuiOld_flow_design = QBuiOld_flow_design [bldg .name ],
197197 THydSupOld_design = t_hyd_sup_old_design_bldg [bldg .name ],
198- setBakTSetZone_amplitude = amplitude_zones ,
199- setBakTSetZone_startTime = start_time_zones ,
200- setBakTSetZone_width = width_zones ))
198+ dTSetBack = d_temp_set_back_zones ,
199+ startTimeSetBack = start_time_zones ,
200+ hoursSetBack = hours_set_back_zones ))
201201 model_file .close ()
202202
203203 for exp in examples :
@@ -370,8 +370,8 @@ def _convert_heating_profile(heating_profile):
370370 This function analyzes a 24-hour heating profile to extract:
371371 - The nominal temperature.
372372 - Start time of setbacks (if any).
373- - Width of setback intervals.
374- - Amplitude of the heating variation.
373+ - hours_set_back of setback intervals.
374+ - d_temp_set_back of the heating variation.
375375
376376 Parameters
377377 ----------
@@ -384,10 +384,10 @@ def _convert_heating_profile(heating_profile):
384384 Maximum temperature in the profile, used as the nominal set point.
385385 start_time : int
386386 Start time of the setback interval in seconds.
387- width : float
388- Width of the setback interval as a percentage of the day .
389- amplitude : float
390- Difference between the minimum and nominal temperatures.
387+ hours_set_back : float
388+ hours of the setback interval in h .
389+ d_temp_set_back : float
390+ Absolute difference between the minimum and nominal temperatures.
391391
392392 Raises
393393 ------
@@ -404,25 +404,25 @@ def _convert_heating_profile(heating_profile):
404404 change_count += 1
405405 change_indexes .append (i )
406406 t_set_zone_nominal = max (heating_profile )
407- amplitude = abs (min (heating_profile ) - t_set_zone_nominal )
407+ d_temp_set_back = abs (min (heating_profile ) - t_set_zone_nominal )
408408 if change_count == 0 :
409- amplitude = 0
409+ d_temp_set_back = 0
410410 start_time = 0
411- width = 1e-50
411+ hours_set_back = 0
412412 elif change_count == 1 :
413413 if heating_profile [0 ] < heating_profile [- 1 ]:
414414 start_time = 0
415- width = change_indexes [0 ]
415+ hours_set_back = change_indexes [0 ]
416416 else :
417417 start_time = change_indexes [0 ] * 3600
418- width = (24 - change_indexes [0 ])
418+ hours_set_back = (24 - change_indexes [0 ])
419419 elif change_count == 2 :
420420 start_time = change_indexes [1 ] * 3600
421- width = (24 - change_indexes [1 ] + change_indexes [0 ])
421+ hours_set_back = (24 - change_indexes [1 ] + change_indexes [0 ])
422422 else :
423423 raise ValueError ("You have more than two temperature intervals in the heating profile."
424424 "BESMod can only handel one heating set back." )
425- return t_set_zone_nominal , start_time , width * 3600 , amplitude
425+ return t_set_zone_nominal , start_time , hours_set_back , d_temp_set_back
426426
427427
428428def _get_next_higher_year_value (years_dict , given_year ):
0 commit comments