139 |
139 |
140 perf.Stop(); |
140 perf.Stop(); |
141 int t = perf.Get(1000000); |
141 int t = perf.Get(1000000); |
142 _total_pf_time_us += t; |
142 _total_pf_time_us += t; |
143 char ttc = Yapf().TransportTypeChar(); |
143 char ttc = Yapf().TransportTypeChar(); |
144 float cache_hit_ratio = (float)m_stats_cache_hits / (float)(m_stats_cache_hits + m_stats_cost_calcs) * 100.0f; |
144 #ifndef NO_DEBUG_MESSAGES |
145 int cost = bDestFound ? m_pBestDestNode->m_cost : -1; |
145 if (_debug_yapf_level >= 3) { |
146 int dist = bDestFound ? m_pBestDestNode->m_estimate - m_pBestDestNode->m_cost : -1; |
146 float cache_hit_ratio = (m_stats_cache_hits == 0) ? 0.0f : ((float)m_stats_cache_hits / (float)(m_stats_cache_hits + m_stats_cost_calcs) * 100.0f); |
147 DEBUG(yapf, 3, "[YAPF%c]%c%4d- %d us - %d rounds - %d open - %d closed - CHR %4.1f%% - c%d(sc%d, ts%d, o%d) -- ", ttc, bDestFound ? '-' : '!', veh_idx, t, m_num_steps, m_nodes.OpenCount(), m_nodes.ClosedCount(), cache_hit_ratio, cost, dist, m_perf_cost.Get(1000000), m_perf_slope_cost.Get(1000000), m_perf_ts_cost.Get(1000000), m_perf_other_cost.Get(1000000)); |
147 int cost = bDestFound ? m_pBestDestNode->m_cost : -1; |
|
148 int dist = bDestFound ? m_pBestDestNode->m_estimate - m_pBestDestNode->m_cost : -1; |
|
149 DEBUG(yapf, 3, "[YAPF%c]%c%4d- %d us - %d rounds - %d open - %d closed - CHR %4.1f%% - c%d(sc%d, ts%d, o%d) -- ", ttc, bDestFound ? '-' : '!', veh_idx, t, m_num_steps, m_nodes.OpenCount(), m_nodes.ClosedCount(), cache_hit_ratio, cost, dist, m_perf_cost.Get(1000000), m_perf_slope_cost.Get(1000000), m_perf_ts_cost.Get(1000000), m_perf_other_cost.Get(1000000)); |
|
150 } |
|
151 #endif //!NO_DEBUG_MESSAGES |
148 return bDestFound; |
152 return bDestFound; |
149 } |
153 } |
150 |
154 |
151 /** If path was found return the best node that has reached the destination. Otherwise |
155 /** If path was found return the best node that has reached the destination. Otherwise |
152 * return the best visited node (which was nearest to the destination). |
156 * return the best visited node (which was nearest to the destination). |