コード例 #1
0
def load_network_one_node(gens):
    names = 'central node'
    equipment = [gens]
    e_connections = []
    h_connections = []
    c_connections = []
    longitude = [-117.1698]
    latitude = [46.7287]
    timezone = -3
    location = Location()
    location.longitude = longitude[0]
    location.latitude = latitude[0]
    location.timezone = timezone
    e_trans_eff = []
    h_trans_eff = []
    c_trans_eff = []
    e_load = [[0]]
    h_load = [[0]]
    c_load = [[0]]
    network = []
    e_demand = NetworkDemand({'connections': e_connections, 'trans_eff': e_trans_eff, 'trans_limit':[], 'load': e_load[0]})
    h_demand = NetworkDemand({'connections':h_connections, 'trans_eff':h_trans_eff, 'trans_limit':[], 'load':h_load[0]})
    c_demand = NetworkDemand({'connections':c_connections, 'trans_eff':c_trans_eff, 'trans_limit':[], 'load':c_load[0]})
    node = Network(gens=True, info_dct={'equipment':equipment[0], 'name':names, 'electrical':e_demand, 'district_heat':h_demand, 'district_cooling':c_demand, 'location': location})
    network.append(node)
    return network
コード例 #2
0
def load_network(gens):
    names = ['slack', 'bus_2', 'bus_3', 'bus_4', 'bus_5']
    equipment = [[gens[0], gens[3]], [gens[1], gens[3]], [gens[2], gens[3]],
                 [], []]
    e_connections = [['bus_2', 'bus_3'], ['slack', 'bus_3', 'bus_4', 'bus_5'],
                     ['slack', 'bus_2', 'bus_4'], ['bus_2', 'bus_3', 'bus_5'],
                     ['bus_2', 'bus_4']]
    longitude = [-117.1698, -117.1527, -117.1558, -117.16, -117.1616]
    latitude = [46.7287, 46.7326, 46.7320, 46.7317, 46.729]
    timezone = -6
    eff = []
    e_trans_eff = [eff] * len(names)
    e_load = [[0, 0], [20, 10], [20, 15], [50, 30], [60, 40]]
    network = []
    for i in range(len(names)):
        location = Location()
        location.longitude = longitude[i]
        location.latitude = latitude[i]
        location.timezone = timezone
        e_demand = NetworkDemand({
            'connections':
            e_connections[i],
            'trans_eff':
            e_trans_eff[i],
            'trans_limit':
            np.ones(len(e_trans_eff[i])) * np.float('inf'),
            'load':
            e_load[i]
        })
        h_demand = NetworkDemand({
            'connections': [],
            'trans_eff': [],
            'trans_limit': [],
            'load': None
        })
        c_demand = NetworkDemand({
            'connections': [],
            'trans_eff': [],
            'trans_limit': [],
            'load': None
        })
        node = Network(gens=True,
                       info_dct={
                           'equipment': equipment[i],
                           'name': names[i],
                           'electrical': e_demand,
                           'district_heat': h_demand,
                           'district_cooling': c_demand,
                           'location': location
                       })
        network.append(node)
    return network
コード例 #3
0
def load_network(gens):
    names = ['West Chiller Plant', 'East Chiller Plant', 'Clark Hall Chiller Plant', 'Johnson Hall Chiller Plant',\
    'SCUE Chiller Plant', 'Utility Node', 'GW Steam Plant', 'CA Steam Plant', 'Research Park']
    equipment = [[gens[3], gens[6], gens[7], gens[4]], [gens[8], gens[9]], [gens[10], gens[11]], [gens[12]], [gens[13]],\
     [gens[0], gens[1], gens[22]], [gens[5], gens[16], gens[17], gens[2], gens[14], gens[15]], [gens[18], gens[19]], [gens[20], gens[21]]]
    e_connections = [['CA Steam Plant'], ['GW Steam Plant'],['Johnson Hall Chiller Plant', 'Utility Node', 'GW Steam Plant'],\
        ['Clark Hall Chiller Plant', 'Utility Node', 'GW Steam Plant'], ['Utility Node'],\
        ['Clark Hall Chiller Plant', 'Johnson Hall Chiller Plant', 'SCUE Chiller Plant', 'GW Steam Plant', 'CA Steam Plant', 'Research Park'],\
        ['East Chiller Plant', 'Clark Hall Chiller Plant', 'Johnson Hall Chiller Plant', 'Utility Node'],\
        ['West Chiller Plant', 'Utility Node'], ['Utility Node']]
    
    h_connections = [[], [], ['Utility Node', 'GW Steam Plant'], [], ['GW Steam Plant', 'CA Steam Plant'], ['Clark Hall Chiller Plant', 'GW Steam Plant'],\
        ['Clark Hall Chiller Plant', 'SCUE Chiller Plant', 'Utility Node'], ['SCUE Chiller Plant'], []]
    c_connections = [['SCUE Chiller Plant'], ['Clark Hall Chiller Plant'], ['East Chiller Plant', 'Johnson Hall Chiller Plant'],\
        ['Clark Hall Chiller Plant', 'SCUE Chiller Plant'], ['West Chiller Plant', 'Johnson Hall Chiller Plant'], [], [], [], []]
    longitude = [-117.1698, -117.1527, -117.1558, -117.16, -117.1616, -117.1529, -117.1515, -117.1710, -117.1626]
    latitude = [46.7287, 46.7326, 46.7320, 46.7317, 46.7298, 46.7295, 46.7287, 46.7296, 46.7444]
    timezone = -6
    e_trans_eff = [[.999],[.95],[.999, .95, .97],[.999, .95, .97],[.999], [.95, .95, .95, .95, .95, .95], [.95, .97, .97, .95], [.999, .95], [.9]]
    h_trans_eff = [[], [], [.91,.9], [], [.9,.9], [.91,.98], [.9, .9, .98], [.9], []]
    c_trans_eff = [[.85],[.95], [.95,.98], [.98,.93], [.85, .93], [], [], [], []]
    e_load = [[], [], [], [], [], 0, 1, 2, 3]
    h_load = [[], [], 0, [], [], [], [], [], []]
    c_load = [[], [], [], [], 0, [], [], [], []]
    network = []
    for i in range(len(names)):
        location = Location()
        location.longitude = longitude[i]
        location.latitude = latitude[i]
        location.timezone = timezone
        e_demand = NetworkDemand({'connections': e_connections[i], 'trans_eff': e_trans_eff[i], 'trans_limit': np.ones(len(e_trans_eff[i]))*np.float('inf'), 'load': e_load[i]})
        h_demand = NetworkDemand({'connections': h_connections[i], 'trans_eff': h_trans_eff[i], 'trans_limit': np.ones(len(h_trans_eff[i]))*np.float('inf'), 'load': h_load[i]})
        c_demand = NetworkDemand({'connections': c_connections[i], 'trans_eff': c_trans_eff[i], 'trans_limit': np.ones(len(c_trans_eff[i]))*np.float('inf'), 'load': c_load[i]})
        node = Network(gens = True, info_dct={'equipment':equipment[i], 'name': names[i], 'electrical': e_demand, 'district_heat': h_demand, 'district_cooling': c_demand, 'location': location})
        network.append(node)
    return network
コード例 #4
0
def load_network(gens):
    names = [
        'TUR115', 'SPU125', 'SPU122', 'SPU124', 'TUR111', 'TUR131', 'TUR117'
    ]
    equipment = [[gens[0], gens[1], gens[2], gens[18]],\
         [gens[6], gens[7], gens[3], gens[24]],\
         [gens[1], gens[5], gens[14], gens[15], gens[25], gens[20]],\
         [gens[1], gens[12], gens[13], gens[16], gens[17], gens[8], gens[9], gens[26]],\
         [gens[27]],\
         [gens[1], gens[10],gens[11], gens[4], gens[19], gens[28]],\
         [gens[29], gens[21], gens[22]]]
    e_connections = [['SPU125'], ['TUR115'], ['SPU124'], ['SPU122'], [], [],
                     []]
    h_connections = [['TUR131', 'TUR111'], [], ['TUR111', 'SPU124'],
                     ['SPU122', 'TUR131'], ['TUR115', 'SPU122'],
                     ['SPU124', 'TUR115'], []]
    c_connections = [[], ['TUR111', 'SPU122'], ['SPU125', 'TUR131'],
                     ['TUR131', 'TUR111'], ['SPU124', 'SPU125'],
                     ['SPU122', 'SPU124'], []]
    longitude = [
        -117.1698, -117.1527, -117.1558, -117.16, -117.1616, -117.1529,
        -117.1515, -117.1710, -117.1626, -177, -177
    ]
    latitude = [
        46.7287, 46.7326, 46.7320, 46.7317, 46.7298, 46.7295, 46.7287, 46.7296,
        46.7444, 46.7, 46.7
    ]
    timezone = -6
    eff = []
    e_trans_eff = [eff] * len(
        names
    )  #[[.999],[.95],[.999, .95, .97],[.999, .95, .97],[.999], [.95, .95, .95, .95, .95, .95], [.95, .97, .97, .95], [.999, .95], [.9], [.9], [.9]]
    h_trans_eff = [eff] * len(
        names
    )  #[[], [], [.91,.9], [], [.9,.9], [.91,.98], [.9, .9, .98], [.9], [], [], [.9]]
    c_trans_eff = [eff] * len(
        names
    )  #[[.85],[.95], [.95,.98], [.98,.93], [.85, .93], [], [], [], [], [9], []]
    e_load = [2, 2, 0, 1, 3, 2, 3]
    h_load = [None, None, 0, 1, 2, 3, None]
    c_load = [None, None, 0, 1, 2, 3, None]
    network = []
    for i in range(len(names)):
        location = Location()
        location.longitude = longitude[i]
        location.latitude = latitude[i]
        location.timezone = timezone
        e_demand = NetworkDemand({
            'connections':
            e_connections[i],
            'trans_eff':
            e_trans_eff[i],
            'trans_limit':
            np.ones(len(e_trans_eff[i])) * np.float('inf'),
            'load':
            e_load[i]
        })
        h_demand = NetworkDemand({
            'connections':
            h_connections[i],
            'trans_eff':
            h_trans_eff[i],
            'trans_limit':
            np.ones(len(h_trans_eff[i])) * np.float('inf'),
            'load':
            h_load[i]
        })
        c_demand = NetworkDemand({
            'connections':
            c_connections[i],
            'trans_eff':
            c_trans_eff[i],
            'trans_limit':
            np.ones(len(c_trans_eff[i])) * np.float('inf'),
            'load':
            c_load[i]
        })
        node = Network(gens=True,
                       info_dct={
                           'equipment': equipment[i],
                           'name': names[i],
                           'electrical': e_demand,
                           'district_heat': h_demand,
                           'district_cooling': c_demand,
                           'location': location
                       })
        network.append(node)
    return network