Generic path-based filter class.
More...
Generic path-based filter class.
Definition at line 969 of file routing_filters.h.
#include <routing_filters.h>
|
| | BasePathFilter (const std::vector< IntVar * > &nexts, int next_domain_size, const PathsMetadata &paths_metadata) |
| | ~BasePathFilter () override=default |
| bool | Accept (const Assignment *delta, const Assignment *deltadelta, int64_t objective_min, int64_t objective_max) override |
| void | OnSynchronize (const Assignment *delta) override |
| | IntVarLocalSearchFilter (const std::vector< IntVar * > &vars) |
| | ~IntVarLocalSearchFilter () override |
| void | Synchronize (const Assignment *assignment, const Assignment *delta) override |
| bool | FindIndex (IntVar *const var, int64_t *index) const |
| void | AddVars (const std::vector< IntVar * > &vars) |
| | Add variables to "track" to the filter.
|
| int | Size () const |
| IntVar * | Var (int index) const |
| int64_t | Value (int index) const |
| bool | IsVarSynced (int index) const |
| virtual void | Relax (const Assignment *, const Assignment *) |
| virtual void | Commit (const Assignment *, const Assignment *) |
| | Dual of Relax(), lets the filter know that the delta was accepted.
|
| virtual bool | IsIncremental () const |
| virtual void | Revert () |
| | Cancels the changes made by the last Relax()/Accept() calls.
|
| virtual void | Reset () |
| | Sets the filter to empty solution.
|
| virtual int64_t | GetSynchronizedObjectiveValue () const |
| | Objective value from last time Synchronize() was called.
|
| virtual int64_t | GetAcceptedObjectiveValue () const |
| | Objective value from the last time Accept() was called and returned true.
|
| | BaseObject () |
| | BaseObject (const BaseObject &)=delete |
| BaseObject & | operator= (const BaseObject &)=delete |
| virtual | ~BaseObject ()=default |
| virtual std::string | DebugString () const |
◆ BasePathFilter()
| operations_research::BasePathFilter::BasePathFilter |
( |
const std::vector< IntVar * > & | nexts, |
|
|
int | next_domain_size, |
|
|
const PathsMetadata & | paths_metadata ) |
◆ ~BasePathFilter()
| operations_research::BasePathFilter::~BasePathFilter |
( |
| ) |
|
|
overridedefault |
◆ Accept()
| bool operations_research::BasePathFilter::Accept |
( |
const Assignment * | delta, |
|
|
const Assignment * | deltadelta, |
|
|
int64_t | objective_min, |
|
|
int64_t | objective_max ) |
|
overridevirtual |
Accepts a "delta" given the assignment with which the filter has been synchronized; the delta holds the variables which have been modified and their new value. If the filter represents a part of the global objective, its contribution must be between objective_min and objective_max. Sample: supposing one wants to maintain a[0,1] + b[0,1] <= 1, for the assignment (a,1), (b,0), the delta (b,1) will be rejected but the delta (a,0) will be accepted.
- Todo
- (user): Remove arguments when there are no more need for those.
Implements operations_research::LocalSearchFilter.
Definition at line 726 of file routing_filters.cc.
◆ End()
| int64_t operations_research::BasePathFilter::End |
( |
int | i | ) |
const |
|
inlineprotected |
◆ GetNewSynchronizedUnperformedNodes()
| const std::vector< int64_t > & operations_research::BasePathFilter::GetNewSynchronizedUnperformedNodes |
( |
| ) |
const |
|
inlineprotected |
◆ GetNext()
| int64_t operations_research::BasePathFilter::GetNext |
( |
int64_t | node | ) |
const |
|
inlineprotected |
◆ GetPath()
| int operations_research::BasePathFilter::GetPath |
( |
int64_t | node | ) |
const |
|
inlineprotected |
◆ GetTouchedPathStarts()
| const std::vector< int64_t > & operations_research::BasePathFilter::GetTouchedPathStarts |
( |
| ) |
const |
|
inlineprotected |
◆ HasAnySyncedPath()
| bool operations_research::BasePathFilter::HasAnySyncedPath |
( |
| ) |
const |
|
inlineprotected |
◆ lns_detected()
| bool operations_research::BasePathFilter::lns_detected |
( |
| ) |
const |
|
inlineprotected |
◆ NumPaths()
| int operations_research::BasePathFilter::NumPaths |
( |
| ) |
const |
|
inlineprotected |
◆ OnSynchronize()
| void operations_research::BasePathFilter::OnSynchronize |
( |
const Assignment * | delta | ) |
|
|
overridevirtual |
◆ PathStartTouched()
| bool operations_research::BasePathFilter::PathStartTouched |
( |
int64_t | start | ) |
const |
|
inlineprotected |
◆ Rank()
| int operations_research::BasePathFilter::Rank |
( |
int64_t | node | ) |
const |
|
inlineprotected |
◆ Start()
| int64_t operations_research::BasePathFilter::Start |
( |
int | i | ) |
const |
|
inlineprotected |
◆ kUnassigned
| const int64_t operations_research::BasePathFilter::kUnassigned = -1 |
|
staticprotected |
The documentation for this class was generated from the following files: