From 44452e8c4fee0eb912c0f7cabf59b65420b32b74 Mon Sep 17 00:00:00 2001 From: "Carles S. Soriano Perez" Date: Thu, 21 Sep 2023 15:14:32 +0200 Subject: [PATCH 1/5] chore: Added explanatory comment as of reason of `_get_accumulated_traffic_from_node_list` method --- .../indirect/traffic_analysis/traffic_analysis_base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ra2ce/analyses/indirect/traffic_analysis/traffic_analysis_base.py b/ra2ce/analyses/indirect/traffic_analysis/traffic_analysis_base.py index 1ef39d73b..b406105e1 100644 --- a/ra2ce/analyses/indirect/traffic_analysis/traffic_analysis_base.py +++ b/ra2ce/analyses/indirect/traffic_analysis/traffic_analysis_base.py @@ -116,6 +116,9 @@ def _get_accumulated_traffic_from_node_list( _intermediate_nodes = 0 for _node in nodes_list: if self.destinations_names in _node: + # TODO: This is potentially dangerous as it could make two times a multiplication of the + # accumulated traffic. Example given, nodes [ a, b, c, d], destination_names = b; a and c + # will multiply accumulated traffic, is that correct? _intermediate_nodes -= 1 continue _node_traffic = self._get_accumulated_traffic_from_node( From 7536147f180f6cc025c33d4a7144e6b525cfe121 Mon Sep 17 00:00:00 2001 From: "Carles S. Soriano Perez" Date: Fri, 22 Sep 2023 13:47:03 +0200 Subject: [PATCH 2/5] fix: `find_route_ods` now returns a geodataframe without duplicate entries or origin_nodes with multiple names --- ra2ce/analyses/indirect/analyses_indirect.py | 43 +++++++++++++++++-- .../traffic_analysis/traffic_analysis_base.py | 27 +++++------- 2 files changed, 50 insertions(+), 20 deletions(-) diff --git a/ra2ce/analyses/indirect/analyses_indirect.py b/ra2ce/analyses/indirect/analyses_indirect.py index 31b67c212..0e1d0e7e3 100644 --- a/ra2ce/analyses/indirect/analyses_indirect.py +++ b/ra2ce/analyses/indirect/analyses_indirect.py @@ -511,7 +511,31 @@ def multi_link_losses(self, gdf, analysis): aggregated_results = pd.concat(results, ignore_index=True) return aggregated_results - def _get_origin_destination_pairs(self, graph): + @staticmethod + def extract_od_nodes_from_graph( + graph: nx.classes.MultiGraph, + ) -> list[tuple[str, str]]: + """ + Extracts all Origin - Destination nodes from the graph, prevents from entries + with list of nodes for a node. + + Args: + graph (nx.classes.MultiGraph): Graph containing origin-destination nodes. + + Returns: + list[tuple[str, str]]]: List containing tuples of origin - destination node combinations. + """ + _od_nodes = [] + for n, v in graph.nodes(data=True): + if "od_id" not in v: + continue + _o_node_list = list(map(lambda x: (n, x), v["od_id"].split(","))) + _od_nodes.extend(_o_node_list) + return _od_nodes + + def _get_origin_destination_pairs( + self, graph: nx.classes.MultiGraph + ) -> list[tuple[int, str], tuple[int, str]]: od_path = ( self.config["static"] / "output_graph" / "origin_destination_table.feather" ) @@ -521,7 +545,7 @@ def _get_origin_destination_pairs(self, graph): for a in od.loc[od["o_id"].notnull(), "o_id"] for b in od.loc[od["d_id"].notnull(), "d_id"] ] - all_nodes = [(n, v["od_id"]) for n, v in graph.nodes(data=True) if "od_id" in v] + all_nodes = self.extract_od_nodes_from_graph(graph) od_nodes = [] for aa, bb in od_pairs: # it is possible that there are multiple origins/destinations at the same 'entry-point' in the road @@ -541,7 +565,9 @@ def _get_origin_destination_pairs(self, graph): ) return od_nodes - def optimal_route_origin_destination(self, graph, analysis): + def optimal_route_origin_destination( + self, graph: nx.classes.MultiGraph, analysis: dict + ) -> gpd.GeoDataFrame: # create list of origin-destination pairs od_nodes = self._get_origin_destination_pairs(graph) pref_routes = find_route_ods(graph, od_nodes, analysis["weighing"]) @@ -1303,7 +1329,11 @@ def save_gdf(gdf, save_path): logging.info("Results saved to: {}".format(save_path)) -def find_route_ods(graph, od_nodes, weighing): +def find_route_ods( + graph: nx.classes.MultiGraph, + od_nodes: list[tuple[tuple[int, str], tuple[int, str]]], + weighing: str, +) -> gpd.GeoDataFrame: # create the routes between all OD pairs ( o_node_list, @@ -1374,6 +1404,11 @@ def find_route_ods(graph, od_nodes, weighing): geometry="geometry", crs="epsg:4326", ) + # Remove potential duplicates (o, d node) with a different Origin name. + _duplicate_columns = ["o_node", "d_node", "destination", "length", "geometry"] + pref_routes = pref_routes.drop_duplicates( + subset=_duplicate_columns, keep="first" + ).reset_index(drop=True) return pref_routes diff --git a/ra2ce/analyses/indirect/traffic_analysis/traffic_analysis_base.py b/ra2ce/analyses/indirect/traffic_analysis/traffic_analysis_base.py index b406105e1..772adde93 100644 --- a/ra2ce/analyses/indirect/traffic_analysis/traffic_analysis_base.py +++ b/ra2ce/analyses/indirect/traffic_analysis/traffic_analysis_base.py @@ -21,6 +21,7 @@ import ast import itertools +import logging import operator from abc import ABC, abstractmethod from typing import Any @@ -60,9 +61,15 @@ def optimal_route_od_link( opt_path = self._get_opt_path_values(o_node, d_node) for u_node, v_node in itertools.pairwise(opt_path): _nodes_key_name = self._get_node_key(u_node, v_node) - _calculated_traffic = self._calculate_origin_node_traffic( + if "," in o_node: + logging.error( + "List of nodes as 'origin node' is not accepted and will be skipped." + ) + continue + _calculated_traffic = self._get_accumulated_traffic_from_node( o_node, count_destination_nodes ) + if "," in d_node: _calculated_traffic *= len(d_node.split(",")) @@ -107,9 +114,9 @@ def _get_accumulated_traffic_from_node_list( nodes_list: list[str], count_destination_nodes: int, ) -> AccumulatedTraffic: - # TODO: This algorithm is not entirely clear (increase decrease of variable _intermediate_nodes) - # When do we want to 'multiply' the accumulated values? - # When do we want to 'add' the accumulated values? + # TODO: This algorithm is a consequence of having a 'dirty' graph network. + # This happens when a centroid snaps to more than one origin node. + # Ideally we clean up the graph network so said 'snapping' is only to one node. _accumulated_traffic = AccumulatedTraffic( utilitarian=1, egalitarian=1, prioritarian=1 ) @@ -140,18 +147,6 @@ def _get_accumulated_traffic_from_node_list( ) return _accumulated_traffic - def _calculate_origin_node_traffic( - self, - origin_node: str, - total_d_nodes: int, - ) -> AccumulatedTraffic: - if "," in origin_node: - return self._get_accumulated_traffic_from_node_list( - origin_node.split(","), total_d_nodes - ) - - return self._get_accumulated_traffic_from_node(origin_node, total_d_nodes) - @abstractmethod def _get_accumulated_traffic_from_node( self, target_node: str, total_d_nodes: int From 9f6c31edb7470db345de7e6598b67db1c750865d Mon Sep 17 00:00:00 2001 From: "Carles S. Soriano Perez" Date: Fri, 22 Sep 2023 13:56:33 +0200 Subject: [PATCH 3/5] test: Updated failing tests --- .../traffic_analysis/test_equity_analysis.py | 2 +- .../traffic_analysis/test_traffic_analysis.py | 2 +- .../test_data/equity_data/expected_result.csv | 717 +++++++++--------- .../expected_result_without_equity.csv | 145 ++-- 4 files changed, 432 insertions(+), 434 deletions(-) diff --git a/tests/analyses/indirect/traffic_analysis/test_equity_analysis.py b/tests/analyses/indirect/traffic_analysis/test_equity_analysis.py index a4901852b..0669a6f5e 100644 --- a/tests/analyses/indirect/traffic_analysis/test_equity_analysis.py +++ b/tests/analyses/indirect/traffic_analysis/test_equity_analysis.py @@ -51,7 +51,7 @@ def test_equity_analysis_with_valid_data( }, ) assert isinstance(_expected_result, pd.DataFrame) - assert len(_expected_result.values) == 359 + assert len(_expected_result.values) == 358 # 2. Run test. _result = valid_equity_analysis.optimal_route_od_link() diff --git a/tests/analyses/indirect/traffic_analysis/test_traffic_analysis.py b/tests/analyses/indirect/traffic_analysis/test_traffic_analysis.py index 9b211d60a..ead0f2a6a 100644 --- a/tests/analyses/indirect/traffic_analysis/test_traffic_analysis.py +++ b/tests/analyses/indirect/traffic_analysis/test_traffic_analysis.py @@ -48,7 +48,7 @@ def test_equity_analysis_with_valid_data( }, ) assert isinstance(_expected_result, pd.DataFrame) - assert len(_expected_result.values) == 359 + assert len(_expected_result.values) == 358 # 2. Run test. _result = valid_traffic_analysis.optimal_route_od_link() diff --git a/tests/test_data/equity_data/expected_result.csv b/tests/test_data/equity_data/expected_result.csv index 02fc361cc..a1bbe9465 100644 --- a/tests/test_data/equity_data/expected_result.csv +++ b/tests/test_data/equity_data/expected_result.csv @@ -1,360 +1,359 @@ ,u,v,traffic,traffic_egalitarian,traffic_prioritarian -0,10736480824,1906180830,4549.779296875,5,14212.09607895013 -1,1906180830,10736480825,31950.635375976555,50,45468.95635237318 -2,10736480825,10736480837,35600.86901855467,55,49119.18999495131 -3,10736480837,10736480838,42651.55163574219,60,71143.3305607317 -4,10736480838,10736480852,48254.47985839847,65,76746.25878338792 -5,10736480852,10736480851,55363.38220214845,70,101510.24380695952 -6,10736480851,10736480864,59867.650756835945,75,117200.94170049483 -7,10736480864,2881407203,64738.23132324219,80,124358.76011964111 -8,2881407203,7189355050,92682.95041656494,190,179312.90152205506 -9,7189355050,7290271353,95339.92746734616,195,181969.87857283634 -10,7290271353,2302221990,95339.92746734616,195,181969.87857283634 -11,2302221990,7187241844,95339.92746734616,195,181969.87857283634 -12,7187241844,2877168563,101486.80246734622,200,204111.66494524572 -13,2877168563,6129873369,108526.00644683838,210,205922.66910053324 -14,6129873369,6129873365,108526.00644683838,210,205922.66910053324 -15,6129873365,6147080221,136972.103981018,240,212628.68901163994 -16,6147080221,10736480854,143187.93796539292,245,220859.96868943627 -17,10736480854,1977410504,149832.4379653928,250,237099.55520653015 -18,1977410504,7118791911,149832.4379653928,250,237099.55520653015 -19,7118791911,6056502120,33278.980268859865,53,49776.071385727366 -20,6056502120,5892440181,33278.980268859865,53,49776.071385727366 -21,5892440181,5892440183,33278.980268859865,53,49776.071385727366 -22,5892440183,7716647983,33278.980268859865,53,49776.071385727366 -23,7716647983,1977414019,33278.980268859865,53,49776.071385727366 -24,1977414019,1977414024,33278.980268859865,53,49776.071385727366 -25,1977414024,6091496733,33278.980268859865,53,49776.071385727366 -26,6091496733,2291073148,33278.980268859865,53,49776.071385727366 -27,2291073148,1848302241,33278.980268859865,53,49776.071385727366 -28,1848302241,7699413914,33278.980268859865,53,49776.071385727366 -29,7699413914,7712547783,33278.980268859865,53,49776.071385727366 -30,7712547783,7622293230,33278.980268859865,53,49776.071385727366 -31,7622293230,10736480826,40568.7265274048,60,62503.18762615247 -32,10736480826,3494600493,45508.83941802979,63,64795.24668111868 -33,3494600493,6130026099,49516.63180084228,65,76287.55530710066 -34,6130026099,10736480884,79463.3701253891,94,85401.60428978945 -35,7118791911,7118791914,119865.95037231443,200,189679.6441652241 -36,7118791914,5520000798,119865.95037231443,200,189679.6441652241 -37,5520000798,7306700091,59932.97518615723,100,94839.822082612 -38,7306700091,876889487,59932.97518615723,100,94839.822082612 -39,876889487,5892440173,66823.82909240722,106,101706.62623190612 -40,5892440173,1847768436,66823.82909240722,106,101706.62623190612 -41,1847768436,1977726016,69618.55086975096,109,101798.73193900591 -42,1977726016,1979143905,69618.55086975096,109,101798.73193900591 -43,1979143905,6056409236,69618.55086975096,109,101798.73193900591 -44,6056409236,5675645894,68686.97694396973,108,101768.03003663932 -45,5675645894,1977417695,90948.92467155453,136,105662.39078434522 -46,1977417695,1977416894,90948.92467155453,136,105662.39078434522 -47,1977416894,1977416892,81218.22610073087,123,104222.54867962781 -48,1977416892,10736480828,141480.23351840972,173,178940.21472975964 -49,10736480828,10736480886,145274.78781528468,175,180549.07176760637 -50,10736480886,6784166345,67710.26376285551,81,89556.22927959618 -51,6784166345,7284605704,67710.26376285551,81,89556.22927959618 -52,7284605704,7304932666,67710.26376285551,81,89556.22927959618 -53,7304932666,7284605697,67710.26376285551,81,89556.22927959618 -54,7284605697,10736480818,83793.24925537108,101,92966.05642636548 -55,10736480818,10736480885,85684.89202880858,102,93768.09602075031 -56,5520000798,5891888008,86522.83304195403,129,107094.16544900987 -57,5891888008,5891887996,86522.83304195403,129,107094.16544900987 -58,5891887996,5891887997,34873.97069854737,54,51359.03693693692 -59,5891887997,10736480887,57612.85160121919,78,61654.15433641648 -60,5891887996,10736480888,53538.607265281695,76,57610.626355961234 -61,3494600493,5715381571,34270.09380683899,30,26388.668679781866 -62,5715381571,5504218401,34270.09380683899,30,26388.668679781866 -63,5504218401,5504218399,34270.09380683899,30,26388.668679781866 -64,5504218399,10736480827,3293.40859375,2,1528.0393699774759 -65,10736480827,1950328139,7206.520703124999,4,11332.064899508576 -66,1950328139,6062635070,38183.20591621399,32,36192.69420931297 -67,6062635070,7284314742,38183.20591621399,32,36192.69420931297 -68,7284314742,1847768354,38183.20591621399,32,36192.69420931297 -69,1847768354,1977416892,60262.00741767883,50,74717.66605013181 -70,10736480826,7622293230,3293.40859375,2,1528.0393699774759 -71,7622293230,7699413915,32452.39362792969,30,52436.50433167793 -72,7699413915,1848302311,32452.39362792969,30,52436.50433167793 -73,1848302311,1848302394,32452.39362792969,30,52436.50433167793 -74,1848302394,6091496731,32452.39362792969,30,52436.50433167793 -75,6091496731,1848302353,32452.39362792969,30,52436.50433167793 -76,1848302353,1988151507,32452.39362792969,30,52436.50433167793 -77,1988151507,1957951851,32452.39362792969,30,52436.50433167793 -78,1957951851,1971929461,32452.39362792969,30,52436.50433167793 -79,1971929461,1848302348,23515.943072509763,22,38945.36840626408 -80,1848302348,1971822806,63985.46910591126,55,87589.63875388772 -81,1971822806,1848302290,45686.15744819642,39,52815.6626008454 -82,1848302290,1957952262,75219.8316669464,57,65457.50851837009 -83,1957952262,5891888010,75219.8316669464,57,65457.50851837009 -84,5891888010,1977410498,43008.09589633942,33,41804.25813994 -85,1977410498,10736480887,43008.09589633942,33,41804.25813994 -86,1971929461,1971822799,8936.450555419922,8,13491.135925413853 -87,1971822799,1977410506,10796.36012573242,9,18151.007761509904 -88,1977410506,559431729,10796.36012573242,9,18151.007761509904 -89,559431729,559431731,10796.36012573242,9,18151.007761509904 -90,559431731,5891888009,10796.36012573242,9,18151.007761509904 -91,5891888009,5891887994,43008.09589633942,33,41804.25813994 -92,5891887994,10736480888,43008.09589633942,33,41804.25813994 -93,10736480827,5504218399,5869.668164062499,3,14706.03829429665 -94,5504218399,5504218401,7301.2009765625,4,13020.347995959426 -95,5504218401,5715381571,7301.2009765625,4,13020.347995959426 -96,5715381571,3494600493,7301.2009765625,4,13020.347995959426 -97,5504218399,5504218397,34889.79732246399,30,34664.65483933549 -98,5504218397,6784189922,34889.79732246399,30,34664.65483933549 -99,6784189922,1848280242,34889.79732246399,30,34664.65483933549 -100,1848280242,1848280088,34889.79732246399,30,34664.65483933549 -101,1848280088,1848302348,34889.79732246399,30,34664.65483933549 -102,5891888010,5891888009,32211.735770606996,24,23653.250378430093 -103,10736480828,1977416892,48818.14004669192,33,20285.35089312952 -104,1977416892,1847768354,48818.14004669192,33,20285.35089312952 -105,1847768354,7284314742,29015.164398765563,28,9083.347080322228 -106,7284314742,6062635070,29946.738324546808,29,9114.048982688828 -107,6062635070,1950328139,29946.738324546808,29,9114.048982688828 -108,1950328139,6130026099,29946.738324546808,29,9114.048982688828 -109,1847768354,1847768304,29533.674218750002,18,12641.845917524699 -110,1847768304,7304846122,29533.674218750002,18,12641.845917524699 -111,7304846122,5675748457,29533.674218750002,18,12641.845917524699 -112,5675748457,1847768303,29533.674218750002,18,12641.845917524699 -113,1847768303,1848302290,29533.674218750002,18,12641.845917524699 -114,10736480829,2291093189,22927.371430015563,24,6012.354832820547 -115,2291093189,2291093198,6844.3859375,4,2602.527686051242 -116,2291093198,1977419695,15879.643374633784,16,5247.691719736187 -117,1977419695,7719541100,15879.643374633784,16,5247.691719736187 -118,7719541100,7284605705,15879.643374633784,16,5247.691719736187 -119,7284605705,6784166345,15879.643374633784,16,5247.691719736187 -120,6784166345,10736480886,60513.497280883836,44,24711.141793040893 -121,10736480886,10736480828,43126.30860137941,30,17872.065336359443 -122,2291093189,1977419693,16082.985492515561,20,3409.8271467693044 -123,1977419693,7719541101,16082.985492515561,20,3409.8271467693044 -124,7719541101,7284605689,16082.985492515561,20,3409.8271467693044 -125,7284605689,7284605697,16082.985492515561,20,3409.8271467693044 -126,10736480830,7608574568,22588.143592834473,30,6612.910084212363 -127,7608574568,7284218991,23407.14644527435,31,5404.359258941439 -128,7284218991,7284218990,9035.257437133789,12,2645.164033684943 -129,7284218990,1849146891,9035.257437133789,12,2645.164033684943 -130,1849146891,1977419699,9035.257437133789,12,2645.164033684943 -131,1977419699,2291093198,9035.257437133789,12,2645.164033684943 -132,7284218991,1849146083,14371.88900814056,19,2759.195225256494 -133,1849146083,1977419697,14371.88900814056,19,2759.195225256494 -134,1977419697,10736480829,14371.88900814056,19,2759.195225256494 -135,7608574568,1977726002,9035.257437133789,12,2645.164033684943 -136,1977726002,1977726006,9035.257437133789,12,2645.164033684943 -137,1977726006,1977726015,9035.257437133789,12,2645.164033684943 -138,1977726015,1849146905,9035.257437133789,12,2645.164033684943 -139,1849146905,10736480841,31234.241785812377,43,5551.753593432642 -140,10736480841,1977726017,37926.713953781145,48,8096.517179868853 -141,1977726017,1977726016,15664.766226196285,20,4202.156432162935 -142,1977726016,1847768436,15664.766226196285,20,4202.156432162935 -143,1847768436,5892440173,15664.766226196285,20,4202.156432162935 -144,5892440173,876889487,15664.766226196285,20,4202.156432162935 -145,876889487,7306700091,15664.766226196285,20,4202.156432162935 -146,7306700091,5891888007,15179.90121517181,20,2793.1260239264816 -147,5891888007,10736480840,15179.90121517181,20,2793.1260239264816 -148,10736480840,5891887997,24628.625824546813,25,12170.615243367814 -149,7306700091,5520000798,15179.90121517181,20,2793.1260239264816 -150,10736480831,10736480842,4173.5400390625,10,472.48392798549935 -151,10736480842,7715411149,9881.2998046875,15,1347.7174097587667 -152,7715411149,1977726008,32053.244638252265,44,4343.202768161718 -153,1977726008,1849146905,22198.98434867859,31,2906.5895597476983 -154,1977726017,1979143906,22261.94772758484,28,3894.360747705915 -155,1979143906,5675645894,22261.94772758484,28,3894.360747705915 -156,1977416894,1847768354,9730.698570823668,13,1439.8421047174106 -157,1977726008,1977726007,9854.260289573669,13,1436.6132084140222 -158,1977726007,1977726002,9854.260289573669,13,1436.6132084140222 -159,1977726002,7608574568,9854.260289573669,13,1436.6132084140222 -160,10736480832,1950340737,410.37758922576904,10,5.1961702564574965 -161,1950340737,10736480857,410.37758922576904,10,5.1961702564574965 -162,10736480857,1950340738,5642.662745475769,15,71.44697248350828 -163,1950340738,7645811707,24429.009931755067,35,3024.064147396356 -164,7645811707,876889422,22171.944833564758,29,2995.485358402953 -165,876889422,7715411149,22171.944833564758,29,2995.485358402953 -166,7645811707,694045523,2257.0650981903077,6,28.57878899340331 -167,694045523,2932502306,12831.888352584838,18,1322.691810956831 -168,2932502306,876889400,12831.888352584838,18,1322.691810956831 -169,876889400,2922902674,12831.888352584838,18,1322.691810956831 -170,2922902674,10736480856,12831.888352584838,18,1322.691810956831 -171,10736480856,1977410545,17489.757981491086,23,1476.2013227898265 -172,1977410545,1977410537,14695.036204147336,20,1384.0956156900293 -173,1977410537,5892440174,14695.036204147336,20,1384.0956156900293 -174,5892440174,7306700092,14695.036204147336,20,1384.0956156900293 -175,7306700092,7306700091,14695.036204147336,20,1384.0956156900293 -176,10736480833,10736480834,3124.254089355469,30,7112.744124453804 -177,10736480834,10736480835,3171.9860992431645,35,7261.844084320268 -178,10736480835,10736480836,3948.286270141603,40,9686.764480457257 -179,10736480836,10736480847,5311.489151000976,45,13944.986485023937 -180,10736480847,10736480848,5414.428298950194,50,14266.536381289101 -181,10736480848,10736480849,5578.25047302246,55,14507.289892919083 -182,10736480849,10736480850,6900.764633178709,60,19114.290984214796 -183,10736480850,10736480860,9340.58885192871,65,27613.461108051477 -184,10736480860,10736480861,9417.309013366697,70,27726.209265519254 -185,10736480861,10736480862,11012.228691101069,75,30070.107552529706 -186,10736480862,10736480871,15240.36003875732,80,36283.780856193815 -187,10736480871,10736480872,15493.601112365717,85,36655.94462526499 -188,10736480872,10736480873,16266.620887756339,90,37791.97658515472 -189,10736480873,10736480863,18962.234413146976,95,41753.4575379639 -190,10736480863,10736480874,24057.232460021973,100,49241.080495476126 -191,10736480874,10736480879,27618.42166900635,105,54474.61382206708 -192,10736480879,2881407203,27944.71909332275,110,54954.14140241366 -193,10736480839,1977410546,9299.5478515625,5,23299.35918048025 -194,1977410546,1971822799,9299.5478515625,5,23299.35918048025 -195,1971822799,1848302348,7439.63828125,4,18639.4873443842 -196,1848302348,1848280088,5344.644921875,3,8118.335231193876 -197,1848280088,1848280242,5344.644921875,3,8118.335231193876 -198,1848280242,6784189922,5344.644921875,3,8118.335231193876 -199,6784189922,5504218397,5344.644921875,3,8118.335231193876 -200,5504218397,5504218399,5344.644921875,3,8118.335231193876 -201,1971822806,5521479268,18299.31165771484,16,34773.976153042335 -202,5521479268,1847768303,18299.31165771484,16,34773.976153042335 -203,1847768303,5675748457,22078.801501464844,18,38524.971840818864 -204,5675748457,7304846122,22078.801501464844,18,38524.971840818864 -205,7304846122,1847768304,22078.801501464844,18,38524.971840818864 -206,1847768304,1847768354,22078.801501464844,18,38524.971840818864 -207,10736480887,1977410498,5669.234765625,3,5626.493531664799 -208,1977410498,5891888010,5669.234765625,3,5626.493531664799 -209,5891888010,1957952262,7264.225195312501,4,7209.4590828743585 -210,1957952262,1848302290,7264.225195312501,4,7209.4590828743585 -211,1848302290,1971822806,3484.7353515625,2,3458.463395097826 -212,1971822806,1848302348,3484.7353515625,2,3458.463395097826 -213,1848302290,1847768303,3779.48984375,2,3750.9956877765326 -214,5891887997,5891887996,1889.744921875,1,1875.4978438882663 -215,10736480843,10736480831,1391.304931640625,5,45.853267240788576 -216,10736480844,10736480832,407.7730712890625,5,5.163192045681763 -217,10736480845,10736480859,742.1225891113282,10,9.396700564133452 -218,10736480859,1950340739,6290.882354736328,15,396.2964821268483 -219,1950340739,10736480858,6290.882354736328,15,396.2964821268483 -220,10736480858,6062539849,11862.879425048828,20,466.84869113136483 -221,6062539849,6062539828,11862.879425048828,20,466.84869113136483 -222,6062539828,7210972514,16800.589971923826,23,811.1416886117969 -223,7210972514,6130025622,16800.589971923826,23,811.1416886117969 -224,6130025622,1950340738,18786.347186279294,20,2952.617174912848 -225,6130025622,6130025621,4745.151770019531,8,186.73947645254597 -226,6130025621,694045523,10574.823254394529,12,1294.1130219634279 -227,10736480846,10736480845,390.557373046875,5,4.9452081657165525 -228,10736480853,1977410514,6215.833984375,5,8231.27967779623 -229,1977410514,6147080221,6215.833984375,5,8231.27967779623 -230,10736480855,1977410535,18300.810546875004,15,16328.021491765503 -231,1977410535,5520000798,11409.956640625,9,9461.217342471386 -232,10736480888,5891887994,1594.9904296875,1,1582.9655512095596 -233,5891887994,5891888009,1594.9904296875,1,1582.9655512095596 -234,5891888009,5891888010,1594.9904296875,1,1582.9655512095596 -235,1977410535,7306700092,6890.853906249999,6,6866.804149294119 -236,7306700092,5892440174,6890.853906249999,6,6866.804149294119 -237,5892440174,876889487,6890.853906249999,6,6866.804149294119 -238,1977410545,1847768436,2794.7217773437496,3,92.10570709979706 -239,6056409236,1977417694,931.57392578125,1,30.701902366599022 -240,1977417694,5675748458,931.57392578125,1,30.701902366599022 -241,5675748458,1977416896,931.57392578125,1,30.701902366599022 -242,1977416896,1847768304,931.57392578125,1,30.701902366599022 -243,1847768304,6062635067,931.57392578125,1,30.701902366599022 -244,6062635067,7284314742,931.57392578125,1,30.701902366599022 -245,10736480865,7187241844,6146.875,5,22141.786372409373 -246,10736480866,2302222267,20964.239624023434,25,5752.036999172081 -247,2302222267,6129873365,28446.097534179695,30,6706.019911106866 -248,10736480867,876916567,13638.351074218748,13,10769.354080139059 -249,876916567,2459127367,13638.351074218748,13,10769.354080139059 -250,2459127367,1977413998,3312.49267578125,3,2356.160344421353 -251,1977413998,7118791906,3312.49267578125,3,2356.160344421353 -252,7118791906,7118791911,3312.49267578125,3,2356.160344421353 -253,2459127367,10736480855,10325.858398437498,10,8413.193735717705 -254,10736480868,6130028044,4386.16845703125,3,1517.171462951559 -255,6130028044,6130029703,4386.16845703125,3,1517.171462951559 -256,6130029703,2530351154,4386.16845703125,3,1517.171462951559 -257,2530351154,10736480867,8638.874023437498,8,5769.877029357809 -258,10736480868,6130021386,2924.1123046875,2,1011.4476419677061 -259,6130021386,6130021388,2924.1123046875,2,1011.4476419677061 -260,6130021388,2530351220,2924.1123046875,2,1011.4476419677061 -261,2530351220,6130025621,12560.580468749997,9,3435.588508264478 -262,6130025621,6130025622,6730.908984374999,5,2328.2149627535964 -263,10736480869,7210972513,9636.4681640625,7,2424.1408662967724 -264,7210972513,2530351223,9636.4681640625,7,2424.1408662967724 -265,2530351223,2530351220,9636.4681640625,7,2424.1408662967724 -266,10736480870,9307790920,8229.517578125,5,573.8216624673868 -267,9307790920,5535006169,8229.517578125,5,573.8216624673868 -268,5535006169,5535021678,8229.517578125,5,573.8216624673868 -269,5535021678,7210972509,8229.517578125,5,573.8216624673868 -270,7210972509,7210972512,4937.710546875,3,344.29299748043206 -271,7210972512,6062539829,4937.710546875,3,344.29299748043206 -272,6062539829,6062539828,4937.710546875,3,344.29299748043206 -273,7210972509,7210972510,3291.80703125,2,229.5286649869547 -274,7210972510,7210972511,3291.80703125,2,229.5286649869547 -275,7210972511,10736480869,3291.80703125,2,229.5286649869547 -276,10736480875,2733095423,7481.85791015625,5,953.9829119347851 -277,2733095423,2302222267,7481.85791015625,5,953.9829119347851 -278,10736480876,1906180811,4338.23974609375,5,1102.476467556748 -279,1906180811,10736480866,14509.277221679686,20,4111.637997721006 -280,10736480877,1906180811,10171.037475585938,15,3009.1615301642582 -281,10736480878,586717899,4252.70556640625,5,4252.70556640625 -282,586717899,2530351154,4252.70556640625,5,4252.70556640625 -283,10736480880,2302221991,7039.2039794921875,10,1811.0041552874782 -284,2302221991,6129833719,7039.2039794921875,10,1811.0041552874782 -285,6129833719,2877168526,7039.2039794921875,10,1811.0041552874782 -286,2877168526,2877168563,7039.2039794921875,10,1811.0041552874782 -287,10736480881,10736480880,6358.58056640625,5,810.7581402044414 -288,10736480882,10736480877,4920.7977294921875,10,1674.9185865115096 -289,10736480883,10736480882,3222.84130859375,5,1243.4170774805802 -290,10736480781,10736480786,130.60971069335938,5,103.38608217547454 -291,10736480786,10736480787,3197.3267517089844,10,3170.1031231910993 -292,10736480787,10736480794,9374.613861083986,15,8990.915116203421 -293,10736480794,10736480795,11991.572113037115,20,11607.87336815655 -294,10736480795,10736480804,20403.345550537113,25,19534.225315307092 -295,10736480804,10736480815,29994.11508178712,30,45894.821883205346 -296,10736480815,6053953119,36448.73129272462,35,63635.581202125555 -297,6053953119,7712617551,36448.73129272462,35,63635.581202125555 -298,7712617551,7622293230,36448.73129272462,35,63635.581202125555 -299,10736480782,7238291279,4814.463765144348,15,3810.9612509796734 -300,7238291279,7238291270,4814.463765144348,15,3810.9612509796734 -301,7238291270,10736480789,4814.463765144348,15,3810.9612509796734 -302,10736480789,7238291217,11216.7015581131,20,8878.748929682872 -303,7238291217,10736480788,11216.7015581131,20,8878.748929682872 -304,10736480788,7698533592,14169.159321784975,25,11215.811307006685 -305,7698533592,10736480796,14169.159321784975,25,11215.811307006685 -306,10736480796,7238291342,22425.46010303497,30,21725.707126049747 -307,7238291342,10736480806,40143.535298347466,50,29552.813141725932 -308,10736480806,10736480805,48947.036274909966,55,33441.83238862998 -309,10736480805,1849171627,58681.674946784966,60,45833.58518302663 -310,1849171627,10736480816,67589.81752490996,65,49610.5578548267 -311,10736480816,10736480884,77441.71303272244,70,62151.573274511 -312,10736480884,6130026099,61953.37042617799,56,49721.258619608816 -313,6130026099,1950328139,30976.685213088993,28,24860.62930980439 -314,6130026099,3494600493,30976.685213088993,28,24860.62930980439 -315,10736480783,10736480779,3585.8672075271606,10,2838.447155419596 -316,10736480779,10736480782,3585.8672075271606,10,2838.447155419596 -317,10736480784,10736480785,1649.352294921875,5,1913.9894571471727 -318,10736480785,10736480792,10918.853271484375,10,12670.773921436787 -319,10736480792,10736480793,11232.406555175783,15,13034.636560781311 -320,10736480793,10736480801,14433.569885253908,20,16749.423803773498 -321,10736480801,10736480802,14772.958374023436,25,17143.266884710174 -322,10736480802,10736480803,18610.991577148434,30,21597.10922608212 -323,10736480803,10736480813,21979.284301757816,35,24965.401950691503 -324,10736480813,10736480814,23951.079467773434,40,27253.569961265875 -325,10736480814,1906180830,27400.85607910156,45,31256.860273423044 -326,10736480790,7238291754,2991.03515625,10,1321.3144772507223 -327,7238291754,7281933558,2991.03515625,10,1321.3144772507223 -328,7281933558,7238291216,2991.03515625,10,1321.3144772507223 -329,7238291216,10736480798,2991.03515625,10,1321.3144772507223 -330,10736480798,10736480797,8565.712890625,15,3783.974396524931 -331,10736480797,7698533591,17718.0751953125,20,7827.106015676187 -332,7698533591,1980828432,17718.0751953125,20,7827.106015676187 -333,1980828432,7238291342,17718.0751953125,20,7827.106015676187 -334,10736480791,10736480790,1504.0472412109375,5,664.4252877230022 -335,10736480799,10736480808,19821.931640624996,15,9471.401481133114 -336,10736480808,10563701729,29100.6953125,20,13405.51417740067 -337,10563701729,1957952104,29100.6953125,20,13405.51417740067 -338,1957952104,1957952128,29100.6953125,20,13405.51417740067 -339,1957952128,10563701727,29100.6953125,20,13405.51417740067 -340,10563701727,10736480807,29100.6953125,20,13405.51417740067 -341,10736480807,10736480819,37346.10253906251,25,16901.492995596054 -342,10736480819,10736480885,46334.103515625015,30,20319.114619706797 -343,10736480885,10736480818,37067.2828125,24,16255.291695765436 -344,10736480818,7284605697,44633.85390625001,28,19463.45007330472 -345,7284605697,7304932666,44633.85390625001,28,19463.45007330472 -346,7304932666,7284605704,44633.85390625001,28,19463.45007330472 -347,7284605704,6784166345,44633.85390625001,28,19463.45007330472 -348,10736480800,10736480809,7000.55908203125,5,2968.1743537741113 -349,10736480809,10736480799,15900.096191406246,10,7738.898288845427 -350,10736480780,10736480783,8.144307136535645,5,6.446748885747194 -351,10736480810,10736480821,3724.059852600099,15,1988.017843923023 -352,10736480821,10736480820,7078.925331115723,20,2502.4562075216418 -353,10736480820,10736480830,14713.311073303217,25,5405.375540456737 -354,10736480811,10736480822,128.346923828125,5,68.80220105544483 -355,10736480822,10736480810,150.07962799072268,10,72.13471523152032 -356,10736480812,10736480823,2825.1656951904297,20,6178.4849622803795 -357,10736480823,10736480833,3028.506942749024,25,6813.659804519701 -358,10736480817,1849171627,8908.142578125,5,3776.97267180007 +0,10736480824,1906180830,4549.779296875,5.0,14212.09607895013 +1,1906180830,10736480825,31950.635375976555,50.0,45468.95635237318 +2,10736480825,10736480837,35600.86901855467,55.0,49119.18999495131 +3,10736480837,10736480838,42651.55163574219,60.0,71143.3305607317 +4,10736480838,10736480852,48254.47985839847,65.0,76746.25878338792 +5,10736480852,10736480851,55363.38220214845,70.0,101510.24380695952 +6,10736480851,10736480864,59867.650756835945,75.0,117200.94170049483 +7,10736480864,2881407203,64738.23132324219,80.0,124358.76011964111 +8,2881407203,7189355050,89857.7847213745,170.0,173134.41655977472 +9,7189355050,7290271353,92514.76177215572,175.0,175791.393610556 +10,7290271353,2302221990,92514.76177215572,175.0,175791.393610556 +11,2302221990,7187241844,92514.76177215572,175.0,175791.393610556 +12,7187241844,2877168563,98661.63677215578,180.0,197933.17998296538 +13,2877168563,6129873369,105700.84075164793,190.0,199744.1841382529 +14,6129873369,6129873365,105700.84075164793,190.0,199744.1841382529 +15,6129873365,6147080221,134146.93828582758,220.0,206450.2040493596 +16,6147080221,10736480854,140362.77227020255,225.0,214681.48372715592 +17,10736480854,1977410504,147007.27227020243,230.0,230921.0702442498 +18,1977410504,7118791911,147007.27227020243,230.0,230921.0702442498 +19,7118791911,6056502120,32713.947129821783,49.0,48540.37439327129 +20,6056502120,5892440181,32713.947129821783,49.0,48540.37439327129 +21,5892440181,5892440183,32713.947129821783,49.0,48540.37439327129 +22,5892440183,7716647983,32713.947129821783,49.0,48540.37439327129 +23,7716647983,1977414019,32713.947129821783,49.0,48540.37439327129 +24,1977414019,1977414024,32713.947129821783,49.0,48540.37439327129 +25,1977414024,6091496733,32713.947129821783,49.0,48540.37439327129 +26,6091496733,2291073148,32713.947129821783,49.0,48540.37439327129 +27,2291073148,1848302241,32713.947129821783,49.0,48540.37439327129 +28,1848302241,7699413914,32713.947129821783,49.0,48540.37439327129 +29,7699413914,7712547783,32713.947129821783,49.0,48540.37439327129 +30,7712547783,7622293230,32713.947129821783,49.0,48540.37439327129 +31,7622293230,10736480826,40003.69338836671,56.0,61267.49063369639 +32,10736480826,3494600493,44943.8062789917,59.0,63559.549688662606 +33,3494600493,6130026099,48951.59866180419,61.0,75051.85831464459 +34,6130026099,10736480884,78898.33698635102,90.0,84165.90729733338 +35,7118791911,7118791914,117605.81781616207,184.0,184736.85619539983 +36,7118791914,5520000798,117605.81781616207,184.0,184736.85619539983 +37,5520000798,7306700091,58802.90890808105,92.0,92368.42809769986 +38,7306700091,876889487,58802.90890808105,92.0,92368.42809769986 +39,876889487,5892440173,65693.76281433104,98.0,99235.23224699398 +40,5892440173,1847768436,65693.76281433104,98.0,99235.23224699398 +41,1847768436,1977726016,68488.48459167479,101.0,99327.33795409377 +42,1977726016,1979143905,68488.48459167479,101.0,99327.33795409377 +43,1979143905,6056409236,68488.48459167479,101.0,99327.33795409377 +44,6056409236,5675645894,67556.91066589355,100.0,99296.63605172718 +45,5675645894,1977417695,89818.85839347835,128.0,103190.99679943308 +46,1977417695,1977416894,89818.85839347835,128.0,103190.99679943308 +47,1977416894,1977416892,80088.15982265469,115.0,101751.15469471567 +48,1977416892,10736480828,140350.1672403335,165.0,176468.8207448475 +49,10736480828,10736480886,144144.72153720853,167.0,178077.67778269423 +50,10736480886,6784166345,67145.23062381744,77.0,88320.53228714011 +51,6784166345,7284605704,67145.23062381744,77.0,88320.53228714011 +52,7284605704,7304932666,67145.23062381744,77.0,88320.53228714011 +53,7304932666,7284605697,67145.23062381744,77.0,88320.53228714011 +54,7284605697,10736480818,83228.21611633299,97.0,91730.35943390941 +55,10736480818,10736480885,85119.85888977049,98.0,92532.39902829424 +56,5520000798,5891888008,85392.76676387785,121.0,104622.77146409774 +57,5891888008,5891887996,85392.76676387785,121.0,104622.77146409774 +58,5891887996,5891887997,34308.93755950928,50.0,50123.339944480846 +59,5891887997,10736480887,57047.8184621811,74.0,60418.45734396041 +60,5891887996,10736480888,52973.574126243606,72.0,56374.92936350516 +61,3494600493,5715381571,34270.09380683899,30.0,26388.668679781866 +62,5715381571,5504218401,34270.09380683899,30.0,26388.668679781866 +63,5504218401,5504218399,34270.09380683899,30.0,26388.668679781866 +64,5504218399,10736480827,3293.40859375,2.0,1528.0393699774759 +65,10736480827,1950328139,7206.520703124999,4.0,11332.064899508576 +66,1950328139,6062635070,38183.20591621399,32.0,36192.69420931297 +67,6062635070,7284314742,38183.20591621399,32.0,36192.69420931297 +68,7284314742,1847768354,38183.20591621399,32.0,36192.69420931297 +69,1847768354,1977416892,60262.00741767883,50.0,74717.66605013181 +70,10736480826,7622293230,3293.40859375,2.0,1528.0393699774759 +71,7622293230,7699413915,32452.39362792969,30.0,52436.50433167793 +72,7699413915,1848302311,32452.39362792969,30.0,52436.50433167793 +73,1848302311,1848302394,32452.39362792969,30.0,52436.50433167793 +74,1848302394,6091496731,32452.39362792969,30.0,52436.50433167793 +75,6091496731,1848302353,32452.39362792969,30.0,52436.50433167793 +76,1848302353,1988151507,32452.39362792969,30.0,52436.50433167793 +77,1988151507,1957951851,32452.39362792969,30.0,52436.50433167793 +78,1957951851,1971929461,32452.39362792969,30.0,52436.50433167793 +79,1971929461,1848302348,23515.943072509763,22.0,38945.36840626408 +80,1848302348,1971822806,63985.46910591126,55.0,87589.63875388772 +81,1971822806,1848302290,45686.15744819642,39.0,52815.6626008454 +82,1848302290,1957952262,75219.8316669464,57.0,65457.50851837009 +83,1957952262,5891888010,75219.8316669464,57.0,65457.50851837009 +84,5891888010,1977410498,43008.09589633942,33.0,41804.25813994 +85,1977410498,10736480887,43008.09589633942,33.0,41804.25813994 +86,1971929461,1971822799,8936.450555419922,8.0,13491.135925413853 +87,1971822799,1977410506,10796.36012573242,9.0,18151.007761509904 +88,1977410506,559431729,10796.36012573242,9.0,18151.007761509904 +89,559431729,559431731,10796.36012573242,9.0,18151.007761509904 +90,559431731,5891888009,10796.36012573242,9.0,18151.007761509904 +91,5891888009,5891887994,43008.09589633942,33.0,41804.25813994 +92,5891887994,10736480888,43008.09589633942,33.0,41804.25813994 +93,10736480827,5504218399,5869.668164062499,3.0,14706.03829429665 +94,5504218399,5504218401,7301.2009765625,4.0,13020.347995959426 +95,5504218401,5715381571,7301.2009765625,4.0,13020.347995959426 +96,5715381571,3494600493,7301.2009765625,4.0,13020.347995959426 +97,5504218399,5504218397,34889.79732246399,30.0,34664.65483933549 +98,5504218397,6784189922,34889.79732246399,30.0,34664.65483933549 +99,6784189922,1848280242,34889.79732246399,30.0,34664.65483933549 +100,1848280242,1848280088,34889.79732246399,30.0,34664.65483933549 +101,1848280088,1848302348,34889.79732246399,30.0,34664.65483933549 +102,5891888010,5891888009,32211.735770606996,24.0,23653.250378430093 +103,10736480828,1977416892,48818.14004669192,33.0,20285.35089312952 +104,1977416892,1847768354,48818.14004669192,33.0,20285.35089312952 +105,1847768354,7284314742,29015.164398765563,28.0,9083.347080322228 +106,7284314742,6062635070,29946.738324546808,29.0,9114.048982688828 +107,6062635070,1950328139,29946.738324546808,29.0,9114.048982688828 +108,1950328139,6130026099,29946.738324546808,29.0,9114.048982688828 +109,1847768354,1847768304,29533.674218750002,18.0,12641.845917524699 +110,1847768304,7304846122,29533.674218750002,18.0,12641.845917524699 +111,7304846122,5675748457,29533.674218750002,18.0,12641.845917524699 +112,5675748457,1847768303,29533.674218750002,18.0,12641.845917524699 +113,1847768303,1848302290,29533.674218750002,18.0,12641.845917524699 +114,10736480829,2291093189,22927.371430015563,24.0,6012.354832820547 +115,2291093189,2291093198,6844.3859375,4.0,2602.527686051242 +116,2291093198,1977419695,15879.643374633784,16.0,5247.691719736187 +117,1977419695,7719541100,15879.643374633784,16.0,5247.691719736187 +118,7719541100,7284605705,15879.643374633784,16.0,5247.691719736187 +119,7284605705,6784166345,15879.643374633784,16.0,5247.691719736187 +120,6784166345,10736480886,60513.497280883836,44.0,24711.141793040893 +121,10736480886,10736480828,43126.30860137941,30.0,17872.065336359443 +122,2291093189,1977419693,16082.985492515561,20.0,3409.8271467693044 +123,1977419693,7719541101,16082.985492515561,20.0,3409.8271467693044 +124,7719541101,7284605689,16082.985492515561,20.0,3409.8271467693044 +125,7284605689,7284605697,16082.985492515561,20.0,3409.8271467693044 +126,10736480830,7608574568,22588.143592834473,30.0,6612.910084212363 +127,7608574568,7284218991,23407.14644527435,31.0,5404.359258941439 +128,7284218991,7284218990,9035.257437133789,12.0,2645.164033684943 +129,7284218990,1849146891,9035.257437133789,12.0,2645.164033684943 +130,1849146891,1977419699,9035.257437133789,12.0,2645.164033684943 +131,1977419699,2291093198,9035.257437133789,12.0,2645.164033684943 +132,7284218991,1849146083,14371.88900814056,19.0,2759.195225256494 +133,1849146083,1977419697,14371.88900814056,19.0,2759.195225256494 +134,1977419697,10736480829,14371.88900814056,19.0,2759.195225256494 +135,7608574568,1977726002,9035.257437133789,12.0,2645.164033684943 +136,1977726002,1977726006,9035.257437133789,12.0,2645.164033684943 +137,1977726006,1977726015,9035.257437133789,12.0,2645.164033684943 +138,1977726015,1849146905,9035.257437133789,12.0,2645.164033684943 +139,1849146905,10736480841,31234.241785812377,43.0,5551.753593432642 +140,10736480841,1977726017,37926.713953781145,48.0,8096.517179868853 +141,1977726017,1977726016,15664.766226196285,20.0,4202.156432162935 +142,1977726016,1847768436,15664.766226196285,20.0,4202.156432162935 +143,1847768436,5892440173,15664.766226196285,20.0,4202.156432162935 +144,5892440173,876889487,15664.766226196285,20.0,4202.156432162935 +145,876889487,7306700091,15664.766226196285,20.0,4202.156432162935 +146,7306700091,5891888007,15179.90121517181,20.0,2793.1260239264816 +147,5891888007,10736480840,15179.90121517181,20.0,2793.1260239264816 +148,10736480840,5891887997,24628.625824546813,25.0,12170.615243367814 +149,7306700091,5520000798,15179.90121517181,20.0,2793.1260239264816 +150,10736480831,10736480842,4173.5400390625,10.0,472.48392798549935 +151,10736480842,7715411149,9881.2998046875,15.0,1347.7174097587667 +152,7715411149,1977726008,32053.244638252265,44.0,4343.202768161718 +153,1977726008,1849146905,22198.98434867859,31.0,2906.5895597476983 +154,1977726017,1979143906,22261.94772758484,28.0,3894.360747705915 +155,1979143906,5675645894,22261.94772758484,28.0,3894.360747705915 +156,1977416894,1847768354,9730.698570823668,13.0,1439.8421047174106 +157,1977726008,1977726007,9854.260289573669,13.0,1436.6132084140222 +158,1977726007,1977726002,9854.260289573669,13.0,1436.6132084140222 +159,1977726002,7608574568,9854.260289573669,13.0,1436.6132084140222 +160,10736480832,1950340737,410.37758922576904,10.0,5.1961702564574965 +161,1950340737,10736480857,410.37758922576904,10.0,5.1961702564574965 +162,10736480857,1950340738,5642.662745475769,15.0,71.44697248350828 +163,1950340738,7645811707,24429.009931755067,35.0,3024.064147396356 +164,7645811707,876889422,22171.944833564758,29.0,2995.485358402953 +165,876889422,7715411149,22171.944833564758,29.0,2995.485358402953 +166,7645811707,694045523,2257.0650981903077,6.0,28.57878899340331 +167,694045523,2932502306,12831.888352584838,18.0,1322.691810956831 +168,2932502306,876889400,12831.888352584838,18.0,1322.691810956831 +169,876889400,2922902674,12831.888352584838,18.0,1322.691810956831 +170,2922902674,10736480856,12831.888352584838,18.0,1322.691810956831 +171,10736480856,1977410545,17489.757981491086,23.0,1476.2013227898265 +172,1977410545,1977410537,14695.036204147336,20.0,1384.0956156900293 +173,1977410537,5892440174,14695.036204147336,20.0,1384.0956156900293 +174,5892440174,7306700092,14695.036204147336,20.0,1384.0956156900293 +175,7306700092,7306700091,14695.036204147336,20.0,1384.0956156900293 +176,10736480833,10736480834,299.088394165039,10.0,934.2591621734273 +177,10736480834,10736480835,346.82040405273426,15.0,1083.3591220398896 +178,10736480835,10736480836,1123.120574951172,20.0,3508.2795181768793 +179,10736480836,10736480847,2486.3234558105473,25.0,7766.501522743556 +180,10736480847,10736480848,2589.262603759766,30.0,8088.051419008721 +181,10736480848,10736480849,2753.0847778320317,35.0,8328.804930638704 +182,10736480849,10736480850,4075.5989379882812,40.0,12935.806021934417 +183,10736480850,10736480860,6515.423156738279,45.0,21434.976145771096 +184,10736480860,10736480861,6592.143318176268,50.0,21547.724303238872 +185,10736480861,10736480862,8187.062995910642,55.0,23891.622590249324 +186,10736480862,10736480871,12415.194343566895,60.0,30105.295893913433 +187,10736480871,10736480872,12668.435417175291,65.0,30477.45966298461 +188,10736480872,10736480873,13441.455192565913,70.0,31613.491622874342 +189,10736480873,10736480863,16137.06871795654,75.0,35574.97257568352 +190,10736480863,10736480874,21232.066764831547,80.0,43062.595533195745 +191,10736480874,10736480879,24793.255973815925,85.0,48296.128859786695 +192,10736480879,2881407203,25119.553398132324,90.0,48775.65644013328 +193,10736480839,1977410546,9299.5478515625,5.0,23299.35918048025 +194,1977410546,1971822799,9299.5478515625,5.0,23299.35918048025 +195,1971822799,1848302348,7439.63828125,4.0,18639.4873443842 +196,1848302348,1848280088,5344.644921875,3.0,8118.335231193876 +197,1848280088,1848280242,5344.644921875,3.0,8118.335231193876 +198,1848280242,6784189922,5344.644921875,3.0,8118.335231193876 +199,6784189922,5504218397,5344.644921875,3.0,8118.335231193876 +200,5504218397,5504218399,5344.644921875,3.0,8118.335231193876 +201,1971822806,5521479268,18299.31165771484,16.0,34773.976153042335 +202,5521479268,1847768303,18299.31165771484,16.0,34773.976153042335 +203,1847768303,5675748457,22078.801501464844,18.0,38524.971840818864 +204,5675748457,7304846122,22078.801501464844,18.0,38524.971840818864 +205,7304846122,1847768304,22078.801501464844,18.0,38524.971840818864 +206,1847768304,1847768354,22078.801501464844,18.0,38524.971840818864 +207,10736480887,1977410498,5669.234765625,3.0,5626.493531664799 +208,1977410498,5891888010,5669.234765625,3.0,5626.493531664799 +209,5891888010,1957952262,7264.225195312501,4.0,7209.4590828743585 +210,1957952262,1848302290,7264.225195312501,4.0,7209.4590828743585 +211,1848302290,1971822806,3484.7353515625,2.0,3458.463395097826 +212,1971822806,1848302348,3484.7353515625,2.0,3458.463395097826 +213,1848302290,1847768303,3779.48984375,2.0,3750.9956877765326 +214,5891887997,5891887996,1889.744921875,1.0,1875.4978438882663 +215,10736480843,10736480831,1391.304931640625,5.0,45.853267240788576 +216,10736480844,10736480832,407.7730712890625,5.0,5.163192045681763 +217,10736480845,10736480859,742.1225891113282,10.0,9.396700564133452 +218,10736480859,1950340739,6290.882354736328,15.0,396.2964821268483 +219,1950340739,10736480858,6290.882354736328,15.0,396.2964821268483 +220,10736480858,6062539849,11862.879425048828,20.0,466.84869113136483 +221,6062539849,6062539828,11862.879425048828,20.0,466.84869113136483 +222,6062539828,7210972514,16800.589971923826,23.0,811.1416886117969 +223,7210972514,6130025622,16800.589971923826,23.0,811.1416886117969 +224,6130025622,1950340738,18786.347186279294,20.0,2952.617174912848 +225,6130025622,6130025621,4745.151770019531,8.0,186.73947645254597 +226,6130025621,694045523,10574.823254394529,12.0,1294.1130219634279 +227,10736480846,10736480845,390.557373046875,5.0,4.9452081657165525 +228,10736480853,1977410514,6215.833984375,5.0,8231.27967779623 +229,1977410514,6147080221,6215.833984375,5.0,8231.27967779623 +230,10736480855,1977410535,18300.810546875004,15.0,16328.021491765503 +231,1977410535,5520000798,11409.956640625,9.0,9461.217342471386 +232,10736480888,5891887994,1594.9904296875,1.0,1582.9655512095596 +233,5891887994,5891888009,1594.9904296875,1.0,1582.9655512095596 +234,5891888009,5891888010,1594.9904296875,1.0,1582.9655512095596 +235,1977410535,7306700092,6890.853906249999,6.0,6866.804149294119 +236,7306700092,5892440174,6890.853906249999,6.0,6866.804149294119 +237,5892440174,876889487,6890.853906249999,6.0,6866.804149294119 +238,1977410545,1847768436,2794.7217773437496,3.0,92.10570709979706 +239,6056409236,1977417694,931.57392578125,1.0,30.701902366599022 +240,1977417694,5675748458,931.57392578125,1.0,30.701902366599022 +241,5675748458,1977416896,931.57392578125,1.0,30.701902366599022 +242,1977416896,1847768304,931.57392578125,1.0,30.701902366599022 +243,1847768304,6062635067,931.57392578125,1.0,30.701902366599022 +244,6062635067,7284314742,931.57392578125,1.0,30.701902366599022 +245,10736480865,7187241844,6146.875,5.0,22141.786372409373 +246,10736480866,2302222267,20964.239624023434,25.0,5752.036999172081 +247,2302222267,6129873365,28446.097534179695,30.0,6706.019911106866 +248,10736480867,876916567,13638.351074218748,13.0,10769.354080139059 +249,876916567,2459127367,13638.351074218748,13.0,10769.354080139059 +250,2459127367,1977413998,3312.49267578125,3.0,2356.160344421353 +251,1977413998,7118791906,3312.49267578125,3.0,2356.160344421353 +252,7118791906,7118791911,3312.49267578125,3.0,2356.160344421353 +253,2459127367,10736480855,10325.858398437498,10.0,8413.193735717705 +254,10736480868,6130028044,4386.16845703125,3.0,1517.171462951559 +255,6130028044,6130029703,4386.16845703125,3.0,1517.171462951559 +256,6130029703,2530351154,4386.16845703125,3.0,1517.171462951559 +257,2530351154,10736480867,8638.874023437498,8.0,5769.877029357809 +258,10736480868,6130021386,2924.1123046875,2.0,1011.4476419677061 +259,6130021386,6130021388,2924.1123046875,2.0,1011.4476419677061 +260,6130021388,2530351220,2924.1123046875,2.0,1011.4476419677061 +261,2530351220,6130025621,12560.580468749997,9.0,3435.588508264478 +262,6130025621,6130025622,6730.908984374999,5.0,2328.2149627535964 +263,10736480869,7210972513,9636.4681640625,7.0,2424.1408662967724 +264,7210972513,2530351223,9636.4681640625,7.0,2424.1408662967724 +265,2530351223,2530351220,9636.4681640625,7.0,2424.1408662967724 +266,10736480870,9307790920,8229.517578125,5.0,573.8216624673868 +267,9307790920,5535006169,8229.517578125,5.0,573.8216624673868 +268,5535006169,5535021678,8229.517578125,5.0,573.8216624673868 +269,5535021678,7210972509,8229.517578125,5.0,573.8216624673868 +270,7210972509,7210972512,4937.710546875,3.0,344.29299748043206 +271,7210972512,6062539829,4937.710546875,3.0,344.29299748043206 +272,6062539829,6062539828,4937.710546875,3.0,344.29299748043206 +273,7210972509,7210972510,3291.80703125,2.0,229.5286649869547 +274,7210972510,7210972511,3291.80703125,2.0,229.5286649869547 +275,7210972511,10736480869,3291.80703125,2.0,229.5286649869547 +276,10736480875,2733095423,7481.85791015625,5.0,953.9829119347851 +277,2733095423,2302222267,7481.85791015625,5.0,953.9829119347851 +278,10736480876,1906180811,4338.23974609375,5.0,1102.476467556748 +279,1906180811,10736480866,14509.277221679686,20.0,4111.637997721006 +280,10736480877,1906180811,10171.037475585938,15.0,3009.1615301642582 +281,10736480878,586717899,4252.70556640625,5.0,4252.70556640625 +282,586717899,2530351154,4252.70556640625,5.0,4252.70556640625 +283,10736480880,2302221991,7039.2039794921875,10.0,1811.0041552874782 +284,2302221991,6129833719,7039.2039794921875,10.0,1811.0041552874782 +285,6129833719,2877168526,7039.2039794921875,10.0,1811.0041552874782 +286,2877168526,2877168563,7039.2039794921875,10.0,1811.0041552874782 +287,10736480881,10736480880,6358.58056640625,5.0,810.7581402044414 +288,10736480882,10736480877,4920.7977294921875,10.0,1674.9185865115096 +289,10736480883,10736480882,3222.84130859375,5.0,1243.4170774805802 +290,10736480781,10736480786,130.60971069335938,5.0,103.38608217547454 +291,10736480786,10736480787,3197.3267517089844,10.0,3170.1031231910993 +292,10736480787,10736480794,9374.613861083986,15.0,8990.915116203421 +293,10736480794,10736480795,11991.572113037115,20.0,11607.87336815655 +294,10736480795,10736480804,20403.345550537113,25.0,19534.225315307092 +295,10736480804,10736480815,29994.11508178712,30.0,45894.821883205346 +296,10736480815,6053953119,36448.73129272462,35.0,63635.581202125555 +297,6053953119,7712617551,36448.73129272462,35.0,63635.581202125555 +298,7712617551,7622293230,36448.73129272462,35.0,63635.581202125555 +299,10736480782,7238291279,4814.463765144348,15.0,3810.9612509796734 +300,7238291279,7238291270,4814.463765144348,15.0,3810.9612509796734 +301,7238291270,10736480789,4814.463765144348,15.0,3810.9612509796734 +302,10736480789,7238291217,11216.7015581131,20.0,8878.748929682872 +303,7238291217,10736480788,11216.7015581131,20.0,8878.748929682872 +304,10736480788,7698533592,14169.159321784975,25.0,11215.811307006685 +305,7698533592,10736480796,14169.159321784975,25.0,11215.811307006685 +306,10736480796,7238291342,22425.46010303497,30.0,21725.707126049747 +307,7238291342,10736480806,40143.535298347466,50.0,29552.813141725932 +308,10736480806,10736480805,48947.036274909966,55.0,33441.83238862998 +309,10736480805,1849171627,58681.674946784966,60.0,45833.58518302663 +310,1849171627,10736480816,67589.81752490996,65.0,49610.5578548267 +311,10736480816,10736480884,77441.71303272244,70.0,62151.573274511 +312,10736480884,6130026099,61953.37042617799,56.0,49721.258619608816 +313,6130026099,1950328139,30976.685213088993,28.0,24860.62930980439 +314,6130026099,3494600493,30976.685213088993,28.0,24860.62930980439 +315,10736480783,10736480779,3585.8672075271606,10.0,2838.447155419596 +316,10736480779,10736480782,3585.8672075271606,10.0,2838.447155419596 +317,10736480784,10736480785,1649.352294921875,5.0,1913.9894571471727 +318,10736480785,10736480792,10918.853271484375,10.0,12670.773921436787 +319,10736480792,10736480793,11232.406555175783,15.0,13034.636560781311 +320,10736480793,10736480801,14433.569885253908,20.0,16749.423803773498 +321,10736480801,10736480802,14772.958374023436,25.0,17143.266884710174 +322,10736480802,10736480803,18610.991577148434,30.0,21597.10922608212 +323,10736480803,10736480813,21979.284301757816,35.0,24965.401950691503 +324,10736480813,10736480814,23951.079467773434,40.0,27253.569961265875 +325,10736480814,1906180830,27400.85607910156,45.0,31256.860273423044 +326,10736480790,7238291754,2991.03515625,10.0,1321.3144772507223 +327,7238291754,7281933558,2991.03515625,10.0,1321.3144772507223 +328,7281933558,7238291216,2991.03515625,10.0,1321.3144772507223 +329,7238291216,10736480798,2991.03515625,10.0,1321.3144772507223 +330,10736480798,10736480797,8565.712890625,15.0,3783.974396524931 +331,10736480797,7698533591,17718.0751953125,20.0,7827.106015676187 +332,7698533591,1980828432,17718.0751953125,20.0,7827.106015676187 +333,1980828432,7238291342,17718.0751953125,20.0,7827.106015676187 +334,10736480791,10736480790,1504.0472412109375,5.0,664.4252877230022 +335,10736480799,10736480808,19821.931640624996,15.0,9471.401481133114 +336,10736480808,10563701729,29100.6953125,20.0,13405.51417740067 +337,10563701729,1957952104,29100.6953125,20.0,13405.51417740067 +338,1957952104,1957952128,29100.6953125,20.0,13405.51417740067 +339,1957952128,10563701727,29100.6953125,20.0,13405.51417740067 +340,10563701727,10736480807,29100.6953125,20.0,13405.51417740067 +341,10736480807,10736480819,37346.10253906251,25.0,16901.492995596054 +342,10736480819,10736480885,46334.103515625015,30.0,20319.114619706797 +343,10736480885,10736480818,37067.2828125,24.0,16255.291695765436 +344,10736480818,7284605697,44633.85390625001,28.0,19463.45007330472 +345,7284605697,7304932666,44633.85390625001,28.0,19463.45007330472 +346,7304932666,7284605704,44633.85390625001,28.0,19463.45007330472 +347,7284605704,6784166345,44633.85390625001,28.0,19463.45007330472 +348,10736480800,10736480809,7000.55908203125,5.0,2968.1743537741113 +349,10736480809,10736480799,15900.096191406246,10.0,7738.898288845427 +350,10736480780,10736480783,8.144307136535645,5.0,6.446748885747194 +351,10736480810,10736480821,3724.059852600099,15.0,1988.017843923023 +352,10736480821,10736480820,7078.925331115723,20.0,2502.4562075216418 +353,10736480820,10736480830,14713.311073303217,25.0,5405.375540456737 +354,10736480811,10736480822,128.346923828125,5.0,68.80220105544483 +355,10736480822,10736480810,150.07962799072268,10.0,72.13471523152032 +356,10736480817,1849171627,8908.142578125,5.0,3776.97267180007 +357,10736480823,10736480833,203.3412475585937,5.0,635.1748422393233 diff --git a/tests/test_data/equity_data/expected_result_without_equity.csv b/tests/test_data/equity_data/expected_result_without_equity.csv index 1f5727745..7338fe937 100644 --- a/tests/test_data/equity_data/expected_result_without_equity.csv +++ b/tests/test_data/equity_data/expected_result_without_equity.csv @@ -7,59 +7,59 @@ 5,10736480852,10736480851,55363.38220214845,70.0 6,10736480851,10736480864,59867.650756835945,75.0 7,10736480864,2881407203,64738.23132324219,80.0 -8,2881407203,7189355050,92682.95041656494,190.0 -9,7189355050,7290271353,95339.92746734616,195.0 -10,7290271353,2302221990,95339.92746734616,195.0 -11,2302221990,7187241844,95339.92746734616,195.0 -12,7187241844,2877168563,101486.80246734622,200.0 -13,2877168563,6129873369,108526.00644683838,210.0 -14,6129873369,6129873365,108526.00644683838,210.0 -15,6129873365,6147080221,136972.103981018,240.0 -16,6147080221,10736480854,143187.93796539292,245.0 -17,10736480854,1977410504,149832.4379653928,250.0 -18,1977410504,7118791911,149832.4379653928,250.0 -19,7118791911,6056502120,33278.980268859865,53.0 -20,6056502120,5892440181,33278.980268859865,53.0 -21,5892440181,5892440183,33278.980268859865,53.0 -22,5892440183,7716647983,33278.980268859865,53.0 -23,7716647983,1977414019,33278.980268859865,53.0 -24,1977414019,1977414024,33278.980268859865,53.0 -25,1977414024,6091496733,33278.980268859865,53.0 -26,6091496733,2291073148,33278.980268859865,53.0 -27,2291073148,1848302241,33278.980268859865,53.0 -28,1848302241,7699413914,33278.980268859865,53.0 -29,7699413914,7712547783,33278.980268859865,53.0 -30,7712547783,7622293230,33278.980268859865,53.0 -31,7622293230,10736480826,40568.7265274048,60.0 -32,10736480826,3494600493,45508.83941802979,63.0 -33,3494600493,6130026099,49516.63180084228,65.0 -34,6130026099,10736480884,79463.3701253891,94.0 -35,7118791911,7118791914,119865.95037231443,200.0 -36,7118791914,5520000798,119865.95037231443,200.0 -37,5520000798,7306700091,59932.97518615723,100.0 -38,7306700091,876889487,59932.97518615723,100.0 -39,876889487,5892440173,66823.82909240722,106.0 -40,5892440173,1847768436,66823.82909240722,106.0 -41,1847768436,1977726016,69618.55086975096,109.0 -42,1977726016,1979143905,69618.55086975096,109.0 -43,1979143905,6056409236,69618.55086975096,109.0 -44,6056409236,5675645894,68686.97694396973,108.0 -45,5675645894,1977417695,90948.92467155453,136.0 -46,1977417695,1977416894,90948.92467155453,136.0 -47,1977416894,1977416892,81218.22610073087,123.0 -48,1977416892,10736480828,141480.23351840972,173.0 -49,10736480828,10736480886,145274.78781528468,175.0 -50,10736480886,6784166345,67710.26376285551,81.0 -51,6784166345,7284605704,67710.26376285551,81.0 -52,7284605704,7304932666,67710.26376285551,81.0 -53,7304932666,7284605697,67710.26376285551,81.0 -54,7284605697,10736480818,83793.24925537108,101.0 -55,10736480818,10736480885,85684.89202880858,102.0 -56,5520000798,5891888008,86522.83304195403,129.0 -57,5891888008,5891887996,86522.83304195403,129.0 -58,5891887996,5891887997,34873.97069854737,54.0 -59,5891887997,10736480887,57612.85160121919,78.0 -60,5891887996,10736480888,53538.607265281695,76.0 +8,2881407203,7189355050,89857.7847213745,170.0 +9,7189355050,7290271353,92514.76177215572,175.0 +10,7290271353,2302221990,92514.76177215572,175.0 +11,2302221990,7187241844,92514.76177215572,175.0 +12,7187241844,2877168563,98661.63677215578,180.0 +13,2877168563,6129873369,105700.84075164793,190.0 +14,6129873369,6129873365,105700.84075164793,190.0 +15,6129873365,6147080221,134146.93828582758,220.0 +16,6147080221,10736480854,140362.77227020255,225.0 +17,10736480854,1977410504,147007.27227020243,230.0 +18,1977410504,7118791911,147007.27227020243,230.0 +19,7118791911,6056502120,32713.947129821783,49.0 +20,6056502120,5892440181,32713.947129821783,49.0 +21,5892440181,5892440183,32713.947129821783,49.0 +22,5892440183,7716647983,32713.947129821783,49.0 +23,7716647983,1977414019,32713.947129821783,49.0 +24,1977414019,1977414024,32713.947129821783,49.0 +25,1977414024,6091496733,32713.947129821783,49.0 +26,6091496733,2291073148,32713.947129821783,49.0 +27,2291073148,1848302241,32713.947129821783,49.0 +28,1848302241,7699413914,32713.947129821783,49.0 +29,7699413914,7712547783,32713.947129821783,49.0 +30,7712547783,7622293230,32713.947129821783,49.0 +31,7622293230,10736480826,40003.69338836671,56.0 +32,10736480826,3494600493,44943.8062789917,59.0 +33,3494600493,6130026099,48951.59866180419,61.0 +34,6130026099,10736480884,78898.33698635102,90.0 +35,7118791911,7118791914,117605.81781616207,184.0 +36,7118791914,5520000798,117605.81781616207,184.0 +37,5520000798,7306700091,58802.90890808105,92.0 +38,7306700091,876889487,58802.90890808105,92.0 +39,876889487,5892440173,65693.76281433104,98.0 +40,5892440173,1847768436,65693.76281433104,98.0 +41,1847768436,1977726016,68488.48459167479,101.0 +42,1977726016,1979143905,68488.48459167479,101.0 +43,1979143905,6056409236,68488.48459167479,101.0 +44,6056409236,5675645894,67556.91066589355,100.0 +45,5675645894,1977417695,89818.85839347835,128.0 +46,1977417695,1977416894,89818.85839347835,128.0 +47,1977416894,1977416892,80088.15982265469,115.0 +48,1977416892,10736480828,140350.1672403335,165.0 +49,10736480828,10736480886,144144.72153720853,167.0 +50,10736480886,6784166345,67145.23062381744,77.0 +51,6784166345,7284605704,67145.23062381744,77.0 +52,7284605704,7304932666,67145.23062381744,77.0 +53,7304932666,7284605697,67145.23062381744,77.0 +54,7284605697,10736480818,83228.21611633299,97.0 +55,10736480818,10736480885,85119.85888977049,98.0 +56,5520000798,5891888008,85392.76676387785,121.0 +57,5891888008,5891887996,85392.76676387785,121.0 +58,5891887996,5891887997,34308.93755950928,50.0 +59,5891887997,10736480887,57047.8184621811,74.0 +60,5891887996,10736480888,52973.574126243606,72.0 61,3494600493,5715381571,34270.09380683899,30.0 62,5715381571,5504218401,34270.09380683899,30.0 63,5504218401,5504218399,34270.09380683899,30.0 @@ -175,23 +175,23 @@ 173,1977410537,5892440174,14695.036204147336,20.0 174,5892440174,7306700092,14695.036204147336,20.0 175,7306700092,7306700091,14695.036204147336,20.0 -176,10736480833,10736480834,3124.254089355469,30.0 -177,10736480834,10736480835,3171.9860992431645,35.0 -178,10736480835,10736480836,3948.286270141603,40.0 -179,10736480836,10736480847,5311.489151000976,45.0 -180,10736480847,10736480848,5414.428298950194,50.0 -181,10736480848,10736480849,5578.25047302246,55.0 -182,10736480849,10736480850,6900.764633178709,60.0 -183,10736480850,10736480860,9340.58885192871,65.0 -184,10736480860,10736480861,9417.309013366697,70.0 -185,10736480861,10736480862,11012.228691101069,75.0 -186,10736480862,10736480871,15240.36003875732,80.0 -187,10736480871,10736480872,15493.601112365717,85.0 -188,10736480872,10736480873,16266.620887756339,90.0 -189,10736480873,10736480863,18962.234413146976,95.0 -190,10736480863,10736480874,24057.232460021973,100.0 -191,10736480874,10736480879,27618.42166900635,105.0 -192,10736480879,2881407203,27944.71909332275,110.0 +176,10736480833,10736480834,299.088394165039,10.0 +177,10736480834,10736480835,346.82040405273426,15.0 +178,10736480835,10736480836,1123.120574951172,20.0 +179,10736480836,10736480847,2486.3234558105473,25.0 +180,10736480847,10736480848,2589.262603759766,30.0 +181,10736480848,10736480849,2753.0847778320317,35.0 +182,10736480849,10736480850,4075.5989379882812,40.0 +183,10736480850,10736480860,6515.423156738279,45.0 +184,10736480860,10736480861,6592.143318176268,50.0 +185,10736480861,10736480862,8187.062995910642,55.0 +186,10736480862,10736480871,12415.194343566895,60.0 +187,10736480871,10736480872,12668.435417175291,65.0 +188,10736480872,10736480873,13441.455192565913,70.0 +189,10736480873,10736480863,16137.06871795654,75.0 +190,10736480863,10736480874,21232.066764831547,80.0 +191,10736480874,10736480879,24793.255973815925,85.0 +192,10736480879,2881407203,25119.553398132324,90.0 193,10736480839,1977410546,9299.5478515625,5.0 194,1977410546,1971822799,9299.5478515625,5.0 195,1971822799,1848302348,7439.63828125,4.0 @@ -355,6 +355,5 @@ 353,10736480820,10736480830,14713.311073303217,25.0 354,10736480811,10736480822,128.346923828125,5.0 355,10736480822,10736480810,150.07962799072268,10.0 -356,10736480812,10736480823,2825.1656951904297,20.0 -357,10736480823,10736480833,3028.506942749024,25.0 -358,10736480817,1849171627,8908.142578125,5.0 +356,10736480817,1849171627,8908.142578125,5.0 +357,10736480823,10736480833,203.3412475585937,5.0 From 594d9bcdc45276e4a57e8aeec5b4744560f62337 Mon Sep 17 00:00:00 2001 From: "Carles S. Soriano Perez" Date: Fri, 22 Sep 2023 14:01:43 +0200 Subject: [PATCH 4/5] chore: Removed unused logic (no longer needed) --- .../traffic_analysis/traffic_analysis_base.py | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/ra2ce/analyses/indirect/traffic_analysis/traffic_analysis_base.py b/ra2ce/analyses/indirect/traffic_analysis/traffic_analysis_base.py index 772adde93..3f950ce5c 100644 --- a/ra2ce/analyses/indirect/traffic_analysis/traffic_analysis_base.py +++ b/ra2ce/analyses/indirect/traffic_analysis/traffic_analysis_base.py @@ -109,44 +109,6 @@ def _get_recorded_traffic_in_node( / count_destination_nodes ) - def _get_accumulated_traffic_from_node_list( - self, - nodes_list: list[str], - count_destination_nodes: int, - ) -> AccumulatedTraffic: - # TODO: This algorithm is a consequence of having a 'dirty' graph network. - # This happens when a centroid snaps to more than one origin node. - # Ideally we clean up the graph network so said 'snapping' is only to one node. - _accumulated_traffic = AccumulatedTraffic( - utilitarian=1, egalitarian=1, prioritarian=1 - ) - _intermediate_nodes = 0 - for _node in nodes_list: - if self.destinations_names in _node: - # TODO: This is potentially dangerous as it could make two times a multiplication of the - # accumulated traffic. Example given, nodes [ a, b, c, d], destination_names = b; a and c - # will multiply accumulated traffic, is that correct? - _intermediate_nodes -= 1 - continue - _node_traffic = self._get_accumulated_traffic_from_node( - _node, count_destination_nodes - ) - # Multiplication ( 'operator.mul' or *) or Addition ( 'operator.add' or +) operations to acummulate traffic. - # This will trigger the overloaded methods in `AccumulatedTraffic`. - _acummulated_operator = ( - operator.mul if _intermediate_nodes == 0 else operator.add - ) - _accumulated_traffic = _acummulated_operator( - _accumulated_traffic, _node_traffic - ) - _intermediate_nodes += 1 - - # Set the remainig values - _accumulated_traffic.egalitarian = len( - list(filter(lambda x: self.destinations_names not in x, nodes_list)) - ) - return _accumulated_traffic - @abstractmethod def _get_accumulated_traffic_from_node( self, target_node: str, total_d_nodes: int From 6c2db782e6e58fb5778dd1b76ae9efe27ed3f5a4 Mon Sep 17 00:00:00 2001 From: "Carles S. Soriano Perez" Date: Fri, 22 Sep 2023 19:55:25 +0200 Subject: [PATCH 5/5] chore: Added missing license and removed import of typing utils --- ra2ce/graph/hazard/hazard_common_functions.py | 21 +++++++++++++++++++ ra2ce/graph/hazard/hazard_overlay.py | 9 ++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/ra2ce/graph/hazard/hazard_common_functions.py b/ra2ce/graph/hazard/hazard_common_functions.py index dcb56a8bf..251d4f023 100644 --- a/ra2ce/graph/hazard/hazard_common_functions.py +++ b/ra2ce/graph/hazard/hazard_common_functions.py @@ -1,3 +1,24 @@ +""" + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). + Copyright (C) 2023 Stichting Deltares + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +""" + import logging from pathlib import Path from osgeo import gdal diff --git a/ra2ce/graph/hazard/hazard_overlay.py b/ra2ce/graph/hazard/hazard_overlay.py index 05968e2a6..a00af9ed0 100644 --- a/ra2ce/graph/hazard/hazard_overlay.py +++ b/ra2ce/graph/hazard/hazard_overlay.py @@ -22,7 +22,6 @@ import logging from pathlib import Path -from typing import Any, List, Tuple, Union import geopandas as gpd import networkx as nx @@ -198,7 +197,7 @@ def overlay_hazard_raster_graph( def od_hazard_intersect( self, graph: nx.classes.graph.Graph, ods: gpd.GeoDataFrame - ) -> Tuple[nx.classes.graph.Graph, gpd.GeoDataFrame]: + ) -> tuple[nx.classes.graph.Graph, gpd.GeoDataFrame]: """Overlays the origin and destination locations and edges with the hazard maps Args: @@ -433,8 +432,8 @@ def get_filtered_files(*suffix) -> list[Path]: return _hazard_files def hazard_intersect( - self, to_overlay: Union[gpd.GeoDataFrame, nx.classes.graph.Graph] - ) -> Union[gpd.GeoDataFrame, nx.classes.graph.Graph]: + self, to_overlay: gpd.GeoDataFrame | nx.classes.graph.Graph + ) -> gpd.GeoDataFrame | nx.classes.graph.Graph: """Handler function that chooses the right function for overlaying the network with the hazard data.""" # To improve performance we need to initialize the variables if self.hazard_files["tif"]: @@ -487,7 +486,7 @@ def get_original_geoms_graph(self, graph_original, graph_new): nx.set_edge_attributes(_graph_new, original_geometries, "geometry") return _graph_new.copy() - def _export_network_files(self, graph_name: str, types_to_export: List[str]): + def _export_network_files(self, graph_name: str, types_to_export: list[str]): _exporter = NetworkExporterFactory() _exporter.export( network=self.graphs[graph_name],