From 92855f72b1e605711515ee878c16f33e4ae00a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20G=C3=BCndling?= Date: Sat, 20 May 2023 22:12:52 +0200 Subject: [PATCH] update nigiri --- .pkg | 2 +- .pkg.lock | 4 ++-- tools/routing_check.py | 40 ++++++++++++++++++++++------------------ 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/.pkg b/.pkg index 03bd9d486..9103d000e 100644 --- a/.pkg +++ b/.pkg @@ -97,7 +97,7 @@ [nigiri] url=git@github.com:motis-project/nigiri.git branch=master - commit=0e97273c4954294fa10d03c6917fc41fc46d5473 + commit=bb0b0669b1ba52ef364f1962928a8d9a77e4478f [osmium] url=git@github.com:motis-project/libosmium.git branch=master diff --git a/.pkg.lock b/.pkg.lock index 4e123d81c..21f3936a4 100644 --- a/.pkg.lock +++ b/.pkg.lock @@ -1,4 +1,4 @@ -7584788766491314502 +15472054091053223076 cista fce53787252d749727eddf2bfbb40c679b4306ba zlib fe8e13ffca867612951bc6baf114e5ac8b00f305 boost be5235eb2258d2ec19e32546ab767a62311d9b46 @@ -27,7 +27,7 @@ libressl 390253a44ceef00eb620c38606588414326e9f23 net 44674d2f3917e20b7019a0f7254d332522c36fb7 unordered_dense 77e91016354e6d8cba24a86c5abb807de2534c02 wyhash 1e012b57fc2227a9e583a57e2eacb3da99816d99 -nigiri 0e97273c4954294fa10d03c6917fc41fc46d5473 +nigiri bb0b0669b1ba52ef364f1962928a8d9a77e4478f lua 7bb93325b26f84c7e8b51fcbd857361ce7605a1d luabind 9223568bbcf818ecfb1001d49f567627ee10852a tbb 2067af88257710d07253761655a802732a32496e diff --git a/tools/routing_check.py b/tools/routing_check.py index 5323b0e2e..fa3971fb3 100755 --- a/tools/routing_check.py +++ b/tools/routing_check.py @@ -3,8 +3,9 @@ from enum import Enum import subprocess - -routers = ["/routing", "/nigiri"] +generate = False +run_routers = ["/nigiri"] +cmp_routers = ["/routing", "/nigiri"] num_queries = 500 @@ -27,7 +28,7 @@ def cmd(self): ] cmd.extend(["--routers"]) - cmd.extend(routers) + cmd.extend(cmp_routers) cmd.extend(["--query_count", str(num_queries)]) @@ -63,11 +64,13 @@ def cmd(self): file_name = file_name + "_sdest" cmd.extend(["--dest_type", "station"]) - query_files = [f"queries/q_{file_name}-{r[1:]}.txt" for r in routers] - response_files = [f"responses/r_{file_name}-{r[1:]}.txt" for r in routers] + run_query_files = [f"queries/q_{file_name}-{r[1:]}.txt" for r in run_routers] + run_response_files = [f"responses/r_{file_name}-{r[1:]}.txt" for r in run_routers] + cmp_query_files = [f"queries/q_{file_name}-{r[1:]}.txt" for r in cmp_routers] + cmp_response_files = [f"responses/r_{file_name}-{r[1:]}.txt" for r in cmp_routers] cmd.extend(["--out", f"queries/q_{file_name}-TARGET.txt"]) - return cmd, query_files, response_files + return cmd, run_query_files, run_response_files, cmp_query_files, cmp_response_files subprocess.check_call(["mkdir", "-p", "queries", "responses"]) @@ -79,16 +82,17 @@ def cmd(self): q.interalmodal_dest = intermodal_dest q.forward = forward - cmd, query_files, response_files = q.cmd() - print(" ".join(cmd)) - try: - subprocess.check_call(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) - except subprocess.CalledProcessError as e: - print(" ".join(e.cmd)) - print(e.output) - raise e + generate_cmd, run_query_files, run_response_files, cmp_query_files, cmp_response_files = q.cmd() + if generate: + try: + print(" ".join(generate_cmd)) + subprocess.check_call(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + except subprocess.CalledProcessError as e: + print(" ".join(e.cmd)) + print(e.output) + raise e - for query_file, response_file in zip(query_files, response_files): + for query_file, response_file in zip(run_query_files, run_response_files): motis_cmd = [ "./motis", "-c", "input/config.ini", @@ -105,13 +109,13 @@ def cmd(self): compare_cmd = ["./motis", "compare"] compare_cmd.append("--queries") - compare_cmd.extend(query_files) + compare_cmd.extend(cmp_query_files) compare_cmd.append("--responses") - compare_cmd.extend(response_files) + compare_cmd.extend(cmp_response_files) print(" ", " ".join(compare_cmd)) try: subprocess.check_call(compare_cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) except subprocess.CalledProcessError as e: subprocess.run(e.cmd) - raise e \ No newline at end of file + raise e