Generic path-based filter class.
More...
#include <routing_filters.h>
Generic path-based filter class.
Definition at line 138 of file routing_filters.h.
◆ BasePathFilter()
operations_research::BasePathFilter::BasePathFilter |
( |
const std::vector< IntVar * > & | nexts, |
|
|
int | next_domain_size ) |
◆ ~BasePathFilter()
operations_research::BasePathFilter::~BasePathFilter |
( |
| ) |
|
|
inlineoverride |
◆ 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.
Determining touched paths and their touched chain start and ends (a node is touched if it corresponds to an element of delta or that an element of delta points to it). The start and end of a touched path subchain will have remained on the same path and will correspond to the min and max ranks of touched nodes in the current assignment.
LNS detected
Checking feasibility of touched paths.
- Note
- FinalizeAcceptPath() is only called if InitializeAcceptPath() is true and all paths are accepted.
Implements operations_research::LocalSearchFilter.
Definition at line 294 of file routing_filters.cc.
◆ 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 |
◆ IsDisabled()
bool operations_research::BasePathFilter::IsDisabled |
( |
| ) |
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: