Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <cp_model_solver_helpers.h>
Public Member Functions | |
SharedClasses (const CpModelProto *proto, Model *global_model) | |
bool | SearchIsDone () |
Public Attributes | |
const CpModelProto & | model_proto |
These are never nullptr. | |
WallTimer *const | wall_timer |
ModelSharedTimeLimit *const | time_limit |
SolverLogger *const | logger |
SharedStatistics *const | stats |
SharedResponseManager *const | response |
SharedTreeManager *const | shared_tree_manager |
std::unique_ptr< SharedBoundsManager > | bounds |
These can be nullptr depending on the options. | |
std::unique_ptr< SharedLPSolutionRepository > | lp_solutions |
std::unique_ptr< SharedIncompleteSolutionManager > | incomplete_solutions |
std::unique_ptr< SharedClausesManager > | clauses |
SharedStatTables | stat_tables |
For displaying summary at the end. | |
Small wrapper containing all the shared classes between our subsolver threads. Note that all these classes can also be retrieved with something like global_model->GetOrCreate<Class>() but it is not thread-safe to do so.
All the classes here should be thread-safe, or at least safe in the way they are accessed. For instance the model_proto will be kept constant for the whole duration of the solve.
Definition at line 49 of file cp_model_solver_helpers.h.
operations_research::sat::SharedClasses::SharedClasses | ( | const CpModelProto * | proto, |
Model * | global_model ) |
Create extra shared classes if needed. Note that while these parameters are true by default, we disable them if we don't have enough workers for them in AdaptGlobalParameters().
Registering them to the global model should not really be necessary, except if one wants to expect them from outside SolveCpModel().
Set up synchronization mode in parallel.
Definition at line 1770 of file cp_model_solver_helpers.cc.
bool operations_research::sat::SharedClasses::SearchIsDone | ( | ) |
This is for cases where the time limit is checked more often.
Definition at line 1812 of file cp_model_solver_helpers.cc.
std::unique_ptr<SharedBoundsManager> operations_research::sat::SharedClasses::bounds |
These can be nullptr depending on the options.
Definition at line 62 of file cp_model_solver_helpers.h.
std::unique_ptr<SharedClausesManager> operations_research::sat::SharedClasses::clauses |
Definition at line 65 of file cp_model_solver_helpers.h.
std::unique_ptr<SharedIncompleteSolutionManager> operations_research::sat::SharedClasses::incomplete_solutions |
Definition at line 64 of file cp_model_solver_helpers.h.
SolverLogger* const operations_research::sat::SharedClasses::logger |
Definition at line 56 of file cp_model_solver_helpers.h.
std::unique_ptr<SharedLPSolutionRepository> operations_research::sat::SharedClasses::lp_solutions |
Definition at line 63 of file cp_model_solver_helpers.h.
const CpModelProto& operations_research::sat::SharedClasses::model_proto |
These are never nullptr.
Definition at line 53 of file cp_model_solver_helpers.h.
SharedResponseManager* const operations_research::sat::SharedClasses::response |
Definition at line 58 of file cp_model_solver_helpers.h.
SharedTreeManager* const operations_research::sat::SharedClasses::shared_tree_manager |
Definition at line 59 of file cp_model_solver_helpers.h.
SharedStatTables operations_research::sat::SharedClasses::stat_tables |
For displaying summary at the end.
Definition at line 68 of file cp_model_solver_helpers.h.
SharedStatistics* const operations_research::sat::SharedClasses::stats |
Definition at line 57 of file cp_model_solver_helpers.h.
ModelSharedTimeLimit* const operations_research::sat::SharedClasses::time_limit |
Definition at line 55 of file cp_model_solver_helpers.h.
WallTimer* const operations_research::sat::SharedClasses::wall_timer |
Definition at line 54 of file cp_model_solver_helpers.h.