Java Reference

Java Reference

PathWithPreviousNodesOperator

Detailed Description

Simple PathOperator wrapper that also stores the current previous nodes, and is thus able to provide the "Prev" and "IsPathStart" functions.

Definition at line 14 of file PathWithPreviousNodesOperator.java.

Public Member Functions

synchronized void delete ()
 
boolean isPathStart (long node)
 
long prev (long node)
 
String toString ()
 
void swigReleaseOwnership ()
 
void swigTakeOwnership ()
 
boolean neighbor ()
 
void reset ()
 
boolean HoldsDelta ()
 
boolean isIncremental ()
 
int size ()
 
long value (long index)
 Returns the value in the current assignment of the variable of given index. More...
 
IntVar var (long index)
 Returns the variable of given index. More...
 
long oldValue (long index)
 
void setValue (long index, long value)
 
boolean activated (long index)
 
void activate (long index)
 
void deactivate (long index)
 
void addVars (IntVar[] vars)
 
void onStart ()
 Called by Start() after synchronizing the operator with the current assignment. More...
 
boolean nextNeighbor (Assignment delta, Assignment deltadelta)
 
void start (Assignment assignment)
 
boolean HasFragments ()
 

Protected Member Functions

 PathWithPreviousNodesOperator (long cPtr, boolean cMemoryOwn)
 
void swigDirectorDisconnect ()
 
boolean oneNeighbor ()
 This method should not be overridden. More...
 
boolean restartAtPathStartOnSynchronize ()
 When the operator is being synchronized with a new solution (when Start() is called), returns true to restart the exploration of the neighborhood from the start of the last paths explored; returns false to restart the exploration at the last nodes visited. More...
 
boolean onSamePathAsPreviousBase (long base_index)
 Returns true if a base node has to be on the same path as the "previous" base node (base node of index base_index - 1). More...
 
long getBaseNodeRestartPosition (int base_index)
 Returns the index of the node to which the base node of index base_index must be set to when it reaches the end of a path. More...
 
void setNextBaseToIncrement (long base_index)
 Set the next base to increment on next iteration. More...
 
boolean initPosition ()
 Returns true if the operator needs to restart its initial position at each call to Start() More...
 

Constructor & Destructor Documentation

◆ PathWithPreviousNodesOperator()

PathWithPreviousNodesOperator ( long  cPtr,
boolean  cMemoryOwn 
)
inlineprotected

Definition at line 17 of file PathWithPreviousNodesOperator.java.

Member Function Documentation

◆ activate()

void activate ( long  index)
inlineinherited

Definition at line 81 of file IntVarLocalSearchOperatorTemplate.java.

◆ activated()

boolean activated ( long  index)
inlineinherited

Definition at line 77 of file IntVarLocalSearchOperatorTemplate.java.

◆ addVars()

void addVars ( IntVar[]  vars)
inlineinherited

Definition at line 89 of file IntVarLocalSearchOperatorTemplate.java.

◆ deactivate()

void deactivate ( long  index)
inlineinherited

Definition at line 85 of file IntVarLocalSearchOperatorTemplate.java.

◆ delete()

synchronized void delete ( )
inline

Reimplemented from PathOperator.

Definition at line 31 of file PathWithPreviousNodesOperator.java.

◆ getBaseNodeRestartPosition()

long getBaseNodeRestartPosition ( int  base_index)
inlineprotectedinherited

Returns the index of the node to which the base node of index base_index must be set to when it reaches the end of a path.

By default, it is set to the start of the current path. When this method is called, one can only assume that base nodes with indices < base_index have their final position.

Definition at line 101 of file PathOperator.java.

◆ HasFragments()

boolean HasFragments ( )
inlineinherited

Reimplemented in BaseLns.

Definition at line 74 of file LocalSearchOperator.java.

◆ HoldsDelta()

boolean HoldsDelta ( )
inlineinherited

Reimplemented from LocalSearchOperator.

Definition at line 42 of file IntVarLocalSearchOperatorTemplate.java.

◆ initPosition()

boolean initPosition ( )
inlineprotectedinherited

Returns true if the operator needs to restart its initial position at each call to Start()

Definition at line 115 of file PathOperator.java.

◆ isIncremental()

boolean isIncremental ( )
inlineinherited

Definition at line 46 of file IntVarLocalSearchOperatorTemplate.java.

◆ isPathStart()

boolean isPathStart ( long  node)
inline

Definition at line 42 of file PathWithPreviousNodesOperator.java.

◆ neighbor()

boolean neighbor ( )
inlineinherited

Definition at line 69 of file PathOperator.java.

◆ nextNeighbor()

boolean nextNeighbor ( Assignment  delta,
Assignment  deltadelta 
)
inlineinherited

Definition at line 62 of file LocalSearchOperator.java.

◆ oldValue()

long oldValue ( long  index)
inlineinherited

Definition at line 69 of file IntVarLocalSearchOperatorTemplate.java.

◆ oneNeighbor()

boolean oneNeighbor ( )
inlineprotectedinherited

This method should not be overridden.

Override MakeNeighbor() instead.

Reimplemented from IntVarLocalSearchOperator.

Definition at line 80 of file PathOperator.java.

◆ onSamePathAsPreviousBase()

boolean onSamePathAsPreviousBase ( long  base_index)
inlineprotectedinherited

Returns true if a base node has to be on the same path as the "previous" base node (base node of index base_index - 1).

Useful to limit neighborhood exploration to nodes on the same path. it's currently way more complicated to implement.

Definition at line 94 of file PathOperator.java.

◆ onStart()

void onStart ( )
inlineinherited

Called by Start() after synchronizing the operator with the current assignment.

Should be overridden instead of Start() to avoid calling VarLocalSearchOperator::Start explicitly.

Definition at line 96 of file IntVarLocalSearchOperatorTemplate.java.

◆ prev()

long prev ( long  node)
inline

Definition at line 46 of file PathWithPreviousNodesOperator.java.

◆ reset()

void reset ( )
inlineinherited

Reimplemented from LocalSearchOperator.

Definition at line 73 of file PathOperator.java.

◆ restartAtPathStartOnSynchronize()

boolean restartAtPathStartOnSynchronize ( )
inlineprotectedinherited

When the operator is being synchronized with a new solution (when Start() is called), returns true to restart the exploration of the neighborhood from the start of the last paths explored; returns false to restart the exploration at the last nodes visited.

This is used to avoid restarting on base nodes which have changed paths, leading to potentially skipping neighbors.

Definition at line 87 of file PathOperator.java.

◆ setNextBaseToIncrement()

void setNextBaseToIncrement ( long  base_index)
inlineprotectedinherited

Set the next base to increment on next iteration.

All base > base_index will be reset to their start value.

Definition at line 108 of file PathOperator.java.

◆ setValue()

void setValue ( long  index,
long  value 
)
inlineinherited

Definition at line 73 of file IntVarLocalSearchOperatorTemplate.java.

◆ size()

int size ( )
inlineinherited

Definition at line 50 of file IntVarLocalSearchOperatorTemplate.java.

◆ start()

void start ( Assignment  assignment)
inlineinherited

Definition at line 66 of file LocalSearchOperator.java.

◆ swigDirectorDisconnect()

void swigDirectorDisconnect ( )
inlineprotectedinherited

Reimplemented from IntVarLocalSearchOperator.

Definition at line 46 of file PathOperator.java.

◆ swigReleaseOwnership()

void swigReleaseOwnership ( )
inlineinherited

Reimplemented from IntVarLocalSearchOperator.

Definition at line 51 of file PathOperator.java.

◆ swigTakeOwnership()

void swigTakeOwnership ( )
inlineinherited

Reimplemented from IntVarLocalSearchOperator.

Definition at line 56 of file PathOperator.java.

◆ toString()

String toString ( )
inline

Reimplemented from BaseObject.

Definition at line 50 of file PathWithPreviousNodesOperator.java.

◆ value()

long value ( long  index)
inlineinherited

Returns the value in the current assignment of the variable of given index.

Definition at line 57 of file IntVarLocalSearchOperatorTemplate.java.

◆ var()

IntVar var ( long  index)
inlineinherited

Returns the variable of given index.

Definition at line 64 of file IntVarLocalSearchOperatorTemplate.java.


The documentation for this class was generated from the following file: