![]() |
Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
|
Filter manager: when a move is made, filters are executed to decide whether the solution is feasible and compute parts of the new cost. This class schedules filter execution and composes costs as a sum.
Definition at line 3137 of file constraint_solveri.h.
#include <constraint_solveri.h>
Classes | |
| struct | FilterEvent |
Public Types | |
| enum | FilterEventType { kAccept , kRelax } |
Public Member Functions | |
| std::string | DebugString () const override |
| LocalSearchFilterManager (std::vector< FilterEvent > filter_events) | |
| LocalSearchFilterManager (std::vector< LocalSearchFilter * > filters) | |
| void | Revert () |
| bool | Accept (LocalSearchMonitor *monitor, const Assignment *delta, const Assignment *deltadelta, int64_t objective_min, int64_t objective_max) |
| void | Synchronize (const Assignment *assignment, const Assignment *delta) |
| Synchronizes all filters to assignment. | |
| int64_t | GetSynchronizedObjectiveValue () const |
| int64_t | GetAcceptedObjectiveValue () const |
| Public Member Functions inherited from operations_research::BaseObject | |
| BaseObject () | |
| BaseObject (const BaseObject &)=delete | |
| BaseObject & | operator= (const BaseObject &)=delete |
| virtual | ~BaseObject ()=default |
| Enumerator | |
|---|---|
| kAccept | |
| kRelax | |
Definition at line 3141 of file constraint_solveri.h.
|
explicit |
Definition at line 3802 of file local_search.cc.
|
explicit |
Definition at line 3787 of file local_search.cc.
| bool operations_research::LocalSearchFilterManager::Accept | ( | LocalSearchMonitor * | monitor, |
| const Assignment * | delta, | ||
| const Assignment * | deltadelta, | ||
| int64_t | objective_min, | ||
| int64_t | objective_max ) |
Returns true iff all filters return true, and the sum of their accepted objectives is between objective_min and objective_max. The monitor has its Begin/EndFiltering events triggered.
Definition at line 3827 of file local_search.cc.
|
inlineoverridevirtual |
Reimplemented from operations_research::BaseObject.
Definition at line 3148 of file constraint_solveri.h.
|
inline |
Definition at line 3170 of file constraint_solveri.h.
|
inline |
Definition at line 3169 of file constraint_solveri.h.
| void operations_research::LocalSearchFilterManager::Revert | ( | ) |
Definition at line 3816 of file local_search.cc.
| void operations_research::LocalSearchFilterManager::Synchronize | ( | const Assignment * | assignment, |
| const Assignment * | delta ) |
Synchronizes all filters to assignment.
Definition at line 3883 of file local_search.cc.