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

Public Member Functions

 __init__ (self, vars, keep_inverse_values=False)
 
 Start (self, assignment)
 
 IsIncremental (self)
 
 Size (self)
 
 Value (self, index)
 
 Var (self, index)
 
 OldValue (self, index)
 
 PrevValue (self, index)
 
 SetValue (self, index, value)
 
 Activated (self, index)
 
 Activate (self, index)
 
 Deactivate (self, index)
 
 AddVars (self, vars)
 
 OnStart (self)
 
 NextNeighbor (self, delta, deltadelta)
 
 OneNeighbor (self)
 
 __disown__ (self)
 
- Public Member Functions inherited from ortools.constraint_solver.pywrapcp.LocalSearchOperator
- Public Member Functions inherited from ortools.constraint_solver.pywrapcp.BaseObject
 DebugString (self)
 
 __str__ (self)
 
 __repr__ (self)
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
- Properties inherited from ortools.constraint_solver.pywrapcp.LocalSearchOperator
 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
- Properties inherited from ortools.constraint_solver.pywrapcp.BaseObject
 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

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 3991 of file pywrapcp.py.

Constructor & Destructor Documentation

◆ __init__()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.__init__ ( self,
vars,
keep_inverse_values = False )

Member Function Documentation

◆ __disown__()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.__disown__ ( self)

◆ Activate()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.Activate ( self,
index )

Definition at line 4047 of file pywrapcp.py.

◆ Activated()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.Activated ( self,
index )

Definition at line 4044 of file pywrapcp.py.

◆ AddVars()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.AddVars ( self,
vars )

Definition at line 4053 of file pywrapcp.py.

◆ Deactivate()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.Deactivate ( self,
index )

Definition at line 4050 of file pywrapcp.py.

◆ IsIncremental()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.IsIncremental ( self)

Definition at line 4018 of file pywrapcp.py.

◆ NextNeighbor()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.NextNeighbor ( self,
delta,
deltadelta )
    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).
    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.

Reimplemented from ortools.constraint_solver.pywrapcp.LocalSearchOperator.

Definition at line 4064 of file pywrapcp.py.

◆ OldValue()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.OldValue ( self,
index )

Definition at line 4035 of file pywrapcp.py.

◆ OneNeighbor()

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

Reimplemented in ortools.constraint_solver.pywrapcp.ChangeValue.

Definition at line 4077 of file pywrapcp.py.

◆ OnStart()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.OnStart ( self)
    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 4056 of file pywrapcp.py.

◆ PrevValue()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.PrevValue ( self,
index )

Definition at line 4038 of file pywrapcp.py.

◆ SetValue()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.SetValue ( self,
index,
value )

Definition at line 4041 of file pywrapcp.py.

◆ Size()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.Size ( self)

Definition at line 4021 of file pywrapcp.py.

◆ Start()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.Start ( self,
assignment )
    This method should not be overridden. Override OnStart() instead which is
    called before exiting this method.

Reimplemented from ortools.constraint_solver.pywrapcp.LocalSearchOperator.

Definition at line 4011 of file pywrapcp.py.

◆ Value()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.Value ( self,
index )
    Returns the value in the current assignment of the variable of given
    index.

Definition at line 4024 of file pywrapcp.py.

◆ Var()

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.Var ( self,
index )
 Returns the variable of given index.

Definition at line 4031 of file pywrapcp.py.

Property Documentation

◆ thisown

ortools.constraint_solver.pywrapcp.IntVarLocalSearchOperator.thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

Definition at line 4000 of file pywrapcp.py.


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