diff --git a/include/heuristic/HeuristicMapper.hpp b/include/heuristic/HeuristicMapper.hpp index 32c4132c9..da3ce8aff 100644 --- a/include/heuristic/HeuristicMapper.hpp +++ b/include/heuristic/HeuristicMapper.hpp @@ -339,8 +339,10 @@ inline bool operator<(const HeuristicMapper::Node& x, inline bool operator>(const HeuristicMapper::Node& x, const HeuristicMapper::Node& y) { - const auto xcost = static_cast(x.costFixed) + x.lookaheadPenalty; - const auto ycost = static_cast(y.costFixed) + y.lookaheadPenalty; + const auto xcost = + static_cast(x.costFixed) + x.lookaheadPenalty + x.costHeur; + const auto ycost = + static_cast(y.costFixed) + y.lookaheadPenalty + y.costHeur; if (std::abs(xcost - ycost) > 1e-6) { return xcost > ycost; }