![]() |
Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
|
Generic filter-based decision builder using an IntVarFilteredHeuristic. More...
Generic filter-based decision builder using an IntVarFilteredHeuristic.
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 assignment 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. when the code is mature enough.
Definition at line 198 of file routing_search.h.
#include <routing_search.h>
Public Member Functions | |
| IntVarFilteredDecisionBuilder (std::unique_ptr< IntVarFilteredHeuristic > heuristic) | |
| ~IntVarFilteredDecisionBuilder () override=default | |
| Decision * | Next (Solver *solver) override |
| std::string | DebugString () const override |
| int64_t | number_of_decisions () const |
| Returns statistics from its underlying heuristic. | |
| int64_t | number_of_rejects () const |
| Public Member Functions inherited from operations_research::DecisionBuilder | |
| DecisionBuilder () | |
| DecisionBuilder (const DecisionBuilder &)=delete | |
| DecisionBuilder & | operator= (const DecisionBuilder &)=delete |
| ~DecisionBuilder () override | |
| virtual void | AppendMonitors (Solver *solver, std::vector< SearchMonitor * > *extras) |
| virtual void | Accept (ModelVisitor *visitor) const |
| void | set_name (absl::string_view name) |
| std::string | GetName () const |
| Public Member Functions inherited from operations_research::BaseObject | |
| BaseObject () | |
| BaseObject (const BaseObject &)=delete | |
| BaseObject & | operator= (const BaseObject &)=delete |
| virtual | ~BaseObject ()=default |
|
explicit |
Definition at line 431 of file routing_search.cc.
|
overridedefault |
|
overridevirtual |
Reimplemented from operations_research::DecisionBuilder.
Definition at line 456 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 operations_research::DecisionBuilder.
Definition at line 435 of file routing_search.cc.
| int64_t operations_research::IntVarFilteredDecisionBuilder::number_of_decisions | ( | ) | const |
Returns statistics from its underlying heuristic.
Definition at line 448 of file routing_search.cc.
| int64_t operations_research::IntVarFilteredDecisionBuilder::number_of_rejects | ( | ) | const |
Definition at line 452 of file routing_search.cc.