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

#include "optimize.h"

Inheritance diagram for pgrouting::vrp::Optimize:
pgrouting::vrp::Solution

Public Member Functions

 Optimize (int kind, const Solution &solution)
 
Vehicle::Cost cost () const
 
std::string cost_str () const
 
int cvTot () const
 
void decrease_truck ()
 
double duration () const
 
size_t fleet_size () const
 
void get_postgres_result (std::vector< General_vehicle_orders_t > &result) const
 
void inter_swap ()
 
bool is_feasable () const
 
void move_duration_based ()
 
bool move_reduce_cost ()
 
void move_wait_time_based ()
 
bool operator< (const Solution &s_rhs) const
 
std::string tau (const std::string &title="Tau") const
 
double total_service_time () const
 
double total_travel_time () const
 
int twvTot () const
 
double wait_time () const
 

Public Attributes

Solution best_solution
 

Protected Attributes

double EPSILON
 
std::deque< Vehicle_pickDeliverfleet
 
const Pgr_pickDeliverproblem
 

Private Member Functions

void decrease_truck (size_t, bool &)
 
void delete_empty_truck ()
 
bool inter_swap (bool reversed)
 
void move_order (Order order, Vehicle_pickDeliver &from_truck, Vehicle_pickDeliver &to_truck)
 
bool move_reduce_cost (size_t, size_t)
 
void save_if_best ()
 
void sort_by_duration ()
 
void sort_for_move ()
 
void swap_order (Order from_order, Vehicle_pickDeliver &from_truck, Order to_order, Vehicle_pickDeliver &to_truck)
 
bool swap_worse (size_t from_pos, size_t to_pos)
 

Detailed Description

Definition at line 37 of file optimize.h.

Constructor & Destructor Documentation

pgrouting::vrp::Optimize::Optimize ( int  kind,
const Solution solution 
)

Member Function Documentation

Vehicle::Cost pgrouting::vrp::Solution::cost ( ) const
inherited
std::string pgrouting::vrp::Solution::cost_str ( ) const
inherited

Definition at line 136 of file solution.cpp.

References pgrouting::vrp::Solution::cost().

Referenced by save_if_best(), and pgrouting::vrp::Solution::tau().

int pgrouting::vrp::Solution::cvTot ( ) const
inherited

Definition at line 108 of file solution.cpp.

References pgrouting::vrp::Solution::fleet.

void pgrouting::vrp::Optimize::decrease_truck ( )
void pgrouting::vrp::Optimize::decrease_truck ( size_t  cycle,
bool &  decreased 
)
private
void pgrouting::vrp::Optimize::delete_empty_truck ( )
private
double pgrouting::vrp::Solution::duration ( ) const
inherited

Definition at line 63 of file solution.cpp.

References pgrouting::vrp::Solution::fleet.

Referenced by decrease_truck(), and save_if_best().

size_t pgrouting::vrp::Solution::fleet_size ( ) const
inlineinherited

Definition at line 110 of file solution.h.

References pgrouting::vrp::Solution::fleet.

void pgrouting::vrp::Solution::get_postgres_result ( std::vector< General_vehicle_orders_t > &  result) const
inherited

Definition at line 38 of file solution.cpp.

References pgrouting::vrp::Solution::fleet.

void pgrouting::vrp::Optimize::inter_swap ( )
bool pgrouting::vrp::Optimize::inter_swap ( bool  reversed)
private
bool pgrouting::vrp::Solution::is_feasable ( ) const
inherited

Definition at line 54 of file solution.cpp.

References pgrouting::vrp::Solution::fleet.

void pgrouting::vrp::Optimize::move_order ( Order  order,
Vehicle_pickDeliver from_truck,
Vehicle_pickDeliver to_truck 
)
private
bool pgrouting::vrp::Optimize::move_reduce_cost ( )
bool pgrouting::vrp::Optimize::move_reduce_cost ( size_t  from_pos,
size_t  to_pos 
)
private
bool pgrouting::vrp::Solution::operator< ( const Solution s_rhs) const
inherited

Definition at line 176 of file solution.cpp.

References pgrouting::vrp::Solution::cost().

void pgrouting::vrp::Optimize::sort_by_duration ( )
private
void pgrouting::vrp::Optimize::sort_for_move ( )
private
void pgrouting::vrp::Optimize::swap_order ( Order  from_order,
Vehicle_pickDeliver from_truck,
Order  to_order,
Vehicle_pickDeliver to_truck 
)
private
bool pgrouting::vrp::Optimize::swap_worse ( size_t  from_pos,
size_t  to_pos 
)
private
std::string pgrouting::vrp::Solution::tau ( const std::string &  title = "Tau") const
inherited
double pgrouting::vrp::Solution::total_service_time ( ) const
inherited

Definition at line 99 of file solution.cpp.

References pgrouting::vrp::Solution::fleet.

double pgrouting::vrp::Solution::total_travel_time ( ) const
inherited

Definition at line 90 of file solution.cpp.

References pgrouting::vrp::Solution::fleet.

int pgrouting::vrp::Solution::twvTot ( ) const
inherited

Definition at line 72 of file solution.cpp.

References pgrouting::vrp::Solution::fleet.

double pgrouting::vrp::Solution::wait_time ( ) const
inherited

Definition at line 81 of file solution.cpp.

References pgrouting::vrp::Solution::fleet.

Member Data Documentation

Solution pgrouting::vrp::Optimize::best_solution
double pgrouting::vrp::Solution::EPSILON
protectedinherited

Definition at line 45 of file solution.h.

Referenced by pgrouting::vrp::Solution::operator=().


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