diff --git a/resources/test/instances/cycling_line_debug_instance/graph.dat b/resources/test/instances/cycling_line_debug_instance/graph.dat index 4cdc53d46a0ce446b94b1fc38095bc17da27a63f..5e6abe119b0ab7da31d6ccb70cbe31df50740e35 100644 --- a/resources/test/instances/cycling_line_debug_instance/graph.dat +++ b/resources/test/instances/cycling_line_debug_instance/graph.dat @@ -18,9 +18,4 @@ 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 +30,240,580,7,6,7,5,4,3,2,7 \ 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 index c12d94a45bd4f63af8380d65c34451e074e13bb1..4cdc53d46a0ce446b94b1fc38095bc17da27a63f 100644 --- a/resources/test/instances/multiple_crossing_lines_debug_instance/graph.dat +++ b/resources/test/instances/multiple_crossing_lines_debug_instance/graph.dat @@ -18,9 +18,9 @@ 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 +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_cycling_lines_debug_instance/graph.dat b/resources/test/instances/multiple_cycling_lines_debug_instance/graph.dat new file mode 100644 index 0000000000000000000000000000000000000000..6b69917d8c38621cb98042260a55f1ca8514ebad --- /dev/null +++ b/resources/test/instances/multiple_cycling_lines_debug_instance/graph.dat @@ -0,0 +1,27 @@ +#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,240,580,7,6,7,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/resources/test/instances/single_node_lines_debug_instance/graph.dat b/resources/test/instances/single_node_lines_debug_instance/graph.dat new file mode 100644 index 0000000000000000000000000000000000000000..971382ad792e295ece30769a3cbe3a436be5c70a --- /dev/null +++ b/resources/test/instances/single_node_lines_debug_instance/graph.dat @@ -0,0 +1,23 @@ +#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,3,3,3,3,3,3,3,3 +15,340,560,7,7,7,7,7,7,7,7 +30,360,580,2,3,4,5,6,7 \ No newline at end of file diff --git a/test/debug.cpp b/test/debug.cpp index 3ae878df07b7b2983d8d65e189240e8f2471337e..999d44cf10d3e3e11589bf46b9eab675587edd2f 100644 --- a/test/debug.cpp +++ b/test/debug.cpp @@ -25,20 +25,30 @@ int main() { } } - Graph cyclingLinesGraph("../resources/test/instances/cycling_line_debug_instance/" + datFile); - for(auto& ptLine : cyclingLinesGraph.getPTLines()) { + Graph crossingLinesGraph("../resources/test/instances/multiple_crossing_lines_debug_instance/" + datFile); + for(auto& ptLine : crossingLinesGraph.getPTLines()) { for(int i = 0; i < ptLine.size(); ++i) { for (auto& startingTime: ptLine.getTimetable(i)) { - TransitShortestPathPrecompute::executeAlgorithm(cyclingLinesGraph, ptLine.getNode(i),startingTime); + TransitShortestPathPrecompute::executeAlgorithm(crossingLinesGraph, ptLine.getNode(i),startingTime); } } } - Graph crossingLinesGraph("../resources/test/instances/multiple_crossing_lines_debug_instance/" + datFile); - for(auto& ptLine : crossingLinesGraph.getPTLines()) { + Graph cyclingLineGraph("../resources/test/instances/cycling_line_debug_instance/" + datFile); + for(auto& ptLine : cyclingLineGraph.getPTLines()) { for(int i = 0; i < ptLine.size(); ++i) { for (auto& startingTime: ptLine.getTimetable(i)) { - TransitShortestPathPrecompute::executeAlgorithm(crossingLinesGraph, ptLine.getNode(i),startingTime); + TransitShortestPathPrecompute::executeAlgorithm(cyclingLineGraph, ptLine.getNode(i),startingTime); + } + } + } + + + Graph multipleCyclingLinesGraph("../resources/test/instances/multiple_cycling_lines_debug_instance/" + datFile); + for(auto& ptLine : multipleCyclingLinesGraph.getPTLines()) { + for(int i = 0; i < ptLine.size(); ++i) { + for (auto& startingTime: ptLine.getTimetable(i)) { + TransitShortestPathPrecompute::executeAlgorithm(multipleCyclingLinesGraph, ptLine.getNode(i),startingTime); } } }