SwapEnds Class Reference

#include <SwapEnds.h>

List of all members.

Public Member Functions

bool evaluate (class VRP *V, int i, int j, VRPMove *M)
bool move (VRP *V, int u, int i)


Detailed Description

Definition at line 16 of file SwapEnds.h.


Member Function Documentation

bool SwapEnds::evaluate ( class VRP V,
int  i,
int  j,
VRPMove M 
)

This function takes the routes containing nodes a and v and evaluates the swapping of the ends of the routes following a and v respectively, subject to the provided rules. Example: VRPH_DEPOT-i-a-j-k-l-VRPH_DEPOT and VRPH_DEPOT-t-u-v-x-y-z-VRPH_DEPOT becomes VRPH_DEPOT-i-a-x-y-z-VRPH_DEPOT and VRPH_DEPOT-t-u-v-j-k-l-VRPH_DEPOT

Example: ( a & v input): VRPH_DEPOT-i-a-b-j-k-l-VRPH_DEPOT and VRPH_DEPOT-t-u-v-w-x-y-z-VRPH_DEPOT becomes VRPH_DEPOT-i-a-w-x-y-z-VRPH_DEPOT and VRPH_DEPOT-t-u-v-b-j-k-l-VRPH_DEPOT

Definition at line 15 of file SwapEnds.cpp.

bool SwapEnds::move ( VRP V,
int  u,
int  i 
)

This function takes the routes corresponding to nodes a and v and swaps the ends of these routes following a and v respectively. Example: VRPH_DEPOT-i-a-j-k-l-VRPH_DEPOT and VRPH_DEPOT-t-u-v-x-y-z-VRPH_DEPOT becomes VRPH_DEPOT-i-a-x-y-z-VRPH_DEPOT and VRPH_DEPOT-t-u-v-j-k-l-VRPH_DEPOT. If the proposed move is feasible, all solution modifications are made, and the function returns true. Returns false if the move is infeasible.

Definition at line 99 of file SwapEnds.cpp.


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

Generated on Thu Mar 10 11:08:49 2011 for VRPH by  doxygen 1.5.9