C++ Reference
C++ Reference: Routing
Detailed Description
Public Member Functions | |
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 void | Commit (const Assignment *delta, const Assignment *deltadelta) |
Dual of Relax(), lets the filter know that the delta was accepted. More... | |
virtual bool | IsIncremental () const |
virtual void | Revert () |
Cancels the changes made by the last Relax()/Accept() calls. More... | |
virtual void | Reset () |
Sets the filter to empty solution. 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... | |
virtual std::string | DebugString () const |
Protected Member Functions | |
int64 | GetNext (int64 node) const |
int | NumPaths () const |
int64 | Start (int i) const |
int | GetPath (int64 node) const |
int | Rank (int64 node) const |
bool | IsDisabled () const |
const std::vector< int64 > & | GetTouchedPathStarts () const |
const std::vector< int64 > & | GetNewSynchronizedUnperformedNodes () const |
void | SynchronizeOnAssignment (const Assignment *assignment) |
Static Protected Attributes | |
static const int64 | kUnassigned |
Constructor & Destructor Documentation
◆ BasePathFilter()
BasePathFilter | ( | const std::vector< IntVar * > & | nexts, |
int | next_domain_size | ||
) |
◆ ~BasePathFilter()
|
inlineoverride |
Member Function Documentation
◆ Accept()
|
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()
|
inherited |
Add variables to "track" to the filter.
◆ Commit()
|
inlinevirtualinherited |
Dual of Relax(), lets the filter know that the delta was accepted.
Definition at line 1725 of file constraint_solveri.h.
◆ DebugString()
|
inlinevirtualinherited |
Reimplemented in PropagationBaseObject, Decision, DecisionBuilder, Demon, Constraint, IntVarIterator, SolutionCollector, OptimizeVar, SearchLimit, RegularLimit, SequenceVar, Assignment, Pack, CallMethod0< T >, CallMethod1< T, P >, CallMethod2< T, P, Q >, CallMethod3< T, P, Q, R >, DelayedCallMethod0< T >, DelayedCallMethod1< T, P >, DelayedCallMethod2< T, P, Q >, LocalSearchFilterManager, PropagationMonitor, LocalSearchMonitor, BooleanVar, SearchLog, ArrayWithOffset< T >, GlobalVehicleBreaksConstraint, IntVarFilteredDecisionBuilder, CPFeasibilityFilter, MakeRelocateNeighborsOperator, MakePairActiveOperator, MakePairInactiveOperator, PairRelocateOperator, LightPairRelocateOperator, PairExchangeOperator, PairExchangeRelocateOperator, SwapIndexPairOperator, IndexPairSwapActiveOperator, FilteredHeuristicPathLNSOperator, RelocatePathAndHeuristicInsertUnperformedOperator, FilteredHeuristicExpensiveChainLNSOperator, FilteredHeuristicCloseNodesLNSOperator, RelocateExpensiveChain, PairNodeSwapActiveOperator< swap_first >, RelocateSubtrip, and ExchangeSubtrip.
Definition at line 3156 of file constraint_solver.h.
◆ FindIndex()
|
inlineinherited |
Definition at line 1820 of file constraint_solveri.h.
◆ GetAcceptedObjectiveValue()
|
inlinevirtualinherited |
Objective value from the last time Accept() was called and returned true.
Definition at line 1757 of file constraint_solveri.h.
◆ GetNewSynchronizedUnperformedNodes()
|
inlineprotected |
◆ GetNext()
◆ GetPath()
◆ GetSynchronizedObjectiveValue()
|
inlinevirtualinherited |
Objective value from last time Synchronize() was called.
Definition at line 1754 of file constraint_solveri.h.
◆ GetTouchedPathStarts()
|
inlineprotected |
◆ IsDisabled()
◆ IsIncremental()
|
inlinevirtualinherited |
Definition at line 1738 of file constraint_solveri.h.
◆ IsVarSynced()
|
inlineinherited |
Definition at line 1837 of file constraint_solveri.h.
◆ NumPaths()
◆ OnSynchronize()
|
overridevirtual |
Reimplemented from IntVarLocalSearchFilter.
◆ Rank()
◆ Relax()
|
inlinevirtualinherited |
Lets the filter know what delta and deltadelta will be passed in the next Accept().
Definition at line 1723 of file constraint_solveri.h.
◆ Reset()
|
inlinevirtualinherited |
Sets the filter to empty solution.
Definition at line 1751 of file constraint_solveri.h.
◆ Revert()
|
inlinevirtualinherited |
Cancels the changes made by the last Relax()/Accept() calls.
Definition at line 1748 of file constraint_solveri.h.
◆ Size()
|
inlineinherited |
Definition at line 1831 of file constraint_solveri.h.
◆ Start()
◆ Synchronize()
|
overridevirtualinherited |
This method should not be overridden.
Override OnSynchronize() instead which is called before exiting this method.
Implements LocalSearchFilter.
◆ SynchronizeOnAssignment()
|
protectedinherited |
◆ Value()
|
inlineinherited |
Definition at line 1833 of file constraint_solveri.h.
◆ Var()
|
inlineinherited |
Definition at line 1832 of file constraint_solveri.h.
Member Data Documentation
◆ kUnassigned
The documentation for this class was generated from the following file: