PGROUTING
3.2
|
#include "pgr_ksp.hpp"
Classes | |
class | Visitor |
Public Member Functions | |
Pgr_ksp () | |
~Pgr_ksp () | |
void | clear () |
std::string | get_error () const |
get_error More... | |
std::string | get_log () const |
get_log More... | |
std::string | get_notice () const |
get_notice More... | |
bool | has_error () const |
get_error More... | |
std::deque< Path > | Yen (G &graph, int64_t start_vertex, int64_t end_vertex, size_t K, bool heap_paths) |
Public Attributes | |
std::ostringstream | error |
Stores the error information. More... | |
std::ostringstream | log |
Stores the hint information. More... | |
std::ostringstream | notice |
Stores the notice information. More... | |
Protected Member Functions | |
void | executeYen (G &graph) |
the actual algorithm More... | |
Private Types | |
typedef std::set< Path, compPathsLess > | pSet |
typedef G::V | V |
members | |
V | v_source |
source descriptor More... | |
V | v_target |
target descriptor More... | |
int64_t | m_start |
source id More... | |
int64_t | m_end |
target id More... | |
size_t | m_K |
bool | m_heap_paths |
Path | curr_result_path |
storage for the current result More... | |
pSet | m_ResultSet |
ordered set of shortest paths More... | |
pSet | m_Heap |
the heap More... | |
Visitor * | m_vis |
Definition at line 47 of file pgr_ksp.hpp.
|
private |
Definition at line 49 of file pgr_ksp.hpp.
|
private |
Definition at line 48 of file pgr_ksp.hpp.
|
inline |
Definition at line 52 of file pgr_ksp.hpp.
References pgrouting::yen::Pgr_ksp< G >::m_vis.
|
inline |
Definition at line 57 of file pgr_ksp.hpp.
References pgrouting::yen::Pgr_ksp< G >::m_vis.
|
inline |
Definition at line 104 of file pgr_ksp.hpp.
References pgrouting::yen::Pgr_ksp< G >::m_Heap, and pgrouting::yen::Pgr_ksp< G >::m_ResultSet.
Referenced by pgrouting::yen::Pgr_turnRestrictedPath< G >::clear(), pgrouting::yen::Pgr_ksp< G >::executeYen(), and pgrouting::yen::Pgr_ksp< G >::Yen().
|
inlineprotected |
Performs the next cycle of the algorithm.
Definition at line 163 of file pgr_ksp.hpp.
References Path::appendPath(), pgrouting::yen::Pgr_ksp< G >::curr_result_path, pgrouting::Pgr_dijkstra< G >::dijkstra(), Path::getSubpath(), pgrouting::yen::Pgr_ksp< G >::m_end, pgrouting::yen::Pgr_ksp< G >::m_Heap, pgrouting::yen::Pgr_ksp< G >::m_ResultSet, pgrouting::yen::Pgr_ksp< G >::m_vis, pgrouting::yen::Pgr_ksp< G >::Visitor::on_insert_to_heap(), pgrouting::yen::Pgr_ksp< G >::removeVertices(), and Path::size().
Referenced by pgrouting::yen::Pgr_ksp< G >::executeYen().
|
inlineprotected |
the actual algorithm
Definition at line 126 of file pgr_ksp.hpp.
References pgrouting::yen::Pgr_ksp< G >::clear(), pgrouting::yen::Pgr_ksp< G >::curr_result_path, pgrouting::yen::Pgr_ksp< G >::doNextCycle(), pgrouting::yen::Pgr_ksp< G >::getFirstSolution(), pgrouting::yen::Pgr_ksp< G >::m_Heap, pgrouting::yen::Pgr_ksp< G >::m_K, pgrouting::yen::Pgr_ksp< G >::m_ResultSet, pgrouting::yen::Pgr_ksp< G >::m_vis, pgrouting::yen::Pgr_ksp< G >::Visitor::on_insert_first_solution(), and Path::recalculate_agg_cost().
Referenced by pgrouting::yen::Pgr_ksp< G >::Yen(), and pgrouting::yen::Pgr_turnRestrictedPath< G >::Yen().
|
inherited |
get_error
Definition at line 53 of file pgr_messages.cpp.
References pgrouting::Pgr_messages::error.
Referenced by do_pgr_many_withPointsDD(), do_pgr_pickDeliver(), do_pgr_pickDeliverEuclidean(), do_pgr_withPoints(), do_pgr_withPointsKsp(), and pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver().
|
inherited |
get_log
Definition at line 36 of file pgr_messages.cpp.
References pgrouting::Pgr_messages::log.
Referenced by do_pgr_bipartite(), do_pgr_boyerMyrvold(), do_pgr_LTDTree(), do_pgr_makeConnected(), do_pgr_many_withPointsDD(), do_pgr_pickDeliver(), do_pgr_pickDeliverEuclidean(), do_pgr_withPoints(), do_pgr_withPointsKsp(), pgr_bellman_ford(), pgr_dijkstraTR(), and pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver().
|
inherited |
get_notice
Definition at line 42 of file pgr_messages.cpp.
References pgrouting::Pgr_messages::notice.
|
inlineprotected |
Definition at line 200 of file pgr_ksp.hpp.
References pgrouting::yen::Pgr_ksp< G >::m_Heap, pgrouting::yen::Pgr_ksp< G >::m_heap_paths, pgrouting::yen::Pgr_ksp< G >::m_ResultSet, and pgassert.
Referenced by pgrouting::yen::Pgr_ksp< G >::Yen(), and pgrouting::yen::Pgr_turnRestrictedPath< G >::Yen().
|
inlineprotected |
Performs the first Dijkstra of the algorithm.
Definition at line 148 of file pgr_ksp.hpp.
References pgrouting::Pgr_dijkstra< G >::dijkstra(), Path::empty(), pgrouting::yen::Pgr_ksp< G >::m_end, pgrouting::yen::Pgr_ksp< G >::m_ResultSet, pgrouting::yen::Pgr_ksp< G >::m_start, and Path::recalculate_agg_cost().
Referenced by pgrouting::yen::Pgr_ksp< G >::executeYen().
|
inherited |
get_error
Definition at line 48 of file pgr_messages.cpp.
References pgrouting::Pgr_messages::error.
Referenced by do_pgr_many_withPointsDD(), do_pgr_withPoints(), and do_pgr_withPointsKsp().
|
inlineprotected |
stores in subPath the first i elements of path
Definition at line 195 of file pgr_ksp.hpp.
Referenced by pgrouting::yen::Pgr_ksp< G >::doNextCycle().
|
inline |
Definition at line 61 of file pgr_ksp.hpp.
References pgrouting::yen::Pgr_ksp< G >::clear(), pgrouting::yen::Pgr_ksp< G >::executeYen(), pgrouting::yen::Pgr_ksp< G >::get_results(), pgrouting::yen::Pgr_ksp< G >::m_end, pgrouting::yen::Pgr_ksp< G >::m_heap_paths, pgrouting::yen::Pgr_ksp< G >::m_K, pgrouting::yen::Pgr_ksp< G >::m_start, pgrouting::yen::Pgr_ksp< G >::v_source, and pgrouting::yen::Pgr_ksp< G >::v_target.
Referenced by do_pgr_ksp(), and do_pgr_withPointsKsp().
|
protected |
storage for the current result
Definition at line 229 of file pgr_ksp.hpp.
Referenced by pgrouting::yen::Pgr_ksp< G >::doNextCycle(), and pgrouting::yen::Pgr_ksp< G >::executeYen().
|
mutableinherited |
Stores the error information.
Definition at line 85 of file pgr_messages.h.
Referenced by pgrouting::vrp::Fleet::build_fleet(), pgrouting::Pg_points_graph::check_points(), pgrouting::Pgr_messages::clear(), pgrouting::Pg_points_graph::create_new_edges(), pgrouting::Pgr_messages::get_error(), pgrouting::Pgr_messages::has_error(), pgrouting::vrp::Fleet::is_fleet_ok(), and pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver().
|
mutableinherited |
Stores the hint information.
Definition at line 81 of file pgr_messages.h.
Referenced by pgrouting::vrp::Fleet::add_vehicle(), Pgr_bellman_ford< G >::bellman_ford(), Pgr_bellman_ford< G >::bellman_ford_1_to_1(), Pgr_bellman_ford< G >::bellman_ford_1_to_many(), pgrouting::alphashape::Pgr_alphaShape::build_best_alpha(), pgrouting::vrp::Fleet::build_fleet(), pgrouting::Pg_points_graph::check_points(), pgrouting::Pgr_messages::clear(), pgrouting::Pg_points_graph::create_new_edges(), pgrouting::vrp::Vehicle_pickDeliver::do_while_feasable(), pgrouting::vrp::Initial_solution::do_while_foo(), pgrouting::functions::Pgr_makeConnected< G >::generatemakeConnected(), pgrouting::Pgr_messages::get_log(), Pgr_bellman_ford< G >::get_paths(), pgrouting::vrp::Pgr_pickDeliver::get_postgres_result(), pgrouting::vrp::Vehicle::get_postgres_result(), pgrouting::vrp::Fleet::get_truck(), pgrouting::vrp::Optimize::inter_swap(), pgrouting::vrp::Fleet::is_fleet_ok(), pgrouting::vrp::Initial_solution::one_truck_all_orders(), pgrouting::vrp::Optimize::Optimize(), pgrouting::Pg_points_graph::Pg_points_graph(), pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver(), pgrouting::vrp::Optimize::save_if_best(), pgrouting::vrp::Solution::Solution(), pgrouting::vrp::Pgr_pickDeliver::solve(), and pgrouting::vrp::Vehicle::Vehicle().
|
protected |
target id
Definition at line 225 of file pgr_ksp.hpp.
Referenced by pgrouting::yen::Pgr_ksp< G >::doNextCycle(), pgrouting::yen::Pgr_ksp< G >::getFirstSolution(), pgrouting::yen::Pgr_ksp< G >::Yen(), and pgrouting::yen::Pgr_turnRestrictedPath< G >::Yen().
|
protected |
the heap
Definition at line 232 of file pgr_ksp.hpp.
Referenced by pgrouting::yen::Pgr_ksp< G >::clear(), pgrouting::yen::Pgr_ksp< G >::doNextCycle(), pgrouting::yen::Pgr_ksp< G >::executeYen(), pgrouting::yen::Pgr_ksp< G >::get_results(), and pgrouting::yen::Pgr_turnRestrictedPath< G >::turnRestrictedPath().
|
protected |
Definition at line 227 of file pgr_ksp.hpp.
Referenced by pgrouting::yen::Pgr_ksp< G >::get_results(), and pgrouting::yen::Pgr_ksp< G >::Yen().
|
protected |
Definition at line 226 of file pgr_ksp.hpp.
Referenced by pgrouting::yen::Pgr_ksp< G >::executeYen(), pgrouting::yen::Pgr_ksp< G >::Yen(), and pgrouting::yen::Pgr_turnRestrictedPath< G >::Yen().
|
protected |
ordered set of shortest paths
Definition at line 231 of file pgr_ksp.hpp.
Referenced by pgrouting::yen::Pgr_ksp< G >::clear(), pgrouting::yen::Pgr_ksp< G >::doNextCycle(), pgrouting::yen::Pgr_ksp< G >::executeYen(), pgrouting::yen::Pgr_ksp< G >::get_results(), pgrouting::yen::Pgr_ksp< G >::getFirstSolution(), and pgrouting::yen::Pgr_turnRestrictedPath< G >::turnRestrictedPath().
|
protected |
source id
Definition at line 224 of file pgr_ksp.hpp.
Referenced by pgrouting::yen::Pgr_ksp< G >::getFirstSolution(), pgrouting::yen::Pgr_ksp< G >::Yen(), and pgrouting::yen::Pgr_turnRestrictedPath< G >::Yen().
|
protected |
Definition at line 234 of file pgr_ksp.hpp.
Referenced by pgrouting::yen::Pgr_ksp< G >::doNextCycle(), pgrouting::yen::Pgr_ksp< G >::executeYen(), pgrouting::yen::Pgr_ksp< G >::Pgr_ksp(), pgrouting::yen::Pgr_turnRestrictedPath< G >::Yen(), and pgrouting::yen::Pgr_ksp< G >::~Pgr_ksp().
|
mutableinherited |
Stores the notice information.
Definition at line 83 of file pgr_messages.h.
Referenced by pgrouting::Pgr_messages::clear(), and pgrouting::Pgr_messages::get_notice().
|
protected |
source descriptor
Definition at line 222 of file pgr_ksp.hpp.
Referenced by pgrouting::yen::Pgr_ksp< G >::Yen(), and pgrouting::yen::Pgr_turnRestrictedPath< G >::Yen().
|
protected |
target descriptor
Definition at line 223 of file pgr_ksp.hpp.
Referenced by pgrouting::yen::Pgr_ksp< G >::Yen(), and pgrouting::yen::Pgr_turnRestrictedPath< G >::Yen().