Generic path-based filter class.
Definition at line 3483 of file routing.h.
|
| BasePathFilter (const std::vector< IntVar * > &nexts, int next_domain_size) |
|
| ~BasePathFilter () override |
|
bool | Accept (const Assignment *delta, const Assignment *deltadelta, int64 objective_min, int64 objective_max) override |
| 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. More...
|
|
void | OnSynchronize (const Assignment *delta) override |
|
void | Synchronize (const Assignment *assignment, const Assignment *delta) override |
| This method should not be overridden. More...
|
|
bool | FindIndex (IntVar *const var, int64 *index) const |
|
void | AddVars (const std::vector< IntVar * > &vars) |
| Add variables to "track" to the filter. More...
|
|
int | Size () const |
|
IntVar * | Var (int index) const |
|
int64 | Value (int index) const |
|
bool | IsVarSynced (int index) const |
|
virtual void | Relax (const Assignment *delta, const Assignment *deltadelta) |
| Lets the filter know what delta and deltadelta will be passed in the next Accept(). More...
|
|
virtual bool | IsIncremental () const |
|
virtual void | Revert () |
| Cancels the changes made by the last Relax()/Accept() calls. More...
|
|
virtual int64 | GetSynchronizedObjectiveValue () const |
| Objective value from last time Synchronize() was called. More...
|
|
virtual int64 | GetAcceptedObjectiveValue () const |
| Objective value from the last time Accept() was called and returned true. More...
|
|
◆ BasePathFilter()
BasePathFilter |
( |
const std::vector< IntVar * > & |
nexts, |
|
|
int |
next_domain_size |
|
) |
| |
◆ ~BasePathFilter()
◆ Accept()
bool Accept |
( |
const Assignment * |
delta, |
|
|
const Assignment * |
deltadelta, |
|
|
int64 |
objective_min, |
|
|
int64 |
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 LocalSearchFilter.
◆ AddVars()
void AddVars |
( |
const std::vector< IntVar * > & |
vars | ) |
|
|
inherited |
Add variables to "track" to the filter.
◆ FindIndex()
bool FindIndex |
( |
IntVar *const |
var, |
|
|
int64 * |
index |
|
) |
| const |
|
inlineinherited |
◆ GetAcceptedObjectiveValue()
virtual int64 GetAcceptedObjectiveValue |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ GetNewSynchronizedUnperformedNodes()
const std::vector<int64>& GetNewSynchronizedUnperformedNodes |
( |
| ) |
const |
|
inlineprotected |
◆ GetNext()
int64 GetNext |
( |
int64 |
node | ) |
const |
|
inlineprotected |
◆ GetPath()
int GetPath |
( |
int64 |
node | ) |
const |
|
inlineprotected |
◆ GetSynchronizedObjectiveValue()
virtual int64 GetSynchronizedObjectiveValue |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ GetTouchedPathStarts()
const std::vector<int64>& GetTouchedPathStarts |
( |
| ) |
const |
|
inlineprotected |
◆ IsDisabled()
bool IsDisabled |
( |
| ) |
const |
|
inlineprotected |
◆ IsIncremental()
virtual bool IsIncremental |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ IsVarSynced()
bool IsVarSynced |
( |
int |
index | ) |
const |
|
inlineinherited |
◆ NumPaths()
◆ OnSynchronize()
void OnSynchronize |
( |
const Assignment * |
delta | ) |
|
|
overridevirtual |
◆ Rank()
int Rank |
( |
int64 |
node | ) |
const |
|
inlineprotected |
◆ Relax()
virtual void Relax |
( |
const Assignment * |
delta, |
|
|
const Assignment * |
deltadelta |
|
) |
| |
|
inlinevirtualinherited |
◆ Revert()
◆ Size()
◆ Start()
int64 Start |
( |
int |
i | ) |
const |
|
inlineprotected |
◆ Synchronize()
void Synchronize |
( |
const Assignment * |
assignment, |
|
|
const Assignment * |
delta |
|
) |
| |
|
overridevirtualinherited |
◆ SynchronizeOnAssignment()
void SynchronizeOnAssignment |
( |
const Assignment * |
assignment | ) |
|
|
protectedinherited |
◆ Value()
int64 Value |
( |
int |
index | ) |
const |
|
inlineinherited |
◆ Var()
IntVar* Var |
( |
int |
index | ) |
const |
|
inlineinherited |
◆ kUnassigned
The documentation for this class was generated from the following file: