139 const std::map<
const E*, std::vector<const E*>>& incomingEdgesOfOutgoingBoundaryEdges,
140 bool silent =
false) {
141 assert(cell !=
nullptr);
143 if (fromEdges.empty()) {
148 std::vector<const E*> fromEdgesAsVector(fromEdges.begin(), fromEdges.end());
149 init(fromEdgesAsVector, vehicle, msTime);
150 size_t numberOfVisitedFromEdges = 0;
151 bool minIsFromEdge =
false;
152#ifdef CSPT_DEBUG_LEVEL_0
153 size_t numberOfTouchedSupercellEdges = 0;
159 const bool mayRevisit =
true;
162#ifdef CSPT_DEBUG_LEVEL_0
167 const E*
const minEdge = minimumInfo->
edge;
168 assert(!minEdge->isInternal());
170 if (minimumInfo->
visited || numberOfVisitedFromEdges < fromEdges.size()) {
171 minIsFromEdge = incomingEdgesOfOutgoingBoundaryEdges.find(minEdge) != incomingEdgesOfOutgoingBoundaryEdges.end();
173 minIsFromEdge =
false;
176 if (numberOfVisitedFromEdges < fromEdges.size()) {
177 numberOfVisitedFromEdges++;
180 assert(incomingEdgesOfOutgoingBoundaryEdges.size() == fromEdges.size());
181 assert(minimumArcInfo->
key != std::numeric_limits<double>::max() && minimumArcInfo->
key !=
UNREACHABLE);
183#ifdef CSPT_DEBUG_LEVEL_0
184 if (supercell->
contains(minEdge->getToJunction())) {
186 if (!minimumArcInfo->
touched) {
187 numberOfTouchedSupercellEdges++;
188 minimumArcInfo->
touched =
true;
192#ifdef CSPT_DEBUG_LEVEL_0
193 if (num_visited % 500 == 0) {
194 std::cout <<
"num_visited: " << num_visited <<
", numberOfTouchedSupercellEdges: " << numberOfTouchedSupercellEdges
195 <<
", minimumArcInfo->key: " << minimumArcInfo->
key << std::endl;
200 myFound.push_back(minimumInfo);
206 for (
const std::pair<const E*, const E*>& follower : minEdge->getViaSuccessors(vClass)) {
207 assert(!follower.first->isInternal());
208 bool wasPushedToHeap =
false;
209 auto& followerInfo =
myEdgeInfos[follower.first->getNumericalID()];
212 if (followerInfo.prohibited ||
isProhibited(follower.first, vehicle)) {
220 assert(!supercell->
contains(follower.first->getToJunction()));
225 double key = std::numeric_limits<double>::max();
227 bool hasImproved =
false;
232 if (minIsFromEdge && (incomingEdgesOfOutgoingBoundaryEdges.at(minEdge))[index]) {
235 assert((incomingEdgesOfOutgoingBoundaryEdges.at(minEdge)).size()
237 const std::vector<std::pair<const E*, const E*>>& followersOfIncomingEdge
238 = ((incomingEdgesOfOutgoingBoundaryEdges.at(minEdge))[index])->getViaSuccessors(vClass);
240 bool turningAllowed =
false;
241 for (std::pair<const E*, const E*> followerOfIncomingEdge : followersOfIncomingEdge) {
242 if (follower.first == followerOfIncomingEdge.first) {
243 turningAllowed =
true;
250 if (!turningAllowed) {
260 double time = leaveTime;
261 myEffortProvider->updateViaEdgeCost(follower.second, vehicle, time, effortToFollower, length);
262 if (effortToFollower < key) {
263 key = effortToFollower;
266 if (oldEffort != std::numeric_limits<double>::max()) {
267 wasPushedToHeap =
true;
270 if ((!followerInfo.visited || mayRevisit)
271 && effortToFollower < oldEffort) {
280 followerArcInfo->
key = key;
281 if (!wasPushedToHeap) {
297#ifdef CSPT_DEBUG_LEVEL_0
298 std::cout <<
"centralizedSPTree finished (queue empty)." << std::endl;