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

#include "VRP_Solver.h"

Public Member Functions

 CSolutionInfo ()
 
 ~CSolutionInfo ()
 
bool addTour (CTourInfo &tour)
 
int getOrderServed ()
 
double getTotalCost ()
 
double getTotalDistance ()
 
double getTotalTravelTime ()
 
CTourInfogetTour (int pos)
 
size_t getTourCount ()
 
std::vector< CTourInfogetTourInfoVector ()
 
int getUnservedOrderAt (int pos)
 
size_t getUnservedOrderCount ()
 
int getUnusedVehicleAt (int pos)
 
size_t getUnusedVehicleCount ()
 
int getVehicleUsed ()
 
bool init (std::vector< int > vecOrder, int iTotalOrder, std::vector< int > vecVehicle)
 
void removeOrder (int pos)
 
void removeVehicle (int pos)
 
void replaceTour (CTourInfo curTour)
 
void replaceTourAt (int index, CTourInfo curTour)
 

Private Attributes

double m_dTotalCost
 
double m_dTotalDistance
 
double m_dTotalTravelTime
 
int m_iOrdersServed
 
int m_iTotalOrders
 
int m_iVehicleUsed
 
std::vector< CTourInfom_vtourAll
 
std::vector< int > m_vUnservedOrderId
 
std::vector< int > m_vUnusedVehicles
 

Detailed Description

Definition at line 240 of file VRP_Solver.h.

Constructor & Destructor Documentation

CSolutionInfo::CSolutionInfo ( )

Definition at line 109 of file VRP_Solver.cpp.

CSolutionInfo::~CSolutionInfo ( )

Definition at line 110 of file VRP_Solver.cpp.

Member Function Documentation

int CSolutionInfo::getOrderServed ( )
inline

Definition at line 246 of file VRP_Solver.h.

References m_iOrdersServed.

Referenced by CVRPSolver::insertUnservedOrders(), and CVRPSolver::updateFinalSolution().

double CSolutionInfo::getTotalCost ( )
inline

Definition at line 262 of file VRP_Solver.h.

References m_dTotalCost.

Referenced by print_solution(), and CVRPSolver::updateFinalSolution().

double CSolutionInfo::getTotalDistance ( )
inline

Definition at line 263 of file VRP_Solver.h.

References m_dTotalDistance.

Referenced by print_solution(), and CVRPSolver::updateFinalSolution().

double CSolutionInfo::getTotalTravelTime ( )
inline

Definition at line 264 of file VRP_Solver.h.

References m_dTotalTravelTime.

Referenced by print_solution(), and CVRPSolver::updateFinalSolution().

CTourInfo& CSolutionInfo::getTour ( int  pos)
inline
size_t CSolutionInfo::getTourCount ( )
inline

Definition at line 252 of file VRP_Solver.h.

References m_vtourAll.

Referenced by CVRPSolver::attemptVehicleExchange().

std::vector<CTourInfo> CSolutionInfo::getTourInfoVector ( )
inline

Definition at line 273 of file VRP_Solver.h.

References m_vtourAll.

Referenced by find_vrp_solution(), CVRPSolver::insertUnservedOrders(), and print_solution().

int CSolutionInfo::getUnservedOrderAt ( int  pos)
inline
size_t CSolutionInfo::getUnservedOrderCount ( )
inline

Definition at line 254 of file VRP_Solver.h.

References m_vUnservedOrderId.

Referenced by CVRPSolver::generateInitialSolution().

int CSolutionInfo::getUnusedVehicleAt ( int  pos)
inline

Definition at line 257 of file VRP_Solver.h.

References m_vUnusedVehicles.

Referenced by CVRPSolver::generateInitialSolution().

size_t CSolutionInfo::getUnusedVehicleCount ( )
inline

Definition at line 255 of file VRP_Solver.h.

References m_vUnusedVehicles.

Referenced by CVRPSolver::generateInitialSolution().

int CSolutionInfo::getVehicleUsed ( )
inline

Definition at line 245 of file VRP_Solver.h.

References m_iVehicleUsed.

bool CSolutionInfo::init ( std::vector< int >  vecOrder,
int  iTotalOrder,
std::vector< int >  vecVehicle 
)
void CSolutionInfo::removeOrder ( int  pos)
inline

Definition at line 260 of file VRP_Solver.h.

References m_vUnservedOrderId.

Referenced by CVRPSolver::generateInitialSolution().

void CSolutionInfo::removeVehicle ( int  pos)
inline

Definition at line 259 of file VRP_Solver.h.

References m_vUnusedVehicles.

Referenced by CVRPSolver::generateInitialSolution().

void CSolutionInfo::replaceTour ( CTourInfo  curTour)

Definition at line 112 of file VRP_Solver.cpp.

References CTourInfo::getVehicleId(), and m_vtourAll.

Referenced by CVRPSolver::applyBestMoveInCurrentSolution().

void CSolutionInfo::replaceTourAt ( int  index,
CTourInfo  curTour 
)

Definition at line 123 of file VRP_Solver.cpp.

References m_vtourAll.

Referenced by CVRPSolver::attemptVehicleExchange().

Member Data Documentation

double CSolutionInfo::m_dTotalCost
private

Definition at line 285 of file VRP_Solver.h.

Referenced by addTour(), getTotalCost(), and init().

double CSolutionInfo::m_dTotalDistance
private

Definition at line 286 of file VRP_Solver.h.

Referenced by addTour(), getTotalDistance(), and init().

double CSolutionInfo::m_dTotalTravelTime
private

Definition at line 287 of file VRP_Solver.h.

Referenced by addTour(), getTotalTravelTime(), and init().

int CSolutionInfo::m_iOrdersServed
private

Definition at line 283 of file VRP_Solver.h.

Referenced by addTour(), getOrderServed(), and init().

int CSolutionInfo::m_iTotalOrders
private

Definition at line 284 of file VRP_Solver.h.

Referenced by init().

int CSolutionInfo::m_iVehicleUsed
private

Definition at line 282 of file VRP_Solver.h.

Referenced by addTour(), getVehicleUsed(), and init().

std::vector<CTourInfo> CSolutionInfo::m_vtourAll
private
std::vector<int> CSolutionInfo::m_vUnservedOrderId
private

Definition at line 280 of file VRP_Solver.h.

Referenced by addTour(), getUnservedOrderAt(), getUnservedOrderCount(), init(), and removeOrder().

std::vector<int> CSolutionInfo::m_vUnusedVehicles
private

Definition at line 281 of file VRP_Solver.h.

Referenced by addTour(), getUnusedVehicleAt(), getUnusedVehicleCount(), init(), and removeVehicle().


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