From 746fb6ac7d7123d7e216bd58137585fb8114cbcb Mon Sep 17 00:00:00 2001
From: Romain BERNARD <romain.bernard@uca.fr>
Date: Wed, 13 Mar 2024 17:49:54 +0100
Subject: [PATCH] add new debug instances

---
 .../cycling_line_debug_instance/graph.dat     | 26 +++++++++++++++++++
 .../graph.dat                                 | 26 +++++++++++++++++++
 test/debug.cpp                                | 19 ++++++++++++++
 3 files changed, 71 insertions(+)
 create mode 100644 resources/test/instances/cycling_line_debug_instance/graph.dat
 create mode 100644 resources/test/instances/multiple_crossing_lines_debug_instance/graph.dat

diff --git a/resources/test/instances/cycling_line_debug_instance/graph.dat b/resources/test/instances/cycling_line_debug_instance/graph.dat
new file mode 100644
index 0000000..4cdc53d
--- /dev/null
+++ b/resources/test/instances/cycling_line_debug_instance/graph.dat
@@ -0,0 +1,26 @@
+#Params (seed)
+123456789
+#Nodes format : status,x,y
+,0,7
+,1,6
+,2,5
+,3,4
+,4,3
+,5,2
+,6,1
+,7,0
+#Edges format : node_in,node_out,length
+0,1,1
+1,2,1
+2,3,2
+2,4,4
+4,5,2
+5,6,3
+6,7,2
+#PT line format : freq (min), start_time, end_time, node_1, ..., node_n
+15,340,560,3,4,5,6
+15,340,560,6,5,4,3
+30,360,580,2,3,4,5,6,7
+30,240,580,7,6,5,4,3,2
+30,290,580,0,4,1
+30,290,580,1,4,0
\ No newline at end of file
diff --git a/resources/test/instances/multiple_crossing_lines_debug_instance/graph.dat b/resources/test/instances/multiple_crossing_lines_debug_instance/graph.dat
new file mode 100644
index 0000000..c12d94a
--- /dev/null
+++ b/resources/test/instances/multiple_crossing_lines_debug_instance/graph.dat
@@ -0,0 +1,26 @@
+#Params (seed)
+123456789
+#Nodes format : status,x,y
+,0,7
+,1,6
+,2,5
+,3,4
+,4,3
+,5,2
+,6,1
+,7,0
+#Edges format : node_in,node_out,length
+0,1,1
+1,2,1
+2,3,2
+2,4,4
+4,5,2
+5,6,3
+6,7,2
+#PT line format : freq (min), start_time, end_time, node_1, ..., node_n
+15,340,560,3,4,5,6,3
+15,340,560,6,5,4,3,6
+30,360,580,2,3,4,5,6,7,2
+30,240,580,7,6,5,4,3,2,7
+30,290,580,0,4,1,0
+30,290,580,1,4,0,1
\ No newline at end of file
diff --git a/test/debug.cpp b/test/debug.cpp
index dfc3ba1..cee738d 100644
--- a/test/debug.cpp
+++ b/test/debug.cpp
@@ -24,5 +24,24 @@ int main() {
             }
         }
     }
+
+    Graph cyclingLinesGraph("../resources/test/instances/cycling_line_debug_instance" + datFile);
+    for(auto& ptLine : cyclingLinesGraph.getPTLines()) {
+        for(int i = 0; i < ptLine.size(); ++i) {
+            for (auto& startingTime: ptLine.getTimetable(i)) {
+                TransitShortestPathPrecompute::executeAlgorithm(cyclingLinesGraph, ptLine.getNode(i),startingTime);
+            }
+        }
+    }
+
+    Graph crossingLinesGraph("../resources/test/instances/multiple_crossing_line_debug_instance" + datFile);
+    for(auto& ptLine : crossingLinesGraph.getPTLines()) {
+        for(int i = 0; i < ptLine.size(); ++i) {
+            for (auto& startingTime: ptLine.getTimetable(i)) {
+                TransitShortestPathPrecompute::executeAlgorithm(crossingLinesGraph, ptLine.getNode(i),startingTime);
+            }
+        }
+    }
+
     return 0;
 }
\ No newline at end of file
-- 
GitLab