Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class LocalSearchFilterManager
Note: This documentation is automatically generated.
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.
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.
Builds a manager that calls filter methods using the following ordering:
first Relax() in vector order, then Accept() in vector order.
Note that some filters might appear only once, if their Relax() or Accept()
are trivial.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eLocalSearchFilterManager\u003c/code\u003e is a class in C++ that manages the execution of filters during local search.\u003c/p\u003e\n"],["\u003cp\u003eFilters are used to determine solution feasibility and calculate costs.\u003c/p\u003e\n"],["\u003cp\u003eThis class orchestrates filter execution, composing the total cost as the sum of individual filter costs.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods for accepting moves, reverting changes, synchronizing filters, and debugging.\u003c/p\u003e\n"],["\u003cp\u003eFilters are executed based on an order defined either explicitly or implicitly using Relax and Accept events.\u003c/p\u003e\n"]]],["The `LocalSearchFilterManager` class manages filter execution for move feasibility and cost computation. Key actions include: constructing a manager with filter events or a list of filters; `Accept` method checks if all filters return true and verifies the summed objectives are within bounds; `Synchronize` method updates all filters with the current assignment; and `Revert` method undoes filter changes. It can `DebugString` to print a string. It exposes methods to retrieve objectives : `GetAcceptedObjectiveValue` and `GetSynchronizedObjectiveValue`.\n"],null,["# LocalSearchFilterManager\n\nC++ Reference: class LocalSearchFilterManager\n=============================================\n\n\nNote: This documentation is automatically generated.\nFilter 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.\n\n| Method ||\n|--------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`Accept`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L1800) | Return type: `bool ` Arguments: `LocalSearchMonitor* const 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. |\n| [`DebugString`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L1784) | Return type: `std::string ` \u003cbr /\u003e |\n| [`GetAcceptedObjectiveValue`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L1806) | Return type: `int64_t ` \u003cbr /\u003e |\n| [`GetSynchronizedObjectiveValue`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L1805) | Return type: `int64_t ` \u003cbr /\u003e |\n| [`LocalSearchFilterManager`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L1788) | Return type: `explicit ` Arguments: `std::vector\u003cFilterEvent\u003e filter_events` Builds a manager that calls filter methods using an explicit ordering. |\n| [`LocalSearchFilterManager`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L1793) | Return type: `explicit ` Arguments: `std::vector\u003cLocalSearchFilter*\u003e filters` Builds a manager that calls filter methods using the following ordering: first Relax() in vector order, then Accept() in vector order. Note that some filters might appear only once, if their Relax() or Accept() are trivial. |\n| [`Revert`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L1796) | Return type: `void ` Calls Revert() of filters, in reverse order of Relax events. |\n| [`Synchronize`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/constraint_solveri.h#L1804) | Return type: `void ` Arguments: `const Assignment* assignment, const Assignment* delta` Synchronizes all filters to assignment. |"]]