14#ifndef OR_TOOLS_BOP_BOP_LNS_H_
15#define OR_TOOLS_BOP_BOP_LNS_H_
27#include "ortools/bop/bop_parameters.pb.h"
32#include "ortools/sat/boolean_problem.pb.h"
49 bool ShouldBeRun(
const ProblemState& problem_state)
const final;
55 const ProblemState& problem_state,
int num_relaxed_vars);
57 int64_t state_update_stamp_;
58 std::unique_ptr<sat::SatSolver> sat_solver_;
111 bool ShouldBeRun(
const ProblemState& problem_state)
const final;
116 const bool use_lp_to_guide_sat_;
117 std::unique_ptr<NeighborhoodGenerator> neighborhood_generator_;
130 absl::BitGenRef random)
131 : objective_terms_(*objective_terms), random_(random) {}
135 void GenerateNeighborhood(
const ProblemState& problem_state,
139 absl::BitGenRef random_;
148 absl::BitGenRef random)
149 : objective_terms_(*objective_terms), random_(random) {}
153 void GenerateNeighborhood(
const ProblemState& problem_state,
157 absl::BitGenRef random_;
166 absl::BitGenRef random);
170 void GenerateNeighborhood(
const ProblemState& problem_state,
177 absl::BitGenRef random_;
A simple class to enforce both an elapsed time limit and a deterministic time limit in the same threa...
~BopAdaptiveLNSOptimizer() final
BopAdaptiveLNSOptimizer(const std::string &name, bool use_lp_to_guide_sat, NeighborhoodGenerator *neighborhood_generator, sat::SatSolver *sat_propagator)
BopCompleteLNSOptimizer(const std::string &name, const BopConstraintTerms &objective_terms)
~BopCompleteLNSOptimizer() final
const std::string & name() const
ConstraintBasedNeighborhood(const BopConstraintTerms *objective_terms, absl::BitGenRef random)
~ConstraintBasedNeighborhood() final
virtual ~NeighborhoodGenerator()
virtual void GenerateNeighborhood(const ProblemState &problem_state, double difficulty, sat::SatSolver *sat_propagator)=0
~ObjectiveBasedNeighborhood() final
ObjectiveBasedNeighborhood(const BopConstraintTerms *objective_terms, absl::BitGenRef random)
RelationGraphBasedNeighborhood(const sat::LinearBooleanProblem &problem, absl::BitGenRef random)
~RelationGraphBasedNeighborhood() final
ModelSharedTimeLimit * time_limit
Collection of objects used to extend the Constraint Solver library.