00001
00002
00003
00004
00005 #ifndef ROUTEPLANNING_MULTICRITERIAEXPANDEDDIJKSTRA_H_
00006 #define ROUTEPLANNING_MULTICRITERIAEXPANDEDDIJKSTRA_H_
00007 #include <queue>
00008 #include "./Graph.h"
00009 #include "./TransitNetworkExpanded.h"
00010 #include "./Label.h"
00011 #include "./TransitPath.h"
00012 using std::priority_queue;
00013 class MulticriteriaExpandedDijkstra
00014 {
00015 public:
00016 MulticriteriaExpandedDijkstra(TransitNetworkExpanded* transitNetwork);
00017 virtual ~MulticriteriaExpandedDijkstra();
00018 FRIEND_TEST(MultiCriteriaExpandedTest, computeShortestPath);
00019
00020 double computeShortestPath(string startStop, Time time,
00021 string endStop, bool buildPath);
00022
00023
00024 double computeShortestPath(int startStopId, Time startTime, int endStopId,
00025 bool reconstructPath);
00026
00027 vector<pair<NodeExpanded, Edge> > transitShortestPath;
00028 vector <Label> labels;
00029 vector <LabelSet> labelSets;
00030 vector<TransitPath> optimalPaths;
00031 private:
00032 void reconstructShortestPath(const Time& startTime,
00033 const unordered_set<int>& startIds,
00034 const LabelSet& endParitySet);
00035 TransitNetworkExpanded* _transitGraph;
00036 vector<int> _timesFromStart;
00037 priority_queue <pair<int, int>,
00038 std::vector<pair<int, int> >,
00039 std::greater<pair<int, int > > > _openNodeQueue;
00040
00041
00042
00043
00044 vector<bool> _expanded;
00045 };
00046
00047 #endif // ROUTEPLANNING_MULTICRITERIAEXPANDEDDIJKSTRA_H_
00048