Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <bop_fs.h>
Public Types | |
enum class | Policy { kNotGuided , kLpGuided , kObjectiveGuided , kUserGuided } |
The different guiding heuristics. More... | |
Public Types inherited from operations_research::bop::BopOptimizerBase | |
enum | Status { OPTIMAL_SOLUTION_FOUND , SOLUTION_FOUND , INFEASIBLE , LIMIT_REACHED , INFORMATION_FOUND , CONTINUE , ABORT } |
Public Member Functions | |
GuidedSatFirstSolutionGenerator (absl::string_view name, Policy policy) | |
~GuidedSatFirstSolutionGenerator () override | |
bool | ShouldBeRun (const ProblemState &problem_state) const override |
Status | Optimize (const BopParameters ¶meters, const ProblemState &problem_state, LearnedInfo *learned_info, TimeLimit *time_limit) override |
Public Member Functions inherited from operations_research::bop::BopOptimizerBase | |
BopOptimizerBase (absl::string_view name) | |
virtual | ~BopOptimizerBase () |
const std::string & | name () const |
Returns the name given at construction. | |
Additional Inherited Members | |
Static Public Member Functions inherited from operations_research::bop::BopOptimizerBase | |
static std::string | GetStatusString (Status status) |
Returns a string describing the status. | |
Protected Attributes inherited from operations_research::bop::BopOptimizerBase | |
const std::string | name_ |
StatsGroup | stats_ |
Tries to find a first solution using SAT and a given assignment preference. This optimizer will never run again once it has found a solution except if the policy is kNotGuided in which case it will be ran again.
|
strong |
operations_research::bop::GuidedSatFirstSolutionGenerator::GuidedSatFirstSolutionGenerator | ( | absl::string_view | name, |
Policy | policy ) |
|
overridedefault |
|
overridevirtual |
We use a relatively small conflict limit so that other optimizer get a chance to run if this one is slow. Note that if this limit is reached, we will return BopOptimizerBase::CONTINUE so that Optimize() will be called again later to resume the current work.
As the solution in the state problem is feasible, it is proved optimal.
The problem is proved infeasible
Implements operations_research::bop::BopOptimizerBase.
|
overridevirtual |
Returns true if this optimizer should be run on the given problem state. Some optimizer requires a feasible solution to run for instance.
Implements operations_research::bop::BopOptimizerBase.