![]() |
OR-Tools
8.2
|
Decision builder building a solution using heuristics with local search filters to evaluate its feasibility.
This is very fast but can eventually fail when the solution is restored if filters did not detect all infeasiblities. More details: Using local search filters to build a solution. The approach is pretty straight-forward: have a general assignment storing the current solution, build delta assigment representing possible extensions to the current solution and validate them with filters. The tricky bit comes from using the assignment and filter APIs in a way which avoids the lazy creation of internal hash_maps between variables and indices. Generic filter-based decision builder using an IntVarFilteredHeuristic. when the code is mature enough.
Public Member Functions | |
IntVarFilteredDecisionBuilder (std::unique_ptr< IntVarFilteredHeuristic > heuristic) | |
~IntVarFilteredDecisionBuilder () override | |
Decision * | Next (Solver *solver) override |
This is the main method of the decision builder class. More... | |
std::string | DebugString () const override |
int64 | number_of_decisions () const |
Returns statistics from its underlying heuristic. More... | |
int64 | number_of_rejects () const |
virtual void | AppendMonitors (Solver *const solver, std::vector< SearchMonitor * > *const extras) |
This method will be called at the start of the search. More... | |
virtual void | Accept (ModelVisitor *const visitor) const |
|
explicit |
Definition at line 2847 of file routing_search.cc.
|
inlineoverride |
|
virtualinherited |
Definition at line 2532 of file constraint_solver.cc.
|
virtualinherited |
This method will be called at the start of the search.
It asks the decision builder if it wants to append search monitors to the list of active monitors for this search. Please note there are no checks at this point for duplication.
Definition at line 2529 of file constraint_solver.cc.
|
overridevirtual |
Reimplemented from DecisionBuilder.
Definition at line 2872 of file routing_search.cc.
This is the main method of the decision builder class.
It must return a decision (an instance of the class Decision). If it returns nullptr, this means that the decision builder has finished its work.
Implements DecisionBuilder.
Definition at line 2851 of file routing_search.cc.
int64 number_of_decisions | ( | ) | const |
Returns statistics from its underlying heuristic.
Definition at line 2864 of file routing_search.cc.
int64 number_of_rejects | ( | ) | const |
Definition at line 2868 of file routing_search.cc.