OR-Tools  8.2
NeighborhoodGeneratorHelper

Detailed Description

Definition at line 64 of file cp_model_lns.h.

Public Member Functions

 NeighborhoodGeneratorHelper (CpModelProto const *model_proto, SatParameters const *parameters, SharedResponseManager *shared_response, SharedTimeLimit *shared_time_limit=nullptr, SharedBoundsManager *shared_bounds=nullptr)
 
bool TaskIsAvailable () override
 
std::function< void()> GenerateTask (int64 task_id) override
 
void Synchronize () override
 
Neighborhood FixGivenVariables (const CpSolverResponse &initial_solution, const std::vector< int > &variables_to_fix) const
 
Neighborhood RemoveMarkedConstraints (const std::vector< int > &constraints_to_remove) const
 
Neighborhood RelaxGivenVariables (const CpSolverResponse &initial_solution, const std::vector< int > &relaxed_variables) const
 
Neighborhood FixAllVariables (const CpSolverResponse &initial_solution) const
 
Neighborhood FullNeighborhood () const
 
bool IsActive (int var) const
 
const std::vector< int > & ActiveVariables () const
 
const std::vector< std::vector< int > > & ConstraintToVar () const
 
const std::vector< std::vector< int > > & VarToConstraint () const
 
const absl::Span< const int > TypeToConstraints (ConstraintProto::ConstraintCase type) const
 
std::vector< int > GetActiveIntervals (const CpSolverResponse &initial_solution) const
 
const CpModelProto & ModelProto () const
 
const SatParameters & Parameters () const
 
absl::Mutex * MutableMutex () const
 
const SharedResponseManagershared_response () const
 
double score () const
 
double deterministic_time () const
 
std::string name () const
 

Protected Attributes

const std::string name_
 
double score_ = 0.0
 
double deterministic_time_ = 0.0
 

Constructor & Destructor Documentation

◆ NeighborhoodGeneratorHelper()

NeighborhoodGeneratorHelper ( CpModelProto const *  model_proto,
SatParameters const *  parameters,
SharedResponseManager shared_response,
SharedTimeLimit shared_time_limit = nullptr,
SharedBoundsManager shared_bounds = nullptr 
)

Definition at line 32 of file cp_model_lns.cc.

Member Function Documentation

◆ ActiveVariables()

const std::vector<int>& ActiveVariables ( ) const
inline

Definition at line 106 of file cp_model_lns.h.

◆ ConstraintToVar()

const std::vector<std::vector<int> >& ConstraintToVar ( ) const
inline

Definition at line 110 of file cp_model_lns.h.

◆ deterministic_time()

double deterministic_time ( ) const
inlineinherited

Definition at line 81 of file subsolver.h.

◆ FixAllVariables()

Neighborhood FixAllVariables ( const CpSolverResponse &  initial_solution) const

Definition at line 292 of file cp_model_lns.cc.

◆ FixGivenVariables()

Neighborhood FixGivenVariables ( const CpSolverResponse &  initial_solution,
const std::vector< int > &  variables_to_fix 
) const

Definition at line 229 of file cp_model_lns.cc.

◆ FullNeighborhood()

Neighborhood FullNeighborhood ( ) const

Definition at line 188 of file cp_model_lns.cc.

◆ GenerateTask()

std::function<void()> GenerateTask ( int64  task_id)
inlineoverridevirtual

Implements SubSolver.

Definition at line 74 of file cp_model_lns.h.

◆ GetActiveIntervals()

std::vector< int > GetActiveIntervals ( const CpSolverResponse &  initial_solution) const

Definition at line 198 of file cp_model_lns.cc.

◆ IsActive()

bool IsActive ( int  var) const

Definition at line 178 of file cp_model_lns.cc.

◆ ModelProto()

const CpModelProto& ModelProto ( ) const
inline

Definition at line 133 of file cp_model_lns.h.

◆ MutableMutex()

absl::Mutex* MutableMutex ( ) const
inline

Definition at line 142 of file cp_model_lns.h.

◆ name()

std::string name ( ) const
inlineinherited

Definition at line 84 of file subsolver.h.

◆ Parameters()

const SatParameters& Parameters ( ) const
inline

Definition at line 134 of file cp_model_lns.h.

◆ RelaxGivenVariables()

Neighborhood RelaxGivenVariables ( const CpSolverResponse &  initial_solution,
const std::vector< int > &  relaxed_variables 
) const

Definition at line 278 of file cp_model_lns.cc.

◆ RemoveMarkedConstraints()

Neighborhood RemoveMarkedConstraints ( const std::vector< int > &  constraints_to_remove) const

Definition at line 263 of file cp_model_lns.cc.

◆ score()

double score ( ) const
inlineinherited

Definition at line 77 of file subsolver.h.

◆ shared_response()

const SharedResponseManager& shared_response ( ) const
inline

Definition at line 144 of file cp_model_lns.h.

◆ Synchronize()

void Synchronize ( )
overridevirtual

Implements SubSolver.

Definition at line 52 of file cp_model_lns.cc.

◆ TaskIsAvailable()

bool TaskIsAvailable ( )
inlineoverridevirtual

Implements SubSolver.

Definition at line 73 of file cp_model_lns.h.

◆ TypeToConstraints()

const absl::Span<const int> TypeToConstraints ( ConstraintProto::ConstraintCase  type) const
inline

Definition at line 118 of file cp_model_lns.h.

◆ VarToConstraint()

const std::vector<std::vector<int> >& VarToConstraint ( ) const
inline

Definition at line 113 of file cp_model_lns.h.

Member Data Documentation

◆ deterministic_time_

double deterministic_time_ = 0.0
protectedinherited

Definition at line 89 of file subsolver.h.

◆ name_

const std::string name_
protectedinherited

Definition at line 87 of file subsolver.h.

◆ score_

double score_ = 0.0
protectedinherited

Definition at line 88 of file subsolver.h.


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