Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class CPFeasibilityFilter
This documentation is automatically generated.
This filter accepts deltas for which the assignment satisfies the
constraints of the Solver. This is verified by keeping an internal copy of
the assignment with all Next vars and their updated values, and calling
RestoreAssignment() on the assignment+delta.
TODO(user): Also call the solution finalizer on variables, with the
exception of Next Vars (woud fail on large instances).
WARNING: In the case of mandatory nodes, when all vehicles are currently
being used in the solution but uninserted nodes still remain, this filter
will reject the solution, even if the node could be inserted on one of these
routes, because all Next vars of vehicle starts are already instantiated.
TODO(user): Avoid such false negatives.
[[["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."],[[["The CPFeasibilityFilter is designed to ensure that assignments in the routing solver respect the defined constraints."],["It works by maintaining an internal assignment copy and validating deltas against it."],["A known limitation is that it may incorrectly reject solutions involving mandatory nodes when all vehicles are in use but uninserted nodes remain."],["It's also important to note that the filter's behavior with solution finalizers on variables is still under development and may be optimized further."]]],["The `CPFeasibilityFilter` class verifies if a delta assignment satisfies solver constraints. It uses an internal assignment copy, updates it with Next vars and their values, and calls `RestoreAssignment()`. It also includes finalizers on variables except Next vars. The filter may reject solutions with mandatory nodes when all vehicles are in use, even if nodes can still be inserted. Key methods include `Accept` (to validate deltas), `CPFeasibilityFilter` (constructor), `DebugString` and `OnSynchronize` to update the assignment.\n"]]