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

#include <cp_model_lns.h>

Inheritance diagram for operations_research::sat::RelaxationInducedNeighborhoodGenerator:
operations_research::sat::NeighborhoodGenerator

Public Member Functions

 RelaxationInducedNeighborhoodGenerator (NeighborhoodGeneratorHelper const *helper, const SharedResponseManager *response_manager, const SharedLPSolutionRepository *lp_solutions, SharedIncompleteSolutionManager *incomplete_solutions, absl::string_view name)
 
Neighborhood Generate (const CpSolverResponse &initial_solution, double difficulty, absl::BitGenRef random) final
 Both initial solution and difficulty values are ignored.
 
bool ReadyToGenerate () const override
 Returns true if the required solutions are available.
 
- Public Member Functions inherited from operations_research::sat::NeighborhoodGenerator
 NeighborhoodGenerator (absl::string_view name, NeighborhoodGeneratorHelper const *helper)
 
virtual ~NeighborhoodGenerator ()=default
 
double GetUCBScore (int64_t total_num_calls) const
 
void AddSolveData (SolveData data)
 
double Synchronize ()
 
std::string name () const
 Returns a short description of the generator.
 
int64_t num_calls () const
 Number of times this generator was called.
 
int64_t num_fully_solved_calls () const
 Number of time the neighborhood was fully solved (OPTIMAL/INFEASIBLE).
 
int64_t num_improving_calls () const
 Out of num_calls(), how many improved the given solution.
 
int64_t num_consecutive_non_improving_calls () const
 
double difficulty () const
 The current difficulty of this generator.
 
double deterministic_limit () const
 The current time limit that the sub-solve should use on this generator.
 

Additional Inherited Members

- Protected Attributes inherited from operations_research::sat::NeighborhoodGenerator
const std::string name_
 
const NeighborhoodGeneratorHelperhelper_
 
absl::Mutex generator_mutex_
 

Detailed Description

Generates a neighborhood by fixing the variables to solutions reported in various repositories. This is inspired from RINS published in "Exploring relaxation induced neighborhoods to improve MIP solutions" 2004 by E. Danna et.

If incomplete_solutions is provided, this generates a neighborhood by fixing the variable values to a solution in the SharedIncompleteSolutionManager and ignores the other repositories.

Otherwise, if response_manager is not provided, this generates a neighborhood using only the linear/general relaxation values. The domain of the variables are reduced to the integer values around their lp solution/relaxation solution values. This was published in "RENS – The Relaxation Enforced Neighborhood" 2009 by Timo Berthold.

Definition at line 791 of file cp_model_lns.h.

Constructor & Destructor Documentation

◆ RelaxationInducedNeighborhoodGenerator()

operations_research::sat::RelaxationInducedNeighborhoodGenerator::RelaxationInducedNeighborhoodGenerator ( NeighborhoodGeneratorHelper const * helper,
const SharedResponseManager * response_manager,
const SharedLPSolutionRepository * lp_solutions,
SharedIncompleteSolutionManager * incomplete_solutions,
absl::string_view name )
inlineexplicit

Definition at line 793 of file cp_model_lns.h.

Member Function Documentation

◆ Generate()

Neighborhood operations_research::sat::RelaxationInducedNeighborhoodGenerator::Generate ( const CpSolverResponse & initial_solution,
double difficulty,
absl::BitGenRef random )
finalvirtual

Both initial solution and difficulty values are ignored.

Fix the variables in the local model.

Todo
(user): Instead of aborting, pick the closest point in the domain?

Implements operations_research::sat::NeighborhoodGenerator.

Definition at line 2315 of file cp_model_lns.cc.

◆ ReadyToGenerate()

bool operations_research::sat::RelaxationInducedNeighborhoodGenerator::ReadyToGenerate ( ) const
overridevirtual

Returns true if the required solutions are available.

Reimplemented from operations_research::sat::NeighborhoodGenerator.

Definition at line 2310 of file cp_model_lns.cc.


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