def summerPeakwinterOK(a, cop_high, cop_low, window_wall_ratio): options = [None] * 6 for i in range(6): options[i] = [cop_high, cop_low, window_wall_ratio] if a < 0: a0 = "To lower summer peak (lowering winter is OK too), we can " a1 = "increase" # COP values a2 = "decrease" # window wall ratio ch = -1 else: a0 = "To increase summer peak (increasing winter is OK too), we can " a1 = "decrease" # COP values a2 = "increase" # window wall ratio ch = 1 print(a0 + a1 + " COP values, " + a2 + " window wall ratio.") cop_high_new = round(cop_high - ch * 0.05, 2) cop_high_dub = round(cop_high - ch * 0.10, 2) cop_low_new = round(cop_low - ch * 0.05, 2) cop_low_dub = round(cop_low - ch * 0.10, 2) window_wall_ratio_new = round(window_wall_ratio + ch * 0.05, 2) window_wall_ratio_dub = round(window_wall_ratio + ch * 0.10, 2) options[0][0:2] = cop_high_new, cop_low_new # change COP high and low options[1][ 0:2] = cop_high_dub, cop_low_dub # change COP high and low double options[2] = [cop_high_new, cop_low_new, window_wall_ratio_new ] # change COP high and low and window wall ratio options[3] = [cop_high_dub, cop_low_dub, window_wall_ratio_dub ] # change COP high and low and window wall ratio double options[4][2] = window_wall_ratio_new # change window wall ratio options[5][2] = window_wall_ratio_dub # change window wall ratio double for i in range(6): if not limits.COPvalsLIM( options[i][0], options[i][1] ): # Will need modification if changing COP high and COP low independently. if a < 0: options[i][0], options[i][ 1] = limits.COPlim_high, limits.COPlim_high else: options[i][0], options[i][ 1] = limits.COPlim_low, limits.COPlim_low if not limits.windowWallRatioLIM(options[i][2]): if a < 0: options[i][2] = limits.window_wall_low else: options[i][2] = limits.window_wall_high # Get rid of any duplicates that were created after limits imposed. final = list(map(list, set(map(tuple, options)))) return final
def summerPeakwinterOK (a, cop_high, cop_low, window_wall_ratio ): options = [None] * 6 for i in range(6): options[i] = [cop_high, cop_low, window_wall_ratio] if a < 0: a0 = "To lower summer peak (lowering winter is OK too), we can " a1 = "increase" # COP values a2 = "decrease" # window wall ratio ch = -1 else: a0 = "To increase summer peak (increasing winter is OK too), we can " a1 = "decrease" # COP values a2 = "increase" # window wall ratio ch = 1 print (a0 + a1 + " COP values, " + a2 + " window wall ratio.") cop_high_new = round(cop_high - ch * 0.05,2) cop_high_dub = round(cop_high - ch * 0.10,2) cop_low_new = round(cop_low - ch * 0.05,2) cop_low_dub = round(cop_low - ch * 0.10,2) window_wall_ratio_new = round(window_wall_ratio + ch * 0.05, 2) window_wall_ratio_dub = round(window_wall_ratio + ch * 0.10, 2) options[0][0:2] = cop_high_new, cop_low_new # change COP high and low options[1][0:2] = cop_high_dub, cop_low_dub # change COP high and low double options[2] = [cop_high_new, cop_low_new, window_wall_ratio_new] # change COP high and low and window wall ratio options[3] = [cop_high_dub, cop_low_dub, window_wall_ratio_dub] # change COP high and low and window wall ratio double options[4][2] = window_wall_ratio_new # change window wall ratio options[5][2] = window_wall_ratio_dub # change window wall ratio double for i in range(6): if not limits.COPvalsLIM(options[i][0],options[i][1]): # Will need modification if changing COP high and COP low independently. if a < 0: options[i][0], options[i][1] = limits.COPlim_high, limits.COPlim_high else: options[i][0], options[i][1] = limits.COPlim_low, limits.COPlim_low if not limits.windowWallRatioLIM(options[i][2]): if a < 0: options[i][2] = limits.window_wall_low; else: options[i][2] = limits.window_wall_high; # Get rid of any duplicates that were created after limits imposed. final = list(map(list, set(map(tuple,options)))) return final
def summerPeak(a, window_wall_ratio): options = [None] * 2 for i in range(2): options[i] = [window_wall_ratio] if a < 0: a0 = "To lower summer peak, we can " a1 = "decrease" ch = -1 else: a0 = "To increase summer peak, we can " a1 = "increase" ch = 1 print(a0 + a1 + " window wall ratio.") options[0][0] = round(window_wall_ratio + ch * 0.05, 2) options[1][0] = round(window_wall_ratio + ch * 0.10, 2) for i in range(2): if not limits.windowWallRatioLIM(options[i][0]): if a < 0: options[i][0] = limits.window_wall_low else: options[i][0] = limits.window_wall_high final = list(map(list, set(map(tuple, options)))) return final
def summerPeak (a, window_wall_ratio): options = [None] * 2 for i in range(2): options[i] = [window_wall_ratio] if a < 0: a0 = "To lower summer peak, we can " a1 = "decrease" ch = -1 else: a0 = "To increase summer peak, we can " a1 = "increase" ch = 1 print (a0 + a1 + " window wall ratio."); options[0][0] = round(window_wall_ratio + ch * 0.05, 2) options[1][0] = round(window_wall_ratio + ch * 0.10, 2) for i in range(2): if not limits.windowWallRatioLIM(options[i][0]): if a < 0: options[i][0] = limits.window_wall_low; else: options[i][0] = limits.window_wall_high; final = list(map(list, set(map(tuple,options)))) return final