21 #ifndef AStarRouterTT_h
22 #define AStarRouterTT_h
65 template<
class E,
class V,
class PF>
76 for (
size_t i = 0; i < noE; i++) {
93 edge(E::dictionary(id)),
132 return nod1->
edge->getNumericalID() > nod2->
edge->getNumericalID();
147 for (
typename std::vector<EdgeInfo*>::iterator i =
myFound.begin(); i !=
myFound.end(); i++) {
155 virtual void compute(
const E* from,
const E* to,
const V*
const vehicle,
156 SUMOTime msTime, std::vector<const E*> &into) {
157 assert(from != 0 && to != 0);
172 const E*
const minEdge = minimumInfo->
edge;
175 myFound.push_back(minimumInfo);
188 const unsigned int length_size = minEdge->getNoFollowing();
189 for (i = 0; i < length_size; i++) {
190 const E*
const follower = minEdge->getFollower(i);
193 if (PF::operator()(follower, vehicle)) {
197 if (!followerInfo->
visited && traveltime < oldEffort) {
199 const SUMOReal heuristic_remaining = minEdge->getDistanceTo(to) / vehicle->getMaxSpeed();
201 followerInfo->
heuristicTime = traveltime + heuristic_remaining;
202 followerInfo->
prev = minimumInfo;
222 for (
typename std::vector<const E*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
223 if (PF::operator()(*i, v)) {
234 std::deque<const E*> tmp;
235 while (rbegin != 0) {
236 tmp.push_front((E*) rbegin->
edge);
237 rbegin = rbegin->
prev;
239 std::copy(tmp.begin(), tmp.end(), std::back_inserter(edges));
259 template<
class E,
class V,
class PF,
class EC>
284 template<
class E,
class V,
class PF>