Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <synchronization.h>
Public Member Functions | |
SharedLPSolutionRepository (int num_solutions_to_keep) | |
void | NewLPSolution (std::vector< double > lp_solution) |
Public Member Functions inherited from operations_research::sat::SharedSolutionRepository< double > | |
SharedSolutionRepository (int num_solutions_to_keep, absl::string_view name="") | |
int | NumSolutions () const |
Solution | GetSolution (int index) const |
Returns the solution i where i must be smaller than NumSolutions(). | |
int64_t | GetBestRank () const |
double | GetVariableValueInSolution (int var_index, int solution_index) const |
Solution | GetRandomBiasedSolution (absl::BitGenRef random) const |
Returns a random solution biased towards good solutions. | |
void | Add (const Solution &solution) |
void | Synchronize () |
std::vector< std::string > | TableLineStats () const |
Additional Inherited Members | |
Protected Member Functions inherited from operations_research::sat::SharedSolutionRepository< double > | |
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< Solution > solutions_ | ABSL_GUARDED_BY (mutex_) |
std::vector< Solution > new_solutions_ | ABSL_GUARDED_BY (mutex_) |
Protected Attributes inherited from operations_research::sat::SharedSolutionRepository< double > | |
const std::string | name_ |
const int | num_solutions_to_keep_ |
absl::Mutex | mutex_ |
Definition at line 150 of file synchronization.h.
|
inlineexplicit |
Definition at line 152 of file synchronization.h.
void operations_research::sat::SharedLPSolutionRepository::NewLPSolution | ( | std::vector< double > | lp_solution | ) |
Add this solution to the pool.
We always prefer to keep the solution from the last synchronize batch.
Definition at line 75 of file synchronization.cc.