コード例 #1
0
def winterPeaksummerOK(a, cop_high, cop_low, decrease_gas, add_heat_degree):
    #peakLevel(a, cool_offset, heat_offset, cop_high, cop_low, sched_skew_std ) # if we have the computing capacity, this would be best
    options = []
    winterload_ops = winterLoad(a, decrease_gas, add_heat_degree)[::2]
    if a < 0:
        a0 = "Since we can also lower summer peak, we can "
        a1 = "increase"  # COP values
        ch = -1
    else:
        a0 = "Since we can also raise summer peak, we can "
        a1 = "decrease"  # COP values
        ch = 1
    print(a0 + a1 + " COP values.")
    cop_high_new = round(cop_high - ch * 0.05, 2)
    cop_low_new = round(cop_low - ch * 0.05, 2)
    if not limits.COPvalsLIM(
            cop_high_new, cop_low_new
    ):  # Will need modification if changing COP high and COP low independently.
        if a < 0:
            cop_high_new, cop_low_new = limits.COPlim_high, limits.COPlim_high
        else:
            cop_high_new, cop_low_new = limits.COPlim_low, limits.COPlim_low
    for i in winterload_ops:
        options.extend(
            [i + [cop_high_new, cop_low_new], i + [cop_high, cop_low]])
    final = list(map(list, set(map(tuple, options))))
    return final
コード例 #2
0
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
コード例 #3
0
def peakLevel(a, cool_offset, heat_offset, cop_high, cop_low, sched_skew_std):
    options = [None] * 7
    for i in range(7):
        options[i] = [
            cool_offset, heat_offset, cop_high, cop_low, sched_skew_std
        ]
    if a < 0:
        a0 = "To lower peaks, we can "
        a1 = "decrease"
        a2 = "increase"
        a3 = "increase"
        ch = -1
    else:
        a0 = "To increase peaks, we can "
        a1 = "increase"
        a2 = "decrease"
        a3 = "decrease"
        ch = 1
    print(a0 + a1 + " set point offsets, " + a2 + " COP values, " + a3 +
          " schedule skew standard deviation.")

    cool_offset_new = cool_offset + ch * 0.5
    heat_offset_new = heat_offset + ch * 0.5
    cop_high_new = round(cop_high - ch * 0.05, 2)
    cop_low_new = round(cop_low - ch * 0.05, 2)
    sched_skew_std_new = sched_skew_std - ch * 900

    # Changing COP values together and offsets together for now.
    options[0][0:2] = cool_offset_new, heat_offset_new  # change offsets
    options[1][2:4] = cop_high_new, cop_low_new  # change COP scaling
    options[2][4] = sched_skew_std_new  # change schedule skew std
    options[3][
        0:
        4] = cool_offset_new, heat_offset_new, cop_high_new, cop_low_new  # change offsets and COP scaling
    options[4][0], options[4][1], options[4][
        4] = cool_offset_new, heat_offset_new, sched_skew_std_new  # change offsets and schedule skew std
    options[5][
        2:
        5] = cop_high_new, cop_low_new, sched_skew_std_new  # change COP scaling and schedule skew std
    options[6] = [
        cool_offset_new, heat_offset_new, cop_high_new, cop_low_new,
        sched_skew_std_new
    ]  # change COP scaling, offsets, and schedule skew std

    for i in range(7):
        if not limits.OffsetsLIM(
                options[i][1], options[i]
            [0]):  # Will need modification if changing offsets independently.
            if a < 0:
                options[i][0], options[i][
                    1] = -limits.offset_band, -limits.offset_band
            else:
                options[i][0], options[i][
                    1] = limits.offset_band, limits.offset_band
        if not limits.COPvalsLIM(
                options[i][2], options[i][3]
        ):  # Will need modification if changing COP high and COP low independently.
            if a < 0:
                options[i][2], options[i][
                    3] = limits.COPlim_high, limits.COPlim_high
            else:
                options[i][2], options[i][
                    3] = limits.COPlim_low, limits.COPlim_low
        if not limits.SchedSkewSTDLIM(options[i][4]):
            if a < 0:
                options[i][4] = limits.schedSkewStd_high
            else:
                options[i][4] = limits.schedSkewStd_low
    # Get rid of any duplicates that were created after limits imposed.
    final = list(map(list, set(map(tuple, options))))
    return final