14#ifndef OR_TOOLS_BOP_BOP_LNS_H_
15#define OR_TOOLS_BOP_BOP_LNS_H_
21#include "absl/random/bit_gen_ref.h"
22#include "absl/strings/string_view.h"
25#include "ortools/bop/bop_parameters.pb.h"
28#include "ortools/sat/boolean_problem.pb.h"
44 bool ShouldBeRun(const
ProblemState& problem_state) const final;
50 const
ProblemState& problem_state,
int num_relaxed_vars);
52 int64_t state_update_stamp_;
53 std::unique_ptr<sat::SatSolver> sat_solver_;
106 bool ShouldBeRun(const
ProblemState& problem_state) const final;
111 const
bool use_lp_to_guide_sat_;
113 sat::SatSolver* const sat_propagator_;
125 absl::BitGenRef random)
126 : objective_terms_(*objective_terms), random_(random) {}
130 void GenerateNeighborhood(const
ProblemState& problem_state,
132 sat::SatSolver* sat_propagator) final;
134 absl::BitGenRef random_;
143 absl::BitGenRef random)
144 : objective_terms_(*objective_terms), random_(random) {}
148 void GenerateNeighborhood(const
ProblemState& problem_state,
150 sat::SatSolver* sat_propagator) final;
152 absl::BitGenRef random_;
161 absl::BitGenRef random);
165 void GenerateNeighborhood(const
ProblemState& problem_state,
167 sat::SatSolver* sat_propagator) final;
171 util_intops::StrongVector<VariableIndex,
std::vector<ConstraintIndex>>
173 absl::BitGenRef random_;
~BopAdaptiveLNSOptimizer() final
~BopCompleteLNSOptimizer() final
BopCompleteLNSOptimizer(absl::string_view name, const BopConstraintTerms &objective_terms)
const std::string & name() const
Returns the name given at construction.
ConstraintBasedNeighborhood(const BopConstraintTerms *objective_terms, absl::BitGenRef random)
~ConstraintBasedNeighborhood() final=default
virtual void GenerateNeighborhood(const ProblemState &problem_state, double difficulty, sat::SatSolver *sat_propagator)=0
virtual ~NeighborhoodGenerator()=default
NeighborhoodGenerator()=default
ObjectiveBasedNeighborhood(const BopConstraintTerms *objective_terms, absl::BitGenRef random)
~ObjectiveBasedNeighborhood() final=default
~RelationGraphBasedNeighborhood() final=default
const std::string name
A name for logging purposes.
In SWIG mode, we don't want anything besides these top-level includes.