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

#include <bop_ls.h>

Inheritance diagram for operations_research::bop::LocalSearchOptimizer:
operations_research::bop::BopOptimizerBase

Public Member Functions

 LocalSearchOptimizer (absl::string_view name, int max_num_decisions, absl::BitGenRef random, sat::SatSolver *sat_propagator)
 
 ~LocalSearchOptimizer () override
 
- Public Member Functions inherited from operations_research::bop::BopOptimizerBase
 BopOptimizerBase (absl::string_view name)
 
virtual ~BopOptimizerBase ()
 
const std::string & name () const
 Returns the name given at construction.
 

Additional Inherited Members

- Public Types inherited from operations_research::bop::BopOptimizerBase
enum  Status {
  OPTIMAL_SOLUTION_FOUND , SOLUTION_FOUND , INFEASIBLE , LIMIT_REACHED ,
  INFORMATION_FOUND , CONTINUE , ABORT
}
 
- Static Public Member Functions inherited from operations_research::bop::BopOptimizerBase
static std::string GetStatusString (Status status)
 Returns a string describing the status.
 
- Protected Attributes inherited from operations_research::bop::BopOptimizerBase
const std::string name_
 
StatsGroup stats_
 

Detailed Description

This class defines a Local Search optimizer. The goal is to find a new solution with a better cost than the given solution by iterating on all assignments that can be reached in max_num_decisions decisions or less. The bop parameter max_number_of_explored_assignments_per_try_in_ls can be used to specify the number of new assignments to iterate on each time the method Optimize() is called. Limiting that parameter allows to reduce the time spent in the Optimize() method at once, and still explore all the reachable assignments (if Optimize() is called enough times).

Note
due to propagation, the number of variables with a different value in the new solution can be greater than max_num_decisions.

Definition at line 130 of file bop_ls.h.

Constructor & Destructor Documentation

◆ LocalSearchOptimizer()

operations_research::bop::LocalSearchOptimizer::LocalSearchOptimizer ( absl::string_view name,
int max_num_decisions,
absl::BitGenRef random,
sat::SatSolver * sat_propagator )

LocalSearchOptimizer

Definition at line 59 of file bop_ls.cc.

◆ ~LocalSearchOptimizer()

operations_research::bop::LocalSearchOptimizer::~LocalSearchOptimizer ( )
overridedefault

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