![]() |
OR-Tools
8.2
|
Public Member Functions | |
| IntVarFilteredHeuristic (Solver *solver, const std::vector< IntVar * > &vars, LocalSearchFilterManager *filter_manager) | |
| virtual | ~IntVarFilteredHeuristic () |
| 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 | |
| void | ResetSolution () |
| Resets the data members for a new solution. More... | |
| virtual bool | InitializeSolution () |
| Virtual method to initialize the 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... | |
| virtual bool | StopSearch () |
| Returns true if the search must be stopped. 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_ |
| IntVarFilteredHeuristic | ( | Solver * | solver, |
| const std::vector< IntVar * > & | vars, | ||
| LocalSearchFilterManager * | filter_manager | ||
| ) |
Definition at line 2881 of file routing_search.cc.
|
inlinevirtual |
| Assignment *const BuildSolution | ( | ) |
Builds a solution.
Returns the resulting assignment if a solution was found, and nullptr otherwise.
Definition at line 2907 of file routing_search.cc.
|
protectedpure virtual |
Virtual method to redefine how to build a solution.
Implemented in GlobalCheapestInsertionFilteredHeuristic, LocalCheapestInsertionFilteredHeuristic, CheapestAdditionFilteredHeuristic, SavingsFilteredHeuristic, and ChristofidesFilteredHeuristic.
|
protected |
Commits the modifications to the current solution if these modifications are "filter-feasible", returns false otherwise; in any case discards all modifications.
Definition at line 2952 of file routing_search.cc.
|
inlineprotected |
|
inlinevirtual |
|
inlineprotectedvirtual |
|
inline |
|
protected |
Resets the data members for a new solution.
Definition at line 2897 of file routing_search.cc.
|
inlineprotected |
|
inlineprotectedvirtual |
Returns true if the search must be stopped.
Reimplemented in RoutingFilteredHeuristic.
|
protected |
Synchronizes filters with an assignment (the current solution).
Definition at line 2980 of file routing_search.cc.
|
protected |