Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.constraintsolver.IntVarLocalSearchOperator Class Reference
Inheritance diagram for com.google.ortools.constraintsolver.IntVarLocalSearchOperator:
com.google.ortools.constraintsolver.LocalSearchOperator com.google.ortools.constraintsolver.BaseObject com.google.ortools.constraintsolver.BaseLns com.google.ortools.constraintsolver.ChangeValue com.google.ortools.constraintsolver.PathOperator

Public Member Functions

synchronized void delete ()
 
void swigReleaseOwnership ()
 
void swigTakeOwnership ()
 
 IntVarLocalSearchOperator (IntVar[] vars, boolean keep_inverse_values)
 
 IntVarLocalSearchOperator (IntVar[] vars)
 
boolean HoldsDelta ()
 
void start (Assignment assignment)
 
boolean isIncremental ()
 
int size ()
 
long value (long index)
 
IntVar var (long index)
 
boolean SkipUnchanged (int index)
 
long oldValue (long index)
 
long PrevValue (long index)
 
void setValue (long index, long value)
 
boolean activated (long index)
 
void activate (long index)
 
void deactivate (long index)
 
boolean ApplyChanges (Assignment delta, Assignment deltadelta)
 
void RevertChanges (boolean change_was_incremental)
 
void addVars (IntVar[] vars)
 
void onStart ()
 
- Public Member Functions inherited from com.google.ortools.constraintsolver.LocalSearchOperator
 LocalSearchOperator ()
 
boolean nextNeighbor (Assignment delta, Assignment deltadelta)
 
void reset ()
 
boolean HasFragments ()
 
- Public Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
 BaseObject ()
 
String toString ()
 

Protected Member Functions

 IntVarLocalSearchOperator (long cPtr, boolean cMemoryOwn)
 
void finalize ()
 
void swigDirectorDisconnect ()
 
boolean oneNeighbor ()
 
- Protected Member Functions inherited from com.google.ortools.constraintsolver.LocalSearchOperator
 LocalSearchOperator (long cPtr, boolean cMemoryOwn)
 
- Protected Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
 BaseObject (long cPtr, boolean cMemoryOwn)
 

Static Protected Member Functions

static long getCPtr (IntVarLocalSearchOperator obj)
 
static long swigRelease (IntVarLocalSearchOperator obj)
 
- Static Protected Member Functions inherited from com.google.ortools.constraintsolver.LocalSearchOperator
static long getCPtr (LocalSearchOperator obj)
 
static long swigRelease (LocalSearchOperator obj)
 
- Static Protected Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
static long getCPtr (BaseObject obj)
 
static long swigRelease (BaseObject obj)
 

Additional Inherited Members

- Protected Attributes inherited from com.google.ortools.constraintsolver.BaseObject
transient boolean swigCMemOwn
 

Detailed Description

Specialization of LocalSearchOperator built from an array of IntVars
which specifies the scope of the operator.
This class also takes care of storing current variable values in Start(),
keeps track of changes done by the operator and builds the delta.
The Deactivate() method can be used to perform Large Neighborhood Search.

Definition at line 18 of file IntVarLocalSearchOperator.java.

Constructor & Destructor Documentation

◆ IntVarLocalSearchOperator() [1/3]

com.google.ortools.constraintsolver.IntVarLocalSearchOperator.IntVarLocalSearchOperator ( long cPtr,
boolean cMemoryOwn )
protected

Definition at line 21 of file IntVarLocalSearchOperator.java.

◆ IntVarLocalSearchOperator() [2/3]

com.google.ortools.constraintsolver.IntVarLocalSearchOperator.IntVarLocalSearchOperator ( IntVar[] vars,
boolean keep_inverse_values )

Definition at line 73 of file IntVarLocalSearchOperator.java.

◆ IntVarLocalSearchOperator() [3/3]

com.google.ortools.constraintsolver.IntVarLocalSearchOperator.IntVarLocalSearchOperator ( IntVar[] vars)

Definition at line 78 of file IntVarLocalSearchOperator.java.

Member Function Documentation

◆ activate()

void com.google.ortools.constraintsolver.IntVarLocalSearchOperator.activate ( long index)

Definition at line 139 of file IntVarLocalSearchOperator.java.

◆ activated()

boolean com.google.ortools.constraintsolver.IntVarLocalSearchOperator.activated ( long index)

Definition at line 135 of file IntVarLocalSearchOperator.java.

◆ addVars()

void com.google.ortools.constraintsolver.IntVarLocalSearchOperator.addVars ( IntVar[] vars)

Definition at line 155 of file IntVarLocalSearchOperator.java.

◆ ApplyChanges()

boolean com.google.ortools.constraintsolver.IntVarLocalSearchOperator.ApplyChanges ( Assignment delta,
Assignment deltadelta )

Definition at line 147 of file IntVarLocalSearchOperator.java.

◆ deactivate()

void com.google.ortools.constraintsolver.IntVarLocalSearchOperator.deactivate ( long index)

Definition at line 143 of file IntVarLocalSearchOperator.java.

◆ delete()

synchronized void com.google.ortools.constraintsolver.IntVarLocalSearchOperator.delete ( )

◆ finalize()

void com.google.ortools.constraintsolver.IntVarLocalSearchOperator.finalize ( )
protected

◆ getCPtr()

static long com.google.ortools.constraintsolver.IntVarLocalSearchOperator.getCPtr ( IntVarLocalSearchOperator obj)
staticprotected

Definition at line 26 of file IntVarLocalSearchOperator.java.

◆ HoldsDelta()

boolean com.google.ortools.constraintsolver.IntVarLocalSearchOperator.HoldsDelta ( )

◆ isIncremental()

boolean com.google.ortools.constraintsolver.IntVarLocalSearchOperator.isIncremental ( )

Definition at line 95 of file IntVarLocalSearchOperator.java.

◆ oldValue()

long com.google.ortools.constraintsolver.IntVarLocalSearchOperator.oldValue ( long index)

Definition at line 123 of file IntVarLocalSearchOperator.java.

◆ oneNeighbor()

boolean com.google.ortools.constraintsolver.IntVarLocalSearchOperator.oneNeighbor ( )
protected

Creates a new neighbor. It returns false when the neighborhood is
completely explored.
MakeNextNeighbor() in a subclass of IntVarLocalSearchOperator.

Reimplemented in com.google.ortools.constraintsolver.ChangeValue, and com.google.ortools.constraintsolver.PathOperator.

Definition at line 173 of file IntVarLocalSearchOperator.java.

◆ onStart()

void com.google.ortools.constraintsolver.IntVarLocalSearchOperator.onStart ( )

Called by Start() after synchronizing the operator with the current
assignment. Should be overridden instead of Start() to avoid calling
IntVarLocalSearchOperator::Start explicitly.

Definition at line 164 of file IntVarLocalSearchOperator.java.

◆ PrevValue()

long com.google.ortools.constraintsolver.IntVarLocalSearchOperator.PrevValue ( long index)

Definition at line 127 of file IntVarLocalSearchOperator.java.

◆ RevertChanges()

void com.google.ortools.constraintsolver.IntVarLocalSearchOperator.RevertChanges ( boolean change_was_incremental)

Definition at line 151 of file IntVarLocalSearchOperator.java.

◆ setValue()

void com.google.ortools.constraintsolver.IntVarLocalSearchOperator.setValue ( long index,
long value )

Definition at line 131 of file IntVarLocalSearchOperator.java.

◆ size()

int com.google.ortools.constraintsolver.IntVarLocalSearchOperator.size ( )

Definition at line 99 of file IntVarLocalSearchOperator.java.

◆ SkipUnchanged()

boolean com.google.ortools.constraintsolver.IntVarLocalSearchOperator.SkipUnchanged ( int index)

Definition at line 119 of file IntVarLocalSearchOperator.java.

◆ start()

void com.google.ortools.constraintsolver.IntVarLocalSearchOperator.start ( Assignment assignment)

This method should not be overridden. Override OnStart() instead which is
called before exiting this method.

Reimplemented from com.google.ortools.constraintsolver.LocalSearchOperator.

Definition at line 91 of file IntVarLocalSearchOperator.java.

◆ swigDirectorDisconnect()

void com.google.ortools.constraintsolver.IntVarLocalSearchOperator.swigDirectorDisconnect ( )
protected

◆ swigRelease()

static long com.google.ortools.constraintsolver.IntVarLocalSearchOperator.swigRelease ( IntVarLocalSearchOperator obj)
staticprotected

Definition at line 30 of file IntVarLocalSearchOperator.java.

◆ swigReleaseOwnership()

void com.google.ortools.constraintsolver.IntVarLocalSearchOperator.swigReleaseOwnership ( )

◆ swigTakeOwnership()

void com.google.ortools.constraintsolver.IntVarLocalSearchOperator.swigTakeOwnership ( )

◆ value()

long com.google.ortools.constraintsolver.IntVarLocalSearchOperator.value ( long index)

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

Definition at line 107 of file IntVarLocalSearchOperator.java.

◆ var()

IntVar com.google.ortools.constraintsolver.IntVarLocalSearchOperator.var ( long index)

Returns the variable of given index.

Definition at line 114 of file IntVarLocalSearchOperator.java.


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