![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
#include <synchronization.h>
Public Member Functions | |
SharedLsSolutionRepository () | |
void | AddSolution (std::vector< int64_t > solution, int num_violations) |
![]() | |
SharedSolutionRepository (int num_solutions_to_keep, absl::string_view name="") | |
int | NumSolutions () const |
std::shared_ptr< const Solution > | GetSolution (int index) const |
Returns the solution i where i must be smaller than NumSolutions(). | |
int64_t | GetBestRank () const |
std::vector< std::shared_ptr< const Solution > > | GetBestNSolutions (int n) const |
int64_t | GetVariableValueInSolution (int var_index, int solution_index) const |
std::shared_ptr< const Solution > | GetRandomBiasedSolution (absl::BitGenRef random) const |
Returns a random solution biased towards good solutions. | |
std::shared_ptr< const Solution > | Add (Solution solution) |
void | Synchronize () |
std::vector< std::string > | TableLineStats () const |
Additional Inherited Members | |
![]() | |
int64_t num_added_ | ABSL_GUARDED_BY (mutex_)=0 |
int64_t num_queried_ | ABSL_GUARDED_BY (mutex_)=0 |
int64_t num_synchronization_ | ABSL_GUARDED_BY (mutex_)=0 |
std::vector< int > tmp_indices_ | ABSL_GUARDED_BY (mutex_) |
std::vector< std::shared_ptr< Solution > > solutions_ | ABSL_GUARDED_BY (mutex_) |
std::vector< std::shared_ptr< Solution > > new_solutions_ | ABSL_GUARDED_BY (mutex_) |
![]() | |
const std::string | name_ |
const int | num_solutions_to_keep_ |
absl::Mutex | mutex_ |
Set of best solution from the feasibility jump workers.
We store (solution, num_violated_constraints), so we have a list of solutions that violate as little constraints as possible. This can be used to set the phase during SAT search.
Definition at line 177 of file synchronization.h.
|
inline |
Definition at line 179 of file synchronization.h.
|
inline |
Definition at line 182 of file synchronization.h.