C++ Reference
C++ Reference: Routing
Detailed Description
Public Member Functions | |
RoutingFilteredHeuristic (RoutingModel *model, LocalSearchFilterManager *filter_manager) | |
~RoutingFilteredHeuristic () override | |
const Assignment * | BuildSolutionFromRoutes (const std::function< int64(int64)> &next_accessor) |
Builds a solution starting from the routes formed by the next accessor. More... | |
RoutingModel * | model () const |
int | GetStartChainEnd (int vehicle) const |
Returns the end of the start chain of vehicle,. More... | |
int | GetEndChainStart (int vehicle) const |
Returns the start of the end chain of vehicle,. More... | |
void | MakeDisjunctionNodesUnperformed (int64 node) |
Make nodes in the same disjunction as 'node' unperformed. More... | |
void | MakeUnassignedNodesUnperformed () |
Make all unassigned nodes unperformed. More... | |
void | MakePartiallyPerformedPairsUnperformed () |
Make all partially performed pickup and delivery pairs unperformed. More... | |
Assignment *const | BuildSolution () |
Builds a solution. More... | |
int64 | number_of_decisions () const |
Returns statistics on search, number of decisions sent to filters, number of decisions rejected by filters. More... | |
int64 | number_of_rejects () const |
virtual std::string | DebugString () const |
Protected Member Functions | |
bool | StopSearch () override |
Returns true if the search must be stopped. More... | |
virtual void | SetVehicleIndex (int64 node, int vehicle) |
virtual void | ResetVehicleIndices () |
bool | VehicleIsEmpty (int vehicle) const |
void | ResetSolution () |
Resets the data members for a new solution. More... | |
virtual bool | BuildSolutionInternal ()=0 |
Virtual method to redefine how to build a solution. More... | |
bool | Commit () |
Commits the modifications to the current solution if these modifications are "filter-feasible", returns false otherwise; in any case discards all modifications. More... | |
void | SetValue (int64 index, int64 value) |
Modifies the current solution by setting the variable of index 'index' to value 'value'. More... | |
int64 | Value (int64 index) const |
Returns the value of the variable of index 'index' in the last committed solution. More... | |
bool | Contains (int64 index) const |
Returns true if the variable of index 'index' is in the current solution. More... | |
int | Size () const |
Returns the number of variables the decision builder is trying to instantiate. More... | |
IntVar * | Var (int64 index) const |
Returns the variable of index 'index'. More... | |
void | SynchronizeFilters () |
Synchronizes filters with an assignment (the current solution). More... | |
Protected Attributes | |
Assignment *const | assignment_ |
Constructor & Destructor Documentation
◆ RoutingFilteredHeuristic()
RoutingFilteredHeuristic | ( | RoutingModel * | model, |
LocalSearchFilterManager * | filter_manager | ||
) |
◆ ~RoutingFilteredHeuristic()
|
inlineoverride |
Member Function Documentation
◆ BuildSolution()
|
inherited |
Builds a solution.
Returns the resulting assignment if a solution was found, and nullptr otherwise.
◆ BuildSolutionFromRoutes()
const Assignment * BuildSolutionFromRoutes | ( | const std::function< int64(int64)> & | next_accessor | ) |
Builds a solution starting from the routes formed by the next accessor.
◆ BuildSolutionInternal()
|
protectedpure virtualinherited |
Virtual method to redefine how to build a solution.
Implemented in GlobalCheapestInsertionFilteredHeuristic, LocalCheapestInsertionFilteredHeuristic, CheapestAdditionFilteredHeuristic, SavingsFilteredHeuristic, and ChristofidesFilteredHeuristic.
◆ Commit()
|
protectedinherited |
Commits the modifications to the current solution if these modifications are "filter-feasible", returns false otherwise; in any case discards all modifications.
◆ Contains()
|
inlineprotectedinherited |
◆ DebugString()
|
inlinevirtualinherited |
◆ GetEndChainStart()
|
inline |
◆ GetStartChainEnd()
|
inline |
◆ MakeDisjunctionNodesUnperformed()
void MakeDisjunctionNodesUnperformed | ( | int64 | node | ) |
Make nodes in the same disjunction as 'node' unperformed.
'node' is a variable index corresponding to a node.
◆ MakePartiallyPerformedPairsUnperformed()
void MakePartiallyPerformedPairsUnperformed | ( | ) |
Make all partially performed pickup and delivery pairs unperformed.
A pair is partially unperformed if one element of the pair has one of its alternatives performed in the solution and the other has no alternatives in the solution or none performed.
◆ MakeUnassignedNodesUnperformed()
void MakeUnassignedNodesUnperformed | ( | ) |
Make all unassigned nodes unperformed.
◆ model()
|
inline |
◆ number_of_decisions()
|
inlineinherited |
◆ number_of_rejects()
◆ ResetSolution()
|
protectedinherited |
Resets the data members for a new solution.
◆ ResetVehicleIndices()
|
inlineprotectedvirtual |
◆ SetValue()
|
inlineprotectedinherited |
◆ SetVehicleIndex()
|
inlineprotectedvirtual |
◆ Size()
|
inlineprotectedinherited |
◆ StopSearch()
|
inlineoverrideprotectedvirtual |
Returns true if the search must be stopped.
Reimplemented from IntVarFilteredHeuristic.
◆ SynchronizeFilters()
|
protectedinherited |
Synchronizes filters with an assignment (the current solution).
◆ Value()
|
inlineprotectedinherited |
◆ Var()
|
inlineprotectedinherited |
◆ VehicleIsEmpty()
Member Data Documentation
◆ assignment_
|
protectedinherited |
The documentation for this class was generated from the following file: