PGROUTING  2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pgrouting::vrp::Order Class Reference

#include "order.h"

Public Member Functions

 Order (size_t p_id, const Vehicle_node &p_pickup, const Vehicle_node &p_deliver, const Pgr_pickDeliver *p_problem)
 
 Order (const Order &)=default
 
const Vehicle_nodedelivery () const
 
size_t id () const
 
bool is_valid () const
 An order is valid when: More...
 
bool isCompatibleIJ (const Order &other) const
 
const Vehicle_nodepickup () const
 
void setCompatibles ()
 
std::set< size_t > subsetI (const std::set< size_t > &I) const
 
std::set< size_t > subsetJ (const std::set< size_t > &J) const
 

Private Attributes

size_t delivery_id
 
std::set< size_t > m_compatibleI
 
std::set< size_t > m_compatibleJ
 
size_t m_id
 
size_t pickup_id
 
const Pgr_pickDeliverproblem
 

Friends

class Initial_solution
 
std::ostream & operator<< (std::ostream &, const Order &)
 
class Pgr_pickDeliver
 

Detailed Description

Definition at line 41 of file order.h.

Constructor & Destructor Documentation

pgrouting::vrp::Order::Order ( size_t  p_id,
const Vehicle_node p_pickup,
const Vehicle_node p_deliver,
const Pgr_pickDeliver p_problem 
)

Definition at line 56 of file order.cpp.

References delivery(), pgassert, and pickup().

pgrouting::vrp::Order::Order ( const Order )
default

Member Function Documentation

bool pgrouting::vrp::Order::is_valid ( ) const

An order is valid when:

  • The pickup is well formed
  • The delivery is well formed
  • isCompatibleIJ to go to delivery after inmediatly visiting pickup

Definition at line 110 of file order.cpp.

References delivery(), pgrouting::vrp::Tw_node::is_compatible_IJ(), pgrouting::vrp::Tw_node::is_delivery(), pgrouting::vrp::Tw_node::is_pickup(), and pickup().

bool pgrouting::vrp::Order::isCompatibleIJ ( const Order other) const

Definition at line 154 of file order.cpp.

References delivery(), pgrouting::vrp::Tw_node::is_compatible_IJ(), and pickup().

Referenced by setCompatibles().

void pgrouting::vrp::Order::setCompatibles ( )
std::set< size_t > pgrouting::vrp::Order::subsetI ( const std::set< size_t > &  I) const

Definition at line 38 of file order.cpp.

References m_compatibleI.

std::set< size_t > pgrouting::vrp::Order::subsetJ ( const std::set< size_t > &  J) const

Definition at line 47 of file order.cpp.

References m_compatibleJ.

Friends And Related Function Documentation

friend class Initial_solution
friend

Definition at line 43 of file order.h.

std::ostream& operator<< ( std::ostream &  log,
const Order order 
)
friend

Definition at line 69 of file order.cpp.

friend class Pgr_pickDeliver
friend

Definition at line 44 of file order.h.

Member Data Documentation

size_t pgrouting::vrp::Order::delivery_id
private

Definition at line 86 of file order.h.

Referenced by delivery().

std::set<size_t> pgrouting::vrp::Order::m_compatibleI
private

Definition at line 98 of file order.h.

Referenced by pgrouting::vrp::operator<<(), setCompatibles(), and subsetI().

std::set<size_t> pgrouting::vrp::Order::m_compatibleJ
private

Definition at line 92 of file order.h.

Referenced by pgrouting::vrp::operator<<(), setCompatibles(), and subsetJ().

size_t pgrouting::vrp::Order::m_id
private

Definition at line 83 of file order.h.

Referenced by id(), and pgrouting::vrp::operator<<().

size_t pgrouting::vrp::Order::pickup_id
private

Definition at line 85 of file order.h.

Referenced by pickup().

const Pgr_pickDeliver* pgrouting::vrp::Order::problem
private

Definition at line 102 of file order.h.

Referenced by delivery(), pickup(), and setCompatibles().


The documentation for this class was generated from the following files: