Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Contain the logic to decide when to restart a SAT tree search. More...
#include <restart.h>
Public Member Functions | |
RestartPolicy (Model *model) | |
void | Reset () |
Resets the policy using the current model parameters. | |
bool | ShouldRestart () |
void | OnConflict (int conflict_trail_index, int conflict_decision_level, int conflict_lbd) |
int | NumRestarts () const |
Returns the number of restarts since the last Reset(). | |
std::string | InfoString () const |
Returns a string with the current restart statistics. | |
double | LbdAverageSinceReset () const |
Contain the logic to decide when to restart a SAT tree search.
|
inlineexplicit |
std::string operations_research::sat::RestartPolicy::InfoString | ( | ) | const |
Returns a string with the current restart statistics.
Definition at line 180 of file restart.cc.
|
inline |
|
inline |
void operations_research::sat::RestartPolicy::OnConflict | ( | int | conflict_trail_index, |
int | conflict_decision_level, | ||
int | conflict_lbd ) |
This will be called by the solver engine after each conflict. The arguments reflect the state of the solver when the conflict was detected and before the backjump.
Decrement the restart counter if needed.
Block the restart. Note(user): glucose only activate this after 10000 conflicts.
Definition at line 151 of file restart.cc.
void operations_research::sat::RestartPolicy::Reset | ( | ) |
Resets the policy using the current model parameters.
Compute the list of restart algorithms to cycle through.
Definition at line 30 of file restart.cc.
bool operations_research::sat::RestartPolicy::ShouldRestart | ( | ) |
Returns true if the solver should be restarted before the next decision is taken. Note that this will return true just once and then assumes that the search was restarted and starts worrying about the next restart.
Strategy switch?
The LUBY_RESTART strategy is considered the "stable" mode and we change the polariy heuristic while under it.
Reset the various restart strategies.
Definition at line 88 of file restart.cc.