![]() |
OR-Tools
8.2
|
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 1763 of file 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 *const monitor, const Assignment *delta, const Assignment *deltadelta, int64 objective_min, int64 objective_max) |
Returns true iff all filters return true, and the sum of their accepted objectives is between objective_min and objective_max. More... | |
void | Synchronize (const Assignment *assignment, const Assignment *delta) |
Synchronizes all filters to assignment. More... | |
int64 | GetSynchronizedObjectiveValue () const |
int64 | GetAcceptedObjectiveValue () const |
enum FilterEventType |
Enumerator | |
---|---|
kAccept | |
kRelax |
Definition at line 1767 of file constraint_solveri.h.
|
explicit |
Definition at line 3884 of file local_search.cc.
|
explicit |
Definition at line 3871 of file local_search.cc.
bool Accept | ( | LocalSearchMonitor *const | monitor, |
const Assignment * | delta, | ||
const Assignment * | deltadelta, | ||
int64 | objective_min, | ||
int64 | 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 3905 of file local_search.cc.
|
inlineoverridevirtual |
Reimplemented from BaseObject.
Definition at line 1773 of file constraint_solveri.h.
|
inline |
Definition at line 1795 of file constraint_solveri.h.
|
inline |
Definition at line 1794 of file constraint_solveri.h.
void Revert | ( | ) |
Definition at line 3894 of file local_search.cc.
void Synchronize | ( | const Assignment * | assignment, |
const Assignment * | delta | ||
) |
Synchronizes all filters to assignment.
Definition at line 3950 of file local_search.cc.