C++ Reference
C++ Reference: Routing
Detailed Description
Similar to the move above, but instead of removing one route entirely, the destruction phase consists of removing all nodes on an "expensive" chain from a route.
Definition at line 386 of file routing_neighborhoods.h.
Public Member Functions | |
FilteredHeuristicExpensiveChainLNSOperator (std::unique_ptr< RoutingFilteredHeuristic > heuristic, int num_arcs_to_consider, std::function< int64(int64, int64, int64)> arc_cost_for_route_start) | |
~FilteredHeuristicExpensiveChainLNSOperator () override | |
std::string | DebugString () const override |
bool | MakeNextNeighbor (Assignment *delta, Assignment *deltadelta) override |
Redefines MakeNextNeighbor to export a simpler interface. More... | |
bool | HoldsDelta () const override |
virtual bool | HoldsDelta () const |
void | Start (const Assignment *assignment) override |
This method should not be overridden. More... | |
virtual bool | IsIncremental () const |
int | Size () const |
const int64 & | Value (int64 index) const |
Returns the value in the current assignment of the variable of given index. More... | |
IntVar * | Var (int64 index) const |
Returns the variable of given index. More... | |
virtual bool | SkipUnchanged (int index) const |
const int64 & | OldValue (int64 index) const |
void | SetValue (int64 index, const int64 &value) |
bool | Activated (int64 index) const |
void | Activate (int64 index) |
void | Deactivate (int64 index) |
bool | ApplyChanges (Assignment *delta, Assignment *deltadelta) const |
void | RevertChanges (bool incremental) |
void | AddVars (const std::vector< IntVar * > &vars) |
virtual void | Reset () |
virtual const LocalSearchOperator * | Self () const |
virtual bool | HasFragments () const |
Protected Member Functions | |
bool | IsInverseValue (int64 index) const |
int64 | InverseValue (int64 index) const |
int64 | OldInverseValue (int64 index) const |
void | SetInverseValue (int64 index, int64 value) |
void | SetOldInverseValue (int64 index, int64 value) |
void | MarkChange (int64 index) |
OnStart() should really be protected, but then SWIG doesn't see it. More... | |
Protected Attributes | |
std::vector< IntVar * > | vars_ |
std::vector< int64 > | values_ |
std::vector< int64 > | old_values_ |
std::vector< int64 > | prev_values_ |
std::vector< int > | assignment_indices_ |
Bitset64 | activated_ |
Bitset64 | was_activated_ |
SparseBitset | changes_ |
SparseBitset | delta_changes_ |
bool | cleared_ |
IntVarLocalSearchHandler | var_handler_ |
Constructor & Destructor Documentation
◆ FilteredHeuristicExpensiveChainLNSOperator()
FilteredHeuristicExpensiveChainLNSOperator | ( | std::unique_ptr< RoutingFilteredHeuristic > | heuristic, |
int | num_arcs_to_consider, | ||
std::function< int64(int64, int64, int64)> | arc_cost_for_route_start | ||
) |
◆ ~FilteredHeuristicExpensiveChainLNSOperator()
|
inlineoverride |
Definition at line 393 of file routing_neighborhoods.h.
Member Function Documentation
◆ Activate()
|
inlineinherited |
Definition at line 863 of file constraint_solveri.h.
◆ Activated()
|
inlineinherited |
Definition at line 862 of file constraint_solveri.h.
◆ AddVars()
|
inlineinherited |
Definition at line 908 of file constraint_solveri.h.
◆ ApplyChanges()
|
inlineinherited |
Definition at line 871 of file constraint_solveri.h.
◆ Deactivate()
|
inlineinherited |
Definition at line 867 of file constraint_solveri.h.
◆ DebugString()
|
inlineoverride |
Definition at line 395 of file routing_neighborhoods.h.
◆ HasFragments()
|
inlinevirtualinherited |
Reimplemented in BaseLns.
Definition at line 815 of file constraint_solveri.h.
◆ HoldsDelta() [1/2]
|
inlinevirtualinherited |
Reimplemented in VarLocalSearchOperator< V, Val, Handler >.
Definition at line 816 of file constraint_solveri.h.
◆ HoldsDelta() [2/2]
|
inlineoverrideinherited |
Definition at line 830 of file constraint_solveri.h.
◆ InverseValue()
|
inlineprotectedinherited |
Definition at line 1077 of file constraint_solveri.h.
◆ IsIncremental()
|
inlinevirtualinherited |
Definition at line 846 of file constraint_solveri.h.
◆ IsInverseValue()
|
inlineprotectedinherited |
Definition at line 1072 of file constraint_solveri.h.
◆ MakeNextNeighbor()
|
overridevirtualinherited |
Redefines MakeNextNeighbor to export a simpler interface.
The calls to ApplyChanges() and RevertChanges() are factored in this method, hiding both delta and deltadelta from subclasses which only need to override MakeOneNeighbor(). Therefore this method should not be overridden. Override MakeOneNeighbor() instead.
Implements LocalSearchOperator.
Reimplemented in PairNodeSwapActiveOperator< swap_first >, IndexPairSwapActiveOperator, and SwapIndexPairOperator.
◆ MarkChange()
|
inlineprotectedinherited |
OnStart() should really be protected, but then SWIG doesn't see it.
So we make it public, but only subclasses should access to it (to override it).
Definition at line 932 of file constraint_solveri.h.
◆ OldInverseValue()
|
inlineprotectedinherited |
Definition at line 1079 of file constraint_solveri.h.
◆ OldValue()
|
inlineinherited |
Definition at line 857 of file constraint_solveri.h.
◆ Reset()
|
inlinevirtualinherited |
Reimplemented in PathOperator.
Definition at line 811 of file constraint_solveri.h.
◆ RevertChanges()
|
inlineinherited |
Definition at line 895 of file constraint_solveri.h.
◆ Self()
|
inlinevirtualinherited |
Definition at line 813 of file constraint_solveri.h.
◆ SetInverseValue()
|
inlineprotectedinherited |
Definition at line 1083 of file constraint_solveri.h.
◆ SetOldInverseValue()
|
inlineprotectedinherited |
Definition at line 1087 of file constraint_solveri.h.
◆ SetValue()
|
inlineinherited |
Definition at line 858 of file constraint_solveri.h.
◆ Size()
|
inlineinherited |
Definition at line 847 of file constraint_solveri.h.
◆ SkipUnchanged()
|
inlinevirtualinherited |
Reimplemented in PathOperator.
Definition at line 856 of file constraint_solveri.h.
◆ Start()
|
inlineoverridevirtualinherited |
This method should not be overridden.
Override OnStart() instead which is called before exiting this method.
Implements LocalSearchOperator.
Definition at line 833 of file constraint_solveri.h.
◆ Value()
|
inlineinherited |
Returns the value in the current assignment of the variable of given index.
Definition at line 850 of file constraint_solveri.h.
◆ Var()
|
inlineinherited |
Returns the variable of given index.
Definition at line 855 of file constraint_solveri.h.
Member Data Documentation
◆ activated_
|
protectedinherited |
Definition at line 942 of file constraint_solveri.h.
◆ assignment_indices_
|
mutableprotectedinherited |
Definition at line 941 of file constraint_solveri.h.
◆ changes_
|
protectedinherited |
Definition at line 944 of file constraint_solveri.h.
◆ cleared_
|
protectedinherited |
Definition at line 946 of file constraint_solveri.h.
◆ delta_changes_
|
protectedinherited |
Definition at line 945 of file constraint_solveri.h.
◆ old_values_
|
protectedinherited |
Definition at line 939 of file constraint_solveri.h.
◆ prev_values_
|
protectedinherited |
Definition at line 940 of file constraint_solveri.h.
◆ values_
|
protectedinherited |
Definition at line 938 of file constraint_solveri.h.
◆ var_handler_
|
protectedinherited |
Definition at line 947 of file constraint_solveri.h.
◆ vars_
|
protectedinherited |
Definition at line 937 of file constraint_solveri.h.
◆ was_activated_
|
protectedinherited |
Definition at line 943 of file constraint_solveri.h.
The documentation for this class was generated from the following file: