Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set | ||
|
||
// doxy/ or-tools/ src/ constraint_solver/ |
Public Member Functions | |
PairRelocateOperator (const IntVar *const *vars, const IntVar *const *secondary_vars, const RoutingModel::NodePairs &pairs, int size) | |
virtual | ~PairRelocateOperator () |
virtual bool | MakeNeighbor () |
Protected Member Functions | |
virtual bool | OnSamePathAsPreviousBase (int64 base_index) |
Returns true if a base node has to be on the same path as the "previous" base node (base node of index base_index - 1). | |
virtual int64 | GetBaseNodeRestartPosition (int base_index) |
Returns the index of the node to which the base node of index base_index must be set to when it reaches the end of a path. |
Possible neighbors for the path 1 -> A -> B -> 2 -> 3 (where (1, 3) are first and last nodes of the path and can therefore not be moved, and (A, B) is a pair of nodes): 1 -> [A] -> 2 -> [B] -> 3 1 -> 2 -> [A] -> [B] -> 3 1 -> [B] -> [A] -> 2 -> 3 1 -> [B] -> 2 -> [A] -> 3 1 -> 2 -> [B] -> [A] -> 3
Definition at line 237 of file routing.cc.
operations_research::PairRelocateOperator::PairRelocateOperator | ( | const IntVar *const * | vars, | |
const IntVar *const * | secondary_vars, | |||
const RoutingModel::NodePairs & | pairs, | |||
int | size | |||
) | [inline] |
Definition at line 239 of file routing.cc.
virtual operations_research::PairRelocateOperator::~PairRelocateOperator | ( | ) | [inline, virtual] |
Definition at line 261 of file routing.cc.
bool operations_research::PairRelocateOperator::MakeNeighbor | ( | ) | [virtual] |
virtual bool operations_research::PairRelocateOperator::OnSamePathAsPreviousBase | ( | int64 | base_index | ) | [inline, protected, virtual] |
Returns true if a base node has to be on the same path as the "previous" base node (base node of index base_index - 1).
Useful to limit neighborhood exploration to nodes on the same path.
Reimplemented from operations_research::PathOperator.
Definition at line 265 of file routing.cc.
virtual int64 operations_research::PairRelocateOperator::GetBaseNodeRestartPosition | ( | int | base_index | ) | [inline, protected, virtual] |
Returns the index of the node to which the base node of index base_index must be set to when it reaches the end of a path.
By default, it is set to the start of the current path. When this method is called, one can only assume that base nodes with indices < base_index have their final position.
Reimplemented from operations_research::PathOperator.
Definition at line 271 of file routing.cc.