Skip to content

Commit

Permalink
Update the log to report edges disconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
cyang-kth committed Aug 1, 2020
1 parent 6d6fa9c commit d16de75
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mm/fmm/fmm_algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ MatchResult FastMapMatch::match_traj(const Trajectory &traj,
});
std::vector<int> indices;
const std::vector<Edge> &edges = network_.get_edges();
C_Path cpath = ubodt_->construct_complete_path(tg_opath, edges,
C_Path cpath = ubodt_->construct_complete_path(traj.id, tg_opath, edges,
&indices);
SPDLOG_DEBUG("Opath is {}", opath);
SPDLOG_DEBUG("Indices is {}", indices);
Expand Down
4 changes: 3 additions & 1 deletion src/mm/fmm/ubodt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ std::vector<EdgeIndex> UBODT::look_sp_path(NodeIndex source,
return edges;
}

C_Path UBODT::construct_complete_path(const TGOpath &path,
C_Path UBODT::construct_complete_path(int traj_id, const TGOpath &path,
const std::vector<Edge> &edges,
std::vector<int> *indices) const {
C_Path cpath;
Expand All @@ -88,6 +88,8 @@ C_Path UBODT::construct_complete_path(const TGOpath &path,
// No transition exist in UBODT
if (segs.empty() && a->edge->target != b->edge->source) {
SPDLOG_DEBUG("Edges not found connecting a b");
SPDLOG_WARN("Traj {} unmatched as edge {} and {} disconnected",
traj_id, a->edge->id, b->edge->id);
indices->clear();
return C_Path();
}
Expand Down
2 changes: 1 addition & 1 deletion src/mm/fmm/ubodt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class UBODT {
* path implying complete path cannot be found in UBDOT,
* an empty path is returned
*/
C_Path construct_complete_path(const TGOpath &path,
C_Path construct_complete_path(int traj_id, const TGOpath &path,
const std::vector<NETWORK::Edge> &edges,
std::vector<int> *indices) const;
/**
Expand Down

0 comments on commit d16de75

Please sign in to comment.