Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::IntVarLocalSearchFilter Class Reference

#include <constraint_solveri.h>

Inheritance diagram for operations_research::IntVarLocalSearchFilter:
operations_research::LocalSearchFilter operations_research::BaseObject operations_research::BasePathFilter

Public Member Functions

 IntVarLocalSearchFilter (const std::vector< IntVar * > &vars)
 
 ~IntVarLocalSearchFilter () override
 
void Synchronize (const Assignment *assignment, const Assignment *delta) override
 
bool FindIndex (IntVar *const var, int64_t *index) const
 
void AddVars (const std::vector< IntVar * > &vars)
 Add variables to "track" to the filter.
 
int Size () const
 
IntVarVar (int index) const
 
int64_t Value (int index) const
 
bool IsVarSynced (int index) const
 
- Public Member Functions inherited from operations_research::LocalSearchFilter
virtual void Relax (const Assignment *delta, const Assignment *deltadelta)
 
virtual void Commit (const Assignment *delta, const Assignment *deltadelta)
 Dual of Relax(), lets the filter know that the delta was accepted.
 
virtual bool Accept (const Assignment *delta, const Assignment *deltadelta, int64_t objective_min, int64_t objective_max)=0
 
virtual bool IsIncremental () const
 
virtual void Revert ()
 Cancels the changes made by the last Relax()/Accept() calls.
 
virtual void Reset ()
 Sets the filter to empty solution.
 
virtual int64_t GetSynchronizedObjectiveValue () const
 Objective value from last time Synchronize() was called.
 
virtual int64_t GetAcceptedObjectiveValue () const
 
- Public Member Functions inherited from operations_research::BaseObject
 BaseObject ()
 
 BaseObject (const BaseObject &)=delete
 This type is neither copyable nor movable.
 
BaseObjectoperator= (const BaseObject &)=delete
 
virtual ~BaseObject ()
 
virtual std::string DebugString () const
 

Protected Member Functions

virtual void OnSynchronize (const Assignment *delta)
 
void SynchronizeOnAssignment (const Assignment *assignment)
 

Detailed Description

Definition at line 2166 of file constraint_solveri.h.

Constructor & Destructor Documentation

◆ IntVarLocalSearchFilter()

operations_research::IntVarLocalSearchFilter::IntVarLocalSearchFilter ( const std::vector< IntVar * > & vars)
explicit

Definition at line 3445 of file local_search.cc.

◆ ~IntVarLocalSearchFilter()

operations_research::IntVarLocalSearchFilter::~IntVarLocalSearchFilter ( )
override

Definition at line 3465 of file local_search.cc.

Member Function Documentation

◆ AddVars()

void operations_research::IntVarLocalSearchFilter::AddVars ( const std::vector< IntVar * > & vars)

Add variables to "track" to the filter.

Definition at line 3450 of file local_search.cc.

◆ FindIndex()

bool operations_research::IntVarLocalSearchFilter::FindIndex ( IntVar *const var,
int64_t * index ) const
inline

Definition at line 2175 of file constraint_solveri.h.

◆ IsVarSynced()

bool operations_research::IntVarLocalSearchFilter::IsVarSynced ( int index) const
inline

Definition at line 2192 of file constraint_solveri.h.

◆ OnSynchronize()

virtual void operations_research::IntVarLocalSearchFilter::OnSynchronize ( const Assignment * delta)
inlineprotectedvirtual

Reimplemented in operations_research::BasePathFilter.

Definition at line 2195 of file constraint_solveri.h.

◆ Size()

int operations_research::IntVarLocalSearchFilter::Size ( ) const
inline

Definition at line 2186 of file constraint_solveri.h.

◆ Synchronize()

void operations_research::IntVarLocalSearchFilter::Synchronize ( const Assignment * assignment,
const Assignment * delta )
overridevirtual

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

Implements operations_research::LocalSearchFilter.

Definition at line 3467 of file local_search.cc.

◆ SynchronizeOnAssignment()

void operations_research::IntVarLocalSearchFilter::SynchronizeOnAssignment ( const Assignment * assignment)
protected

Definition at line 3478 of file local_search.cc.

◆ Value()

int64_t operations_research::IntVarLocalSearchFilter::Value ( int index) const
inline

Definition at line 2188 of file constraint_solveri.h.

◆ Var()

IntVar * operations_research::IntVarLocalSearchFilter::Var ( int index) const
inline

Definition at line 2187 of file constraint_solveri.h.


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