14#ifndef OR_TOOLS_SAT_CP_MODEL_SOLVER_HELPERS_H_
15#define OR_TOOLS_SAT_CP_MODEL_SOLVER_HELPERS_H_
24#include "absl/flags/declare.h"
25#include "absl/types/span.h"
27#include "ortools/sat/cp_model.pb.h"
30#include "ortools/sat/sat_parameters.pb.h"
67 std::unique_ptr<SharedBoundsManager>
bounds;
70 std::unique_ptr<SharedClausesManager>
clauses;
107 IntegerVariable objective_var,
131 int num_variable_in_original_model,
132 const CpModelProto& mapping_proto,
133 absl::Span<const int> postsolve_mapping,
The model "singleton" shared time limit.
Contains the table we display after the solver is done.
Simple class to add statistics by name and print them at the end.
ABSL_DECLARE_FLAG(bool, cp_model_dump_models)
void SolveLoadedCpModel(const CpModelProto &model_proto, Model *model)
void RegisterObjectiveBoundsImport(SharedResponseManager *shared_response_manager, Model *model)
void RegisterClausesExport(int id, SharedClausesManager *shared_clauses_manager, Model *model)
Registers a callback that will export good clauses discovered during search.
void MinimizeL1DistanceWithHint(const CpModelProto &model_proto, Model *model)
void LoadFeasibilityPump(const CpModelProto &model_proto, Model *model)
void AdaptGlobalParameters(const CpModelProto &model_proto, Model *model)
void QuickSolveWithHint(const CpModelProto &model_proto, Model *model)
void LoadDebugSolution(const CpModelProto &model_proto, Model *model)
void RegisterVariableBoundsLevelZeroExport(const CpModelProto &, SharedBoundsManager *shared_bounds_manager, Model *model)
void PostsolveResponseWrapper(const SatParameters ¶ms, int num_variable_in_original_model, const CpModelProto &mapping_proto, absl::Span< const int > postsolve_mapping, std::vector< int64_t > *solution)
void RegisterVariableBoundsLevelZeroImport(const CpModelProto &model_proto, SharedBoundsManager *shared_bounds_manager, Model *model)
void LoadCpModel(const CpModelProto &model_proto, Model *model)
void RegisterObjectiveBestBoundExport(IntegerVariable objective_var, SharedResponseManager *shared_response_manager, Model *model)
int RegisterClausesLevelZeroImport(int id, SharedClausesManager *shared_clauses_manager, Model *model)
In SWIG mode, we don't want anything besides these top-level includes.
Select next search node to expand Select next item_i to add this new search node to the search Generate a new search node where item_i is not in the knapsack Check validity of this new partial solution(using propagators) - If valid
void RegisterSharedClassesInLocalModel(Model *local_model)
SolverLogger *const logger
const CpModelProto & model_proto
These are never nullptr.
SharedLsSolutionRepository *const ls_hints
std::unique_ptr< SharedIncompleteSolutionManager > incomplete_solutions
std::unique_ptr< SharedClausesManager > clauses
ModelSharedTimeLimit *const time_limit
SharedTreeManager *const shared_tree_manager
SharedResponseManager *const response
SharedClasses(const CpModelProto *proto, Model *global_model)
SharedStatTables *const stat_tables
SharedStatistics *const stats
std::unique_ptr< SharedLPSolutionRepository > lp_solutions
WallTimer *const wall_timer
std::unique_ptr< SharedBoundsManager > bounds
These can be nullptr depending on the options.