From 49e47a336d4c8edd4d4e9fe4554e107fe953441d Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Mon, 24 Jan 2022 12:46:54 +0100 Subject: [PATCH] mostly reformat --- ortools/algorithms/samples/code_samples.bzl | 32 ++++++++++----------- ortools/bop/bop_base.cc | 1 + ortools/bop/bop_base.h | 1 + ortools/bop/bop_parameters.proto | 2 ++ ortools/bop/bop_solver.cc | 1 + 5 files changed, 21 insertions(+), 16 deletions(-) diff --git a/ortools/algorithms/samples/code_samples.bzl b/ortools/algorithms/samples/code_samples.bzl index 068bdf418e..9a36790d29 100644 --- a/ortools/algorithms/samples/code_samples.bzl +++ b/ortools/algorithms/samples/code_samples.bzl @@ -1,20 +1,20 @@ """Helper macro to compile and test code samples.""" def code_sample_cc(name): - native.cc_binary( - name = name, - srcs = [name + ".cc"], - deps = [ - "//ortools/algorithms:knapsack_solver_lib", - ], - ) + native.cc_binary( + name = name, + srcs = [name + ".cc"], + deps = [ + "//ortools/algorithms:knapsack_solver_lib", + ], + ) - native.cc_test( - name = name + "_test", - size = "small", - srcs = [name + ".cc"], - deps = [ - ":" + name, - "//ortools/algorithms:knapsack_solver_lib", - ], - ) + native.cc_test( + name = name+"_test", + size = "small", + srcs = [name + ".cc"], + deps = [ + ":"+name, + "//ortools/algorithms:knapsack_solver_lib", + ], + ) diff --git a/ortools/bop/bop_base.cc b/ortools/bop/bop_base.cc index c066d4d4d3..1b9d74f138 100644 --- a/ortools/bop/bop_base.cc +++ b/ortools/bop/bop_base.cc @@ -254,5 +254,6 @@ const std::vector& ProblemState::NewlyAddedBinaryClauses() void ProblemState::SynchronizationDone() { binary_clause_manager_.ClearNewlyAdded(); } + } // namespace bop } // namespace operations_research diff --git a/ortools/bop/bop_base.h b/ortools/bop/bop_base.h index 4e3254224c..43f88ddf48 100644 --- a/ortools/bop/bop_base.h +++ b/ortools/bop/bop_base.h @@ -280,6 +280,7 @@ struct LearnedInfo { // New binary clauses. std::vector binary_clauses; }; + } // namespace bop } // namespace operations_research #endif // OR_TOOLS_BOP_BOP_BASE_H_ diff --git a/ortools/bop/bop_parameters.proto b/ortools/bop/bop_parameters.proto index 962ca9dfdc..e2417b9580 100644 --- a/ortools/bop/bop_parameters.proto +++ b/ortools/bop/bop_parameters.proto @@ -131,6 +131,7 @@ message BopParameters { // Use Large Neighborhood Search based on the LP relaxation. optional bool use_lp_lns = 12 [default = true]; + // Whether we use sat propagation to choose the lns neighbourhood. optional bool use_sat_to_choose_lns_neighbourhood = 15 [default = true]; @@ -270,6 +271,7 @@ message BopParameters { // overhead can be "absorbed" by the other threads. optional double decomposed_problem_min_time_in_seconds = 36 [default = 0.0]; + // The first solutions based on guided SAT will work in chunk of that many // conflicts at the time. This allows to simulate parallelism between the // different guiding strategy on a single core. diff --git a/ortools/bop/bop_solver.cc b/ortools/bop/bop_solver.cc index f67bd99317..cd463a0f97 100644 --- a/ortools/bop/bop_solver.cc +++ b/ortools/bop/bop_solver.cc @@ -61,6 +61,7 @@ bool UpdateProblemStateBasedOnStatus(BopOptimizerBase::Status status, return false; } + } // anonymous namespace //------------------------------------------------------------------------------