C++ Reference
C++ Reference: Routing
Detailed Description
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 |
Constructor & Destructor Documentation
◆ IntVarFilteredDecisionBuilder()
|
explicit |
◆ ~IntVarFilteredDecisionBuilder()
|
inlineoverride |
Member Function Documentation
◆ Accept()
|
virtualinherited |
◆ AppendMonitors()
|
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.
◆ DebugString()
|
overridevirtual |
Reimplemented from DecisionBuilder.
◆ Next()
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.
◆ number_of_decisions()
int64 number_of_decisions | ( | ) | const |
Returns statistics from its underlying heuristic.
◆ number_of_rejects()
int64 number_of_rejects | ( | ) | const |
The documentation for this class was generated from the following file: