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

#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< SharedBoundsManagerbounds
 These can be nullptr depending on the options.
 
std::unique_ptr< SharedLPSolutionRepositorylp_solutions
 
std::unique_ptr< SharedIncompleteSolutionManagerincomplete_solutions
 
std::unique_ptr< SharedClausesManagerclauses
 
SharedStatTables stat_tables
 For displaying summary at the end.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SharedClasses()

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.

Member Function Documentation

◆ SearchIsDone()

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.

Member Data Documentation

◆ bounds

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.

◆ clauses

std::unique_ptr<SharedClausesManager> operations_research::sat::SharedClasses::clauses

Definition at line 65 of file cp_model_solver_helpers.h.

◆ incomplete_solutions

std::unique_ptr<SharedIncompleteSolutionManager> operations_research::sat::SharedClasses::incomplete_solutions

Definition at line 64 of file cp_model_solver_helpers.h.

◆ logger

SolverLogger* const operations_research::sat::SharedClasses::logger

Definition at line 56 of file cp_model_solver_helpers.h.

◆ lp_solutions

std::unique_ptr<SharedLPSolutionRepository> operations_research::sat::SharedClasses::lp_solutions

Definition at line 63 of file cp_model_solver_helpers.h.

◆ model_proto

const CpModelProto& operations_research::sat::SharedClasses::model_proto

These are never nullptr.

Definition at line 53 of file cp_model_solver_helpers.h.

◆ response

SharedResponseManager* const operations_research::sat::SharedClasses::response

Definition at line 58 of file cp_model_solver_helpers.h.

◆ shared_tree_manager

SharedTreeManager* const operations_research::sat::SharedClasses::shared_tree_manager

Definition at line 59 of file cp_model_solver_helpers.h.

◆ stat_tables

SharedStatTables operations_research::sat::SharedClasses::stat_tables

For displaying summary at the end.

Definition at line 68 of file cp_model_solver_helpers.h.

◆ stats

SharedStatistics* const operations_research::sat::SharedClasses::stats

Definition at line 57 of file cp_model_solver_helpers.h.

◆ time_limit

ModelSharedTimeLimit* const operations_research::sat::SharedClasses::time_limit

Definition at line 55 of file cp_model_solver_helpers.h.

◆ wall_timer

WallTimer* const operations_research::sat::SharedClasses::wall_timer

Definition at line 54 of file cp_model_solver_helpers.h.


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