PGROUTING  2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CTourInfo Class Reference

#include "VRP_Solver.h"

Public Member Functions

 CTourInfo ()
 
 ~CTourInfo ()
 
double getCost ()
 
double getDistance ()
 
int getEndDepot ()
 
std::vector< int > getOrderVector ()
 
int getRemainingCapacity ()
 
size_t getServedOrderCount ()
 
int getStartDepot ()
 
int getStartTime (int pos)
 
double getTravelTime ()
 
int getVehicleId ()
 
CVehicleInfogetVehicleInfo ()
 
void init ()
 
bool insertOrder (int orderId, int pos)
 
bool removeOrder (int pos)
 
void setEndDepot (int depotId)
 
void setStartDepot (int depotId)
 
void setStartTime (std::vector< int > vStartTime)
 
void setVehicleInfo (CVehicleInfo vehicleInfo)
 
void updateCost (double cost, double distance, double travelTime)
 

Private Attributes

double m_dTotalCost
 
double m_dTotalDistance
 
double m_dTotalTraveltime
 
int m_iEndDepotId
 
int m_iOrdersServed
 
int m_iStartDepotId
 
CVehicleInfo m_vehicleInfo
 
std::vector< int > m_viOrderIds
 
std::vector< int > m_viStartTime
 

Friends

bool operator== (const CTourInfo &cur, const CTourInfo &that)
 

Detailed Description

Definition at line 166 of file VRP_Solver.h.

Constructor & Destructor Documentation

CTourInfo::CTourInfo ( )

Definition at line 82 of file VRP_Solver.cpp.

References m_dTotalCost, m_dTotalDistance, and m_dTotalTraveltime.

CTourInfo::~CTourInfo ( )

Definition at line 87 of file VRP_Solver.cpp.

Member Function Documentation

double CTourInfo::getCost ( )
inline

Definition at line 199 of file VRP_Solver.h.

References m_dTotalCost.

Referenced by CSolutionInfo::addTour(), and CVRPSolver::getCostForInsert().

double CTourInfo::getDistance ( )
inline

Definition at line 197 of file VRP_Solver.h.

References m_dTotalDistance.

Referenced by CSolutionInfo::addTour(), and CVRPSolver::getCostForInsert().

int CTourInfo::getEndDepot ( )
inline
int CTourInfo::getRemainingCapacity ( )

Definition at line 94 of file VRP_Solver.cpp.

References CVehicleInfo::getRemainingCapacity(), and m_vehicleInfo.

Referenced by CVRPSolver::getPotentialInsert().

size_t CTourInfo::getServedOrderCount ( )
inline

Definition at line 186 of file VRP_Solver.h.

References m_viOrderIds.

Referenced by find_vrp_solution().

int CTourInfo::getStartDepot ( )
inline
int CTourInfo::getStartTime ( int  pos)
inline

Definition at line 205 of file VRP_Solver.h.

References m_viStartTime.

Referenced by find_vrp_solution(), and CVRPSolver::getPotentialInsert().

double CTourInfo::getTravelTime ( )
inline

Definition at line 201 of file VRP_Solver.h.

References m_dTotalTraveltime.

Referenced by CSolutionInfo::addTour(), and CVRPSolver::getCostForInsert().

int CTourInfo::getVehicleId ( )
inline
CVehicleInfo& CTourInfo::getVehicleInfo ( )
inline

Definition at line 177 of file VRP_Solver.h.

References m_vehicleInfo.

Referenced by CVRPSolver::attemptVehicleExchange(), and CVRPSolver::insertOrder().

void CTourInfo::init ( )
bool CTourInfo::insertOrder ( int  orderId,
int  pos 
)

Definition at line 89 of file VRP_Solver.cpp.

References m_viOrderIds.

Referenced by CVRPSolver::insertOrder().

bool CTourInfo::removeOrder ( int  pos)

Definition at line 98 of file VRP_Solver.cpp.

References m_viOrderIds.

Referenced by CVRPSolver::insertOrder().

void CTourInfo::setEndDepot ( int  depotId)
inline

Definition at line 184 of file VRP_Solver.h.

References m_iEndDepotId.

Referenced by CVRPSolver::generateInitialSolution().

void CTourInfo::setStartDepot ( int  depotId)
inline

Definition at line 181 of file VRP_Solver.h.

References m_iStartDepotId.

Referenced by CVRPSolver::generateInitialSolution().

void CTourInfo::setStartTime ( std::vector< int >  vStartTime)
inline

Definition at line 190 of file VRP_Solver.h.

References m_viStartTime.

Referenced by CVRPSolver::updateTourCosts().

void CTourInfo::setVehicleInfo ( CVehicleInfo  vehicleInfo)
inline
void CTourInfo::updateCost ( double  cost,
double  distance,
double  travelTime 
)

Definition at line 103 of file VRP_Solver.cpp.

References m_dTotalCost, m_dTotalDistance, and m_dTotalTraveltime.

Referenced by CVRPSolver::updateTourCosts().

Friends And Related Function Documentation

bool operator== ( const CTourInfo cur,
const CTourInfo that 
)
friend

Definition at line 45 of file VRP_Solver.cpp.

Member Data Documentation

double CTourInfo::m_dTotalCost
private

Definition at line 231 of file VRP_Solver.h.

Referenced by CTourInfo(), getCost(), and updateCost().

double CTourInfo::m_dTotalDistance
private

Definition at line 232 of file VRP_Solver.h.

Referenced by CTourInfo(), getDistance(), and updateCost().

double CTourInfo::m_dTotalTraveltime
private

Definition at line 233 of file VRP_Solver.h.

Referenced by CTourInfo(), getTravelTime(), and updateCost().

int CTourInfo::m_iEndDepotId
private

Definition at line 227 of file VRP_Solver.h.

Referenced by getEndDepot(), and setEndDepot().

int CTourInfo::m_iOrdersServed
private

Definition at line 228 of file VRP_Solver.h.

int CTourInfo::m_iStartDepotId
private

Definition at line 226 of file VRP_Solver.h.

Referenced by getStartDepot(), and setStartDepot().

CVehicleInfo CTourInfo::m_vehicleInfo
private
std::vector<int> CTourInfo::m_viOrderIds
private
std::vector<int> CTourInfo::m_viStartTime
private

Definition at line 230 of file VRP_Solver.h.

Referenced by getStartTime(), and setStartTime().


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