Files
ortools-clone/docs/cpp/restart_8cc_source.html
Mizux Seiha 17edcf0e25 Update doc
2021-09-30 01:28:18 +02:00

335 lines
57 KiB
HTML

<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OR-Tools: restart.cc Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="styleSheet.tmp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="orLogo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">OR-Tools
&#160;<span id="projectnumber">9.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('restart_8cc_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle"><div class="title">restart.cc</div></div>
</div><!--header-->
<div class="contents">
<a href="restart_8cc.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright 2010-2021 Google LLC</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">// you may not use this file except in compliance with the License.</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// You may obtain a copy of the License at</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">//</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">//</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// See the License for the specific language governing permissions and</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// limitations under the License.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &quot;<a class="code" href="restart_8h.html">ortools/sat/restart.h</a>&quot;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include &quot;absl/strings/str_format.h&quot;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &quot;absl/strings/str_split.h&quot;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &quot;<a class="code" href="port_2proto__utils_8h.html">ortools/port/proto_utils.h</a>&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceoperations__research.html">operations_research</a> {</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="keyword">namespace </span>sat {</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_restart_policy.html#a372de693ad40b3f42839c8ec6ac845f4"> 23</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_restart_policy.html#a372de693ad40b3f42839c8ec6ac845f4">RestartPolicy::Reset</a>() {</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> num_restarts_ = 0;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> strategy_counter_ = 0;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> strategy_change_conflicts_ =</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#aa1e51629e1c097bf47b59b8217622aab">num_conflicts_before_strategy_changes</a>();</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> conflicts_until_next_strategy_change_ = strategy_change_conflicts_;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> luby_count_ = 0;</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> conflicts_until_next_restart_ = parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a2e529e401bb4839107191c88e9a40354">restart_period</a>();</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> dl_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a7adffacaf51777a81f9d3ff4e95cfd7b">Reset</a>(parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a94024ef93d10714bff28c91e7b36964b">restart_running_window_size</a>());</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> lbd_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a7adffacaf51777a81f9d3ff4e95cfd7b">Reset</a>(parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a94024ef93d10714bff28c91e7b36964b">restart_running_window_size</a>());</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> trail_size_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a7adffacaf51777a81f9d3ff4e95cfd7b">Reset</a>(parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a3949bba8cab3b82602d59259bfce920d">blocking_restart_window_size</a>());</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="comment">// Compute the list of restart algorithms to cycle through.</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="comment">//</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="comment">// TODO(user): for some reason, strategies_.assign() does not work as the</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="comment">// returned type of the proto enum iterator is int ?!</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> strategies_.clear();</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ad512c88d16098c3fa418c2645f38b9d1">restart_algorithms_size</a>(); ++i) {</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> strategies_.push_back(parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a1d3d3d4baa63f084b6e5e45db7cacf9a">restart_algorithms</a>(i));</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> }</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">if</span> (strategies_.empty()) {</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">const</span> std::vector&lt;std::string&gt; string_values = absl::StrSplit(</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#af38b9af354d1d46b5077256ddc4c8ea1">default_restart_algorithms</a>(), <span class="charliteral">&#39;,&#39;</span>, absl::SkipEmpty());</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string&amp; string_value : string_values) {</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_enumeration" href="namespaceoperations__research_1_1sat.html#a94ab601b3fd87a63ae2e200a6c665482">SatParameters::RestartAlgorithm</a> tmp;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="preprocessor">#if defined(__PORTABLE_PLATFORM__)</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">if</span> (string_value == <span class="stringliteral">&quot;NO_RESTART&quot;</span>) {</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> tmp = <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a349e1d5ea28f024751c52530eccde3f1">SatParameters::NO_RESTART</a>;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (string_value == <span class="stringliteral">&quot;LUBY_RESTART&quot;</span>) {</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> tmp = <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#aca24cda99f26155443145b45fa8d01ec">SatParameters::LUBY_RESTART</a>;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (string_value == <span class="stringliteral">&quot;DL_MOVING_AVERAGE_RESTART&quot;</span>) {</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> tmp = <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a6541b27a81c52496144ebb5f8b76fd12">SatParameters::DL_MOVING_AVERAGE_RESTART</a>;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (string_value == <span class="stringliteral">&quot;LBD_MOVING_AVERAGE_RESTART&quot;</span>) {</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> tmp = <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a02400e7881b1dadd52cd4f6886a30ec1">SatParameters::LBD_MOVING_AVERAGE_RESTART</a>;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (string_value == <span class="stringliteral">&quot;FIXED_RESTART&quot;</span>) {</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> tmp = <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a0b6ef43add3ab77a343e3648ac5bfa44">SatParameters::FIXED_RESTART</a>;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <a class="code hl_define" href="base_2logging_8h.html#accad43a85d781d53381cd53a9894b6ae">LOG</a>(<a class="code hl_variable" href="log__severity_8h.html#a50e5762f38854b37ee3e2851bc1bb0e7">WARNING</a>) &lt;&lt; <span class="stringliteral">&quot;Couldn&#39;t parse the RestartAlgorithm name: &#39;&quot;</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> &lt;&lt; string_value &lt;&lt; <span class="stringliteral">&quot;&#39;.&quot;</span>;</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> }</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="preprocessor">#else </span><span class="comment">// __PORTABLE_PLATFORM__</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ac82ff5ee251afd49c0878bb1b14d9485">SatParameters::RestartAlgorithm_Parse</a>(string_value, &amp;tmp)) {</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <a class="code hl_define" href="base_2logging_8h.html#accad43a85d781d53381cd53a9894b6ae">LOG</a>(<a class="code hl_variable" href="log__severity_8h.html#a50e5762f38854b37ee3e2851bc1bb0e7">WARNING</a>) &lt;&lt; <span class="stringliteral">&quot;Couldn&#39;t parse the RestartAlgorithm name: &#39;&quot;</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> &lt;&lt; string_value &lt;&lt; <span class="stringliteral">&quot;&#39;.&quot;</span>;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="preprocessor">#endif </span><span class="comment">// !__PORTABLE_PLATFORM__</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> strategies_.push_back(tmp);</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> }</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> }</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">if</span> (strategies_.empty()) {</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> strategies_.push_back(<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a349e1d5ea28f024751c52530eccde3f1">SatParameters::NO_RESTART</a>);</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> }</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span>}</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_restart_policy.html#a9a4dbc2c6849f437d4f08288eeffbfed"> 81</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_restart_policy.html#a9a4dbc2c6849f437d4f08288eeffbfed">RestartPolicy::ShouldRestart</a>() {</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordtype">bool</span> should_restart = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">switch</span> (strategies_[strategy_counter_ % strategies_.size()]) {</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a349e1d5ea28f024751c52530eccde3f1">SatParameters::NO_RESTART</a>:</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#aca24cda99f26155443145b45fa8d01ec">SatParameters::LUBY_RESTART</a>:</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">if</span> (conflicts_until_next_restart_ == 0) {</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> luby_count_++;</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> should_restart = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> }</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a6541b27a81c52496144ebb5f8b76fd12">SatParameters::DL_MOVING_AVERAGE_RESTART</a>:</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordflow">if</span> (dl_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a9cc27103c6a070bad6dcaea6df83e7ff">IsWindowFull</a>() &amp;&amp;</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> dl_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#abe7238c645e1aeac09a33b1291357486">GlobalAverage</a>() &lt;</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#af98911e529481a841fa349a3e86d7a97">restart_dl_average_ratio</a>() *</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> dl_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a240c66108d94a6cf475664188437b3b0">WindowAverage</a>()) {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> should_restart = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> }</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a02400e7881b1dadd52cd4f6886a30ec1">SatParameters::LBD_MOVING_AVERAGE_RESTART</a>:</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">if</span> (lbd_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a9cc27103c6a070bad6dcaea6df83e7ff">IsWindowFull</a>() &amp;&amp;</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> lbd_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#abe7238c645e1aeac09a33b1291357486">GlobalAverage</a>() &lt;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a31df872ffbfbfc10564b0c5cfc8dc0d4">restart_lbd_average_ratio</a>() *</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> lbd_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a240c66108d94a6cf475664188437b3b0">WindowAverage</a>()) {</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> should_restart = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a0b6ef43add3ab77a343e3648ac5bfa44">SatParameters::FIXED_RESTART</a>:</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">if</span> (conflicts_until_next_restart_ == 0) {</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> should_restart = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> }</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> }</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordflow">if</span> (should_restart) {</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> num_restarts_++;</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="comment">// Strategy switch?</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">if</span> (conflicts_until_next_strategy_change_ == 0) {</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> strategy_counter_++;</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> strategy_change_conflicts_ +=</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a11d726a0fb9b87741887b29526ca0033">strategy_change_increase_ratio</a>() *</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> strategy_change_conflicts_);</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> conflicts_until_next_strategy_change_ = strategy_change_conflicts_;</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> </div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="comment">// The LUBY_RESTART strategy is considered the &quot;stable&quot; mode and we change</span></div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="comment">// the polariy heuristic while under it.</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> decision_policy_-&gt;<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_decision_policy.html#a9004867224c2af27a8b06fc439c8a7a4">SetStablePhase</a>(</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> strategies_[strategy_counter_ % strategies_.size()] ==</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#aca24cda99f26155443145b45fa8d01ec">SatParameters::LUBY_RESTART</a>);</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> }</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> </div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="comment">// Reset the various restart strategies.</span></div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> dl_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a8b0ef188b9f416aa368e07c94a9dd1af">ClearWindow</a>();</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> lbd_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a8b0ef188b9f416aa368e07c94a9dd1af">ClearWindow</a>();</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> conflicts_until_next_restart_ = parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a2e529e401bb4839107191c88e9a40354">restart_period</a>();</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">if</span> (strategies_[strategy_counter_ % strategies_.size()] ==</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#aca24cda99f26155443145b45fa8d01ec">SatParameters::LUBY_RESTART</a>) {</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> conflicts_until_next_restart_ *= <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#ab89c95fd9e5fe8176a7807d92872972e">SUniv</a>(luby_count_ + 1);</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> }</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> }</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="keywordflow">return</span> should_restart;</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span>}</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> </div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_restart_policy.html#a6656a848070cf8e91a9af92feee0477c"> 144</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_restart_policy.html#a6656a848070cf8e91a9af92feee0477c">RestartPolicy::OnConflict</a>(<span class="keywordtype">int</span> conflict_trail_index,</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="keywordtype">int</span> conflict_decision_level, <span class="keywordtype">int</span> conflict_lbd) {</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="comment">// Decrement the restart counter if needed.</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">if</span> (conflicts_until_next_restart_ &gt; 0) {</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> --conflicts_until_next_restart_;</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> }</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordflow">if</span> (conflicts_until_next_strategy_change_ &gt; 0) {</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> --conflicts_until_next_strategy_change_;</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> }</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> trail_size_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a925b6233d6cc9970b8f5bba800e9a3eb">Add</a>(conflict_trail_index);</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> dl_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a925b6233d6cc9970b8f5bba800e9a3eb">Add</a>(conflict_decision_level);</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> lbd_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a925b6233d6cc9970b8f5bba800e9a3eb">Add</a>(conflict_lbd);</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> </div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="comment">// Block the restart.</span></div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="comment">// Note(user): glucose only activate this after 10000 conflicts.</span></div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="keywordflow">if</span> (parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#acaaf774470271c3c023ab169156354fb">use_blocking_restart</a>()) {</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">if</span> (lbd_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a9cc27103c6a070bad6dcaea6df83e7ff">IsWindowFull</a>() &amp;&amp;</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> dl_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a9cc27103c6a070bad6dcaea6df83e7ff">IsWindowFull</a>() &amp;&amp;</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> trail_size_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a9cc27103c6a070bad6dcaea6df83e7ff">IsWindowFull</a>() &amp;&amp;</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> conflict_trail_index &gt;</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> parameters_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a5523099a7377143fc9fa791a26dfe6e9">blocking_restart_multiplier</a>() *</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> trail_size_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a240c66108d94a6cf475664188437b3b0">WindowAverage</a>()) {</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> dl_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a8b0ef188b9f416aa368e07c94a9dd1af">ClearWindow</a>();</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> lbd_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a8b0ef188b9f416aa368e07c94a9dd1af">ClearWindow</a>();</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> }</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> }</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span>}</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> </div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_restart_policy.html#a3b30aa3a72ace837ddc29fd371c6e46e"> 173</a></span>std::string <a class="code hl_function" href="classoperations__research_1_1sat_1_1_restart_policy.html#a3b30aa3a72ace837ddc29fd371c6e46e">RestartPolicy::InfoString</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> std::string result =</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> absl::StrFormat(<span class="stringliteral">&quot; num restarts: %d\n&quot;</span>, num_restarts_) +</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> absl::StrFormat(</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="stringliteral">&quot; current_strategy: %s\n&quot;</span>,</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> ProtoEnumToString&lt;SatParameters::RestartAlgorithm&gt;(</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> strategies_[strategy_counter_ % strategies_.size()])) +</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> absl::StrFormat(<span class="stringliteral">&quot; conflict decision level avg: %f window: %f\n&quot;</span>,</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> dl_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#abe7238c645e1aeac09a33b1291357486">GlobalAverage</a>(),</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> dl_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a240c66108d94a6cf475664188437b3b0">WindowAverage</a>()) +</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> absl::StrFormat(<span class="stringliteral">&quot; conflict lbd avg: %f window: %f\n&quot;</span>,</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> lbd_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#abe7238c645e1aeac09a33b1291357486">GlobalAverage</a>(),</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> lbd_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a240c66108d94a6cf475664188437b3b0">WindowAverage</a>()) +</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> absl::StrFormat(<span class="stringliteral">&quot; conflict trail size avg: %f window: %f\n&quot;</span>,</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> trail_size_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#abe7238c645e1aeac09a33b1291357486">GlobalAverage</a>(),</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> trail_size_running_average_.<a class="code hl_function" href="classoperations__research_1_1_running_average.html#a240c66108d94a6cf475664188437b3b0">WindowAverage</a>());</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span>}</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span>} <span class="comment">// namespace sat</span></div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span>} <span class="comment">// namespace operations_research</span></div>
<div class="ttc" id="abase_2logging_8h_html_accad43a85d781d53381cd53a9894b6ae"><div class="ttname"><a href="base_2logging_8h.html#accad43a85d781d53381cd53a9894b6ae">LOG</a></div><div class="ttdeci">#define LOG(severity)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00416">base/logging.h:416</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_running_average_html_a240c66108d94a6cf475664188437b3b0"><div class="ttname"><a href="classoperations__research_1_1_running_average.html#a240c66108d94a6cf475664188437b3b0">operations_research::RunningAverage::WindowAverage</a></div><div class="ttdeci">double WindowAverage() const</div><div class="ttdef"><b>Definition:</b> <a href="running__stat_8h_source.html#l00126">running_stat.h:126</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_running_average_html_a7adffacaf51777a81f9d3ff4e95cfd7b"><div class="ttname"><a href="classoperations__research_1_1_running_average.html#a7adffacaf51777a81f9d3ff4e95cfd7b">operations_research::RunningAverage::Reset</a></div><div class="ttdeci">void Reset(int window_size)</div><div class="ttdef"><b>Definition:</b> <a href="running__stat_8h_source.html#l00104">running_stat.h:104</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_running_average_html_a8b0ef188b9f416aa368e07c94a9dd1af"><div class="ttname"><a href="classoperations__research_1_1_running_average.html#a8b0ef188b9f416aa368e07c94a9dd1af">operations_research::RunningAverage::ClearWindow</a></div><div class="ttdeci">void ClearWindow()</div><div class="ttdef"><b>Definition:</b> <a href="running__stat_8h_source.html#l00131">running_stat.h:131</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_running_average_html_a925b6233d6cc9970b8f5bba800e9a3eb"><div class="ttname"><a href="classoperations__research_1_1_running_average.html#a925b6233d6cc9970b8f5bba800e9a3eb">operations_research::RunningAverage::Add</a></div><div class="ttdeci">void Add(int value)</div><div class="ttdef"><b>Definition:</b> <a href="running__stat_8h_source.html#l00111">running_stat.h:111</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_running_average_html_a9cc27103c6a070bad6dcaea6df83e7ff"><div class="ttname"><a href="classoperations__research_1_1_running_average.html#a9cc27103c6a070bad6dcaea6df83e7ff">operations_research::RunningAverage::IsWindowFull</a></div><div class="ttdeci">bool IsWindowFull() const</div><div class="ttdef"><b>Definition:</b> <a href="running__stat_8h_source.html#l00136">running_stat.h:136</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_running_average_html_abe7238c645e1aeac09a33b1291357486"><div class="ttname"><a href="classoperations__research_1_1_running_average.html#abe7238c645e1aeac09a33b1291357486">operations_research::RunningAverage::GlobalAverage</a></div><div class="ttdeci">double GlobalAverage() const</div><div class="ttdef"><b>Definition:</b> <a href="running__stat_8h_source.html#l00122">running_stat.h:122</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_restart_policy_html_a372de693ad40b3f42839c8ec6ac845f4"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_restart_policy.html#a372de693ad40b3f42839c8ec6ac845f4">operations_research::sat::RestartPolicy::Reset</a></div><div class="ttdeci">void Reset()</div><div class="ttdef"><b>Definition:</b> <a href="restart_8cc_source.html#l00023">restart.cc:23</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_restart_policy_html_a3b30aa3a72ace837ddc29fd371c6e46e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_restart_policy.html#a3b30aa3a72ace837ddc29fd371c6e46e">operations_research::sat::RestartPolicy::InfoString</a></div><div class="ttdeci">std::string InfoString() const</div><div class="ttdef"><b>Definition:</b> <a href="restart_8cc_source.html#l00173">restart.cc:173</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_restart_policy_html_a6656a848070cf8e91a9af92feee0477c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_restart_policy.html#a6656a848070cf8e91a9af92feee0477c">operations_research::sat::RestartPolicy::OnConflict</a></div><div class="ttdeci">void OnConflict(int conflict_trail_index, int conflict_decision_level, int conflict_lbd)</div><div class="ttdef"><b>Definition:</b> <a href="restart_8cc_source.html#l00144">restart.cc:144</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_restart_policy_html_a9a4dbc2c6849f437d4f08288eeffbfed"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_restart_policy.html#a9a4dbc2c6849f437d4f08288eeffbfed">operations_research::sat::RestartPolicy::ShouldRestart</a></div><div class="ttdeci">bool ShouldRestart()</div><div class="ttdef"><b>Definition:</b> <a href="restart_8cc_source.html#l00081">restart.cc:81</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_decision_policy_html_a9004867224c2af27a8b06fc439c8a7a4"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_decision_policy.html#a9004867224c2af27a8b06fc439c8a7a4">operations_research::sat::SatDecisionPolicy::SetStablePhase</a></div><div class="ttdeci">void SetStablePhase(bool is_stable)</div><div class="ttdef"><b>Definition:</b> <a href="sat__decision_8h_source.html#l00081">sat_decision.h:81</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a02400e7881b1dadd52cd4f6886a30ec1"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a02400e7881b1dadd52cd4f6886a30ec1">operations_research::sat::SatParameters::LBD_MOVING_AVERAGE_RESTART</a></div><div class="ttdeci">static constexpr RestartAlgorithm LBD_MOVING_AVERAGE_RESTART</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l00677">sat_parameters.pb.h:677</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a0b6ef43add3ab77a343e3648ac5bfa44"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a0b6ef43add3ab77a343e3648ac5bfa44">operations_research::sat::SatParameters::FIXED_RESTART</a></div><div class="ttdeci">static constexpr RestartAlgorithm FIXED_RESTART</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l00679">sat_parameters.pb.h:679</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a11d726a0fb9b87741887b29526ca0033"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a11d726a0fb9b87741887b29526ca0033">operations_research::sat::SatParameters::strategy_change_increase_ratio</a></div><div class="ttdeci">double strategy_change_increase_ratio() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l04659">sat_parameters.pb.h:4659</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a1d3d3d4baa63f084b6e5e45db7cacf9a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a1d3d3d4baa63f084b6e5e45db7cacf9a">operations_research::sat::SatParameters::restart_algorithms</a></div><div class="ttdeci">::operations_research::sat::SatParameters_RestartAlgorithm restart_algorithms(int index) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l04329">sat_parameters.pb.h:4329</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a2e529e401bb4839107191c88e9a40354"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a2e529e401bb4839107191c88e9a40354">operations_research::sat::SatParameters::restart_period</a></div><div class="ttdeci">::PROTOBUF_NAMESPACE_ID::int32 restart_period() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l04435">sat_parameters.pb.h:4435</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a31df872ffbfbfc10564b0c5cfc8dc0d4"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a31df872ffbfbfc10564b0c5cfc8dc0d4">operations_research::sat::SatParameters::restart_lbd_average_ratio</a></div><div class="ttdeci">double restart_lbd_average_ratio() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l04519">sat_parameters.pb.h:4519</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a349e1d5ea28f024751c52530eccde3f1"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a349e1d5ea28f024751c52530eccde3f1">operations_research::sat::SatParameters::NO_RESTART</a></div><div class="ttdeci">static constexpr RestartAlgorithm NO_RESTART</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l00671">sat_parameters.pb.h:671</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a3949bba8cab3b82602d59259bfce920d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a3949bba8cab3b82602d59259bfce920d">operations_research::sat::SatParameters::blocking_restart_window_size</a></div><div class="ttdeci">::PROTOBUF_NAMESPACE_ID::int32 blocking_restart_window_size() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l04575">sat_parameters.pb.h:4575</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a5523099a7377143fc9fa791a26dfe6e9"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a5523099a7377143fc9fa791a26dfe6e9">operations_research::sat::SatParameters::blocking_restart_multiplier</a></div><div class="ttdeci">double blocking_restart_multiplier() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l04603">sat_parameters.pb.h:4603</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a6541b27a81c52496144ebb5f8b76fd12"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a6541b27a81c52496144ebb5f8b76fd12">operations_research::sat::SatParameters::DL_MOVING_AVERAGE_RESTART</a></div><div class="ttdeci">static constexpr RestartAlgorithm DL_MOVING_AVERAGE_RESTART</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l00675">sat_parameters.pb.h:675</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a94024ef93d10714bff28c91e7b36964b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a94024ef93d10714bff28c91e7b36964b">operations_research::sat::SatParameters::restart_running_window_size</a></div><div class="ttdeci">::PROTOBUF_NAMESPACE_ID::int32 restart_running_window_size() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l04463">sat_parameters.pb.h:4463</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_aa1e51629e1c097bf47b59b8217622aab"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#aa1e51629e1c097bf47b59b8217622aab">operations_research::sat::SatParameters::num_conflicts_before_strategy_changes</a></div><div class="ttdeci">::PROTOBUF_NAMESPACE_ID::int32 num_conflicts_before_strategy_changes() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l04631">sat_parameters.pb.h:4631</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_ac82ff5ee251afd49c0878bb1b14d9485"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#ac82ff5ee251afd49c0878bb1b14d9485">operations_research::sat::SatParameters::RestartAlgorithm_Parse</a></div><div class="ttdeci">static bool RestartAlgorithm_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, RestartAlgorithm *value)</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l00701">sat_parameters.pb.h:701</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_aca24cda99f26155443145b45fa8d01ec"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#aca24cda99f26155443145b45fa8d01ec">operations_research::sat::SatParameters::LUBY_RESTART</a></div><div class="ttdeci">static constexpr RestartAlgorithm LUBY_RESTART</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l00673">sat_parameters.pb.h:673</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_acaaf774470271c3c023ab169156354fb"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#acaaf774470271c3c023ab169156354fb">operations_research::sat::SatParameters::use_blocking_restart</a></div><div class="ttdeci">bool use_blocking_restart() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l04547">sat_parameters.pb.h:4547</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_ad512c88d16098c3fa418c2645f38b9d1"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#ad512c88d16098c3fa418c2645f38b9d1">operations_research::sat::SatParameters::restart_algorithms_size</a></div><div class="ttdeci">int restart_algorithms_size() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l04320">sat_parameters.pb.h:4320</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_af38b9af354d1d46b5077256ddc4c8ea1"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#af38b9af354d1d46b5077256ddc4c8ea1">operations_research::sat::SatParameters::default_restart_algorithms</a></div><div class="ttdeci">const std::string &amp; default_restart_algorithms() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l04373">sat_parameters.pb.h:4373</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_af98911e529481a841fa349a3e86d7a97"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#af98911e529481a841fa349a3e86d7a97">operations_research::sat::SatParameters::restart_dl_average_ratio</a></div><div class="ttdeci">double restart_dl_average_ratio() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l04491">sat_parameters.pb.h:4491</a></div></div>
<div class="ttc" id="alog__severity_8h_html_a50e5762f38854b37ee3e2851bc1bb0e7"><div class="ttname"><a href="log__severity_8h.html#a50e5762f38854b37ee3e2851bc1bb0e7">WARNING</a></div><div class="ttdeci">const int WARNING</div><div class="ttdef"><b>Definition:</b> <a href="log__severity_8h_source.html#l00031">log_severity.h:31</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a94ab601b3fd87a63ae2e200a6c665482"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a94ab601b3fd87a63ae2e200a6c665482">operations_research::sat::SatParameters_RestartAlgorithm</a></div><div class="ttdeci">SatParameters_RestartAlgorithm</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l00218">sat_parameters.pb.h:218</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_ab89c95fd9e5fe8176a7807d92872972e"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#ab89c95fd9e5fe8176a7807d92872972e">operations_research::sat::SUniv</a></div><div class="ttdeci">int SUniv(int i)</div><div class="ttdef"><b>Definition:</b> <a href="restart_8h_source.html#l00085">restart.h:85</a></div></div>
<div class="ttc" id="anamespaceoperations__research_html"><div class="ttname"><a href="namespaceoperations__research.html">operations_research</a></div><div class="ttdoc">Collection of objects used to extend the Constraint Solver library.</div><div class="ttdef"><b>Definition:</b> <a href="dense__doubly__linked__list_8h_source.html#l00021">dense_doubly_linked_list.h:21</a></div></div>
<div class="ttc" id="aport_2proto__utils_8h_html"><div class="ttname"><a href="port_2proto__utils_8h.html">proto_utils.h</a></div></div>
<div class="ttc" id="arestart_8h_html"><div class="ttname"><a href="restart_8h.html">restart.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_a7cc1eeded8f693d0da6c729bc88c45a.html">ortools</a></li><li class="navelem"><a class="el" href="dir_dddac007a45022d9da6ea1dee012c3b9.html">sat</a></li><li class="navelem"><a class="el" href="restart_8cc.html">restart.cc</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>
</html>