Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set | ||
|
||
// doxy/ or-tools/ src/ constraint_solver/ |
Public Member Functions | |
MakePairActiveOperator (const IntVar *const *vars, const IntVar *const *secondary_vars, const RoutingModel::NodePairs &pairs, int size) | |
virtual | ~MakePairActiveOperator () |
virtual bool | MakeNextNeighbor (Assignment *delta, Assignment *deltadelta) |
Redefines MakeNextNeighbor to export a simpler interface. | |
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. |
These neighborhoods are very useful for Pickup and Delivery problems where pickup and delivery nodes must remain on the same route.
Definition at line 145 of file routing.cc.
operations_research::MakePairActiveOperator::MakePairActiveOperator | ( | const IntVar *const * | vars, | |
const IntVar *const * | secondary_vars, | |||
const RoutingModel::NodePairs & | pairs, | |||
int | size | |||
) | [inline] |
Definition at line 147 of file routing.cc.
virtual operations_research::MakePairActiveOperator::~MakePairActiveOperator | ( | ) | [inline, virtual] |
Definition at line 154 of file routing.cc.
bool operations_research::MakePairActiveOperator::MakeNextNeighbor | ( | Assignment * | delta, | |
Assignment * | deltadelta | |||
) | [virtual] |
Redefines MakeNextNeighbor to export a simpler interface.
The calls to ApplyChanges() and RevertChanges() are factored in this method, hiding both delta and deltadelta from subclasses which only need to override MakeOneNeighbor(). Therefore this method should not be overridden. Override MakeOneNeighbor() instead.
Reimplemented from operations_research::IntVarLocalSearchOperator.
Definition at line 191 of file routing.cc.
bool operations_research::MakePairActiveOperator::MakeNeighbor | ( | ) | [virtual] |
virtual bool operations_research::MakePairActiveOperator::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 159 of file routing.cc.
virtual int64 operations_research::MakePairActiveOperator::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 164 of file routing.cc.