From bfd3ad0f7a4484273489e351eacadb40d7e104a6 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 28 Jul 2016 17:34:42 -0400 Subject: [PATCH 1/2] power flow python file --- py/power_flow.py | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 py/power_flow.py diff --git a/py/power_flow.py b/py/power_flow.py new file mode 100644 index 0000000..a7a51e0 --- /dev/null +++ b/py/power_flow.py @@ -0,0 +1,70 @@ +import networkx as nx +from networkx.classes.function import get_edge_attributes, get_node_attributes, set_edge_attributes, set_node_attributes + + +def power_flow(graph, size, pcc_node, load_str='load', gen_str='gen', distance_str='weight'): + """ + Find the power flow for each edge on a graph. Return the absolute flow (float) and + graph (Networkx.Graph() object) with the following new attributes: + nodes - voltage_angle + edges - flow + Parameters + ---------- + graph: Networkx.Graph() object + Graph for which to calculate DC power flow. + size: int + Number of nodes in the graph + pcc_node: str + Name of the PCC node. + load_str: str (optional) + Name of the attribute that stores the power load of each node of the graph. + gen_str: str (optional) + Name of the attribute that stores the power generation of each node of the graph. + distance_str: str (optional) + Name of the attribute that stores the length of each edge of the graph. + """ + total_load = 0 + total_gen = 0 + + load = get_node_attributes(graph, load_str) + gen = get_node_attributes(graph, gen_str) + + for node in load: + total_load += graph.node[node][load_str] + total_gen += graph.node[node][gen_str] + + grid_compensation = total_load - total_gen + + if grid_compensation > 0: + graph.node[pcc_node][load_str] += grid_compensation + else: + graph.node[pcc_node][gen_str] += abs(grid_compensation) + + reactance_per_foot = 3e-4 # estimate + feet = 1000 # estimate + node_reactance = 0 + + set_node_attributes(graph, 'voltage_angle', 0) + + for i in range(size): + neighbors = nx.all_neighbors(graph, i) + for node in neighbors: + line_reactance = (graph.edge[i][node][distance_str] * reactance_per_foot * feet) + node_reactance += line_reactance + + graph.node[i]['voltage_angle'] = (graph.node[i][gen_str] - graph.node[i][load_str]) * node_reactance + + absolute_flow = 0 + + set_edge_attributes(graph, 'flow', 0) + + for i in range(size): + neighbors = nx.all_neighbors(graph, i) + + for node in neighbors: + if node > i: + graph.edge[i][node]['flow'] = (graph.node[node]['voltage_angle'] - graph.node[i]['voltage_angle']) \ + / (graph.edge[i][node][distance_str] * reactance_per_foot * feet) + absolute_flow += abs(graph.edge[i][node]['flow']) + + return absolute_flow, graph -- GitLab From f3f009adb6169a60c01fd49d5071d9f881cad8f0 Mon Sep 17 00:00:00 2001 From: Sam Kramer Date: Thu, 28 Jul 2016 17:47:30 -0400 Subject: [PATCH 2/2] delete simulated_annealing.py --- py/simulated_annealing.py | 1285 ------------------------------------- 1 file changed, 1285 deletions(-) delete mode 100644 py/simulated_annealing.py diff --git a/py/simulated_annealing.py b/py/simulated_annealing.py deleted file mode 100644 index 9075705..0000000 --- a/py/simulated_annealing.py +++ /dev/null @@ -1,1285 +0,0 @@ -""" -Simulated Annealing -""" - -import math -from networkx.classes.function import set_edge_attributes, get_edge_attributes, non_edges -from networkx.algorithms.components import is_connected, connected_component_subgraphs, number_connected_components -from numpy.random import choice -from operator import itemgetter - - -class MyException(Exception): - pass - - -def calculate_distance(p1, p2): - """Calculate the euclidian distance between two points p1 and p2 - Parameters - ------ - p1, p2: tuple - Points which the function calculate the distance. Tuples of Cartesian coordinates (x,y) - - Returns - ------ - dist: float - The distance value of the line between the two points - """ - #print(p1, p2) - x1, y1 = p1 - x2, y2 = p2 - dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) - return dist - - -def get_prob_dist_attr(graph, distance_str="distance", weight_str="weight", weight=True, alpha=2, distance=False, - return_all_edges_graph=True): - """ - Return the graph with each edges affected with their respective distance attribute and an optional weight - attribute. The weight is proportional to the distance between nodes i and j at the power minus alpha, - p_ij = d_ij ** (-alpha) / normalisation constant. - Parameters - ---------- - graph: networkx.Graph object - A network generated using the package Networkx, with edges and nodes. - distance_str: str - Name to give the attribute for distance - weight_str: str - Name to give the attribute for weight - distance: bool - Whether or not to affect each edge with the attribute distance_str - weight: bool - Whether or not to affect each edge with the attribute probability_str - p_ij = d_ij ** (-alpha) / normalisation constant. - alpha: int - If weight is True, parameter to compute the weight to affect to each edge. - return_all_edges_graph: bool - If True, and if weight True, return a graph with all possible edges. - - Returns - ------- - graph: networkx.Graph object - The same graph affected with the attributes of distance and weight (optional) for each edge. - all_edges_graph: graph (optional) - If return_all_edges_graph and weights are True, then return a dictionary of all the possible edges - with their weights as attribute. - - """ - if distance: - dist_d = {} - if weight: - weight_d = {} - #norm_factor = 0 - - for e in graph.edges(): - dist = calculate_distance(e[0], e[1]) - if distance: - dist_d[e] = dist - set_edge_attributes(graph, distance_str, dist_d) - if weight: - proba = dist ** (-alpha) - weight_d[e] = proba - set_edge_attributes(graph, weight_str, weight_d) - - if return_all_edges_graph: - all_edges_graph = graph.copy() - all_weights_d = {} - non_edges_l = list(non_edges(graph)) - for e in non_edges_l: - all_weights_d[e] = calculate_distance(e[0], e[1]) ** (-alpha) - all_edges_graph.add_edges_from(non_edges_l) - set_edge_attributes(all_edges_graph, weight_str, all_weights_d) - - #if weight: - # weight_d.update((k, v / norm_factor) for k, v in weight_d.items()) - - if return_all_edges_graph: - return graph, all_edges_graph - else: - return graph - - -def normalize(lst): - """ - Normalize a list of value so the total sum is 1 - Parameters - ---------- - lst: list - The list to normalize - - Returns - ------- - The normalize list - """ - lst = list(lst) - s = sum(lst) - return list(map(lambda x: x / s, lst)) - - -def neighbor_generator(graph, graph_all_edges_weight, len_original, nb_additional_link=2, weight_str='weight', - method="exhaustive"): - """ - Generate a random neighbor according to the probability of linkage, or link removal, of a graph - for the simulated annealing. - Parameters - ---------- - graph: Networkx.Graph() object - graph from Networkx package. All edges need to have a weight attribute corresponding to the probability of - keeping the edge to generate a new graph (or 1 - probability to remove the edge). - len_original: int - Length of the original graph. - nb_additional_link: int - Number of additional link to add to the spanning tree graph at the beginning (initialization). - graph_all_edges_weight: dict - dictionary of all possible edges (given all the nodes of the graph), and their weight related to the - probability of being kept during the neighbor generator process. - Key/value = set(edge) / weight of being kept - weight = distance(edge) ^ (-alpha) - weight_str: str - The string to access the weight attribute of each edge. - method: str - Select the method to select add an edge when the graph is not connected after removing the first edge. - Method 1. Take a new edge randomly until the graph is connected - Method 2. Rebuild a dictionary of all possible edges that link the two sub-graphs, - along with their probability - - Returns - ------- - new_graph: Networkx.Graph() object - A random neighbor of the graph, as defined in the 'Data-driven modeling of urban microgrids' paper. - """ - if len(list(get_edge_attributes(graph, weight_str).values())) != len(graph.edges()): - raise MyException("""The graph passed as argument needs to have, for each and every edge, - an attribute corresponding to the weight_str argument: {attr_str}. This probability is equal to: - 1 - probability of removal = probability of being kept""".format(attr_str=weight_str)) - - method1 = "try" - method2 = "exhaustive" - if method.lower() not in [method2, method1]: - raise MyException("""Invalid argument in method. Must be in - [{method1}, {method2}]""".format(method2=method2, method1=method1)) - - new_graph = graph.copy() - - # Add 2 edges and compute the probability and distance for each of them. Initial stage. - non_edges_l = list(non_edges(new_graph)) - if len(graph.edges()) == len_original: - #print("Add 2 edges") - random_indices = choice(len(non_edges_l), size=nb_additional_link, replace=False) - edges_add = itemgetter(*random_indices)(non_edges_l) - weighted_edges_add = [{weight_str: graph_all_edges_weight[e[0]][e[1]][weight_str]} for e in edges_add] - new_graph.add_edges_from(list(zip(*edges_add, weighted_edges_add))) - - # Remove random edge - #print(is_connected(new_graph)) - dict_edge_removal = get_edge_attributes(new_graph, weight_str) - dict_edge_removal.update((k, 1/v) for k,v in dict_edge_removal.items()) - random_idx = choice(len(dict_edge_removal.keys()), size=1, p=normalize(dict_edge_removal.values())) - edge_remove = list(dict_edge_removal.keys())[random_idx] - new_graph.remove_edge(edge_remove[0], edge_remove[1]) - #print(is_connected(new_graph)) - - # Test if new_graph is connected, if not the new edge has to link the two sub-graphs, - # otherwise the edge has no constraints - if is_connected(new_graph): - # Add random edge - non_edges_l = list(non_edges(new_graph)) - dict_edge_add = dict([((n1, n2), graph_all_edges_weight[n1][n2][weight_str]) for n1, n2 in non_edges_l]) - random_idx = choice(len(dict_edge_add.keys()), size=1, p=normalize(dict_edge_add.values())) - edge_add = list(dict_edge_add.keys())[random_idx] - new_graph.add_edge(*edge_add, {weight_str: dict_edge_add[edge_add]}) - return new_graph - else: - # Two methods: - # 1. Take a new edge randomly until the graph is connected - # 2. Rebuild a dictionary of all possible edges that link - # the two sub-graphs, along with their probability - - # Method 1 - if method.lower() == method1: - dict_edge_add = get_edge_attributes(all_edges_graph, weight_str) - first_iter = True - while not is_connected(new_graph): - if not first_iter: - new_graph.remove_edge(*edge_add, {weight_str: dict_edge_add[edge_add]}) - random_idx = choice(len(dict_edge_add.keys()), p=normalize(dict_edge_add.values())) - edge_add = list(dict_edge_add.keys())[random_idx] - new_graph.add_edge(*edge_add, {weight_str: dict_edge_add[edge_add]}) - first_iter = False - return new_graph - # Method 2 - elif method.lower() == method2: - subgraph_l = list(connected_component_subgraphs(new_graph)) - graph1, graph2 = subgraph_l - dict_edge_add = dict([((n1, n2), graph_all_edges_weight[n1][n2][weight_str]) for (n1, n2) in - graph_all_edges_weight.edges() if (n1 in graph1.nodes() and - n2 in graph2.nodes())]) - #print(edges_add_weight_d, len(graph1)+len(graph2), len(list(zip(graph1.nodes(), graph2.nodes())))) - random_idx = choice(len(dict_edge_add.keys()), p=normalize(dict_edge_add.values())) - edge_add = list(dict_edge_add.keys())[random_idx] - new_graph.add_edge(*edge_add, {weight_str: dict_edge_add[edge_add]}) - - return new_graph - - -if __name__ == "__main__": - - import networkx as nx - import time - #from networkx.algorithms.mst import minimum_spanning_tree - - #### Data ##### - nodes = [ - (986216.0, 192953.0), - (985210.0, 192440.0), - (984670.0, 190209.0), - (986199.0, 192906.0), - (985931.0, 193829.0), - (983842.0, 189544.0), - (985915.0, 192018.0), - (986076.0, 191798.0), - (984445.0, 189078.0), - (985043.0, 193280.0), - (986420.0, 191143.0), - (985750.0, 193762.0), - (986442.0, 189315.0), - (984334.0, 189449.0), - (984698.0, 191782.0), - (987166.0, 189415.0), - (985695.0, 192831.0), - (986720.0, 190012.0), - (986344.0, 193278.0), - (985968.0, 194474.0), - (985029.0, 190937.0), - (984745.0, 191330.0), - (985287.0, 189544.0), - (986830.0, 189593.0), - (983957.0, 189563.0), - (984752.0, 191229.0), - (985708.0, 189130.0), - (984193.0, 189896.0), - (986502.0, 188293.0), - (987193.0, 189108.0), - (983618.0, 188736.0), - (985543.0, 193500.0), - (986518.0, 194460.0), - (985348.0, 190174.0), - (984706.0, 192470.0), - (984833.0, 192610.0), - (984435.0, 189052.0), - (985778.0, 190425.0), - (983901.0, 189418.0), - (987495.0, 189362.0), - (983966.0, 189587.0), - (986839.0, 188997.0), - (986192.0, 193173.0), - (987144.0, 189426.0), - (985812.0, 190291.0), - (985011.0, 191351.0), - (985791.0, 191843.0), - (986619.0, 188525.0), - (985895.0, 192034.0), - (985322.0, 189636.0), - (985498.0, 192335.0), - (984216.0, 189886.0), - (986343.0, 192789.0), - (985319.0, 190778.0), - (985486.0, 191685.0), - (985766.0, 192623.0), - (986892.0, 190137.0), - (985477.0, 191661.0), - (985718.0, 190693.0), - (985248.0, 193420.0), - (985634.0, 189751.0), - (986107.0, 194705.0), - (983657.0, 188721.0), - (985369.0, 192660.0), - (986364.0, 191008.0), - (985718.0, 191585.0), - (985854.0, 190098.0), - (986847.0, 190815.0), - (986422.0, 194549.0), - (987610.0, 189234.0), - (983898.0, 188911.0), - (985512.0, 192718.0), - (985325.0, 191959.0), - (985957.0, 193899.0), - (985755.0, 191192.0), - (985943.0, 192936.0), - (985136.0, 189379.0), - (985976.0, 191440.0), - (986138.0, 188181.0), - (987075.0, 188584.0), - (984840.0, 191326.0), - (986034.0, 190320.0), - (985604.0, 191894.0), - (985120.0, 192580.0), - (986427.0, 194440.0), - (985983.0, 190051.0), - (986949.0, 190108.0), - (985233.0, 192964.0), - (985656.0, 193076.0), - (985443.0, 191567.0), - (985672.0, 190595.0), - (985466.0, 193716.0), - (985158.0, 191709.0), - (985187.0, 192832.0), - (985927.0, 192891.0), - (986202.0, 191325.0), - (986067.0, 193764.0), - (985077.0, 192872.0), - (985279.0, 192799.0), - (986329.0, 188973.0), - (986205.0, 193700.0), - (986907.0, 188962.0), - (984018.0, 189312.0), - (984055.0, 189957.0), - (986715.0, 190772.0), - (985464.0, 191186.0), - (985293.0, 193635.0), - (986251.0, 190783.0), - (985689.0, 190643.0), - (985699.0, 190164.0), - (987137.0, 189137.0), - (985060.0, 193328.0), - (986047.0, 193883.0), - (986355.0, 192809.0), - (986634.0, 189847.0), - (986123.0, 192495.0), - (985245.0, 192267.0), - (986633.0, 190297.0), - (984519.0, 191689.0), - (985452.0, 190421.0), - (984289.0, 189187.0), - (985967.0, 191416.0), - (985468.0, 190416.0), - (985494.0, 191707.0), - (985639.0, 191371.0), - (985068.0, 193351.0), - (985150.0, 192738.0), - (985557.0, 190216.0), - (987291.0, 189059.0), - (986750.0, 188458.0), - (985196.0, 193278.0), - (986267.0, 193093.0), - (985960.0, 190929.0), - (985592.0, 193333.0), - (985364.0, 191949.0), - (986010.0, 192536.0), - (985665.0, 192280.0), - (984929.0, 192035.0), - (986755.0, 189924.0), - (986384.0, 188937.0), - (986518.0, 190161.0), - (986064.0, 194557.0), - (986158.0, 193080.0), - (984571.0, 189734.0), - (986161.0, 193730.0), - (985729.0, 194410.0), - (985153.0, 193161.0), - (985218.0, 191865.0), - (985377.0, 193469.0), - (985978.0, 193031.0), - (984844.0, 192641.0), - (984285.0, 189306.0), - (985431.0, 190251.0), - (985232.0, 193799.0), - (987097.0, 189450.0), - (985692.0, 193175.0), - (986407.0, 189333.0), - (987263.0, 189480.0), - (986489.0, 190061.0), - (986108.0, 194314.0), - (985716.0, 192641.0), - (986884.0, 188974.0), - (985888.0, 190263.0), - (985100.0, 193061.0), - (985598.0, 191548.0), - (985987.0, 193362.0), - (986339.0, 194313.0), - (986975.0, 189043.0), - (986937.0, 188477.0), - (985529.0, 193844.0), - (986141.0, 193033.0), - (985374.0, 191379.0), - (986007.0, 189906.0), - (986320.0, 194320.0), - (985061.0, 191846.0), - (986247.0, 187348.0), - (985141.0, 191671.0), - (985055.0, 192335.0), - (984078.0, 189947.0), - (985568.0, 191465.0), - (985561.0, 191904.0), - (986370.0, 192844.0), - (986505.0, 193860.0), - (985525.0, 191915.0), - (985710.0, 192259.0), - (986170.0, 187387.0), - (985109.0, 191335.0), - (985376.0, 192925.0), - (986450.0, 191233.0), - (985969.0, 193007.0), - (985622.0, 192675.0), - (985986.0, 191974.0), - (984131.0, 190339.0), - (985450.0, 193976.0), - (985310.0, 190473.0), - (985651.0, 190077.0), - (984755.0, 192452.0), - (984990.0, 190333.0), - (986138.0, 187404.0), - (983847.0, 189264.0), - (985263.0, 189447.0), - (985296.0, 193551.0), - (985517.0, 189715.0), - (986049.0, 192522.0), - (986236.0, 192455.0), - (985862.0, 192016.0), - (986044.0, 191955.0), - (985856.0, 187745.0), - (985863.0, 191107.0), - (985161.0, 193184.0), - (985576.0, 191488.0), - (985084.0, 192593.0), - (985434.0, 191092.0), - (985144.0, 193137.0), - (985103.0, 192318.0), - (985417.0, 190434.0), - (985444.0, 190139.0), - (985250.0, 192426.0), - (985502.0, 193387.0), - (985033.0, 192349.0), - (986517.0, 189569.0), - (984848.0, 191253.0), - (986621.0, 190808.0), - (986913.0, 188490.0), - (985027.0, 189147.0), - (985242.0, 193101.0), - (985873.0, 191150.0), - (985964.0, 192003.0), - (985279.0, 193505.0), - (986149.0, 191241.0), - (986916.0, 189959.0), - (984388.0, 190356.0), - (985204.0, 193302.0), - (984902.0, 191471.0), - (987021.0, 189019.0), - (984513.0, 191654.0), - (985559.0, 191442.0), - (984861.0, 192687.0), - (983762.0, 188683.0), - (986293.0, 193165.0), - (985928.0, 191825.0), - (985941.0, 191342.0), - (986160.0, 191339.0), - (984948.0, 192332.0), - (985535.0, 193479.0), - (986392.0, 192894.0), - (985543.0, 191910.0), - (985605.0, 192114.0), - (985198.0, 192721.0), - (984716.0, 191618.0), - (984294.0, 189330.0), - (986074.0, 191945.0), - (985049.0, 192244.0), - (985314.0, 189615.0), - (985966.0, 193923.0), - (984975.0, 190291.0), - (986354.0, 189963.0), - (985082.0, 191896.0), - (986159.0, 192482.0), - (984719.0, 191838.0), - (984175.0, 189792.0), - (985447.0, 192158.0), - (985474.0, 191210.0), - (986570.0, 188536.0), - (985585.0, 191513.0), - (985383.0, 191402.0), - (983805.0, 189474.0), - (985535.0, 190391.0), - (986273.0, 190786.0), - (986834.0, 188530.0), - (985884.0, 194436.0), - (984705.0, 191801.0), - (986860.0, 188517.0), - (986604.0, 190144.0), - (985781.0, 193345.0), - (985636.0, 194191.0), - (984967.0, 192493.0), - (984262.0, 190085.0), - (985649.0, 187967.0), - (985697.0, 193618.0), - (984526.0, 191713.0), - (986016.0, 193136.0), - (986953.0, 189054.0), - (985026.0, 193228.0), - (986191.0, 192882.0), - (985397.0, 190156.0), - (987075.0, 189604.0), - (984735.0, 189823.0), - (984935.0, 189858.0), - (985329.0, 192943.0), - (987338.0, 188989.0), - (986873.0, 189981.0), - (985574.0, 194322.0), - (984579.0, 192131.0), - (985533.0, 193171.0), - (985434.0, 191543.0), - (986808.0, 189616.0), - (985881.0, 191174.0), - (984125.0, 189814.0), - (986424.0, 193009.0), - (987045.0, 189007.0), - (985850.0, 192587.0), - (984933.0, 191516.0), - (984311.0, 189377.0), - (985969.0, 188096.0), - (985632.0, 191350.0), - (986420.0, 188158.0), - (984156.0, 190399.0), - (985781.0, 192797.0), - (986234.0, 189599.0), - (985631.0, 194475.0), - (986218.0, 194357.0), - (984788.0, 189324.0), - (985943.0, 190880.0), - (985561.0, 192884.0), - (986747.0, 188575.0), - (985052.0, 190929.0), - (987122.0, 189438.0), - (984367.0, 189264.0), - (985864.0, 188442.0), - (986427.0, 189814.0), - (986140.0, 191813.0), - (986400.0, 191254.0), - (985264.0, 193163.0), - (984998.0, 190354.0), - (986729.0, 190030.0), - (984101.0, 189936.0), - (984996.0, 192571.0), - (985305.0, 192953.0), - (985328.0, 189655.0), - (985343.0, 193617.0), - (985830.0, 187875.0), - (983787.0, 188951.0), - (986783.0, 188556.0), - (986233.0, 194082.0), - (985844.0, 191855.0), - (986016.0, 191964.0), - (986402.0, 188167.0), - (986476.0, 191252.0), - (983810.0, 188665.0), - (985735.0, 192250.0), - (987189.0, 189403.0), - (985549.0, 193518.0), - (986797.0, 189018.0), - (984262.0, 189864.0), - (985653.0, 187848.0), - (984708.0, 189520.0), - (987252.0, 189193.0), - (986468.0, 191414.0), - (985745.0, 190316.0), - (985624.0, 194156.0), - (983743.0, 188861.0), - (985280.0, 191788.0), - (986428.0, 188915.0), - (985376.0, 192764.0), - (985109.0, 193461.0), - (985566.0, 193262.0), - (985157.0, 193009.0), - (985469.0, 191637.0), - (985229.0, 192433.0), - (984831.0, 192566.0), - (987097.0, 188572.0), - (984978.0, 192521.0), - (985893.0, 192753.0), - (986125.0, 193854.0), - (985298.0, 191272.0), - (987053.0, 188595.0), - (985461.0, 190119.0), - (985180.0, 191769.0), - (986494.0, 194523.0), - (986818.0, 189008.0), - (983875.0, 189634.0), - (984416.0, 189728.0), - (986340.0, 191172.0), - (985841.0, 190280.0), - (984740.0, 191675.0), - (984774.0, 192350.0), - (985298.0, 193255.0), - (985705.0, 191549.0), - (987112.0, 188680.0), - (985723.0, 187812.0), - (985257.0, 193861.0), - (985142.0, 191425.0), - (986616.0, 188235.0), - (985447.0, 192354.0), - (984125.0, 189926.0), - (986877.0, 190801.0), - (986500.0, 189863.0), - (984686.0, 192383.0), - (987279.0, 189179.0), - (986788.0, 190024.0), - (985820.0, 192604.0), - (985409.0, 191473.0), - (985944.0, 191663.0), - (985132.0, 192852.0), - (985183.0, 193243.0), - (985533.0, 191191.0), - (985516.0, 190398.0), - (985014.0, 192620.0), - (984987.0, 192546.0), - (985632.0, 189276.0), - (985246.0, 193837.0), - (984924.0, 191903.0), - (985649.0, 194227.0), - (985346.0, 190460.0), - (987056.0, 188708.0), - (985990.0, 191819.0), - (985298.0, 192408.0), - (985280.0, 191122.0), - (985211.0, 191303.0), - (983550.0, 188753.0), - (985824.0, 194272.0), - (986060.0, 194587.0), - (986692.0, 188603.0), - (986099.0, 190838.0), - (985101.0, 191315.0), - (984302.0, 189353.0), - (985364.0, 191249.0), - (984737.0, 192193.0), - (985973.0, 194323.0), - (985121.0, 192472.0), - (986219.0, 190795.0), - (985874.0, 194104.0), - (985643.0, 193472.0), - (986224.0, 193818.0), - (985961.0, 193362.0), - (986250.0, 193046.0), - (985609.0, 189286.0), - (985585.0, 192132.0), - (985447.0, 192896.0), - (985427.0, 193606.0), - (987053.0, 189473.0), - (985975.0, 193948.0), - (986136.0, 187724.0), - (985557.0, 193538.0), - (986198.0, 192933.0), - (985895.0, 191673.0), - (986200.0, 193198.0), - (985730.0, 188397.0), - (984216.0, 189773.0), - (986886.0, 188504.0), - (986524.0, 191392.0), - (986227.0, 193687.0), - (985232.0, 192816.0), - (986082.0, 189164.0), - (985493.0, 193056.0), - (985176.0, 191175.0), - (985877.0, 190089.0), - (985733.0, 190284.0), - (985960.0, 192554.0), - (984908.0, 192805.0), - (985840.0, 192758.0), - (985811.0, 188062.0), - (985516.0, 190237.0), - (987101.0, 189156.0), - (985794.0, 191300.0), - (987070.0, 189171.0), - (985944.0, 193864.0), - (985659.0, 193519.0), - (983805.0, 189140.0), - (985938.0, 193370.0), - (985460.0, 191613.0), - (985340.0, 191311.0), - (985960.0, 192984.0), - (986126.0, 191093.0), - (985250.0, 193125.0), - (986011.0, 193353.0), - (985367.0, 193752.0), - (985037.0, 192502.0), - (986030.0, 192529.0), - (984863.0, 192317.0), - (986493.0, 190174.0), - (985391.0, 191426.0), - (986665.0, 188502.0), - (984712.0, 191820.0), - (985674.0, 190992.0), - (985010.0, 192357.0), - (985599.0, 192684.0), - (985010.0, 193199.0), - (985757.0, 190348.0), - (985407.0, 193124.0), - (986294.0, 191189.0), - (986570.0, 188258.0), - (985529.0, 190094.0), - (987222.0, 189386.0), - (986098.0, 191937.0), - (987002.0, 189206.0), - (985148.0, 191185.0), - (986347.0, 192581.0), - (985969.0, 191658.0), - (986723.0, 189780.0), - (986861.0, 188986.0), - (986602.0, 189721.0), - (985604.0, 191981.0), - (986122.0, 190830.0), - (986076.0, 190849.0), - (986831.0, 190002.0), - (986295.0, 187323.0), - (985744.0, 193043.0), - (986162.0, 187710.0), - (986094.0, 192904.0), - (985869.0, 191672.0), - (985233.0, 193077.0), - (987423.0, 189284.0), - (986046.0, 189225.0), - (986440.0, 193056.0), - (986112.0, 192114.0), - (985615.0, 193396.0), - (984701.0, 190530.0), - (986149.0, 193056.0), - (986262.0, 193963.0), - (985110.0, 192860.0), - (984959.0, 191267.0), - (985454.0, 191938.0), - (985510.0, 189488.0), - (986688.0, 190227.0), - (985550.0, 192701.0), - (985141.0, 191987.0) - ] - edges = [ - ((986216.0, 192953.0), (986250.0, 193046.0)), - ((986216.0, 192953.0), (986198.0, 192933.0)), - ((985210.0, 192440.0), (985229.0, 192433.0)), - ((985210.0, 192440.0), (985121.0, 192472.0)), - ((984670.0, 190209.0), (984975.0, 190291.0)), - ((984670.0, 190209.0), (984388.0, 190356.0)), - ((984670.0, 190209.0), (984701.0, 190530.0)), - ((986199.0, 192906.0), (986198.0, 192933.0)), - ((986199.0, 192906.0), (986191.0, 192882.0)), - ((985931.0, 193829.0), (985750.0, 193762.0)), - ((985931.0, 193829.0), (985944.0, 193864.0)), - ((983842.0, 189544.0), (983875.0, 189634.0)), - ((983842.0, 189544.0), (983805.0, 189474.0)), - ((985915.0, 192018.0), (985964.0, 192003.0)), - ((985915.0, 192018.0), (985895.0, 192034.0)), - ((986076.0, 191798.0), (986140.0, 191813.0)), - ((986076.0, 191798.0), (985990.0, 191819.0)), - ((984445.0, 189078.0), (984289.0, 189187.0)), - ((984445.0, 189078.0), (984435.0, 189052.0)), - ((985043.0, 193280.0), (985026.0, 193228.0)), - ((985043.0, 193280.0), (985060.0, 193328.0)), - ((986420.0, 191143.0), (986340.0, 191172.0)), - ((986420.0, 191143.0), (986450.0, 191233.0)), - ((986420.0, 191143.0), (986364.0, 191008.0)), - ((985750.0, 193762.0), (985697.0, 193618.0)), - ((986442.0, 189315.0), (986407.0, 189333.0)), - ((984334.0, 189449.0), (984311.0, 189377.0)), - ((984698.0, 191782.0), (984526.0, 191713.0)), - ((984698.0, 191782.0), (984705.0, 191801.0)), - ((984698.0, 191782.0), (984740.0, 191675.0)), - ((987166.0, 189415.0), (987144.0, 189426.0)), - ((987166.0, 189415.0), (987189.0, 189403.0)), - ((985695.0, 192831.0), (985781.0, 192797.0)), - ((985695.0, 192831.0), (985561.0, 192884.0)), - ((986720.0, 190012.0), (986755.0, 189924.0)), - ((986720.0, 190012.0), (986729.0, 190030.0)), - ((986344.0, 193278.0), (986293.0, 193165.0)), - ((985968.0, 194474.0), (985884.0, 194436.0)), - ((985968.0, 194474.0), (986064.0, 194557.0)), - ((985029.0, 190937.0), (985052.0, 190929.0)), - ((984745.0, 191330.0), (984840.0, 191326.0)), - ((985287.0, 189544.0), (985314.0, 189615.0)), - ((985287.0, 189544.0), (985263.0, 189447.0)), - ((986830.0, 189593.0), (986808.0, 189616.0)), - ((986830.0, 189593.0), (987075.0, 189604.0)), - ((983957.0, 189563.0), (983966.0, 189587.0)), - ((984752.0, 191229.0), (984848.0, 191253.0)), - ((985708.0, 189130.0), (986046.0, 189225.0)), - ((985708.0, 189130.0), (985632.0, 189276.0)), - ((984193.0, 189896.0), (984125.0, 189926.0)), - ((984193.0, 189896.0), (984216.0, 189886.0)), - ((984193.0, 189896.0), (984262.0, 190085.0)), - ((986502.0, 188293.0), (986570.0, 188536.0)), - ((986502.0, 188293.0), (986420.0, 188158.0)), - ((986502.0, 188293.0), (986570.0, 188258.0)), - ((987193.0, 189108.0), (987252.0, 189193.0)), - ((987193.0, 189108.0), (987291.0, 189059.0)), - ((987193.0, 189108.0), (987137.0, 189137.0)), - ((983618.0, 188736.0), (983550.0, 188753.0)), - ((983618.0, 188736.0), (983657.0, 188721.0)), - ((985543.0, 193500.0), (985549.0, 193518.0)), - ((985543.0, 193500.0), (985535.0, 193479.0)), - ((986518.0, 194460.0), (986494.0, 194523.0)), - ((986518.0, 194460.0), (986427.0, 194440.0)), - ((985348.0, 190174.0), (985397.0, 190156.0)), - ((984706.0, 192470.0), (984686.0, 192383.0)), - ((984706.0, 192470.0), (984755.0, 192452.0)), - ((984833.0, 192610.0), (984831.0, 192566.0)), - ((984833.0, 192610.0), (984844.0, 192641.0)), - ((985778.0, 190425.0), (985757.0, 190348.0)), - ((985778.0, 190425.0), (985672.0, 190595.0)), - ((983901.0, 189418.0), (984018.0, 189312.0)), - ((983901.0, 189418.0), (983805.0, 189474.0)), - ((983901.0, 189418.0), (983847.0, 189264.0)), - ((987495.0, 189362.0), (987423.0, 189284.0)), - ((987495.0, 189362.0), (987610.0, 189234.0)), - ((983966.0, 189587.0), (984125.0, 189814.0)), - ((983966.0, 189587.0), (983875.0, 189634.0)), - ((986839.0, 188997.0), (986818.0, 189008.0)), - ((986839.0, 188997.0), (986861.0, 188986.0)), - ((986192.0, 193173.0), (986200.0, 193198.0)), - ((987144.0, 189426.0), (987122.0, 189438.0)), - ((985812.0, 190291.0), (985841.0, 190280.0)), - ((985812.0, 190291.0), (985745.0, 190316.0)), - ((985011.0, 191351.0), (984959.0, 191267.0)), - ((985011.0, 191351.0), (985101.0, 191315.0)), - ((985791.0, 191843.0), (985844.0, 191855.0)), - ((985791.0, 191843.0), (985604.0, 191894.0)), - ((986619.0, 188525.0), (986570.0, 188536.0)), - ((986619.0, 188525.0), (986665.0, 188502.0)), - ((985895.0, 192034.0), (985862.0, 192016.0)), - ((985322.0, 189636.0), (985314.0, 189615.0)), - ((985322.0, 189636.0), (985328.0, 189655.0)), - ((985498.0, 192335.0), (985665.0, 192280.0)), - ((985498.0, 192335.0), (985447.0, 192354.0)), - ((984216.0, 189886.0), (984262.0, 189864.0)), - ((986343.0, 192789.0), (986355.0, 192809.0)), - ((985319.0, 190778.0), (985310.0, 190473.0)), - ((985486.0, 191685.0), (985494.0, 191707.0)), - ((985486.0, 191685.0), (985477.0, 191661.0)), - ((985766.0, 192623.0), (985820.0, 192604.0)), - ((985766.0, 192623.0), (985716.0, 192641.0)), - ((986892.0, 190137.0), (986949.0, 190108.0)), - ((985477.0, 191661.0), (985469.0, 191637.0)), - ((985718.0, 190693.0), (985689.0, 190643.0)), - ((985718.0, 190693.0), (985943.0, 190880.0)), - ((985248.0, 193420.0), (985204.0, 193302.0)), - ((985248.0, 193420.0), (985279.0, 193505.0)), - ((985634.0, 189751.0), (985651.0, 190077.0)), - ((985634.0, 189751.0), (985517.0, 189715.0)), - ((986107.0, 194705.0), (986060.0, 194587.0)), - ((983657.0, 188721.0), (983743.0, 188861.0)), - ((983657.0, 188721.0), (983762.0, 188683.0)), - ((985369.0, 192660.0), (985376.0, 192764.0)), - ((986364.0, 191008.0), (986621.0, 190808.0)), - ((985718.0, 191585.0), (985705.0, 191549.0)), - ((985718.0, 191585.0), (985869.0, 191672.0)), - ((985854.0, 190098.0), (985877.0, 190089.0)), - ((985854.0, 190098.0), (985888.0, 190263.0)), - ((986847.0, 190815.0), (986877.0, 190801.0)), - ((986847.0, 190815.0), (986715.0, 190772.0)), - ((986422.0, 194549.0), (986494.0, 194523.0)), - ((983898.0, 188911.0), (983787.0, 188951.0)), - ((985512.0, 192718.0), (985550.0, 192701.0)), - ((985512.0, 192718.0), (985376.0, 192764.0)), - ((985325.0, 191959.0), (985364.0, 191949.0)), - ((985325.0, 191959.0), (985218.0, 191865.0)), - ((985957.0, 193899.0), (985966.0, 193923.0)), - ((985957.0, 193899.0), (985944.0, 193864.0)), - ((985755.0, 191192.0), (985674.0, 190992.0)), - ((985755.0, 191192.0), (985873.0, 191150.0)), - ((985755.0, 191192.0), (985794.0, 191300.0)), - ((985943.0, 192936.0), (985927.0, 192891.0)), - ((985943.0, 192936.0), (985960.0, 192984.0)), - ((985136.0, 189379.0), (985263.0, 189447.0)), - ((985136.0, 189379.0), (985027.0, 189147.0)), - ((985976.0, 191440.0), (985967.0, 191416.0)), - ((986138.0, 188181.0), (986402.0, 188167.0)), - ((986138.0, 188181.0), (985969.0, 188096.0)), - ((987075.0, 188584.0), (987112.0, 188680.0)), - ((987075.0, 188584.0), (987097.0, 188572.0)), - ((987075.0, 188584.0), (987053.0, 188595.0)), - ((984840.0, 191326.0), (984848.0, 191253.0)), - ((984840.0, 191326.0), (984902.0, 191471.0)), - ((986034.0, 190320.0), (985888.0, 190263.0)), - ((985604.0, 191894.0), (985604.0, 191981.0)), - ((985604.0, 191894.0), (985561.0, 191904.0)), - ((985120.0, 192580.0), (985084.0, 192593.0)), - ((986427.0, 194440.0), (986339.0, 194313.0)), - ((985983.0, 190051.0), (985877.0, 190089.0)), - ((985983.0, 190051.0), (986007.0, 189906.0)), - ((986949.0, 190108.0), (986873.0, 189981.0)), - ((985233.0, 192964.0), (985187.0, 192832.0)), - ((985233.0, 192964.0), (985157.0, 193009.0)), - ((985233.0, 192964.0), (985305.0, 192953.0)), - ((985656.0, 193076.0), (985692.0, 193175.0)), - ((985656.0, 193076.0), (985744.0, 193043.0)), - ((985443.0, 191567.0), (985434.0, 191543.0)), - ((985443.0, 191567.0), (985460.0, 191613.0)), - ((985443.0, 191567.0), (985585.0, 191513.0)), - ((985672.0, 190595.0), (985689.0, 190643.0)), - ((985466.0, 193716.0), (985367.0, 193752.0)), - ((985466.0, 193716.0), (985529.0, 193844.0)), - ((985466.0, 193716.0), (985427.0, 193606.0)), - ((985158.0, 191709.0), (985141.0, 191671.0)), - ((985158.0, 191709.0), (985180.0, 191769.0)), - ((985187.0, 192832.0), (985232.0, 192816.0)), - ((985187.0, 192832.0), (985132.0, 192852.0)), - ((985927.0, 192891.0), (985893.0, 192753.0)), - ((986202.0, 191325.0), (986160.0, 191339.0)), - ((986067.0, 193764.0), (986161.0, 193730.0)), - ((986067.0, 193764.0), (986125.0, 193854.0)), - ((985077.0, 192872.0), (985110.0, 192860.0)), - ((985279.0, 192799.0), (985232.0, 192816.0)), - ((985279.0, 192799.0), (985376.0, 192764.0)), - ((986329.0, 188973.0), (986384.0, 188937.0)), - ((986329.0, 188973.0), (986082.0, 189164.0)), - ((986205.0, 193700.0), (986161.0, 193730.0)), - ((986205.0, 193700.0), (986227.0, 193687.0)), - ((986907.0, 188962.0), (986953.0, 189054.0)), - ((986907.0, 188962.0), (986884.0, 188974.0)), - ((986907.0, 188962.0), (987056.0, 188708.0)), - ((984018.0, 189312.0), (984285.0, 189306.0)), - ((984055.0, 189957.0), (984078.0, 189947.0)), - ((986715.0, 190772.0), (986621.0, 190808.0)), - ((985464.0, 191186.0), (985434.0, 191092.0)), - ((985464.0, 191186.0), (985474.0, 191210.0)), - ((985293.0, 193635.0), (985343.0, 193617.0)), - ((986251.0, 190783.0), (986273.0, 190786.0)), - ((986251.0, 190783.0), (986219.0, 190795.0)), - ((985699.0, 190164.0), (985733.0, 190284.0)), - ((985699.0, 190164.0), (985651.0, 190077.0)), - ((987137.0, 189137.0), (987101.0, 189156.0)), - ((985060.0, 193328.0), (985068.0, 193351.0)), - ((986047.0, 193883.0), (985966.0, 193923.0)), - ((986047.0, 193883.0), (986125.0, 193854.0)), - ((986355.0, 192809.0), (986370.0, 192844.0)), - ((986634.0, 189847.0), (986723.0, 189780.0)), - ((986634.0, 189847.0), (986500.0, 189863.0)), - ((986634.0, 189847.0), (986755.0, 189924.0)), - ((986634.0, 189847.0), (986602.0, 189721.0)), - ((986123.0, 192495.0), (986049.0, 192522.0)), - ((986123.0, 192495.0), (986159.0, 192482.0)), - ((985245.0, 192267.0), (985298.0, 192408.0)), - ((986633.0, 190297.0), (986688.0, 190227.0)), - ((984519.0, 191689.0), (984526.0, 191713.0)), - ((984519.0, 191689.0), (984513.0, 191654.0)), - ((985452.0, 190421.0), (985417.0, 190434.0)), - ((985452.0, 190421.0), (985468.0, 190416.0)), - ((984289.0, 189187.0), (984367.0, 189264.0)), - ((985967.0, 191416.0), (985941.0, 191342.0)), - ((985967.0, 191416.0), (986160.0, 191339.0)), - ((985468.0, 190416.0), (985516.0, 190398.0)), - ((985639.0, 191371.0), (985632.0, 191350.0)), - ((985639.0, 191371.0), (985559.0, 191442.0)), - ((985068.0, 193351.0), (985109.0, 193461.0)), - ((985150.0, 192738.0), (985198.0, 192721.0)), - ((985150.0, 192738.0), (985084.0, 192593.0)), - ((985557.0, 190216.0), (985516.0, 190237.0)), - ((987291.0, 189059.0), (987338.0, 188989.0)), - ((986750.0, 188458.0), (986783.0, 188556.0)), - ((986750.0, 188458.0), (986665.0, 188502.0)), - ((985196.0, 193278.0), (985183.0, 193243.0)), - ((985196.0, 193278.0), (985204.0, 193302.0)), - ((986267.0, 193093.0), (986250.0, 193046.0)), - ((986267.0, 193093.0), (986293.0, 193165.0)), - ((986267.0, 193093.0), (986440.0, 193056.0)), - ((985960.0, 190929.0), (985863.0, 191107.0)), - ((985960.0, 190929.0), (985943.0, 190880.0)), - ((985592.0, 193333.0), (985615.0, 193396.0)), - ((985592.0, 193333.0), (985566.0, 193262.0)), - ((985364.0, 191949.0), (985454.0, 191938.0)), - ((986010.0, 192536.0), (986030.0, 192529.0)), - ((986010.0, 192536.0), (985960.0, 192554.0)), - ((985665.0, 192280.0), (985710.0, 192259.0)), - ((985665.0, 192280.0), (985585.0, 192132.0)), - ((984929.0, 192035.0), (984924.0, 191903.0)), - ((986384.0, 188937.0), (986428.0, 188915.0)), - ((986518.0, 190161.0), (986493.0, 190174.0)), - ((986518.0, 190161.0), (986489.0, 190061.0)), - ((986518.0, 190161.0), (986604.0, 190144.0)), - ((986064.0, 194557.0), (986060.0, 194587.0)), - ((986158.0, 193080.0), (986250.0, 193046.0)), - ((986158.0, 193080.0), (986016.0, 193136.0)), - ((986158.0, 193080.0), (986149.0, 193056.0)), - ((984571.0, 189734.0), (984416.0, 189728.0)), - ((984571.0, 189734.0), (984735.0, 189823.0)), - ((984571.0, 189734.0), (984708.0, 189520.0)), - ((985729.0, 194410.0), (985631.0, 194475.0)), - ((985729.0, 194410.0), (985884.0, 194436.0)), - ((985153.0, 193161.0), (985144.0, 193137.0)), - ((985153.0, 193161.0), (985161.0, 193184.0)), - ((985218.0, 191865.0), (985082.0, 191896.0)), - ((985218.0, 191865.0), (985280.0, 191788.0)), - ((985377.0, 193469.0), (985279.0, 193505.0)), - ((985978.0, 193031.0), (986016.0, 193136.0)), - ((985978.0, 193031.0), (985969.0, 193007.0)), - ((984844.0, 192641.0), (984861.0, 192687.0)), - ((984285.0, 189306.0), (984294.0, 189330.0)), - ((984285.0, 189306.0), (984367.0, 189264.0)), - ((985431.0, 190251.0), (985516.0, 190237.0)), - ((985431.0, 190251.0), (985397.0, 190156.0)), - ((985232.0, 193799.0), (985367.0, 193752.0)), - ((985232.0, 193799.0), (985246.0, 193837.0)), - ((987097.0, 189450.0), (987053.0, 189473.0)), - ((987097.0, 189450.0), (987122.0, 189438.0)), - ((985692.0, 193175.0), (985566.0, 193262.0)), - ((986407.0, 189333.0), (986517.0, 189569.0)), - ((987263.0, 189480.0), (987222.0, 189386.0)), - ((986489.0, 190061.0), (986354.0, 189963.0)), - ((986108.0, 194314.0), (986218.0, 194357.0)), - ((986108.0, 194314.0), (985973.0, 194323.0)), - ((985716.0, 192641.0), (985622.0, 192675.0)), - ((986884.0, 188974.0), (986861.0, 188986.0)), - ((985888.0, 190263.0), (985841.0, 190280.0)), - ((985100.0, 193061.0), (985144.0, 193137.0)), - ((985100.0, 193061.0), (985157.0, 193009.0)), - ((985598.0, 191548.0), (985705.0, 191549.0)), - ((985598.0, 191548.0), (985585.0, 191513.0)), - ((985987.0, 193362.0), (985961.0, 193362.0)), - ((985987.0, 193362.0), (986011.0, 193353.0)), - ((986339.0, 194313.0), (986320.0, 194320.0)), - ((986975.0, 189043.0), (986953.0, 189054.0)), - ((986975.0, 189043.0), (987021.0, 189019.0)), - ((986937.0, 188477.0), (986913.0, 188490.0)), - ((986937.0, 188477.0), (987053.0, 188595.0)), - ((985529.0, 193844.0), (985450.0, 193976.0)), - ((986141.0, 193033.0), (986149.0, 193056.0)), - ((985374.0, 191379.0), (985340.0, 191311.0)), - ((985374.0, 191379.0), (985383.0, 191402.0)), - ((986007.0, 189906.0), (986354.0, 189963.0)), - ((986320.0, 194320.0), (986218.0, 194357.0)), - ((985061.0, 191846.0), (985082.0, 191896.0)), - ((985061.0, 191846.0), (984924.0, 191903.0)), - ((986247.0, 187348.0), (986295.0, 187323.0)), - ((986247.0, 187348.0), (986170.0, 187387.0)), - ((985055.0, 192335.0), (985033.0, 192349.0)), - ((985055.0, 192335.0), (985103.0, 192318.0)), - ((985055.0, 192335.0), (985049.0, 192244.0)), - ((984078.0, 189947.0), (984101.0, 189936.0)), - ((985568.0, 191465.0), (985576.0, 191488.0)), - ((985568.0, 191465.0), (985559.0, 191442.0)), - ((985561.0, 191904.0), (985543.0, 191910.0)), - ((986370.0, 192844.0), (986392.0, 192894.0)), - ((986505.0, 193860.0), (986262.0, 193963.0)), - ((985525.0, 191915.0), (985543.0, 191910.0)), - ((985525.0, 191915.0), (985454.0, 191938.0)), - ((985710.0, 192259.0), (985735.0, 192250.0)), - ((986170.0, 187387.0), (986138.0, 187404.0)), - ((985109.0, 191335.0), (985211.0, 191303.0)), - ((985109.0, 191335.0), (985142.0, 191425.0)), - ((985109.0, 191335.0), (985101.0, 191315.0)), - ((985376.0, 192925.0), (985447.0, 192896.0)), - ((985376.0, 192925.0), (985329.0, 192943.0)), - ((986450.0, 191233.0), (986400.0, 191254.0)), - ((986450.0, 191233.0), (986476.0, 191252.0)), - ((985969.0, 193007.0), (985960.0, 192984.0)), - ((985622.0, 192675.0), (985599.0, 192684.0)), - ((985986.0, 191974.0), (985964.0, 192003.0)), - ((985986.0, 191974.0), (986016.0, 191964.0)), - ((984131.0, 190339.0), (984156.0, 190399.0)), - ((984131.0, 190339.0), (984262.0, 190085.0)), - ((985310.0, 190473.0), (985346.0, 190460.0)), - ((985651.0, 190077.0), (985529.0, 190094.0)), - ((984755.0, 192452.0), (984831.0, 192566.0)), - ((984990.0, 190333.0), (984975.0, 190291.0)), - ((984990.0, 190333.0), (984998.0, 190354.0)), - ((986138.0, 187404.0), (986162.0, 187710.0)), - ((983847.0, 189264.0), (983805.0, 189140.0)), - ((985296.0, 193551.0), (985343.0, 193617.0)), - ((985296.0, 193551.0), (985279.0, 193505.0)), - ((985517.0, 189715.0), (985510.0, 189488.0)), - ((985517.0, 189715.0), (985328.0, 189655.0)), - ((986049.0, 192522.0), (986030.0, 192529.0)), - ((986236.0, 192455.0), (986159.0, 192482.0)), - ((986236.0, 192455.0), (986347.0, 192581.0)), - ((986044.0, 191955.0), (986112.0, 192114.0)), - ((986044.0, 191955.0), (986074.0, 191945.0)), - ((986044.0, 191955.0), (986016.0, 191964.0)), - ((985856.0, 187745.0), (985830.0, 187875.0)), - ((985856.0, 187745.0), (986136.0, 187724.0)), - ((985863.0, 191107.0), (985873.0, 191150.0)), - ((985161.0, 193184.0), (985183.0, 193243.0)), - ((985161.0, 193184.0), (985026.0, 193228.0)), - ((985576.0, 191488.0), (985585.0, 191513.0)), - ((985084.0, 192593.0), (985014.0, 192620.0)), - ((985417.0, 190434.0), (985346.0, 190460.0)), - ((985444.0, 190139.0), (985397.0, 190156.0)), - ((985444.0, 190139.0), (985461.0, 190119.0)), - ((985250.0, 192426.0), (985229.0, 192433.0)), - ((985250.0, 192426.0), (985298.0, 192408.0)), - ((985502.0, 193387.0), (985535.0, 193479.0)), - ((985033.0, 192349.0), (985010.0, 192357.0)), - ((986517.0, 189569.0), (986234.0, 189599.0)), - ((986517.0, 189569.0), (986602.0, 189721.0)), - ((984848.0, 191253.0), (984959.0, 191267.0)), - ((986913.0, 188490.0), (986886.0, 188504.0)), - ((985027.0, 189147.0), (984788.0, 189324.0)), - ((985242.0, 193101.0), (985233.0, 193077.0)), - ((985242.0, 193101.0), (985250.0, 193125.0)), - ((985873.0, 191150.0), (985881.0, 191174.0)), - ((986149.0, 191241.0), (986160.0, 191339.0)), - ((986149.0, 191241.0), (986126.0, 191093.0)), - ((986149.0, 191241.0), (986294.0, 191189.0)), - ((986916.0, 189959.0), (986873.0, 189981.0)), - ((984388.0, 190356.0), (984156.0, 190399.0)), - ((984902.0, 191471.0), (984933.0, 191516.0)), - ((987021.0, 189019.0), (987101.0, 189156.0)), - ((987021.0, 189019.0), (987045.0, 189007.0)), - ((984861.0, 192687.0), (984908.0, 192805.0)), - ((983762.0, 188683.0), (983810.0, 188665.0)), - ((986293.0, 193165.0), (986200.0, 193198.0)), - ((985928.0, 191825.0), (985990.0, 191819.0)), - ((985928.0, 191825.0), (985844.0, 191855.0)), - ((985928.0, 191825.0), (985895.0, 191673.0)), - ((985941.0, 191342.0), (985794.0, 191300.0)), - ((984948.0, 192332.0), (985010.0, 192357.0)), - ((984948.0, 192332.0), (984863.0, 192317.0)), - ((986392.0, 192894.0), (986424.0, 193009.0)), - ((985605.0, 192114.0), (985604.0, 191981.0)), - ((985605.0, 192114.0), (985585.0, 192132.0)), - ((985198.0, 192721.0), (985232.0, 192816.0)), - ((984716.0, 191618.0), (984740.0, 191675.0)), - ((984294.0, 189330.0), (984302.0, 189353.0)), - ((986074.0, 191945.0), (986098.0, 191937.0)), - ((985966.0, 193923.0), (985975.0, 193948.0)), - ((986354.0, 189963.0), (986427.0, 189814.0)), - ((985082.0, 191896.0), (985141.0, 191987.0)), - ((984719.0, 191838.0), (984924.0, 191903.0)), - ((984719.0, 191838.0), (984712.0, 191820.0)), - ((984175.0, 189792.0), (984125.0, 189814.0)), - ((984175.0, 189792.0), (984216.0, 189773.0)), - ((985447.0, 192158.0), (985585.0, 192132.0)), - ((985474.0, 191210.0), (985533.0, 191191.0)), - ((985474.0, 191210.0), (985364.0, 191249.0)), - ((985383.0, 191402.0), (985391.0, 191426.0)), - ((985535.0, 190391.0), (985516.0, 190237.0)), - ((985535.0, 190391.0), (985516.0, 190398.0)), - ((986834.0, 188530.0), (986860.0, 188517.0)), - ((986834.0, 188530.0), (986783.0, 188556.0)), - ((985884.0, 194436.0), (985973.0, 194323.0)), - ((984705.0, 191801.0), (984712.0, 191820.0)), - ((986860.0, 188517.0), (986886.0, 188504.0)), - ((986604.0, 190144.0), (986688.0, 190227.0)), - ((985781.0, 193345.0), (985615.0, 193396.0)), - ((985781.0, 193345.0), (985938.0, 193370.0)), - ((985636.0, 194191.0), (985649.0, 194227.0)), - ((985636.0, 194191.0), (985624.0, 194156.0)), - ((984967.0, 192493.0), (985010.0, 192357.0)), - ((984967.0, 192493.0), (984978.0, 192521.0)), - ((985649.0, 187967.0), (985653.0, 187848.0)), - ((985649.0, 187967.0), (985811.0, 188062.0)), - ((985697.0, 193618.0), (985659.0, 193519.0)), - ((985026.0, 193228.0), (985010.0, 193199.0)), - ((986191.0, 192882.0), (986094.0, 192904.0)), - ((987075.0, 189604.0), (987053.0, 189473.0)), - ((984735.0, 189823.0), (984935.0, 189858.0)), - ((985329.0, 192943.0), (985305.0, 192953.0)), - ((986873.0, 189981.0), (986831.0, 190002.0)), - ((985574.0, 194322.0), (985631.0, 194475.0)), - ((985574.0, 194322.0), (985649.0, 194227.0)), - ((984579.0, 192131.0), (984737.0, 192193.0)), - ((985533.0, 193171.0), (985493.0, 193056.0)), - ((985533.0, 193171.0), (985566.0, 193262.0)), - ((985434.0, 191543.0), (985409.0, 191473.0)), - ((986808.0, 189616.0), (986723.0, 189780.0)), - ((986424.0, 193009.0), (986440.0, 193056.0)), - ((985850.0, 192587.0), (985820.0, 192604.0)), - ((985850.0, 192587.0), (985960.0, 192554.0)), - ((984311.0, 189377.0), (984302.0, 189353.0)), - ((985969.0, 188096.0), (985811.0, 188062.0)), - ((985632.0, 191350.0), (985794.0, 191300.0)), - ((986420.0, 188158.0), (986402.0, 188167.0)), - ((985781.0, 192797.0), (985840.0, 192758.0)), - ((984788.0, 189324.0), (984708.0, 189520.0)), - ((985943.0, 190880.0), (986076.0, 190849.0)), - ((985561.0, 192884.0), (985447.0, 192896.0)), - ((986747.0, 188575.0), (986783.0, 188556.0)), - ((986747.0, 188575.0), (986692.0, 188603.0)), - ((985052.0, 190929.0), (985148.0, 191185.0)), - ((985864.0, 188442.0), (985730.0, 188397.0)), - ((986427.0, 189814.0), (986500.0, 189863.0)), - ((986140.0, 191813.0), (986098.0, 191937.0)), - ((985264.0, 193163.0), (985298.0, 193255.0)), - ((985264.0, 193163.0), (985250.0, 193125.0)), - ((986729.0, 190030.0), (986788.0, 190024.0)), - ((984101.0, 189936.0), (984125.0, 189926.0)), - ((984996.0, 192571.0), (985014.0, 192620.0)), - ((984996.0, 192571.0), (984987.0, 192546.0)), - ((985343.0, 193617.0), (985427.0, 193606.0)), - ((985830.0, 187875.0), (985723.0, 187812.0)), - ((983787.0, 188951.0), (983805.0, 189140.0)), - ((983787.0, 188951.0), (983743.0, 188861.0)), - ((986233.0, 194082.0), (986262.0, 193963.0)), - ((986476.0, 191252.0), (986524.0, 191392.0)), - ((987189.0, 189403.0), (987222.0, 189386.0)), - ((985549.0, 193518.0), (985557.0, 193538.0)), - ((986797.0, 189018.0), (986818.0, 189008.0)), - ((984262.0, 189864.0), (984216.0, 189773.0)), - ((985653.0, 187848.0), (985723.0, 187812.0)), - ((987252.0, 189193.0), (987279.0, 189179.0)), - ((987252.0, 189193.0), (987222.0, 189386.0)), - ((986468.0, 191414.0), (986524.0, 191392.0)), - ((985745.0, 190316.0), (985757.0, 190348.0)), - ((985745.0, 190316.0), (985733.0, 190284.0)), - ((985280.0, 191788.0), (985180.0, 191769.0)), - ((985157.0, 193009.0), (985233.0, 193077.0)), - ((985469.0, 191637.0), (985460.0, 191613.0)), - ((984978.0, 192521.0), (985037.0, 192502.0)), - ((984978.0, 192521.0), (984987.0, 192546.0)), - ((985893.0, 192753.0), (985840.0, 192758.0)), - ((986125.0, 193854.0), (986224.0, 193818.0)), - ((985298.0, 191272.0), (985211.0, 191303.0)), - ((985298.0, 191272.0), (985340.0, 191311.0)), - ((985461.0, 190119.0), (985529.0, 190094.0)), - ((984416.0, 189728.0), (984216.0, 189773.0)), - ((986340.0, 191172.0), (986294.0, 191189.0)), - ((984774.0, 192350.0), (984863.0, 192317.0)), - ((984774.0, 192350.0), (984686.0, 192383.0)), - ((984774.0, 192350.0), (984737.0, 192193.0)), - ((987112.0, 188680.0), (987056.0, 188708.0)), - ((985257.0, 193861.0), (985246.0, 193837.0)), - ((986616.0, 188235.0), (986570.0, 188258.0)), - ((985447.0, 192354.0), (985298.0, 192408.0)), - ((987279.0, 189179.0), (987423.0, 189284.0)), - ((986788.0, 190024.0), (986831.0, 190002.0)), - ((985409.0, 191473.0), (985391.0, 191426.0)), - ((985944.0, 191663.0), (985969.0, 191658.0)), - ((985944.0, 191663.0), (985895.0, 191673.0)), - ((985132.0, 192852.0), (985110.0, 192860.0)), - ((985632.0, 189276.0), (985609.0, 189286.0)), - ((985280.0, 191122.0), (985176.0, 191175.0)), - ((985211.0, 191303.0), (985176.0, 191175.0)), - ((985824.0, 194272.0), (985874.0, 194104.0)), - ((985824.0, 194272.0), (985973.0, 194323.0)), - ((986099.0, 190838.0), (986122.0, 190830.0)), - ((986099.0, 190838.0), (986076.0, 190849.0)), - ((985364.0, 191249.0), (985340.0, 191311.0)), - ((985121.0, 192472.0), (985037.0, 192502.0)), - ((986219.0, 190795.0), (986122.0, 190830.0)), - ((985874.0, 194104.0), (985975.0, 193948.0)), - ((985643.0, 193472.0), (985615.0, 193396.0)), - ((985643.0, 193472.0), (985659.0, 193519.0)), - ((986224.0, 193818.0), (986262.0, 193963.0)), - ((985961.0, 193362.0), (985938.0, 193370.0)), - ((985609.0, 189286.0), (985510.0, 189488.0)), - ((985427.0, 193606.0), (985557.0, 193538.0)), - ((986136.0, 187724.0), (986162.0, 187710.0)), - ((985557.0, 193538.0), (985659.0, 193519.0)), - ((985895.0, 191673.0), (985869.0, 191672.0)), - ((985730.0, 188397.0), (985811.0, 188062.0)), - ((986082.0, 189164.0), (986046.0, 189225.0)), - ((985493.0, 193056.0), (985407.0, 193124.0)), - ((985176.0, 191175.0), (985148.0, 191185.0)), - ((987101.0, 189156.0), (987070.0, 189171.0)), - ((987070.0, 189171.0), (987002.0, 189206.0)), - ((985599.0, 192684.0), (985550.0, 192701.0)) - ] - - g = nx.Graph() - g.add_nodes_from(nodes) - g.add_edges_from(edges) - #g = nx.Graph() - #g = nx.complete_graph(500) - #g = minimum_spanning_tree(g, weight=1) - g, all_edges_graph = get_prob_dist_attr(g, return_all_edges_graph=True) - graph = g.copy() - start = time.clock() - for i in range(10): - #print(len(graph.edges())) - neighbor = neighbor_generator(graph, all_edges_graph, len_original=len(g.edges()), method="exhaustive") - graph = neighbor - print(time.clock() - start) \ No newline at end of file -- GitLab