PGROUTING
3.2
|
#include "fleet.h"
Public Types | |
typedef std::vector< Vehicle_pickDeliver >::iterator | iterator |
Public Member Functions | |
Vehicle_pickDeliver | get_truck () |
Vehicle_pickDeliver | get_truck (size_t order) |
bool | is_fleet_ok () const |
bool | is_order_ok (const Order &order) const |
Given an order, Cycle trhugh all the trucks to verify if the order can be served by at least one truck. More... | |
Fleet & | operator= (const Fleet &fleet) |
void | set_compatibles (const PD_Orders &orders) |
constructor | |
Fleet ()=default | |
Fleet (const std::vector< Vehicle_t > &vehicles, double factor) | |
Fleet (const Fleet &fleet) | |
vector like functions | |
size_t | size () const |
Vehicle_pickDeliver & | operator[] (size_t i) |
iterator | begin () |
iterator | end () |
Private Member Functions | |
void | add_vehicle (Vehicle_t, double factor, const Vehicle_node &, const Vehicle_node &) |
bool | build_fleet (std::vector< Vehicle_t > vehicles, double factor) |
build the fleet More... | |
Static Private Member Functions | |
static Pgr_messages & | msg () |
the problem message More... | |
Private Attributes | |
std::vector< Vehicle_pickDeliver > | m_trucks |
Identifiers< size_t > | m_un_used |
Identifiers< size_t > | m_used |
Static Private Attributes | |
static Pgr_pickDeliver * | problem |
The problem. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &log, const Fleet &v) |
class | PD_problem |
typedef std::vector<Vehicle_pickDeliver>::iterator pgrouting::vrp::Fleet::iterator |
|
default |
pgrouting::vrp::Fleet::Fleet | ( | const std::vector< Vehicle_t > & | vehicles, |
double | factor | ||
) |
pgrouting::vrp::Fleet::Fleet | ( | const Fleet & | fleet | ) |
|
private |
Definition at line 122 of file fleet.cpp.
References Vehicle_t::cant_v, Vehicle_t::capacity, pgrouting::vrp::Tw_node::closes(), Vehicle_t::id, pgrouting::vrp::Tw_node::is_end(), pgrouting::vrp::Tw_node::is_start(), pgrouting::Pgr_messages::log, m_trucks, msg(), pgrouting::vrp::Tw_node::opens(), pgassert, and Vehicle_t::speed.
Referenced by build_fleet().
|
inline |
|
private |
build the fleet
builds a fleet from a vector of Vehicle_t
[in] | vehicles | of type Vehicle_t |
[in] | vehicles | the list of vehicles |
[in] | factor | the multiplier to speed up or slow down |
Definition at line 160 of file fleet.cpp.
References pgrouting::vrp::Pgr_pickDeliver::add_node(), add_vehicle(), pgrouting::tsp::Dmatrix::empty(), pgrouting::Pgr_messages::error, pgrouting::vrp::Pgr_pickDeliver::get_cost_matrix(), pgrouting::vrp::Pgr_pickDeliver::get_nodes(), pgrouting::tsp::Dmatrix::has_id(), pgrouting::Pgr_messages::log, m_trucks, m_un_used, msg(), pgassert, problem, and size().
Referenced by Fleet().
|
inline |
Vehicle_pickDeliver pgrouting::vrp::Fleet::get_truck | ( | ) |
Definition at line 67 of file fleet.cpp.
References ENTERING, EXITING, Identifiers< T >::front(), pgrouting::Pgr_messages::log, m_trucks, m_un_used, m_used, msg(), pgassertwm, and Identifiers< T >::size().
Referenced by pgrouting::vrp::Initial_solution::do_while_foo(), and pgrouting::vrp::Initial_solution::one_truck_all_orders().
Vehicle_pickDeliver pgrouting::vrp::Fleet::get_truck | ( | size_t | order | ) |
Definition at line 82 of file fleet.cpp.
References Identifiers< T >::front(), pgrouting::Pgr_messages::log, m_trucks, m_un_used, m_used, msg(), pgassert, pgassertwm, and Identifiers< T >::size().
bool pgrouting::vrp::Fleet::is_fleet_ok | ( | ) | const |
Definition at line 253 of file fleet.cpp.
References ENTERING, pgrouting::Pgr_messages::error, EXITING, pgrouting::Pgr_messages::log, m_trucks, msg(), and pgassertwm.
Referenced by pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver().
bool pgrouting::vrp::Fleet::is_order_ok | ( | const Order & | order | ) | const |
Given an order, Cycle trhugh all the trucks to verify if the order can be served by at least one truck.
Definition at line 288 of file fleet.cpp.
References pgrouting::vrp::Order::is_valid(), and m_trucks.
Referenced by pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver().
|
staticprivate |
the problem message
Definition at line 46 of file fleet.cpp.
References pgrouting::vrp::Pgr_pickDeliver::msg, and problem.
Referenced by add_vehicle(), build_fleet(), get_truck(), is_fleet_ok(), and pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver().
Vehicle_pickDeliver & pgrouting::vrp::Fleet::operator[] | ( | size_t | i | ) |
void pgrouting::vrp::Fleet::set_compatibles | ( | const PD_Orders & | orders | ) |
Definition at line 313 of file fleet.cpp.
References m_trucks.
Referenced by pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver().
|
inline |
|
friend |
|
friend |
|
private |
Definition at line 88 of file fleet.h.
Referenced by add_vehicle(), begin(), build_fleet(), end(), Fleet(), get_truck(), is_fleet_ok(), is_order_ok(), pgrouting::vrp::operator<<(), operator=(), operator[](), set_compatibles(), and size().
|
private |
Definition at line 90 of file fleet.h.
Referenced by build_fleet(), Fleet(), get_truck(), and operator=().
|
private |
Definition at line 89 of file fleet.h.
Referenced by get_truck(), and operator=().
|
staticprivate |
The problem.
Definition at line 110 of file fleet.h.
Referenced by build_fleet(), msg(), and pgrouting::vrp::PD_problem::PD_problem().