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);
151 size_t numberOfVisitedFromEdges = 0;
152 bool minIsFromEdge =
false;
153#ifdef CSPT_DEBUG_LEVEL_0
154 size_t numberOfTouchedSupercellEdges = 0;
159 const bool mayRevisit =
true;
165 const E*
const minEdge = minimumInfo->
edge;
166 assert(!minEdge->isInternal());
168 if (minimumInfo->
visited || numberOfVisitedFromEdges < fromEdges.size()) {
169 minIsFromEdge = incomingEdgesOfOutgoingBoundaryEdges.find(minEdge) != incomingEdgesOfOutgoingBoundaryEdges.end();
171 minIsFromEdge =
false;
174 if (numberOfVisitedFromEdges < fromEdges.size()) {
175 numberOfVisitedFromEdges++;
178 assert(incomingEdgesOfOutgoingBoundaryEdges.size() == fromEdges.size());
179 assert(minimumArcInfo->
key != std::numeric_limits<double>::max() && minimumArcInfo->
key !=
UNREACHABLE);
181#ifdef CSPT_DEBUG_LEVEL_0
182 if (supercell->
contains(minEdge->getToJunction())) {
184 if (!minimumArcInfo->
touched) {
185 numberOfTouchedSupercellEdges++;
186 minimumArcInfo->
touched =
true;
190#ifdef CSPT_DEBUG_LEVEL_0
191 if (num_visited % 500 == 0) {
192 std::cout <<
"num_visited: " << num_visited <<
", numberOfTouchedSupercellEdges: " << numberOfTouchedSupercellEdges
193 <<
", minimumArcInfo->key: " << minimumArcInfo->
key << std::endl;
198 myFound.push_back(minimumInfo);
204 for (
const std::pair<const E*, const E*>& follower : minEdge->getViaSuccessors(vClass)) {
205 assert(!follower.first->isInternal());
206 bool wasPushedToHeap =
false;
207 auto& followerInfo =
myEdgeInfos[follower.first->getNumericalID()];
210 if (followerInfo.prohibited ||
isProhibited(follower.first, vehicle)) {
218 assert(!supercell->
contains(follower.first->getToJunction()));
223 double key = std::numeric_limits<double>::max();
225 bool hasImproved =
false;
230 if (minIsFromEdge && (incomingEdgesOfOutgoingBoundaryEdges.at(minEdge))[index]) {
233 assert((incomingEdgesOfOutgoingBoundaryEdges.at(minEdge)).size()
235 const std::vector<std::pair<const E*, const E*>>& followersOfIncomingEdge
236 = ((incomingEdgesOfOutgoingBoundaryEdges.at(minEdge))[index])->getViaSuccessors(vClass);
238 bool turningAllowed =
false;
239 for (std::pair<const E*, const E*> followerOfIncomingEdge : followersOfIncomingEdge) {
240 if (follower.first == followerOfIncomingEdge.first) {
241 turningAllowed =
true;
248 if (!turningAllowed) {
258 double time = leaveTime;
259 myEffortProvider->updateViaEdgeCost(follower.second, vehicle, time, effortToFollower, length);
260 if (effortToFollower < key) {
261 key = effortToFollower;
264 if (oldEffort != std::numeric_limits<double>::max()) {
265 wasPushedToHeap =
true;
268 if ((!followerInfo.visited || mayRevisit)
269 && effortToFollower < oldEffort) {
278 followerArcInfo->
key = key;
279 if (!wasPushedToHeap) {
295#ifdef CSPT_DEBUG_LEVEL_0
296 std::cout <<
"centralizedSPTree finished (queue empty)." << std::endl;