From e20c74020f66bb1626199021e7ac4f67364c0850 Mon Sep 17 00:00:00 2001 From: Romain BERNARD <romain.bernard@uca.fr> Date: Mon, 23 Sep 2024 13:30:31 +0200 Subject: [PATCH] Add basic debug instances for invalid entry/exit (TODO: add requests variants with some successes and some fails) --- .../debug unfulfilled entry/graph.dat | 20 +++++++++++++++++++ .../debug unfulfilled entry/requests.dat | 4 ++++ .../debug unfulfilled exit/graph.dat | 19 ++++++++++++++++++ .../debug unfulfilled exit/requests.dat | 4 ++++ .../Heuristics/MultimodalModularHeuristic.h | 2 +- .../Multimodal/Heuristics/TransitAccess.h | 2 +- src/utils/Globals.h | 2 +- 7 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 resources/test/instances/MultimodalHeuristic/debug unfulfilled entry/graph.dat create mode 100644 resources/test/instances/MultimodalHeuristic/debug unfulfilled entry/requests.dat create mode 100644 resources/test/instances/MultimodalHeuristic/debug unfulfilled exit/graph.dat create mode 100644 resources/test/instances/MultimodalHeuristic/debug unfulfilled exit/requests.dat diff --git a/resources/test/instances/MultimodalHeuristic/debug unfulfilled entry/graph.dat b/resources/test/instances/MultimodalHeuristic/debug unfulfilled entry/graph.dat new file mode 100644 index 0000000..f2ab163 --- /dev/null +++ b/resources/test/instances/MultimodalHeuristic/debug unfulfilled entry/graph.dat @@ -0,0 +1,20 @@ +#Params (seed) +123456789 +#Nodes format : status (work, leisure, residential),x,y +,0,0 +,8,4 +,1,1 +,3,3 +#Edges start,end,length +0,1,60 +0,2,60 +0,3,20 +1,0,5 +1,3,15 +2,3,5 +3,0,20 +#PT line fixed +1,2 +10,15 +20,25 +30,35 \ No newline at end of file diff --git a/resources/test/instances/MultimodalHeuristic/debug unfulfilled entry/requests.dat b/resources/test/instances/MultimodalHeuristic/debug unfulfilled entry/requests.dat new file mode 100644 index 0000000..308a1af --- /dev/null +++ b/resources/test/instances/MultimodalHeuristic/debug unfulfilled entry/requests.dat @@ -0,0 +1,4 @@ +#Global Params (delta ratio) +1 +#Requests (origin_idx,destination_idx,min_tw_start,max_tw_start,min_tw_end,max_tw_end,delta_time,capacity) +0,3,10,30,40,60,,1 \ No newline at end of file diff --git a/resources/test/instances/MultimodalHeuristic/debug unfulfilled exit/graph.dat b/resources/test/instances/MultimodalHeuristic/debug unfulfilled exit/graph.dat new file mode 100644 index 0000000..ea282ec --- /dev/null +++ b/resources/test/instances/MultimodalHeuristic/debug unfulfilled exit/graph.dat @@ -0,0 +1,19 @@ +#Params (seed) +123456789 +#Nodes format : status (work, leisure, residential),x,y +,0,0 +,8,4 +,1,1 +,3,3 +#Edges start,end,length +0,2,10 +0,3,20 +1,0,5 +1,3,15 +2,3,5 +3,0,20 +#PT line fixed +1,2 +10,15 +20,25 +30,35 \ No newline at end of file diff --git a/resources/test/instances/MultimodalHeuristic/debug unfulfilled exit/requests.dat b/resources/test/instances/MultimodalHeuristic/debug unfulfilled exit/requests.dat new file mode 100644 index 0000000..308a1af --- /dev/null +++ b/resources/test/instances/MultimodalHeuristic/debug unfulfilled exit/requests.dat @@ -0,0 +1,4 @@ +#Global Params (delta ratio) +1 +#Requests (origin_idx,destination_idx,min_tw_start,max_tw_start,min_tw_end,max_tw_end,delta_time,capacity) +0,3,10,30,40,60,,1 \ No newline at end of file diff --git a/src/algorithm/Multimodal/Heuristics/MultimodalModularHeuristic.h b/src/algorithm/Multimodal/Heuristics/MultimodalModularHeuristic.h index 97e5805..46242b3 100644 --- a/src/algorithm/Multimodal/Heuristics/MultimodalModularHeuristic.h +++ b/src/algorithm/Multimodal/Heuristics/MultimodalModularHeuristic.h @@ -66,7 +66,7 @@ private: std::vector<size_t> _darpRequestList; //Add friend test classes to test inner workings without making the whole API public - FRIEND_TEST(MultimodalInsertionHeuristicDebug, DebugBaseInstance); + FRIEND_TEST(MultimodalInsertionHeuristicDebug, DebugPTInstance); FRIEND_TEST(MultimodalInsertionHeuristicDebug, DebugInstanceAlain); //Public interface to interact with the modular heuristic diff --git a/src/algorithm/Multimodal/Heuristics/TransitAccess.h b/src/algorithm/Multimodal/Heuristics/TransitAccess.h index a1ec4f6..c59a121 100644 --- a/src/algorithm/Multimodal/Heuristics/TransitAccess.h +++ b/src/algorithm/Multimodal/Heuristics/TransitAccess.h @@ -1,5 +1,5 @@ // -// Created by Bebs on 24/07/2024. +// Created by Romain on 24/07/2024. // #ifndef GREEDYALGORITHM_TRANSITACCESS_H diff --git a/src/utils/Globals.h b/src/utils/Globals.h index 88a94e0..3beb725 100644 --- a/src/utils/Globals.h +++ b/src/utils/Globals.h @@ -1,5 +1,5 @@ // -// Created by Bebs on 19/07/2024. +// Created by Romain on 19/07/2024. // #ifndef GREEDYALGORITHM_GLOBALS_H -- GitLab