Arguments: 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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eRestartPolicy\u003c/code\u003e class in C++ defines the logic for restarting the SAT tree search within the OR-Tools solver.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to track restart statistics (\u003ccode\u003eInfoString\u003c/code\u003e, \u003ccode\u003eNumRestarts\u003c/code\u003e), react to conflicts (\u003ccode\u003eOnConflict\u003c/code\u003e), and determine restart timing (\u003ccode\u003eShouldRestart\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eUsers can reset the policy using \u003ccode\u003eReset\u003c/code\u003e and initialize it with \u003ccode\u003eRestartPolicy\u003c/code\u003e using a model.\u003c/p\u003e\n"],["\u003cp\u003eThe policy helps guide the solver's search process by strategically restarting it based on conflict analysis and other factors.\u003c/p\u003e\n"]]],["The `RestartPolicy` class manages SAT tree search restarts. It provides methods to monitor and control the restart process. Key actions include: `Reset` to initialize the policy, `OnConflict` to update the policy after each conflict (recording conflict details), `ShouldRestart` to determine if a restart is needed, and `NumRestarts` to get the restart count. `InfoString` provides statistics about the current restarts. The class decides when to trigger a restart based on internal logic and solver state.\n"],null,["# RestartPolicy\n\nC++ Reference: class RestartPolicy\n==================================\n\n\nNote: This documentation is automatically generated.\nContain the logic to decide when to restart a SAT tree search.\n\n| Method ||\n|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`InfoString`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/restart.h#L57) | Return type: `std::string ` Returns a string with the current restart statistics. |\n| [`NumRestarts`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/restart.h#L54) | Return type: `int ` Returns the number of restarts since the last Reset(). |\n| [`OnConflict`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/restart.h#L50) | Return type: `void ` Arguments: `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. |\n| [`Reset`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/restart.h#L40) | Return type: `void ` Resets the policy using the current model parameters. |\n| [`RestartPolicy`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/restart.h#L33) | Return type: `explicit ` Arguments: `Model* model` \u003cbr /\u003e |\n| [`ShouldRestart`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/restart.h#L45) | Return type: `bool ` 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. |"]]