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

845 lines
194 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: cp_model_search.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('cp__model__search_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">cp_model_search.cc</div></div>
</div><!--header-->
<div class="contents">
<a href="cp__model__search_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="cp__model__search_8h.html">ortools/sat/cp_model_search.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 &lt;cstdint&gt;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &lt;limits&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &lt;random&gt;</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="preprocessor">#include &quot;absl/container/flat_hash_map.h&quot;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &quot;absl/strings/str_format.h&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include &quot;<a class="code" href="cp__model__utils_8h.html">ortools/sat/cp_model_utils.h</a>&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include &quot;<a class="code" href="sat_2util_8h.html">ortools/sat/util.h</a>&quot;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceoperations__research.html">operations_research</a> {</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="keyword">namespace </span>sat {</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_cp_model_view.html#adc929cce11607181a7b435a028f8709f"> 28</a></span><a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_view.html#adc929cce11607181a7b435a028f8709f">CpModelView::CpModelView</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_model.html">Model</a>* <a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>)</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> : mapping_(*<a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;GetOrCreate&lt;<a class="code hl_class" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html">CpModelMapping</a>&gt;()),</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> boolean_assignment_(<a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;GetOrCreate&lt;<a class="code hl_class" href="classoperations__research_1_1sat_1_1_trail.html">Trail</a>&gt;()-&gt;<a class="code hl_class" href="classoperations__research_1_1_assignment.html">Assignment</a>()),</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> integer_trail_(*<a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;GetOrCreate&lt;<a class="code hl_class" href="classoperations__research_1_1sat_1_1_integer_trail.html">IntegerTrail</a>&gt;()),</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> integer_encoder_(*<a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;GetOrCreate&lt;<a class="code hl_class" href="classoperations__research_1_1sat_1_1_integer_encoder.html">IntegerEncoder</a>&gt;()) {}</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_cp_model_view.html#a9d3beb2afe4ae647674b054bf29290e2"> 34</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_view.html#a9d3beb2afe4ae647674b054bf29290e2">CpModelView::NumVariables</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#ae05bc267fe7166e53214c1b3fa157023">NumProtoVariables</a>(); }</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_cp_model_view.html#a724467d12811fa7f9d69c42814d5a7bd"> 36</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_view.html#a724467d12811fa7f9d69c42814d5a7bd">CpModelView::IsFixed</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordflow">if</span> (mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a40d4cc176c455f8de98e96aade69734a">IsBoolean</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)) {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordflow">return</span> boolean_assignment_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a49e751eb6f0e9babd957889bb8e7472d">VariableIsAssigned</a>(</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a922026cbae3cd7aac276fcad53bd4278">Literal</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>).<a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a6a5dcff82096cd7a7147bf996dbaa5a8">Variable</a>());</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a4c46b216006440e76f16d33797123b3b">IsInteger</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)) {</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">return</span> integer_trail_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_integer_trail.html#a523501d854b2ca8034d37c15e7c89117">IsFixed</a>(mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a877d019ee57a306f9dc8da11efcb4c82">Integer</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>));</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> }</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">return</span> <span class="keyword">true</span>; <span class="comment">// Default.</span></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> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_cp_model_view.html#a8701b9f9c1a34491a7a6a84f74da1a9e"> 46</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_view.html#a8701b9f9c1a34491a7a6a84f74da1a9e">CpModelView::IsCurrentlyFree</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">return</span> mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a4c46b216006440e76f16d33797123b3b">IsInteger</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>) &amp;&amp;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> integer_trail_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_integer_trail.html#a309d057e12c8d4d393f13975eea2e2a9">IsCurrentlyIgnored</a>(mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a877d019ee57a306f9dc8da11efcb4c82">Integer</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>));</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span>}</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_cp_model_view.html#afef192be7cc9b9ac060dc9e8da0cb2fc"> 51</a></span>int64_t <a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_view.html#afef192be7cc9b9ac060dc9e8da0cb2fc">CpModelView::Min</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">if</span> (mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a40d4cc176c455f8de98e96aade69734a">IsBoolean</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)) {</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> l = mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a922026cbae3cd7aac276fcad53bd4278">Literal</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">return</span> boolean_assignment_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a5300129913f51dcb0b1c531e3248490e">LiteralIsTrue</a>(l) ? 1 : 0;</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> (mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a4c46b216006440e76f16d33797123b3b">IsInteger</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)) {</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">return</span> integer_trail_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_integer_trail.html#ab857cd2aead68952d9fe92a8ad8d3ac9">LowerBound</a>(mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a877d019ee57a306f9dc8da11efcb4c82">Integer</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)).value();</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> }</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">return</span> 0; <span class="comment">// Default.</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span>}</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_cp_model_view.html#aece25b118cb8a3a0a9ddd134d96d9ae1"> 61</a></span>int64_t <a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_view.html#aece25b118cb8a3a0a9ddd134d96d9ae1">CpModelView::Max</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">if</span> (mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a40d4cc176c455f8de98e96aade69734a">IsBoolean</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)) {</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> l = mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a922026cbae3cd7aac276fcad53bd4278">Literal</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">return</span> boolean_assignment_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#acfd1646011e643f58fd7dc66d9cc90a5">LiteralIsFalse</a>(l) ? 0 : 1;</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a4c46b216006440e76f16d33797123b3b">IsInteger</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)) {</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">return</span> integer_trail_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_integer_trail.html#a8b6d5a25e6ad3d28a85b1924471e2cac">UpperBound</a>(mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a877d019ee57a306f9dc8da11efcb4c82">Integer</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)).value();</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> }</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">return</span> 0; <span class="comment">// Default.</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span>}</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_cp_model_view.html#a8635df410af81fb62224e17be268620c"> 71</a></span><a class="code hl_struct" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">BooleanOrIntegerLiteral</a> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_view.html#a8635df410af81fb62224e17be268620c">CpModelView::GreaterOrEqual</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>,</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> int64_t <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(!<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_view.html#a724467d12811fa7f9d69c42814d5a7bd">IsFixed</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>));</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_struct" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">BooleanOrIntegerLiteral</a> result;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordflow">if</span> (mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a40d4cc176c455f8de98e96aade69734a">IsBoolean</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)) {</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(<a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a> == 0 || <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a> == 1);</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a> == 1) {</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> result.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html#a3c6f3ae96a90c7fcef34dd0f1ce0297e">boolean_literal_index</a> = mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a922026cbae3cd7aac276fcad53bd4278">Literal</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>).<a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a4a11c7c4d7706c09de5e18707c3b5c62">Index</a>();</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> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a4c46b216006440e76f16d33797123b3b">IsInteger</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)) {</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> result.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html#aee356429e37f0750e38ee17ae1464a00">integer_literal</a> = <a class="code hl_function" href="structoperations__research_1_1sat_1_1_integer_literal.html#a6c233aafac25ea66d69de93a83c9be63">IntegerLiteral::GreaterOrEqual</a>(</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a877d019ee57a306f9dc8da11efcb4c82">Integer</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>), IntegerValue(<a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>));</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> }</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span>}</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_cp_model_view.html#aee82fe548f25e7db55682d9dfcaee51b"> 87</a></span><a class="code hl_struct" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">BooleanOrIntegerLiteral</a> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_view.html#aee82fe548f25e7db55682d9dfcaee51b">CpModelView::LowerOrEqual</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>,</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> int64_t <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(!<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_view.html#a724467d12811fa7f9d69c42814d5a7bd">IsFixed</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>));</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <a class="code hl_struct" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">BooleanOrIntegerLiteral</a> result;</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordflow">if</span> (mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a40d4cc176c455f8de98e96aade69734a">IsBoolean</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)) {</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(<a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a> == 0 || <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a> == 1);</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a> == 0) {</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> result.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html#a3c6f3ae96a90c7fcef34dd0f1ce0297e">boolean_literal_index</a> = mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a922026cbae3cd7aac276fcad53bd4278">Literal</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>).<a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a239e1315c4e975a35537790ba0d913a7">NegatedIndex</a>();</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> }</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a4c46b216006440e76f16d33797123b3b">IsInteger</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)) {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> result.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html#aee356429e37f0750e38ee17ae1464a00">integer_literal</a> = <a class="code hl_function" href="structoperations__research_1_1sat_1_1_integer_literal.html#a3e2eb445631727dd4abf1d5343f16b2f">IntegerLiteral::LowerOrEqual</a>(mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a877d019ee57a306f9dc8da11efcb4c82">Integer</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>),</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> IntegerValue(<a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>));</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> }</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span>}</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_cp_model_view.html#ab1c777219019216dad10f30c74a3bc2b"> 103</a></span><a class="code hl_struct" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">BooleanOrIntegerLiteral</a> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_view.html#ab1c777219019216dad10f30c74a3bc2b">CpModelView::MedianValue</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(!<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_view.html#a724467d12811fa7f9d69c42814d5a7bd">IsFixed</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>));</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <a class="code hl_struct" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">BooleanOrIntegerLiteral</a> result;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordflow">if</span> (mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a40d4cc176c455f8de98e96aade69734a">IsBoolean</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)) {</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> result.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html#a3c6f3ae96a90c7fcef34dd0f1ce0297e">boolean_literal_index</a> = mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a922026cbae3cd7aac276fcad53bd4278">Literal</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>).<a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a239e1315c4e975a35537790ba0d913a7">NegatedIndex</a>();</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a4c46b216006440e76f16d33797123b3b">IsInteger</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)) {</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keyword">const</span> IntegerVariable variable = mapping_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a877d019ee57a306f9dc8da11efcb4c82">Integer</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <a class="code hl_define" href="base_2logging_8h.html#ab25e01a2942b821d66371fc68d53f2eb">CHECK_NE</a>(variable, <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a5bd8c44473618b7eafd33ba978db2f06">kNoIntegerVariable</a>);</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <a class="code hl_define" href="base_2logging_8h.html#a3e1cfef60e774a81f30eaddf26a3a274">CHECK</a>(integer_encoder_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_integer_encoder.html#ac9e262bbda19ec4b7d51bd77b70bb363">VariableIsFullyEncoded</a>(variable));</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> std::vector&lt;IntegerEncoder::ValueLiteralPair&gt; encoding =</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> integer_encoder_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_integer_encoder.html#ad31b2f541f1dd2cbb531c66347ea08e9">RawDomainEncoding</a>(variable);</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> std::sort(encoding.begin(), encoding.end());</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> std::vector&lt;Literal&gt; unassigned_sorted_literals;</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; p : encoding) {</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordflow">if</span> (!boolean_assignment_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a142694366986039454f53b38e8378815">LiteralIsAssigned</a>(p.literal)) {</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> unassigned_sorted_literals.push_back(p.literal);</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> }</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> }</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="comment">// 5 values -&gt; returns the second.</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="comment">// 4 values -&gt; returns the second too.</span></div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="comment">// Array is 0 based.</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keyword">const</span> <span class="keywordtype">int</span> target = (unassigned_sorted_literals.size() + 1) / 2 - 1;</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> result.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html#a3c6f3ae96a90c7fcef34dd0f1ce0297e">boolean_literal_index</a> = unassigned_sorted_literals[target].Index();</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> }</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span>}</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span><span class="comment">// Stores one variable and its strategy value.</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_var_value.html"> 131</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structoperations__research_1_1sat_1_1_var_value.html">VarValue</a> {</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_var_value.html#adb528a1cb1ca190150183394d082590d"> 132</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_var_value.html#adb528a1cb1ca190150183394d082590d">ref</a>;</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_var_value.html#ac072af30c4ffbc834bb4c681f6ecb514"> 133</a></span> int64_t <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_var_value.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>;</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span>};</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> </div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span><span class="keyword">namespace </span>{</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> </div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span><span class="comment">// TODO(user): Save this somewhere instead of recomputing it.</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span><span class="keywordtype">bool</span> ModelHasSchedulingConstraints(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_cp_model_proto.html">CpModelProto</a>&amp; cp_model_proto) {</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_constraint_proto.html">ConstraintProto</a>&amp; <a class="code hl_variable" href="demon__profiler_8cc.html#a05da18ca9c7b657a4a6ea24e07c9b695">ct</a> : cp_model_proto.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_proto.html#afce66afa8ae7776a449bba7313ea3559">constraints</a>()) {</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="demon__profiler_8cc.html#a05da18ca9c7b657a4a6ea24e07c9b695">ct</a>.constraint_case() == <a class="code hl_enumvalue" href="classoperations__research_1_1sat_1_1_constraint_proto.html#ada030f50fcddb646af448ac7c5705e35aa604bb0c8d30d6e0908b243370cf98a7">ConstraintProto::kNoOverlap</a>) <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="demon__profiler_8cc.html#a05da18ca9c7b657a4a6ea24e07c9b695">ct</a>.constraint_case() == <a class="code hl_enumvalue" href="classoperations__research_1_1sat_1_1_constraint_proto.html#ada030f50fcddb646af448ac7c5705e35a6273d2906038e97dc4d54d89436a305a">ConstraintProto::kCumulative</a>) <span class="keywordflow">return</span> <span class="keyword">true</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"> 144</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span>}</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> </div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span>} <span class="comment">// namespace</span></div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> </div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#a097ca8cb4e3e4c0b29c27846f578f23b"> 149</a></span><span class="keyword">const</span> std::function&lt;<a class="code hl_struct" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">BooleanOrIntegerLiteral</a>()&gt; <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a097ca8cb4e3e4c0b29c27846f578f23b">ConstructSearchStrategyInternal</a>(</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keyword">const</span> std::vector&lt;DecisionStrategyProto&gt;&amp; strategies, <a class="code hl_class" href="classoperations__research_1_1sat_1_1_model.html">Model</a>* <a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>) {</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keyword">const</span> <span class="keyword">auto</span>&amp; view = *<a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;GetOrCreate&lt;<a class="code hl_class" href="classoperations__research_1_1sat_1_1_cp_model_view.html">CpModelView</a>&gt;();</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keyword">const</span> <span class="keyword">auto</span>&amp; <a class="code hl_variable" href="cp__model__fz__solver_8cc.html#a10a1eab179b472c030bdc2a2efef7219">parameters</a> = *<a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;GetOrCreate&lt;<a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a>&gt;();</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keyword">auto</span>* random = <a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;GetOrCreate&lt;<a class="code hl_class" href="classoperations__research_1_1sat_1_1_model_random_generator.html">ModelRandomGenerator</a>&gt;();</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> </div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="comment">// Note that we copy strategies to keep the return function validity</span></div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="comment">// independently of the life of the passed vector.</span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keywordflow">return</span> [&amp;view, &amp;<a class="code hl_variable" href="cp__model__fz__solver_8cc.html#a10a1eab179b472c030bdc2a2efef7219">parameters</a>, random, strategies]() {</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html">DecisionStrategyProto</a>&amp; strategy : strategies) {</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordtype">int</span> candidate;</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> int64_t candidate_value = <a class="code hl_variable" href="alldiff__cst_8cc.html#a26e6db9bcc64b584051ecc28171ed11f">std::numeric_limits&lt;int64_t&gt;::max</a>();</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> </div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="comment">// TODO(user): Improve the complexity if this becomes an issue which</span></div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="comment">// may be the case if we do a fixed_search.</span></div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="comment">// To store equivalent variables in randomized search.</span></div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> std::vector&lt;VarValue&gt; active_refs;</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> </div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> <span class="keywordtype">int</span> t_index = 0; <span class="comment">// Index in strategy.transformations().</span></div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strategy.variables().size(); ++i) {</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keyword">const</span> <span class="keywordtype">int</span> ref = strategy.variables(i);</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a> = <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#acdbc8ad33149d45a6e6fcd8b72fd68ed">PositiveRef</a>(ref);</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keywordflow">if</span> (view.IsFixed(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>) || view.IsCurrentlyFree(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)) <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> </div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> int64_t coeff(1);</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> int64_t offset(0);</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="keywordflow">while</span> (t_index &lt; strategy.transformations().size() &amp;&amp;</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> strategy.transformations(t_index).index() &lt; i) {</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> ++t_index;</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> }</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordflow">if</span> (t_index &lt; strategy.transformations_size() &amp;&amp;</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> strategy.transformations(t_index).index() == i) {</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> coeff = strategy.transformations(t_index).positive_coeff();</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> offset = strategy.transformations(t_index).offset();</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> }</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> </div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="comment">// TODO(user): deal with integer overflow in case of wrongly specified</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="comment">// coeff? Note that if this is filled by the presolve it shouldn&#39;t</span></div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="comment">// happen since any feasible value in the new variable domain should be</span></div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <span class="comment">// a feasible value of the original variable domain.</span></div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> int64_t <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>(0);</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> int64_t lb = view.Min(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> int64_t ub = view.Max(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a217338425de4389014563f1f24331713">RefIsPositive</a>(ref)) {</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> lb = -view.Max(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> ub = -view.Min(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> }</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="keywordflow">switch</span> (strategy.variable_selection_strategy()) {</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#ac97244061e3840a546f716a0906d963a">DecisionStrategyProto::CHOOSE_FIRST</a>:</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a3e767a434f1ae24aa77b216d01262b46">DecisionStrategyProto::CHOOSE_LOWEST_MIN</a>:</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a> = coeff * lb + offset;</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#aaf8918709f489a1fe2ad4165a0708bd7">DecisionStrategyProto::CHOOSE_HIGHEST_MAX</a>:</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a> = -(coeff * ub + offset);</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a97eeb48d600352e193d22197fce8cec2">DecisionStrategyProto::CHOOSE_MIN_DOMAIN_SIZE</a>:</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a> = coeff * (ub - lb + 1);</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a38e09a959d68cbaea40347bbeec7f367">DecisionStrategyProto::CHOOSE_MAX_DOMAIN_SIZE</a>:</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a> = -coeff * (ub - lb + 1);</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <a class="code hl_define" href="base_2logging_8h.html#accad43a85d781d53381cd53a9894b6ae">LOG</a>(<a class="code hl_variable" href="log__severity_8h.html#acdd38e3c9f22f127d7776920e3079eda">FATAL</a>) &lt;&lt; <span class="stringliteral">&quot;Unknown VariableSelectionStrategy &quot;</span></div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> &lt;&lt; strategy.variable_selection_strategy();</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> }</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a> &lt; candidate_value) {</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> candidate = ref;</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> candidate_value = <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>;</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> }</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <span class="keywordflow">if</span> (strategy.variable_selection_strategy() ==</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#ac97244061e3840a546f716a0906d963a">DecisionStrategyProto::CHOOSE_FIRST</a> &amp;&amp;</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> !<a class="code hl_variable" href="cp__model__fz__solver_8cc.html#a10a1eab179b472c030bdc2a2efef7219">parameters</a>.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ae535d7515d701373438ee5c103cd3031">randomize_search</a>()) {</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="cp__model__fz__solver_8cc.html#a10a1eab179b472c030bdc2a2efef7219">parameters</a>.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ae535d7515d701373438ee5c103cd3031">randomize_search</a>()) {</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a> &lt;=</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> candidate_value + <a class="code hl_variable" href="cp__model__fz__solver_8cc.html#a10a1eab179b472c030bdc2a2efef7219">parameters</a>.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ae2c4cfa9b4e95ca5fa194ceedcd162fb">search_randomization_tolerance</a>()) {</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> active_refs.push_back({ref, <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>});</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> }</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> }</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> }</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> </div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <span class="keywordflow">if</span> (candidate_value == <a class="code hl_variable" href="alldiff__cst_8cc.html#a26e6db9bcc64b584051ecc28171ed11f">std::numeric_limits&lt;int64_t&gt;::max</a>()) <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="cp__model__fz__solver_8cc.html#a10a1eab179b472c030bdc2a2efef7219">parameters</a>.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ae535d7515d701373438ee5c103cd3031">randomize_search</a>()) {</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> <a class="code hl_define" href="base_2logging_8h.html#a3e1cfef60e774a81f30eaddf26a3a274">CHECK</a>(!active_refs.empty());</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <span class="keyword">const</span> IntegerValue threshold(</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> candidate_value + <a class="code hl_variable" href="cp__model__fz__solver_8cc.html#a10a1eab179b472c030bdc2a2efef7219">parameters</a>.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ae2c4cfa9b4e95ca5fa194ceedcd162fb">search_randomization_tolerance</a>());</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="keyword">auto</span> is_above_tolerance = [threshold](<span class="keyword">const</span> <a class="code hl_struct" href="structoperations__research_1_1sat_1_1_var_value.html">VarValue</a>&amp; entry) {</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> <span class="keywordflow">return</span> entry.value &gt; threshold;</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> };</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> <span class="comment">// Remove all values above tolerance.</span></div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> active_refs.erase(std::remove_if(active_refs.begin(), active_refs.end(),</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> is_above_tolerance),</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> active_refs.end());</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> <span class="keyword">const</span> <span class="keywordtype">int</span> winner = absl::Uniform&lt;int&gt;(*random, 0, active_refs.size());</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> candidate = active_refs[winner].ref;</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> }</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> </div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> <a class="code hl_enumeration" href="namespaceoperations__research_1_1sat.html#a0ab0c4789d577b30dde661c19f88d00e">DecisionStrategyProto::DomainReductionStrategy</a> selection =</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> strategy.domain_reduction_strategy();</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a217338425de4389014563f1f24331713">RefIsPositive</a>(candidate)) {</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> <span class="keywordflow">switch</span> (selection) {</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a077b0a300e818c188123729d35fbac9c">DecisionStrategyProto::SELECT_MIN_VALUE</a>:</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> selection = <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a2f479f9cb1e0e8bb189d810d899673d9">DecisionStrategyProto::SELECT_MAX_VALUE</a>;</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a2f479f9cb1e0e8bb189d810d899673d9">DecisionStrategyProto::SELECT_MAX_VALUE</a>:</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> selection = <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a077b0a300e818c188123729d35fbac9c">DecisionStrategyProto::SELECT_MIN_VALUE</a>;</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a914b87c4401bfbe3531933bdd83e63fe">DecisionStrategyProto::SELECT_LOWER_HALF</a>:</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> selection = <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#af532692efe270e142c91e425aadebf63">DecisionStrategyProto::SELECT_UPPER_HALF</a>;</div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#af532692efe270e142c91e425aadebf63">DecisionStrategyProto::SELECT_UPPER_HALF</a>:</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> selection = <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a914b87c4401bfbe3531933bdd83e63fe">DecisionStrategyProto::SELECT_LOWER_HALF</a>;</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> }</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> }</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> </div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a> = <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#acdbc8ad33149d45a6e6fcd8b72fd68ed">PositiveRef</a>(candidate);</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="keyword">const</span> int64_t lb = view.Min(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <span class="keyword">const</span> int64_t ub = view.Max(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <span class="keywordflow">switch</span> (selection) {</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a077b0a300e818c188123729d35fbac9c">DecisionStrategyProto::SELECT_MIN_VALUE</a>:</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> <span class="keywordflow">return</span> view.LowerOrEqual(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, lb);</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a2f479f9cb1e0e8bb189d810d899673d9">DecisionStrategyProto::SELECT_MAX_VALUE</a>:</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> <span class="keywordflow">return</span> view.GreaterOrEqual(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, ub);</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a914b87c4401bfbe3531933bdd83e63fe">DecisionStrategyProto::SELECT_LOWER_HALF</a>:</div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> <span class="keywordflow">return</span> view.LowerOrEqual(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, lb + (ub - lb) / 2);</div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#af532692efe270e142c91e425aadebf63">DecisionStrategyProto::SELECT_UPPER_HALF</a>:</div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> <span class="keywordflow">return</span> view.GreaterOrEqual(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, ub - (ub - lb) / 2);</div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a714ed0d3d67bec4d88cadc7f32e59f3e">DecisionStrategyProto::SELECT_MEDIAN_VALUE</a>:</div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> <span class="keywordflow">return</span> view.MedianValue(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <a class="code hl_define" href="base_2logging_8h.html#accad43a85d781d53381cd53a9894b6ae">LOG</a>(<a class="code hl_variable" href="log__severity_8h.html#acdd38e3c9f22f127d7776920e3079eda">FATAL</a>) &lt;&lt; <span class="stringliteral">&quot;Unknown DomainReductionStrategy &quot;</span></div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> &lt;&lt; strategy.domain_reduction_strategy();</div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> }</div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> }</div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> <span class="keywordflow">return</span> <a class="code hl_struct" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">BooleanOrIntegerLiteral</a>();</div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> };</div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span>}</div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> </div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#aef9a9e314dd32a66b7540b0ae367eb4f"> 292</a></span>std::function&lt;<a class="code hl_struct" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">BooleanOrIntegerLiteral</a>()&gt; <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#aef9a9e314dd32a66b7540b0ae367eb4f">ConstructSearchStrategy</a>(</div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_cp_model_proto.html">CpModelProto</a>&amp; cp_model_proto,</div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> <span class="keyword">const</span> std::vector&lt;IntegerVariable&gt;&amp; variable_mapping,</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> IntegerVariable objective_var, <a class="code hl_class" href="classoperations__research_1_1sat_1_1_model.html">Model</a>* <a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>) {</div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> std::vector&lt;std::function&lt;<a class="code hl_struct" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">BooleanOrIntegerLiteral</a>()&gt;&gt; heuristics;</div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> </div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> <span class="comment">// We start by the user specified heuristic.</span></div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> {</div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> std::vector&lt;DecisionStrategyProto&gt; strategies;</div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html">DecisionStrategyProto</a>&amp; <a class="code hl_variable" href="cp__model__fz__solver_8cc.html#aed003f5eb5197bc586b7ef2c36a63da2">proto</a> :</div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> cp_model_proto.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_proto.html#a6e5a7240e89f8a6665de1da5554603ec">search_strategy</a>()) {</div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> strategies.push_back(<a class="code hl_variable" href="cp__model__fz__solver_8cc.html#aed003f5eb5197bc586b7ef2c36a63da2">proto</a>);</div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> }</div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> heuristics.push_back(<a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a097ca8cb4e3e4c0b29c27846f578f23b">ConstructSearchStrategyInternal</a>(strategies, <a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>));</div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> }</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> </div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> <span class="comment">// If there are some scheduling constraint, we complete with a custom</span></div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> <span class="comment">// &quot;scheduling&quot; strategy.</span></div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> <span class="keywordflow">if</span> (ModelHasSchedulingConstraints(cp_model_proto)) {</div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> heuristics.push_back(<a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a6c01e08a9089e0d5fed2507f479bbadc">SchedulingSearchHeuristic</a>(<a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>));</div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> }</div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> </div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> <span class="comment">// If needed, we finish by instantiating anything left.</span></div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;GetOrCreate&lt;<a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a>&gt;()-&gt;<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#aaee385bc09f704a88dee6b939782e21a">instantiate_all_variables</a>()) {</div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> std::vector&lt;IntegerVariable&gt; decisions;</div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> IntegerVariable <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a> : variable_mapping) {</div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a> == <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a5bd8c44473618b7eafd33ba978db2f06">kNoIntegerVariable</a>) <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> </div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> <span class="comment">// Make sure we try to fix the objective to its lowest value first.</span></div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a> == <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#aae43e784db06c0974ce59ebbe8dd2b22">NegationOf</a>(objective_var)) {</div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> decisions.push_back(objective_var);</div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> decisions.push_back(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> }</div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> }</div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> heuristics.push_back(<a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a0b08971dbb223f77e7fc9c41a77fdc7b">FirstUnassignedVarAtItsMinHeuristic</a>(decisions, <a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>));</div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> }</div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> </div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a2acd1aef8e418e20032fd893668c04a6">SequentialSearch</a>(heuristics);</div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span>}</div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span> </div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#afb3c98e67e212632d35259e550235d0a"> 333</a></span>std::function&lt;<a class="code hl_struct" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">BooleanOrIntegerLiteral</a>()&gt; <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#afb3c98e67e212632d35259e550235d0a">InstrumentSearchStrategy</a>(</div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_cp_model_proto.html">CpModelProto</a>&amp; cp_model_proto,</div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> <span class="keyword">const</span> std::vector&lt;IntegerVariable&gt;&amp; variable_mapping,</div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> <span class="keyword">const</span> std::function&lt;<a class="code hl_struct" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">BooleanOrIntegerLiteral</a>()&gt;&amp; instrumented_strategy,</div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_model.html">Model</a>* <a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>) {</div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> std::vector&lt;int&gt; ref_to_display;</div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; cp_model_proto.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_proto.html#abef5f55c3278c137faca92b8e433f8ea">variables_size</a>(); ++i) {</div>
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> <span class="keywordflow">if</span> (variable_mapping[i] == <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a5bd8c44473618b7eafd33ba978db2f06">kNoIntegerVariable</a>) <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> <span class="keywordflow">if</span> (cp_model_proto.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_proto.html#a6a4544ca20489d70e302f5d6d374a012">variables</a>(i).<a class="code hl_function" href="classoperations__research_1_1sat_1_1_integer_variable_proto.html#a24dcbf29c0d6cd766009a182a6484e3b">name</a>().empty()) <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> ref_to_display.push_back(i);</div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> }</div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> std::sort(ref_to_display.begin(), ref_to_display.end(), [&amp;](<span class="keywordtype">int</span> i, <span class="keywordtype">int</span> j) {</div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> return cp_model_proto.variables(i).name() &lt;</div>
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> cp_model_proto.variables(j).name();</div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> });</div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> </div>
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> std::vector&lt;std::pair&lt;int64_t, int64_t&gt;&gt; old_domains(variable_mapping.size());</div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> <span class="keywordflow">return</span> [instrumented_strategy, <a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>, variable_mapping, cp_model_proto,</div>
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> old_domains, ref_to_display]() <span class="keyword">mutable</span> {</div>
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span> <span class="keyword">const</span> <a class="code hl_struct" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">BooleanOrIntegerLiteral</a> decision = instrumented_strategy();</div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> <span class="keywordflow">if</span> (!decision.<a class="code hl_function" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html#ae26b73bbf70dc88433be39df364ca7c1">HasValue</a>()) <span class="keywordflow">return</span> decision;</div>
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span> </div>
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span> <span class="keywordflow">if</span> (decision.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html#a3c6f3ae96a90c7fcef34dd0f1ce0297e">boolean_literal_index</a> != <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a2dbcb7017d468a17bdb30252af5c6c31">kNoLiteralIndex</a>) {</div>
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"> 356</span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> l = <a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a>(decision.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html#a3c6f3ae96a90c7fcef34dd0f1ce0297e">boolean_literal_index</a>);</div>
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</span> <a class="code hl_define" href="base_2logging_8h.html#accad43a85d781d53381cd53a9894b6ae">LOG</a>(<a class="code hl_variable" href="log__severity_8h.html#ab4a2cbab234914b320b7fae11b6e8cb9">INFO</a>) &lt;&lt; <span class="stringliteral">&quot;Boolean decision &quot;</span> &lt;&lt; l;</div>
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_struct" href="structoperations__research_1_1sat_1_1_integer_literal.html">IntegerLiteral</a> i_lit :</div>
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> <a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;Get&lt;<a class="code hl_class" href="classoperations__research_1_1sat_1_1_integer_encoder.html">IntegerEncoder</a>&gt;()-&gt;<a class="code hl_function" href="classoperations__research_1_1sat_1_1_integer_encoder.html#a47c935a057dc400bddf6c9ca8217c836">GetAllIntegerLiterals</a>(l)) {</div>
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> <a class="code hl_define" href="base_2logging_8h.html#accad43a85d781d53381cd53a9894b6ae">LOG</a>(<a class="code hl_variable" href="log__severity_8h.html#ab4a2cbab234914b320b7fae11b6e8cb9">INFO</a>) &lt;&lt; <span class="stringliteral">&quot; - associated with &quot;</span> &lt;&lt; i_lit;</div>
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno"> 361</span> }</div>
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"> 362</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> <a class="code hl_define" href="base_2logging_8h.html#accad43a85d781d53381cd53a9894b6ae">LOG</a>(<a class="code hl_variable" href="log__severity_8h.html#ab4a2cbab234914b320b7fae11b6e8cb9">INFO</a>) &lt;&lt; <span class="stringliteral">&quot;Integer decision &quot;</span> &lt;&lt; decision.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html#aee356429e37f0750e38ee17ae1464a00">integer_literal</a>;</div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> }</div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</span> <span class="keyword">const</span> <span class="keywordtype">int</span> level = <a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;Get&lt;<a class="code hl_class" href="classoperations__research_1_1sat_1_1_trail.html">Trail</a>&gt;()-&gt;CurrentDecisionLevel();</div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> std::string to_display =</div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> absl::StrCat(<span class="stringliteral">&quot;Diff since last call, level=&quot;</span>, level, <span class="stringliteral">&quot;\n&quot;</span>);</div>
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"> 368</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_integer_trail.html">IntegerTrail</a>* integer_trail = <a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;GetOrCreate&lt;<a class="code hl_class" href="classoperations__research_1_1sat_1_1_integer_trail.html">IntegerTrail</a>&gt;();</div>
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"> 369</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> ref : ref_to_display) {</div>
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</span> <span class="keyword">const</span> IntegerVariable <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a> = variable_mapping[ref];</div>
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"> 371</span> <span class="keyword">const</span> std::pair&lt;int64_t, int64_t&gt; new_domain(</div>
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> integer_trail-&gt;<a class="code hl_function" href="classoperations__research_1_1sat_1_1_integer_trail.html#ab857cd2aead68952d9fe92a8ad8d3ac9">LowerBound</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>).value(),</div>
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"> 373</span> integer_trail-&gt;<a class="code hl_function" href="classoperations__research_1_1sat_1_1_integer_trail.html#a8b6d5a25e6ad3d28a85b1924471e2cac">UpperBound</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>).value());</div>
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</span> <span class="keywordflow">if</span> (new_domain != old_domains[ref]) {</div>
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span> absl::StrAppend(&amp;to_display, cp_model_proto.variables(ref).name(), <span class="stringliteral">&quot; [&quot;</span>,</div>
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"> 376</span> old_domains[ref].first, <span class="stringliteral">&quot;,&quot;</span>, old_domains[ref].second,</div>
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"> 377</span> <span class="stringliteral">&quot;] -&gt; [&quot;</span>, new_domain.first, <span class="stringliteral">&quot;,&quot;</span>, new_domain.second,</div>
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"> 378</span> <span class="stringliteral">&quot;]\n&quot;</span>);</div>
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span> old_domains[ref] = new_domain;</div>
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"> 380</span> }</div>
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"> 381</span> }</div>
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno"> 382</span> <a class="code hl_define" href="base_2logging_8h.html#accad43a85d781d53381cd53a9894b6ae">LOG</a>(<a class="code hl_variable" href="log__severity_8h.html#ab4a2cbab234914b320b7fae11b6e8cb9">INFO</a>) &lt;&lt; to_display;</div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"> 383</span> <span class="keywordflow">return</span> decision;</div>
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"> 384</span> };</div>
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno"> 385</span>}</div>
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno"> 386</span> </div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span><span class="comment">// Note: in flatzinc setting, we know we always have a fixed search defined.</span></div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno"> 388</span><span class="comment">//</span></div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"> 389</span><span class="comment">// Things to try:</span></div>
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span><span class="comment">// - Specialize for purely boolean problems</span></div>
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno"> 391</span><span class="comment">// - Disable linearization_level options for non linear problems</span></div>
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span><span class="comment">// - Fast restart in randomized search</span></div>
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span><span class="comment">// - Different propatation levels for scheduling constraints</span></div>
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#accb8be601562b35adeea0682f3ea560c"> 394</a></span>std::vector&lt;SatParameters&gt; <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#accb8be601562b35adeea0682f3ea560c">GetDiverseSetOfParameters</a>(</div>
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a>&amp; base_params, <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_cp_model_proto.html">CpModelProto</a>&amp; cp_model,</div>
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"> 396</span> <span class="keyword">const</span> <span class="keywordtype">int</span> num_workers) {</div>
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span> <span class="comment">// Defines a set of named strategies so it is easier to read in one place</span></div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"> 398</span> <span class="comment">// the one that are used. See below.</span></div>
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"> 399</span> std::map&lt;std::string, SatParameters&gt; strategies;</div>
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno"> 400</span> </div>
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno"> 401</span> <span class="comment">// Lp variations only.</span></div>
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno"> 402</span> {</div>
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a> new_params = base_params;</div>
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a7c4035495431c855047f46da9bf3aee2">set_linearization_level</a>(0);</div>
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"> 405</span> strategies[<span class="stringliteral">&quot;no_lp&quot;</span>] = new_params;</div>
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno"> 406</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a7c4035495431c855047f46da9bf3aee2">set_linearization_level</a>(1);</div>
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno"> 407</span> strategies[<span class="stringliteral">&quot;default_lp&quot;</span>] = new_params;</div>
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno"> 408</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a7c4035495431c855047f46da9bf3aee2">set_linearization_level</a>(2);</div>
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno"> 409</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a2dc61ebb1adfcb5c96285552c4eef6ce">set_add_lp_constraints_lazily</a>(<span class="keyword">false</span>);</div>
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"> 410</span> strategies[<span class="stringliteral">&quot;max_lp&quot;</span>] = new_params;</div>
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> }</div>
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"> 412</span> </div>
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span> <span class="comment">// Core. Note that we disable the lp here because it is faster on the minizinc</span></div>
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> <span class="comment">// benchmark.</span></div>
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno"> 415</span> <span class="comment">//</span></div>
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"> 416</span> <span class="comment">// TODO(user): Do more experiments, the LP with core could be useful, but we</span></div>
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span> <span class="comment">// probably need to incorporate the newly created integer variables from the</span></div>
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno"> 418</span> <span class="comment">// core algorithm into the LP.</span></div>
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno"> 419</span> {</div>
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno"> 420</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a> new_params = base_params;</div>
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"> 421</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a12ca6efbeca97a5144172001228719dc">set_search_branching</a>(<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ab620cb0acc7c1245958c5783e1b4767e">SatParameters::AUTOMATIC_SEARCH</a>);</div>
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno"> 422</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a3712336400bac2cffb76d06873aa0172">set_optimize_with_core</a>(<span class="keyword">true</span>);</div>
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno"> 423</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a7c4035495431c855047f46da9bf3aee2">set_linearization_level</a>(0);</div>
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno"> 424</span> strategies[<span class="stringliteral">&quot;core&quot;</span>] = new_params;</div>
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno"> 425</span> }</div>
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"> 426</span> </div>
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"> 427</span> <span class="comment">// It can be interesting to try core and lp.</span></div>
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno"> 428</span> {</div>
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno"> 429</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a> new_params = base_params;</div>
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno"> 430</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a12ca6efbeca97a5144172001228719dc">set_search_branching</a>(<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ab620cb0acc7c1245958c5783e1b4767e">SatParameters::AUTOMATIC_SEARCH</a>);</div>
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"> 431</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a3712336400bac2cffb76d06873aa0172">set_optimize_with_core</a>(<span class="keyword">true</span>);</div>
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno"> 432</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a7c4035495431c855047f46da9bf3aee2">set_linearization_level</a>(1);</div>
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno"> 433</span> strategies[<span class="stringliteral">&quot;core_default_lp&quot;</span>] = new_params;</div>
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno"> 434</span> }</div>
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno"> 435</span> </div>
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"> 436</span> {</div>
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"> 437</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a> new_params = base_params;</div>
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno"> 438</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a12ca6efbeca97a5144172001228719dc">set_search_branching</a>(<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ab620cb0acc7c1245958c5783e1b4767e">SatParameters::AUTOMATIC_SEARCH</a>);</div>
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"> 439</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a3712336400bac2cffb76d06873aa0172">set_optimize_with_core</a>(<span class="keyword">true</span>);</div>
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a7c4035495431c855047f46da9bf3aee2">set_linearization_level</a>(2);</div>
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span> strategies[<span class="stringliteral">&quot;core_max_lp&quot;</span>] = new_params;</div>
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span> }</div>
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno"> 443</span> </div>
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"> 444</span> {</div>
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno"> 445</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a> new_params = base_params;</div>
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno"> 446</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ae695f88dd381c202206accd9b79e8d0c">set_optimize_with_lb_tree_search</a>(<span class="keyword">true</span>);</div>
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno"> 447</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a7c4035495431c855047f46da9bf3aee2">set_linearization_level</a>(2);</div>
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno"> 448</span> strategies[<span class="stringliteral">&quot;lb_tree_search&quot;</span>] = new_params;</div>
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno"> 449</span> }</div>
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno"> 450</span> </div>
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno"> 451</span> {</div>
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno"> 452</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a> new_params = base_params;</div>
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"> 453</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a12ca6efbeca97a5144172001228719dc">set_search_branching</a>(<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ab620cb0acc7c1245958c5783e1b4767e">SatParameters::AUTOMATIC_SEARCH</a>);</div>
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ac8021914a0604c6af88489e5d0ec104a">set_use_probing_search</a>(<span class="keyword">true</span>);</div>
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"> 455</span> strategies[<span class="stringliteral">&quot;probing&quot;</span>] = new_params;</div>
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"> 456</span> }</div>
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> </div>
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno"> 458</span> <span class="comment">// Search variation.</span></div>
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"> 459</span> {</div>
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a> new_params = base_params;</div>
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a12ca6efbeca97a5144172001228719dc">set_search_branching</a>(<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ab620cb0acc7c1245958c5783e1b4767e">SatParameters::AUTOMATIC_SEARCH</a>);</div>
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span> strategies[<span class="stringliteral">&quot;auto&quot;</span>] = new_params;</div>
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"> 463</span> </div>
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno"> 464</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a12ca6efbeca97a5144172001228719dc">set_search_branching</a>(<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#afc7419e2f33992c4a7b8b0decd1dc3e0">SatParameters::FIXED_SEARCH</a>);</div>
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno"> 465</span> strategies[<span class="stringliteral">&quot;fixed&quot;</span>] = new_params;</div>
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno"> 466</span> </div>
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"> 467</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a12ca6efbeca97a5144172001228719dc">set_search_branching</a>(</div>
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"> 468</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a59349c6ff18c51a1487ae271c9c577ee">SatParameters::PORTFOLIO_WITH_QUICK_RESTART_SEARCH</a>);</div>
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno"> 469</span> strategies[<span class="stringliteral">&quot;quick_restart&quot;</span>] = new_params;</div>
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno"> 470</span> </div>
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno"> 471</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a12ca6efbeca97a5144172001228719dc">set_search_branching</a>(</div>
<div class="line"><a id="l00472" name="l00472"></a><span class="lineno"> 472</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a59349c6ff18c51a1487ae271c9c577ee">SatParameters::PORTFOLIO_WITH_QUICK_RESTART_SEARCH</a>);</div>
<div class="line"><a id="l00473" name="l00473"></a><span class="lineno"> 473</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a7c4035495431c855047f46da9bf3aee2">set_linearization_level</a>(0);</div>
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno"> 474</span> strategies[<span class="stringliteral">&quot;quick_restart_no_lp&quot;</span>] = new_params;</div>
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"> 475</span> </div>
<div class="line"><a id="l00476" name="l00476"></a><span class="lineno"> 476</span> <span class="comment">// We force the max lp here too.</span></div>
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"> 477</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a7c4035495431c855047f46da9bf3aee2">set_linearization_level</a>(2);</div>
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a12ca6efbeca97a5144172001228719dc">set_search_branching</a>(<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#aa1f93c70c349b5f740fefe5317b7f9fc">SatParameters::LP_SEARCH</a>);</div>
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno"> 479</span> strategies[<span class="stringliteral">&quot;reduced_costs&quot;</span>] = new_params;</div>
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"> 480</span> </div>
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"> 481</span> <span class="comment">// For this one, we force other param too.</span></div>
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno"> 482</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a7c4035495431c855047f46da9bf3aee2">set_linearization_level</a>(2);</div>
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno"> 483</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a12ca6efbeca97a5144172001228719dc">set_search_branching</a>(<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a17a5aa1f5b9e992c1ffb4db39988f542">SatParameters::PSEUDO_COST_SEARCH</a>);</div>
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno"> 484</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#ab253f28220a4b075fb08426d044ccd28">set_exploit_best_solution</a>(<span class="keyword">true</span>);</div>
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"> 485</span> strategies[<span class="stringliteral">&quot;pseudo_costs&quot;</span>] = new_params;</div>
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno"> 486</span> }</div>
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno"> 487</span> </div>
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno"> 488</span> <span class="comment">// Less encoding.</span></div>
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno"> 489</span> {</div>
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"> 490</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a> new_params = base_params;</div>
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno"> 491</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a496346e5424316ea146fa429ea5f5c6c">set_boolean_encoding_level</a>(0);</div>
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno"> 492</span> strategies[<span class="stringliteral">&quot;less_encoding&quot;</span>] = new_params;</div>
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno"> 493</span> }</div>
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno"> 494</span> </div>
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"> 495</span> <span class="comment">// We only use a &quot;fixed search&quot; worker if some strategy is specified or</span></div>
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> <span class="comment">// if we have a scheduling model.</span></div>
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"> 497</span> <span class="comment">//</span></div>
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span> <span class="comment">// TODO(user): For scheduling, this is important to find good first solution</span></div>
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span> <span class="comment">// but afterwards it is not really great and should probably be replaced by a</span></div>
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> <span class="comment">// LNS worker.</span></div>
<div class="line"><a id="l00501" name="l00501"></a><span class="lineno"> 501</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> use_fixed_strategy = !cp_model.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_proto.html#a6e5a7240e89f8a6665de1da5554603ec">search_strategy</a>().empty() ||</div>
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno"> 502</span> ModelHasSchedulingConstraints(cp_model);</div>
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno"> 503</span> </div>
<div class="line"><a id="l00504" name="l00504"></a><span class="lineno"> 504</span> <span class="comment">// Our current set of strategies</span></div>
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"> 505</span> <span class="comment">//</span></div>
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span> <span class="comment">// TODO(user, fdid): Avoid launching two strategies if they are the same,</span></div>
<div class="line"><a id="l00507" name="l00507"></a><span class="lineno"> 507</span> <span class="comment">// like if there is no lp, or everything is already linearized at level 1.</span></div>
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"> 508</span> std::vector&lt;std::string&gt; names;</div>
<div class="line"><a id="l00509" name="l00509"></a><span class="lineno"> 509</span> <span class="keywordflow">if</span> (base_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a5a6e355530b56b20f5ab3503bf29321e">reduce_memory_usage_in_interleave_mode</a>() &amp;&amp;</div>
<div class="line"><a id="l00510" name="l00510"></a><span class="lineno"> 510</span> base_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a06730fdc65bbc2f484f63f2434ca3ee0">interleave_search</a>()) {</div>
<div class="line"><a id="l00511" name="l00511"></a><span class="lineno"> 511</span> <span class="comment">// Low memory mode for interleaved search in single thread.</span></div>
<div class="line"><a id="l00512" name="l00512"></a><span class="lineno"> 512</span> <span class="keywordflow">if</span> (cp_model.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_proto.html#a777a6e330a22a8889389cb9b9c9f12d6">has_objective</a>()) {</div>
<div class="line"><a id="l00513" name="l00513"></a><span class="lineno"> 513</span> names.push_back(<span class="stringliteral">&quot;default_lp&quot;</span>);</div>
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"> 514</span> names.push_back(use_fixed_strategy ? <span class="stringliteral">&quot;fixed&quot;</span> : <span class="stringliteral">&quot;pseudo_costs&quot;</span>);</div>
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span> names.push_back(cp_model.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_proto.html#a2787b866382b560920d55ce5cf129920">objective</a>().<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_objective_proto.html#a76c521af56ab0e96eb06deeb679f46f7">vars_size</a>() &gt; 1 ? <span class="stringliteral">&quot;core&quot;</span> : <span class="stringliteral">&quot;no_lp&quot;</span>);</div>
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno"> 516</span> names.push_back(<span class="stringliteral">&quot;max_lp&quot;</span>);</div>
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno"> 517</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno"> 518</span> names.push_back(<span class="stringliteral">&quot;default_lp&quot;</span>);</div>
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno"> 519</span> names.push_back(use_fixed_strategy ? <span class="stringliteral">&quot;fixed&quot;</span> : <span class="stringliteral">&quot;no_lp&quot;</span>);</div>
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno"> 520</span> names.push_back(<span class="stringliteral">&quot;less_encoding&quot;</span>);</div>
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno"> 521</span> names.push_back(<span class="stringliteral">&quot;max_lp&quot;</span>);</div>
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno"> 522</span> names.push_back(<span class="stringliteral">&quot;quick_restart&quot;</span>);</div>
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno"> 523</span> }</div>
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno"> 524</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (cp_model.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_proto.html#a777a6e330a22a8889389cb9b9c9f12d6">has_objective</a>()) {</div>
<div class="line"><a id="l00525" name="l00525"></a><span class="lineno"> 525</span> names.push_back(<span class="stringliteral">&quot;default_lp&quot;</span>);</div>
<div class="line"><a id="l00526" name="l00526"></a><span class="lineno"> 526</span> <span class="keywordflow">if</span> (use_fixed_strategy) {</div>
<div class="line"><a id="l00527" name="l00527"></a><span class="lineno"> 527</span> names.push_back(<span class="stringliteral">&quot;fixed&quot;</span>);</div>
<div class="line"><a id="l00528" name="l00528"></a><span class="lineno"> 528</span> <span class="keywordflow">if</span> (num_workers &gt; 8) names.push_back(<span class="stringliteral">&quot;reduced_costs&quot;</span>);</div>
<div class="line"><a id="l00529" name="l00529"></a><span class="lineno"> 529</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00530" name="l00530"></a><span class="lineno"> 530</span> names.push_back(<span class="stringliteral">&quot;reduced_costs&quot;</span>);</div>
<div class="line"><a id="l00531" name="l00531"></a><span class="lineno"> 531</span> }</div>
<div class="line"><a id="l00532" name="l00532"></a><span class="lineno"> 532</span> names.push_back(<span class="stringliteral">&quot;pseudo_costs&quot;</span>);</div>
<div class="line"><a id="l00533" name="l00533"></a><span class="lineno"> 533</span> names.push_back(<span class="stringliteral">&quot;no_lp&quot;</span>);</div>
<div class="line"><a id="l00534" name="l00534"></a><span class="lineno"> 534</span> names.push_back(<span class="stringliteral">&quot;max_lp&quot;</span>);</div>
<div class="line"><a id="l00535" name="l00535"></a><span class="lineno"> 535</span> </div>
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"> 536</span> <span class="comment">// TODO(user): Experiment with core and LP.</span></div>
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno"> 537</span> <span class="keywordflow">if</span> (cp_model.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_proto.html#a2787b866382b560920d55ce5cf129920">objective</a>().<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_objective_proto.html#a76c521af56ab0e96eb06deeb679f46f7">vars_size</a>() &gt; 1) names.push_back(<span class="stringliteral">&quot;core&quot;</span>);</div>
<div class="line"><a id="l00538" name="l00538"></a><span class="lineno"> 538</span> </div>
<div class="line"><a id="l00539" name="l00539"></a><span class="lineno"> 539</span> <span class="comment">// Only add this strategy if we have enough worker left for LNS.</span></div>
<div class="line"><a id="l00540" name="l00540"></a><span class="lineno"> 540</span> <span class="keywordflow">if</span> (num_workers &gt; 8 || base_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a06730fdc65bbc2f484f63f2434ca3ee0">interleave_search</a>()) {</div>
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno"> 541</span> names.push_back(<span class="stringliteral">&quot;quick_restart&quot;</span>);</div>
<div class="line"><a id="l00542" name="l00542"></a><span class="lineno"> 542</span> }</div>
<div class="line"><a id="l00543" name="l00543"></a><span class="lineno"> 543</span> <span class="keywordflow">if</span> (num_workers &gt; 10) {</div>
<div class="line"><a id="l00544" name="l00544"></a><span class="lineno"> 544</span> names.push_back(<span class="stringliteral">&quot;quick_restart_no_lp&quot;</span>);</div>
<div class="line"><a id="l00545" name="l00545"></a><span class="lineno"> 545</span> }</div>
<div class="line"><a id="l00546" name="l00546"></a><span class="lineno"> 546</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00547" name="l00547"></a><span class="lineno"> 547</span> names.push_back(<span class="stringliteral">&quot;default_lp&quot;</span>);</div>
<div class="line"><a id="l00548" name="l00548"></a><span class="lineno"> 548</span> <span class="keywordflow">if</span> (use_fixed_strategy) names.push_back(<span class="stringliteral">&quot;fixed&quot;</span>);</div>
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno"> 549</span> names.push_back(<span class="stringliteral">&quot;less_encoding&quot;</span>);</div>
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno"> 550</span> names.push_back(<span class="stringliteral">&quot;no_lp&quot;</span>);</div>
<div class="line"><a id="l00551" name="l00551"></a><span class="lineno"> 551</span> names.push_back(<span class="stringliteral">&quot;max_lp&quot;</span>);</div>
<div class="line"><a id="l00552" name="l00552"></a><span class="lineno"> 552</span> names.push_back(<span class="stringliteral">&quot;quick_restart&quot;</span>);</div>
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno"> 553</span> <span class="keywordflow">if</span> (num_workers &gt; 10) {</div>
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno"> 554</span> names.push_back(<span class="stringliteral">&quot;quick_restart_no_lp&quot;</span>);</div>
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno"> 555</span> }</div>
<div class="line"><a id="l00556" name="l00556"></a><span class="lineno"> 556</span> }</div>
<div class="line"><a id="l00557" name="l00557"></a><span class="lineno"> 557</span> <span class="keywordflow">if</span> (num_workers &gt; 12) {</div>
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno"> 558</span> names.push_back(<span class="stringliteral">&quot;probing&quot;</span>);</div>
<div class="line"><a id="l00559" name="l00559"></a><span class="lineno"> 559</span> names.push_back(<span class="stringliteral">&quot;lb_tree_search&quot;</span>);</div>
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno"> 560</span> }</div>
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno"> 561</span> </div>
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno"> 562</span> <span class="comment">// Creates the diverse set of parameters with names and seed. We remove the</span></div>
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno"> 563</span> <span class="comment">// last ones if needed below.</span></div>
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno"> 564</span> std::vector&lt;SatParameters&gt; result;</div>
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno"> 565</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string&amp; <a class="code hl_variable" href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a> : names) {</div>
<div class="line"><a id="l00566" name="l00566"></a><span class="lineno"> 566</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a> new_params = strategies.at(<a class="code hl_variable" href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a>);</div>
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno"> 567</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a74f7eb449a6e182b73c8b4a1dbf15ce6">set_name</a>(<a class="code hl_variable" href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a>);</div>
<div class="line"><a id="l00568" name="l00568"></a><span class="lineno"> 568</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#aa148eda9a432e6c798d9e2eecc8645f4">set_random_seed</a>(result.size() + 1);</div>
<div class="line"><a id="l00569" name="l00569"></a><span class="lineno"> 569</span> result.push_back(new_params);</div>
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno"> 570</span> }</div>
<div class="line"><a id="l00571" name="l00571"></a><span class="lineno"> 571</span> </div>
<div class="line"><a id="l00572" name="l00572"></a><span class="lineno"> 572</span> <span class="comment">// If there is no objective, we complete with randomized fixed search.</span></div>
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno"> 573</span> <span class="comment">// If there is an objective, the extra workers will use LNS.</span></div>
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno"> 574</span> <span class="keywordflow">if</span> (!cp_model.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_proto.html#a777a6e330a22a8889389cb9b9c9f12d6">has_objective</a>()) {</div>
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno"> 575</span> <span class="keywordtype">int</span> target = num_workers;</div>
<div class="line"><a id="l00576" name="l00576"></a><span class="lineno"> 576</span> </div>
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno"> 577</span> <span class="comment">// If strategies that do not require a full worker are present, leave one</span></div>
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno"> 578</span> <span class="comment">// worker for them.</span></div>
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno"> 579</span> <span class="keywordflow">if</span> (!base_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a06730fdc65bbc2f484f63f2434ca3ee0">interleave_search</a>() &amp;&amp;</div>
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno"> 580</span> (base_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a4ce528568865a9d377b9aa1cf8e7bba1">use_rins_lns</a>() || base_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a496446461aaf7b3634d5d8dee20cf102">use_relaxation_lns</a>() ||</div>
<div class="line"><a id="l00581" name="l00581"></a><span class="lineno"> 581</span> base_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a271429cfd7459cfc7256ccf302f09312">use_feasibility_pump</a>())) {</div>
<div class="line"><a id="l00582" name="l00582"></a><span class="lineno"> 582</span> target = <a class="code hl_variable" href="alldiff__cst_8cc.html#a26e6db9bcc64b584051ecc28171ed11f">std::max</a>(1, num_workers - 1);</div>
<div class="line"><a id="l00583" name="l00583"></a><span class="lineno"> 583</span> }</div>
<div class="line"><a id="l00584" name="l00584"></a><span class="lineno"> 584</span> </div>
<div class="line"><a id="l00585" name="l00585"></a><span class="lineno"> 585</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="pack_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a> = 1;</div>
<div class="line"><a id="l00586" name="l00586"></a><span class="lineno"> 586</span> <span class="keywordflow">while</span> (result.size() &lt; target) {</div>
<div class="line"><a id="l00587" name="l00587"></a><span class="lineno"> 587</span> <span class="comment">// TODO(user): This doesn&#39;t make sense if there is no fixed search.</span></div>
<div class="line"><a id="l00588" name="l00588"></a><span class="lineno"> 588</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a> new_params = base_params;</div>
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno"> 589</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a12ca6efbeca97a5144172001228719dc">set_search_branching</a>(<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_parameters.html#afc7419e2f33992c4a7b8b0decd1dc3e0">SatParameters::FIXED_SEARCH</a>);</div>
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno"> 590</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a9a5672d5693f6b33a6b50749b45cae65">set_randomize_search</a>(<span class="keyword">true</span>);</div>
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno"> 591</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a76eb3f692d72d9f57b8f541595373d72">set_search_randomization_tolerance</a>(<a class="code hl_variable" href="pack_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>);</div>
<div class="line"><a id="l00592" name="l00592"></a><span class="lineno"> 592</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#aa148eda9a432e6c798d9e2eecc8645f4">set_random_seed</a>(result.size() + 1);</div>
<div class="line"><a id="l00593" name="l00593"></a><span class="lineno"> 593</span> new_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a74f7eb449a6e182b73c8b4a1dbf15ce6">set_name</a>(absl::StrCat(<span class="stringliteral">&quot;random_&quot;</span>, <a class="code hl_variable" href="pack_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>));</div>
<div class="line"><a id="l00594" name="l00594"></a><span class="lineno"> 594</span> result.push_back(new_params);</div>
<div class="line"><a id="l00595" name="l00595"></a><span class="lineno"> 595</span> ++<a class="code hl_variable" href="pack_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>;</div>
<div class="line"><a id="l00596" name="l00596"></a><span class="lineno"> 596</span> }</div>
<div class="line"><a id="l00597" name="l00597"></a><span class="lineno"> 597</span> }</div>
<div class="line"><a id="l00598" name="l00598"></a><span class="lineno"> 598</span> </div>
<div class="line"><a id="l00599" name="l00599"></a><span class="lineno"> 599</span> <span class="comment">// If we are not in interleave search, we cannot run more strategies than</span></div>
<div class="line"><a id="l00600" name="l00600"></a><span class="lineno"> 600</span> <span class="comment">// the number of worker.</span></div>
<div class="line"><a id="l00601" name="l00601"></a><span class="lineno"> 601</span> <span class="comment">//</span></div>
<div class="line"><a id="l00602" name="l00602"></a><span class="lineno"> 602</span> <span class="comment">// TODO(user): consider using LNS if we use a small number of workers.</span></div>
<div class="line"><a id="l00603" name="l00603"></a><span class="lineno"> 603</span> <span class="keywordflow">if</span> (!base_params.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_parameters.html#a06730fdc65bbc2f484f63f2434ca3ee0">interleave_search</a>() &amp;&amp; result.size() &gt; num_workers) {</div>
<div class="line"><a id="l00604" name="l00604"></a><span class="lineno"> 604</span> result.resize(num_workers);</div>
<div class="line"><a id="l00605" name="l00605"></a><span class="lineno"> 605</span> }</div>
<div class="line"><a id="l00606" name="l00606"></a><span class="lineno"> 606</span> </div>
<div class="line"><a id="l00607" name="l00607"></a><span class="lineno"> 607</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00608" name="l00608"></a><span class="lineno"> 608</span>}</div>
<div class="line"><a id="l00609" name="l00609"></a><span class="lineno"> 609</span> </div>
<div class="line"><a id="l00610" name="l00610"></a><span class="lineno"> 610</span>} <span class="comment">// namespace sat</span></div>
<div class="line"><a id="l00611" name="l00611"></a><span class="lineno"> 611</span>} <span class="comment">// namespace operations_research</span></div>
<div class="ttc" id="aalldiff__cst_8cc_html_a26e6db9bcc64b584051ecc28171ed11f"><div class="ttname"><a href="alldiff__cst_8cc.html#a26e6db9bcc64b584051ecc28171ed11f">max</a></div><div class="ttdeci">int64_t max</div><div class="ttdef"><b>Definition:</b> <a href="alldiff__cst_8cc_source.html#l00140">alldiff_cst.cc:140</a></div></div>
<div class="ttc" id="abase_2logging_8h_html_a3e1cfef60e774a81f30eaddf26a3a274"><div class="ttname"><a href="base_2logging_8h.html#a3e1cfef60e774a81f30eaddf26a3a274">CHECK</a></div><div class="ttdeci">#define CHECK(condition)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00491">base/logging.h:491</a></div></div>
<div class="ttc" id="abase_2logging_8h_html_ab25e01a2942b821d66371fc68d53f2eb"><div class="ttname"><a href="base_2logging_8h.html#ab25e01a2942b821d66371fc68d53f2eb">CHECK_NE</a></div><div class="ttdeci">#define CHECK_NE(val1, val2)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00699">base/logging.h:699</a></div></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="abase_2logging_8h_html_ae17f8119c108cf3070bad3449c7e0006"><div class="ttname"><a href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a></div><div class="ttdeci">#define DCHECK(condition)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00885">base/logging.h:885</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_assignment_html"><div class="ttname"><a href="classoperations__research_1_1_assignment.html">operations_research::Assignment</a></div><div class="ttdoc">An Assignment is a variable -&gt; domains mapping, used to report solutions to the user.</div><div class="ttdef"><b>Definition:</b> <a href="constraint__solver_8h_source.html#l05042">constraint_solver.h:5042</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_constraint_proto_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_constraint_proto.html">operations_research::sat::ConstraintProto</a></div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l03941">cp_model.pb.h:3942</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_constraint_proto_html_ada030f50fcddb646af448ac7c5705e35a6273d2906038e97dc4d54d89436a305a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_constraint_proto.html#ada030f50fcddb646af448ac7c5705e35a6273d2906038e97dc4d54d89436a305a">operations_research::sat::ConstraintProto::kCumulative</a></div><div class="ttdeci">@ kCumulative</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l04009">cp_model.pb.h:4009</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_constraint_proto_html_ada030f50fcddb646af448ac7c5705e35aa604bb0c8d30d6e0908b243370cf98a7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_constraint_proto.html#ada030f50fcddb646af448ac7c5705e35aa604bb0c8d30d6e0908b243370cf98a7">operations_research::sat::ConstraintProto::kNoOverlap</a></div><div class="ttdeci">@ kNoOverlap</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l04007">cp_model.pb.h:4007</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_mapping_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_mapping.html">operations_research::sat::CpModelMapping</a></div><div class="ttdef"><b>Definition:</b> <a href="cp__model__mapping_8h_source.html#l00065">cp_model_mapping.h:65</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_mapping_html_a40d4cc176c455f8de98e96aade69734a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a40d4cc176c455f8de98e96aade69734a">operations_research::sat::CpModelMapping::IsBoolean</a></div><div class="ttdeci">bool IsBoolean(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__mapping_8h_source.html#l00070">cp_model_mapping.h:70</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_mapping_html_a4c46b216006440e76f16d33797123b3b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a4c46b216006440e76f16d33797123b3b">operations_research::sat::CpModelMapping::IsInteger</a></div><div class="ttdeci">bool IsInteger(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__mapping_8h_source.html#l00075">cp_model_mapping.h:75</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_mapping_html_a877d019ee57a306f9dc8da11efcb4c82"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a877d019ee57a306f9dc8da11efcb4c82">operations_research::sat::CpModelMapping::Integer</a></div><div class="ttdeci">IntegerVariable Integer(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__mapping_8h_source.html#l00085">cp_model_mapping.h:85</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_mapping_html_a922026cbae3cd7aac276fcad53bd4278"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#a922026cbae3cd7aac276fcad53bd4278">operations_research::sat::CpModelMapping::Literal</a></div><div class="ttdeci">sat::Literal Literal(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__mapping_8h_source.html#l00080">cp_model_mapping.h:80</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_mapping_html_ae05bc267fe7166e53214c1b3fa157023"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_mapping.html#ae05bc267fe7166e53214c1b3fa157023">operations_research::sat::CpModelMapping::NumProtoVariables</a></div><div class="ttdeci">int NumProtoVariables() const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__mapping_8h_source.html#l00202">cp_model_mapping.h:202</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_proto_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_proto.html">operations_research::sat::CpModelProto</a></div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l06083">cp_model.pb.h:6084</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_proto_html_a2787b866382b560920d55ce5cf129920"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_proto.html#a2787b866382b560920d55ce5cf129920">operations_research::sat::CpModelProto::objective</a></div><div class="ttdeci">const ::operations_research::sat::CpObjectiveProto &amp; objective() const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l12246">cp_model.pb.h:12246</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_proto_html_a6a4544ca20489d70e302f5d6d374a012"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_proto.html#a6a4544ca20489d70e302f5d6d374a012">operations_research::sat::CpModelProto::variables</a></div><div class="ttdeci">const ::operations_research::sat::IntegerVariableProto &amp; variables(int index) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l12170">cp_model.pb.h:12170</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_proto_html_a6e5a7240e89f8a6665de1da5554603ec"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_proto.html#a6e5a7240e89f8a6665de1da5554603ec">operations_research::sat::CpModelProto::search_strategy</a></div><div class="ttdeci">const ::operations_research::sat::DecisionStrategyProto &amp; search_strategy(int index) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l12340">cp_model.pb.h:12340</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_proto_html_a777a6e330a22a8889389cb9b9c9f12d6"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_proto.html#a777a6e330a22a8889389cb9b9c9f12d6">operations_research::sat::CpModelProto::has_objective</a></div><div class="ttdeci">bool has_objective() const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l12232">cp_model.pb.h:12232</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_proto_html_abef5f55c3278c137faca92b8e433f8ea"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_proto.html#abef5f55c3278c137faca92b8e433f8ea">operations_research::sat::CpModelProto::variables_size</a></div><div class="ttdeci">int variables_size() const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l12152">cp_model.pb.h:12152</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_proto_html_afce66afa8ae7776a449bba7313ea3559"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_proto.html#afce66afa8ae7776a449bba7313ea3559">operations_research::sat::CpModelProto::constraints</a></div><div class="ttdeci">const ::operations_research::sat::ConstraintProto &amp; constraints(int index) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l12210">cp_model.pb.h:12210</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_view_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_view.html">operations_research::sat::CpModelView</a></div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8h_source.html#l00039">cp_model_search.h:39</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_view_html_a724467d12811fa7f9d69c42814d5a7bd"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_view.html#a724467d12811fa7f9d69c42814d5a7bd">operations_research::sat::CpModelView::IsFixed</a></div><div class="ttdeci">bool IsFixed(int var) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00036">cp_model_search.cc:36</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_view_html_a8635df410af81fb62224e17be268620c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_view.html#a8635df410af81fb62224e17be268620c">operations_research::sat::CpModelView::GreaterOrEqual</a></div><div class="ttdeci">BooleanOrIntegerLiteral GreaterOrEqual(int var, int64_t value) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00071">cp_model_search.cc:71</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_view_html_a8701b9f9c1a34491a7a6a84f74da1a9e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_view.html#a8701b9f9c1a34491a7a6a84f74da1a9e">operations_research::sat::CpModelView::IsCurrentlyFree</a></div><div class="ttdeci">bool IsCurrentlyFree(int var) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00046">cp_model_search.cc:46</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_view_html_a9d3beb2afe4ae647674b054bf29290e2"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_view.html#a9d3beb2afe4ae647674b054bf29290e2">operations_research::sat::CpModelView::NumVariables</a></div><div class="ttdeci">int NumVariables() const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00034">cp_model_search.cc:34</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_view_html_ab1c777219019216dad10f30c74a3bc2b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_view.html#ab1c777219019216dad10f30c74a3bc2b">operations_research::sat::CpModelView::MedianValue</a></div><div class="ttdeci">BooleanOrIntegerLiteral MedianValue(int var) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00103">cp_model_search.cc:103</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_view_html_adc929cce11607181a7b435a028f8709f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_view.html#adc929cce11607181a7b435a028f8709f">operations_research::sat::CpModelView::CpModelView</a></div><div class="ttdeci">CpModelView(Model *model)</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00028">cp_model_search.cc:28</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_view_html_aece25b118cb8a3a0a9ddd134d96d9ae1"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_view.html#aece25b118cb8a3a0a9ddd134d96d9ae1">operations_research::sat::CpModelView::Max</a></div><div class="ttdeci">int64_t Max(int var) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00061">cp_model_search.cc:61</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_view_html_aee82fe548f25e7db55682d9dfcaee51b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_view.html#aee82fe548f25e7db55682d9dfcaee51b">operations_research::sat::CpModelView::LowerOrEqual</a></div><div class="ttdeci">BooleanOrIntegerLiteral LowerOrEqual(int var, int64_t value) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00087">cp_model_search.cc:87</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_model_view_html_afef192be7cc9b9ac060dc9e8da0cb2fc"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_view.html#afef192be7cc9b9ac060dc9e8da0cb2fc">operations_research::sat::CpModelView::Min</a></div><div class="ttdeci">int64_t Min(int var) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00051">cp_model_search.cc:51</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_cp_objective_proto_html_a76c521af56ab0e96eb06deeb679f46f7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_objective_proto.html#a76c521af56ab0e96eb06deeb679f46f7">operations_research::sat::CpObjectiveProto::vars_size</a></div><div class="ttdeci">int vars_size() const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l11355">cp_model.pb.h:11355</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_decision_strategy_proto_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html">operations_research::sat::DecisionStrategyProto</a></div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l05095">cp_model.pb.h:5096</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_decision_strategy_proto_html_a077b0a300e818c188123729d35fbac9c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a077b0a300e818c188123729d35fbac9c">operations_research::sat::DecisionStrategyProto::SELECT_MIN_VALUE</a></div><div class="ttdeci">static constexpr DomainReductionStrategy SELECT_MIN_VALUE</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l05250">cp_model.pb.h:5250</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_decision_strategy_proto_html_a2f479f9cb1e0e8bb189d810d899673d9"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a2f479f9cb1e0e8bb189d810d899673d9">operations_research::sat::DecisionStrategyProto::SELECT_MAX_VALUE</a></div><div class="ttdeci">static constexpr DomainReductionStrategy SELECT_MAX_VALUE</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l05252">cp_model.pb.h:5252</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_decision_strategy_proto_html_a38e09a959d68cbaea40347bbeec7f367"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a38e09a959d68cbaea40347bbeec7f367">operations_research::sat::DecisionStrategyProto::CHOOSE_MAX_DOMAIN_SIZE</a></div><div class="ttdeci">static constexpr VariableSelectionStrategy CHOOSE_MAX_DOMAIN_SIZE</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l05222">cp_model.pb.h:5222</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_decision_strategy_proto_html_a3e767a434f1ae24aa77b216d01262b46"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a3e767a434f1ae24aa77b216d01262b46">operations_research::sat::DecisionStrategyProto::CHOOSE_LOWEST_MIN</a></div><div class="ttdeci">static constexpr VariableSelectionStrategy CHOOSE_LOWEST_MIN</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l05216">cp_model.pb.h:5216</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_decision_strategy_proto_html_a714ed0d3d67bec4d88cadc7f32e59f3e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a714ed0d3d67bec4d88cadc7f32e59f3e">operations_research::sat::DecisionStrategyProto::SELECT_MEDIAN_VALUE</a></div><div class="ttdeci">static constexpr DomainReductionStrategy SELECT_MEDIAN_VALUE</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l05258">cp_model.pb.h:5258</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_decision_strategy_proto_html_a914b87c4401bfbe3531933bdd83e63fe"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a914b87c4401bfbe3531933bdd83e63fe">operations_research::sat::DecisionStrategyProto::SELECT_LOWER_HALF</a></div><div class="ttdeci">static constexpr DomainReductionStrategy SELECT_LOWER_HALF</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l05254">cp_model.pb.h:5254</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_decision_strategy_proto_html_a97eeb48d600352e193d22197fce8cec2"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a97eeb48d600352e193d22197fce8cec2">operations_research::sat::DecisionStrategyProto::CHOOSE_MIN_DOMAIN_SIZE</a></div><div class="ttdeci">static constexpr VariableSelectionStrategy CHOOSE_MIN_DOMAIN_SIZE</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l05220">cp_model.pb.h:5220</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_decision_strategy_proto_html_aaf8918709f489a1fe2ad4165a0708bd7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#aaf8918709f489a1fe2ad4165a0708bd7">operations_research::sat::DecisionStrategyProto::CHOOSE_HIGHEST_MAX</a></div><div class="ttdeci">static constexpr VariableSelectionStrategy CHOOSE_HIGHEST_MAX</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l05218">cp_model.pb.h:5218</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_decision_strategy_proto_html_ac97244061e3840a546f716a0906d963a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#ac97244061e3840a546f716a0906d963a">operations_research::sat::DecisionStrategyProto::CHOOSE_FIRST</a></div><div class="ttdeci">static constexpr VariableSelectionStrategy CHOOSE_FIRST</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l05214">cp_model.pb.h:5214</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_decision_strategy_proto_html_af532692efe270e142c91e425aadebf63"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_decision_strategy_proto.html#af532692efe270e142c91e425aadebf63">operations_research::sat::DecisionStrategyProto::SELECT_UPPER_HALF</a></div><div class="ttdeci">static constexpr DomainReductionStrategy SELECT_UPPER_HALF</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l05256">cp_model.pb.h:5256</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_integer_encoder_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_integer_encoder.html">operations_research::sat::IntegerEncoder</a></div><div class="ttdef"><b>Definition:</b> <a href="integer_8h_source.html#l00306">integer.h:306</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_integer_encoder_html_a47c935a057dc400bddf6c9ca8217c836"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_integer_encoder.html#a47c935a057dc400bddf6c9ca8217c836">operations_research::sat::IntegerEncoder::GetAllIntegerLiterals</a></div><div class="ttdeci">const InlinedIntegerLiteralVector &amp; GetAllIntegerLiterals(Literal lit) const</div><div class="ttdef"><b>Definition:</b> <a href="integer_8h_source.html#l00434">integer.h:434</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_integer_encoder_html_ac9e262bbda19ec4b7d51bd77b70bb363"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_integer_encoder.html#ac9e262bbda19ec4b7d51bd77b70bb363">operations_research::sat::IntegerEncoder::VariableIsFullyEncoded</a></div><div class="ttdeci">bool VariableIsFullyEncoded(IntegerVariable var) const</div><div class="ttdef"><b>Definition:</b> <a href="integer_8cc_source.html#l00097">integer.cc:97</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_integer_encoder_html_ad31b2f541f1dd2cbb531c66347ea08e9"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_integer_encoder.html#ad31b2f541f1dd2cbb531c66347ea08e9">operations_research::sat::IntegerEncoder::RawDomainEncoding</a></div><div class="ttdeci">std::vector&lt; ValueLiteralPair &gt; RawDomainEncoding(IntegerVariable var) const</div><div class="ttdef"><b>Definition:</b> <a href="integer_8cc_source.html#l00168">integer.cc:168</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_integer_trail_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_integer_trail.html">operations_research::sat::IntegerTrail</a></div><div class="ttdef"><b>Definition:</b> <a href="integer_8h_source.html#l00574">integer.h:574</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_integer_trail_html_a309d057e12c8d4d393f13975eea2e2a9"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_integer_trail.html#a309d057e12c8d4d393f13975eea2e2a9">operations_research::sat::IntegerTrail::IsCurrentlyIgnored</a></div><div class="ttdeci">bool IsCurrentlyIgnored(IntegerVariable i) const</div><div class="ttdef"><b>Definition:</b> <a href="integer_8h_source.html#l00659">integer.h:659</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_integer_trail_html_a523501d854b2ca8034d37c15e7c89117"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_integer_trail.html#a523501d854b2ca8034d37c15e7c89117">operations_research::sat::IntegerTrail::IsFixed</a></div><div class="ttdeci">bool IsFixed(IntegerVariable i) const</div><div class="ttdef"><b>Definition:</b> <a href="integer_8h_source.html#l01353">integer.h:1353</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_integer_trail_html_a8b6d5a25e6ad3d28a85b1924471e2cac"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_integer_trail.html#a8b6d5a25e6ad3d28a85b1924471e2cac">operations_research::sat::IntegerTrail::UpperBound</a></div><div class="ttdeci">IntegerValue UpperBound(IntegerVariable i) const</div><div class="ttdef"><b>Definition:</b> <a href="integer_8h_source.html#l01349">integer.h:1349</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_integer_trail_html_ab857cd2aead68952d9fe92a8ad8d3ac9"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_integer_trail.html#ab857cd2aead68952d9fe92a8ad8d3ac9">operations_research::sat::IntegerTrail::LowerBound</a></div><div class="ttdeci">IntegerValue LowerBound(IntegerVariable i) const</div><div class="ttdef"><b>Definition:</b> <a href="integer_8h_source.html#l01345">integer.h:1345</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_integer_variable_proto_html_a24dcbf29c0d6cd766009a182a6484e3b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_integer_variable_proto.html#a24dcbf29c0d6cd766009a182a6484e3b">operations_research::sat::IntegerVariableProto::name</a></div><div class="ttdeci">const std::string &amp; name() const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l06838">cp_model.pb.h:6838</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html">operations_research::sat::Literal</a></div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00065">sat_base.h:65</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a239e1315c4e975a35537790ba0d913a7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a239e1315c4e975a35537790ba0d913a7">operations_research::sat::Literal::NegatedIndex</a></div><div class="ttdeci">LiteralIndex NegatedIndex() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00086">sat_base.h:86</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a4a11c7c4d7706c09de5e18707c3b5c62"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a4a11c7c4d7706c09de5e18707c3b5c62">operations_research::sat::Literal::Index</a></div><div class="ttdeci">LiteralIndex Index() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00085">sat_base.h:85</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a6a5dcff82096cd7a7147bf996dbaa5a8"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a6a5dcff82096cd7a7147bf996dbaa5a8">operations_research::sat::Literal::Variable</a></div><div class="ttdeci">BooleanVariable Variable() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00081">sat_base.h:81</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_model_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_model.html">operations_research::sat::Model</a></div><div class="ttdoc">Class that owns everything related to a particular optimization model.</div><div class="ttdef"><b>Definition:</b> <a href="sat_2model_8h_source.html#l00038">sat/model.h:38</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_model_random_generator_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_model_random_generator.html">operations_research::sat::ModelRandomGenerator</a></div><div class="ttdef"><b>Definition:</b> <a href="sat_2util_8h_source.html#l00041">sat/util.h:41</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html">operations_research::sat::SatParameters</a></div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l00347">sat_parameters.pb.h:348</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a06730fdc65bbc2f484f63f2434ca3ee0"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a06730fdc65bbc2f484f63f2434ca3ee0">operations_research::sat::SatParameters::interleave_search</a></div><div class="ttdeci">bool interleave_search() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l07464">sat_parameters.pb.h:7464</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a12ca6efbeca97a5144172001228719dc"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a12ca6efbeca97a5144172001228719dc">operations_research::sat::SatParameters::set_search_branching</a></div><div class="ttdeci">void set_search_branching(::operations_research::sat::SatParameters_SearchBranching value)</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l06800">sat_parameters.pb.h:6800</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a17a5aa1f5b9e992c1ffb4db39988f542"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a17a5aa1f5b9e992c1ffb4db39988f542">operations_research::sat::SatParameters::PSEUDO_COST_SEARCH</a></div><div class="ttdeci">static constexpr SearchBranching PSEUDO_COST_SEARCH</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l00779">sat_parameters.pb.h:779</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a271429cfd7459cfc7256ccf302f09312"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a271429cfd7459cfc7256ccf302f09312">operations_research::sat::SatParameters::use_feasibility_pump</a></div><div class="ttdeci">bool use_feasibility_pump() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l07744">sat_parameters.pb.h:7744</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a2dc61ebb1adfcb5c96285552c4eef6ce"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a2dc61ebb1adfcb5c96285552c4eef6ce">operations_research::sat::SatParameters::set_add_lp_constraints_lazily</a></div><div class="ttdeci">void set_add_lp_constraints_lazily(bool value)</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l06575">sat_parameters.pb.h:6575</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a3712336400bac2cffb76d06873aa0172"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a3712336400bac2cffb76d06873aa0172">operations_research::sat::SatParameters::set_optimize_with_core</a></div><div class="ttdeci">void set_optimize_with_core(bool value)</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l07136">sat_parameters.pb.h:7136</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a496346e5424316ea146fa429ea5f5c6c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a496346e5424316ea146fa429ea5f5c6c">operations_research::sat::SatParameters::set_boolean_encoding_level</a></div><div class="ttdeci">void set_boolean_encoding_level(::PROTOBUF_NAMESPACE_ID::int32 value)</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l06239">sat_parameters.pb.h:6239</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a496446461aaf7b3634d5d8dee20cf102"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a496446461aaf7b3634d5d8dee20cf102">operations_research::sat::SatParameters::use_relaxation_lns</a></div><div class="ttdeci">bool use_relaxation_lns() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l07801">sat_parameters.pb.h:7801</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a4ce528568865a9d377b9aa1cf8e7bba1"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a4ce528568865a9d377b9aa1cf8e7bba1">operations_research::sat::SatParameters::use_rins_lns</a></div><div class="ttdeci">bool use_rins_lns() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l07716">sat_parameters.pb.h:7716</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a59349c6ff18c51a1487ae271c9c577ee"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a59349c6ff18c51a1487ae271c9c577ee">operations_research::sat::SatParameters::PORTFOLIO_WITH_QUICK_RESTART_SEARCH</a></div><div class="ttdeci">static constexpr SearchBranching PORTFOLIO_WITH_QUICK_RESTART_SEARCH</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l00781">sat_parameters.pb.h:781</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a5a6e355530b56b20f5ab3503bf29321e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a5a6e355530b56b20f5ab3503bf29321e">operations_research::sat::SatParameters::reduce_memory_usage_in_interleave_mode</a></div><div class="ttdeci">bool reduce_memory_usage_in_interleave_mode() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l07520">sat_parameters.pb.h:7520</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a74f7eb449a6e182b73c8b4a1dbf15ce6"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a74f7eb449a6e182b73c8b4a1dbf15ce6">operations_research::sat::SatParameters::set_name</a></div><div class="ttdeci">void set_name(ArgT0 &amp;&amp;arg0, ArgT... args)</div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a76eb3f692d72d9f57b8f541595373d72"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a76eb3f692d72d9f57b8f541595373d72">operations_research::sat::SatParameters::set_search_randomization_tolerance</a></div><div class="ttdeci">void set_search_randomization_tolerance(::PROTOBUF_NAMESPACE_ID::int64 value)</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l07893">sat_parameters.pb.h:7893</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a7c4035495431c855047f46da9bf3aee2"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a7c4035495431c855047f46da9bf3aee2">operations_research::sat::SatParameters::set_linearization_level</a></div><div class="ttdeci">void set_linearization_level(::PROTOBUF_NAMESPACE_ID::int32 value)</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l06211">sat_parameters.pb.h:6211</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_a9a5672d5693f6b33a6b50749b45cae65"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#a9a5672d5693f6b33a6b50749b45cae65">operations_research::sat::SatParameters::set_randomize_search</a></div><div class="ttdeci">void set_randomize_search(bool value)</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l07865">sat_parameters.pb.h:7865</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_aa148eda9a432e6c798d9e2eecc8645f4"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#aa148eda9a432e6c798d9e2eecc8645f4">operations_research::sat::SatParameters::set_random_seed</a></div><div class="ttdeci">void set_random_seed(::PROTOBUF_NAMESPACE_ID::int32 value)</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l04891">sat_parameters.pb.h:4891</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_aa1f93c70c349b5f740fefe5317b7f9fc"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#aa1f93c70c349b5f740fefe5317b7f9fc">operations_research::sat::SatParameters::LP_SEARCH</a></div><div class="ttdeci">static constexpr SearchBranching LP_SEARCH</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l00777">sat_parameters.pb.h:777</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_aaee385bc09f704a88dee6b939782e21a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#aaee385bc09f704a88dee6b939782e21a">operations_research::sat::SatParameters::instantiate_all_variables</a></div><div class="ttdeci">bool instantiate_all_variables() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l07324">sat_parameters.pb.h:7324</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_ab253f28220a4b075fb08426d044ccd28"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#ab253f28220a4b075fb08426d044ccd28">operations_research::sat::SatParameters::set_exploit_best_solution</a></div><div class="ttdeci">void set_exploit_best_solution(bool value)</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l06968">sat_parameters.pb.h:6968</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_ab620cb0acc7c1245958c5783e1b4767e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#ab620cb0acc7c1245958c5783e1b4767e">operations_research::sat::SatParameters::AUTOMATIC_SEARCH</a></div><div class="ttdeci">static constexpr SearchBranching AUTOMATIC_SEARCH</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l00771">sat_parameters.pb.h:771</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_ac8021914a0604c6af88489e5d0ec104a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#ac8021914a0604c6af88489e5d0ec104a">operations_research::sat::SatParameters::set_use_probing_search</a></div><div class="ttdeci">void set_use_probing_search(bool value)</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l07080">sat_parameters.pb.h:7080</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_ae2c4cfa9b4e95ca5fa194ceedcd162fb"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#ae2c4cfa9b4e95ca5fa194ceedcd162fb">operations_research::sat::SatParameters::search_randomization_tolerance</a></div><div class="ttdeci">::PROTOBUF_NAMESPACE_ID::int64 search_randomization_tolerance() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l07885">sat_parameters.pb.h:7885</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_ae535d7515d701373438ee5c103cd3031"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#ae535d7515d701373438ee5c103cd3031">operations_research::sat::SatParameters::randomize_search</a></div><div class="ttdeci">bool randomize_search() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l07857">sat_parameters.pb.h:7857</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_ae695f88dd381c202206accd9b79e8d0c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#ae695f88dd381c202206accd9b79e8d0c">operations_research::sat::SatParameters::set_optimize_with_lb_tree_search</a></div><div class="ttdeci">void set_optimize_with_lb_tree_search(bool value)</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l07164">sat_parameters.pb.h:7164</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_parameters_html_afc7419e2f33992c4a7b8b0decd1dc3e0"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_parameters.html#afc7419e2f33992c4a7b8b0decd1dc3e0">operations_research::sat::SatParameters::FIXED_SEARCH</a></div><div class="ttdeci">static constexpr SearchBranching FIXED_SEARCH</div><div class="ttdef"><b>Definition:</b> <a href="sat__parameters_8pb_8h_source.html#l00773">sat_parameters.pb.h:773</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html">operations_research::sat::Trail</a></div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00234">sat_base.h:234</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_a142694366986039454f53b38e8378815"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#a142694366986039454f53b38e8378815">operations_research::sat::VariablesAssignment::LiteralIsAssigned</a></div><div class="ttdeci">bool LiteralIsAssigned(Literal literal) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00154">sat_base.h:154</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_a49e751eb6f0e9babd957889bb8e7472d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#a49e751eb6f0e9babd957889bb8e7472d">operations_research::sat::VariablesAssignment::VariableIsAssigned</a></div><div class="ttdeci">bool VariableIsAssigned(BooleanVariable var) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00159">sat_base.h:159</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_a5300129913f51dcb0b1c531e3248490e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#a5300129913f51dcb0b1c531e3248490e">operations_research::sat::VariablesAssignment::LiteralIsTrue</a></div><div class="ttdeci">bool LiteralIsTrue(Literal literal) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00151">sat_base.h:151</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_acfd1646011e643f58fd7dc66d9cc90a5"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#acfd1646011e643f58fd7dc66d9cc90a5">operations_research::sat::VariablesAssignment::LiteralIsFalse</a></div><div class="ttdeci">bool LiteralIsFalse(Literal literal) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00148">sat_base.h:148</a></div></div>
<div class="ttc" id="acp__model__fz__solver_8cc_html_a10a1eab179b472c030bdc2a2efef7219"><div class="ttname"><a href="cp__model__fz__solver_8cc.html#a10a1eab179b472c030bdc2a2efef7219">parameters</a></div><div class="ttdeci">SatParameters parameters</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__fz__solver_8cc_source.html#l00116">cp_model_fz_solver.cc:116</a></div></div>
<div class="ttc" id="acp__model__fz__solver_8cc_html_aed003f5eb5197bc586b7ef2c36a63da2"><div class="ttname"><a href="cp__model__fz__solver_8cc.html#aed003f5eb5197bc586b7ef2c36a63da2">proto</a></div><div class="ttdeci">CpModelProto proto</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__fz__solver_8cc_source.html#l00115">cp_model_fz_solver.cc:115</a></div></div>
<div class="ttc" id="acp__model__search_8h_html"><div class="ttname"><a href="cp__model__search_8h.html">cp_model_search.h</a></div></div>
<div class="ttc" id="acp__model__utils_8h_html"><div class="ttname"><a href="cp__model__utils_8h.html">cp_model_utils.h</a></div></div>
<div class="ttc" id="adefault__search_8cc_html_ac673bc430bdc3fdaa09f7becf98ef267"><div class="ttname"><a href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a></div><div class="ttdeci">const std::string name</div><div class="ttdef"><b>Definition:</b> <a href="default__search_8cc_source.html#l00813">default_search.cc:813</a></div></div>
<div class="ttc" id="ademon__profiler_8cc_html_a05da18ca9c7b657a4a6ea24e07c9b695"><div class="ttname"><a href="demon__profiler_8cc.html#a05da18ca9c7b657a4a6ea24e07c9b695">ct</a></div><div class="ttdeci">const Constraint * ct</div><div class="ttdef"><b>Definition:</b> <a href="demon__profiler_8cc_source.html#l00043">demon_profiler.cc:43</a></div></div>
<div class="ttc" id="ademon__profiler_8cc_html_ac072af30c4ffbc834bb4c681f6ecb514"><div class="ttname"><a href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a></div><div class="ttdeci">int64_t value</div><div class="ttdef"><b>Definition:</b> <a href="demon__profiler_8cc_source.html#l00044">demon_profiler.cc:44</a></div></div>
<div class="ttc" id="aexpr__array_8cc_html_a472a99923cbe11ae7b5a5d157d9ad465"><div class="ttname"><a href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a></div><div class="ttdeci">IntVar * var</div><div class="ttdef"><b>Definition:</b> <a href="expr__array_8cc_source.html#l01874">expr_array.cc:1874</a></div></div>
<div class="ttc" id="agurobi__interface_8cc_html_a0728f23c9a47655d38e0bf1a2f200bcf"><div class="ttname"><a href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a></div><div class="ttdeci">GRBmodel * model</div><div class="ttdef"><b>Definition:</b> <a href="gurobi__interface_8cc_source.html#l00273">gurobi_interface.cc:273</a></div></div>
<div class="ttc" id="alog__severity_8h_html_ab4a2cbab234914b320b7fae11b6e8cb9"><div class="ttname"><a href="log__severity_8h.html#ab4a2cbab234914b320b7fae11b6e8cb9">INFO</a></div><div class="ttdeci">const int INFO</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="alog__severity_8h_html_acdd38e3c9f22f127d7776920e3079eda"><div class="ttname"><a href="log__severity_8h.html#acdd38e3c9f22f127d7776920e3079eda">FATAL</a></div><div class="ttdeci">const int FATAL</div><div class="ttdef"><b>Definition:</b> <a href="log__severity_8h_source.html#l00032">log_severity.h:32</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a097ca8cb4e3e4c0b29c27846f578f23b"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a097ca8cb4e3e4c0b29c27846f578f23b">operations_research::sat::ConstructSearchStrategyInternal</a></div><div class="ttdeci">const std::function&lt; BooleanOrIntegerLiteral()&gt; ConstructSearchStrategyInternal(const std::vector&lt; DecisionStrategyProto &gt; &amp;strategies, Model *model)</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00149">cp_model_search.cc:149</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a0ab0c4789d577b30dde661c19f88d00e"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a0ab0c4789d577b30dde661c19f88d00e">operations_research::sat::DecisionStrategyProto_DomainReductionStrategy</a></div><div class="ttdeci">DecisionStrategyProto_DomainReductionStrategy</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l00210">cp_model.pb.h:210</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a0b08971dbb223f77e7fc9c41a77fdc7b"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a0b08971dbb223f77e7fc9c41a77fdc7b">operations_research::sat::FirstUnassignedVarAtItsMinHeuristic</a></div><div class="ttdeci">std::function&lt; BooleanOrIntegerLiteral()&gt; FirstUnassignedVarAtItsMinHeuristic(const std::vector&lt; IntegerVariable &gt; &amp;vars, Model *model)</div><div class="ttdef"><b>Definition:</b> <a href="integer__search_8cc_source.html#l00152">integer_search.cc:152</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a217338425de4389014563f1f24331713"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a217338425de4389014563f1f24331713">operations_research::sat::RefIsPositive</a></div><div class="ttdeci">bool RefIsPositive(int ref)</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__utils_8h_source.html#l00036">cp_model_utils.h:36</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a2acd1aef8e418e20032fd893668c04a6"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a2acd1aef8e418e20032fd893668c04a6">operations_research::sat::SequentialSearch</a></div><div class="ttdeci">std::function&lt; BooleanOrIntegerLiteral()&gt; SequentialSearch(std::vector&lt; std::function&lt; BooleanOrIntegerLiteral()&gt; &gt; heuristics)</div><div class="ttdef"><b>Definition:</b> <a href="integer__search_8cc_source.html#l00187">integer_search.cc:187</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a2dbcb7017d468a17bdb30252af5c6c31"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a2dbcb7017d468a17bdb30252af5c6c31">operations_research::sat::kNoLiteralIndex</a></div><div class="ttdeci">const LiteralIndex kNoLiteralIndex(-1)</div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a5bd8c44473618b7eafd33ba978db2f06"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a5bd8c44473618b7eafd33ba978db2f06">operations_research::sat::kNoIntegerVariable</a></div><div class="ttdeci">const IntegerVariable kNoIntegerVariable(-1)</div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a6c01e08a9089e0d5fed2507f479bbadc"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a6c01e08a9089e0d5fed2507f479bbadc">operations_research::sat::SchedulingSearchHeuristic</a></div><div class="ttdeci">std::function&lt; BooleanOrIntegerLiteral()&gt; SchedulingSearchHeuristic(Model *model)</div><div class="ttdef"><b>Definition:</b> <a href="integer__search_8cc_source.html#l00350">integer_search.cc:350</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_aae43e784db06c0974ce59ebbe8dd2b22"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#aae43e784db06c0974ce59ebbe8dd2b22">operations_research::sat::NegationOf</a></div><div class="ttdeci">std::vector&lt; IntegerVariable &gt; NegationOf(const std::vector&lt; IntegerVariable &gt; &amp;vars)</div><div class="ttdef"><b>Definition:</b> <a href="integer_8cc_source.html#l00029">integer.cc:29</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_accb8be601562b35adeea0682f3ea560c"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#accb8be601562b35adeea0682f3ea560c">operations_research::sat::GetDiverseSetOfParameters</a></div><div class="ttdeci">std::vector&lt; SatParameters &gt; GetDiverseSetOfParameters(const SatParameters &amp;base_params, const CpModelProto &amp;cp_model, const int num_workers)</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00394">cp_model_search.cc:394</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_acdbc8ad33149d45a6e6fcd8b72fd68ed"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#acdbc8ad33149d45a6e6fcd8b72fd68ed">operations_research::sat::PositiveRef</a></div><div class="ttdeci">int PositiveRef(int ref)</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__utils_8h_source.html#l00035">cp_model_utils.h:35</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_aef9a9e314dd32a66b7540b0ae367eb4f"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#aef9a9e314dd32a66b7540b0ae367eb4f">operations_research::sat::ConstructSearchStrategy</a></div><div class="ttdeci">std::function&lt; BooleanOrIntegerLiteral()&gt; ConstructSearchStrategy(const CpModelProto &amp;cp_model_proto, const std::vector&lt; IntegerVariable &gt; &amp;variable_mapping, IntegerVariable objective_var, Model *model)</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00292">cp_model_search.cc:292</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_afb3c98e67e212632d35259e550235d0a"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#afb3c98e67e212632d35259e550235d0a">operations_research::sat::InstrumentSearchStrategy</a></div><div class="ttdeci">std::function&lt; BooleanOrIntegerLiteral()&gt; InstrumentSearchStrategy(const CpModelProto &amp;cp_model_proto, const std::vector&lt; IntegerVariable &gt; &amp;variable_mapping, const std::function&lt; BooleanOrIntegerLiteral()&gt; &amp;instrumented_strategy, Model *model)</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00333">cp_model_search.cc:333</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="apack_8cc_html_a750b5d744c39a06bfb13e6eb010e35d0"><div class="ttname"><a href="pack_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a></div><div class="ttdeci">int index</div><div class="ttdef"><b>Definition:</b> <a href="pack_8cc_source.html#l00509">pack.cc:509</a></div></div>
<div class="ttc" id="asat_2util_8h_html"><div class="ttname"><a href="sat_2util_8h.html">util.h</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_boolean_or_integer_literal_html"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html">operations_research::sat::BooleanOrIntegerLiteral</a></div><div class="ttdef"><b>Definition:</b> <a href="integer__search_8h_source.html#l00041">integer_search.h:41</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_boolean_or_integer_literal_html_a3c6f3ae96a90c7fcef34dd0f1ce0297e"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html#a3c6f3ae96a90c7fcef34dd0f1ce0297e">operations_research::sat::BooleanOrIntegerLiteral::boolean_literal_index</a></div><div class="ttdeci">LiteralIndex boolean_literal_index</div><div class="ttdef"><b>Definition:</b> <a href="integer__search_8h_source.html#l00053">integer_search.h:53</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_boolean_or_integer_literal_html_ae26b73bbf70dc88433be39df364ca7c1"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html#ae26b73bbf70dc88433be39df364ca7c1">operations_research::sat::BooleanOrIntegerLiteral::HasValue</a></div><div class="ttdeci">bool HasValue() const</div><div class="ttdef"><b>Definition:</b> <a href="integer__search_8h_source.html#l00048">integer_search.h:48</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_boolean_or_integer_literal_html_aee356429e37f0750e38ee17ae1464a00"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_boolean_or_integer_literal.html#aee356429e37f0750e38ee17ae1464a00">operations_research::sat::BooleanOrIntegerLiteral::integer_literal</a></div><div class="ttdeci">IntegerLiteral integer_literal</div><div class="ttdef"><b>Definition:</b> <a href="integer__search_8h_source.html#l00054">integer_search.h:54</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_integer_literal_html"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_integer_literal.html">operations_research::sat::IntegerLiteral</a></div><div class="ttdef"><b>Definition:</b> <a href="integer_8h_source.html#l00167">integer.h:167</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_integer_literal_html_a3e2eb445631727dd4abf1d5343f16b2f"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_integer_literal.html#a3e2eb445631727dd4abf1d5343f16b2f">operations_research::sat::IntegerLiteral::LowerOrEqual</a></div><div class="ttdeci">static IntegerLiteral LowerOrEqual(IntegerVariable i, IntegerValue bound)</div><div class="ttdef"><b>Definition:</b> <a href="integer_8h_source.html#l01315">integer.h:1315</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_integer_literal_html_a6c233aafac25ea66d69de93a83c9be63"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_integer_literal.html#a6c233aafac25ea66d69de93a83c9be63">operations_research::sat::IntegerLiteral::GreaterOrEqual</a></div><div class="ttdeci">static IntegerLiteral GreaterOrEqual(IntegerVariable i, IntegerValue bound)</div><div class="ttdef"><b>Definition:</b> <a href="integer_8h_source.html#l01309">integer.h:1309</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_var_value_html"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_var_value.html">operations_research::sat::VarValue</a></div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00131">cp_model_search.cc:131</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_var_value_html_ac072af30c4ffbc834bb4c681f6ecb514"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_var_value.html#ac072af30c4ffbc834bb4c681f6ecb514">operations_research::sat::VarValue::value</a></div><div class="ttdeci">int64_t value</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00133">cp_model_search.cc:133</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_var_value_html_adb528a1cb1ca190150183394d082590d"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_var_value.html#adb528a1cb1ca190150183394d082590d">operations_research::sat::VarValue::ref</a></div><div class="ttdeci">int ref</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__search_8cc_source.html#l00132">cp_model_search.cc:132</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="cp__model__search_8cc.html">cp_model_search.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>