continue re-architecture of CP-SAT search

This commit is contained in:
Laurent Perron
2019-07-05 09:33:04 +02:00
parent afc4ad1214
commit 98b59bc5e2
7 changed files with 204 additions and 69 deletions

View File

@@ -162,7 +162,8 @@ class CoreBasedOptimizer {
Model* model);
// TODO(user): Change the algo slighlty to allow resuming from the last
// aborted position.
// aborted position. Currently, the search is "resumable", but it will restart
// some of the work already done, so it might just never find anything.
SatSolver::Status Optimize();
private:
@@ -209,6 +210,10 @@ class CoreBasedOptimizer {
IntegerValue stratification_threshold_;
std::function<void()> feasible_solution_observer_;
// This is used to not add the objective equation more than once if we
// solve in "chunk".
bool already_switched_to_linear_scan_ = false;
// Set to true when we need to abort early.
//
// TODO(user): This is only used for the stop after first solution parameter