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

860 lines
199 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: presolve_context.h 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('presolve__context_8h_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">presolve_context.h</div></div>
</div><!--header-->
<div class="contents">
<a href="presolve__context_8h.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">#ifndef OR_TOOLS_SAT_PRESOLVE_CONTEXT_H_</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#define OR_TOOLS_SAT_PRESOLVE_CONTEXT_H_</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &lt;cstdint&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &lt;deque&gt;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</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_8pb_8h.html">ortools/sat/cp_model.pb.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="cp__model__utils_8h.html">ortools/sat/cp_model_utils.h</a>&quot;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#include &quot;<a class="code" href="sat_2model_8h.html">ortools/sat/model.h</a>&quot;</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="preprocessor">#include &quot;<a class="code" href="presolve__util_8h.html">ortools/sat/presolve_util.h</a>&quot;</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor">#include &quot;<a class="code" href="sat__parameters_8pb_8h.html">ortools/sat/sat_parameters.pb.h</a>&quot;</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</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="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor">#include &quot;<a class="code" href="affine__relation_8h.html">ortools/util/affine_relation.h</a>&quot;</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#include &quot;<a class="code" href="bitset_8h.html">ortools/util/bitset.h</a>&quot;</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#include &quot;<a class="code" href="util_2logging_8h.html">ortools/util/logging.h</a>&quot;</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#include &quot;<a class="code" href="sorted__interval__list_8h.html">ortools/util/sorted_interval_list.h</a>&quot;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &quot;<a class="code" href="time__limit_8h.html">ortools/util/time_limit.h</a>&quot;</span></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"> 34</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceoperations__research.html">operations_research</a> {</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="keyword">namespace </span>sat {</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="comment">// We use some special constraint index in our variable &lt;-&gt; constraint graph.</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#aca25bc3ffa54b3f2668c6eeddffd8d1d"> 38</a></span><span class="keyword">constexpr</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="namespaceoperations__research_1_1sat.html#aca25bc3ffa54b3f2668c6eeddffd8d1d">kObjectiveConstraint</a> = -1;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#a55963ffe87280b37dce97b9a8cbd03ae"> 39</a></span><span class="keyword">constexpr</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="namespaceoperations__research_1_1sat.html#a55963ffe87280b37dce97b9a8cbd03ae">kAffineRelationConstraint</a> = -2;</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#abe4ecb2ef8f498b18a55fbcbbf54e550"> 40</a></span><span class="keyword">constexpr</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="namespaceoperations__research_1_1sat.html#abe4ecb2ef8f498b18a55fbcbbf54e550">kAssumptionsConstraint</a> = -3;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="keyword">class </span><a class="code hl_class" href="classoperations__research_1_1sat_1_1_presolve_context.html">PresolveContext</a>;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="comment">// When storing a reference to a literal, it is important not to forget when</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="comment">// reading it back to take its representative. Otherwise, we might introduce</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="comment">// literal that have already been removed, which will break invariants in a</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="comment">// bunch of places.</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_literal.html"> 48</a></span><span class="keyword">class </span><a class="code hl_class" href="classoperations__research_1_1sat_1_1_saved_literal.html">SavedLiteral</a> {</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_literal.html#a24f5a711e542ac97673337e549a74e7c"> 50</a></span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_saved_literal.html#a24f5a711e542ac97673337e549a74e7c">SavedLiteral</a>() {}</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_literal.html#ad134f35430fd7787cea20a3714c123e0"> 51</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_saved_literal.html#ad134f35430fd7787cea20a3714c123e0">SavedLiteral</a>(<span class="keywordtype">int</span> ref) : ref_(ref) {}</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_saved_literal.html#adf2db0610413d540ca6c4e4f1cce5fd6">Get</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_presolve_context.html">PresolveContext</a>* <a class="code hl_variable" href="gurobi__interface_8cc.html#a5f287b83a753915ae862fed64f8640a6">context</a>) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordtype">int</span> ref_ = 0;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span>};</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="comment">// Same as SavedLiteral for variable.</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_variable.html"> 59</a></span><span class="keyword">class </span><a class="code hl_class" href="classoperations__research_1_1sat_1_1_saved_variable.html">SavedVariable</a> {</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_variable.html#aea29b5bb569ea104749893b9f321697c"> 61</a></span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_saved_variable.html#aea29b5bb569ea104749893b9f321697c">SavedVariable</a>() {}</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_variable.html#abbc9b5ccc44af7db8e8a5703dce41b7d"> 62</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_saved_variable.html#abbc9b5ccc44af7db8e8a5703dce41b7d">SavedVariable</a>(<span class="keywordtype">int</span> ref) : ref_(ref) {}</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_saved_variable.html#adf2db0610413d540ca6c4e4f1cce5fd6">Get</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_presolve_context.html">PresolveContext</a>* <a class="code hl_variable" href="gurobi__interface_8cc.html#a5f287b83a753915ae862fed64f8640a6">context</a>) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordtype">int</span> ref_ = 0;</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> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="comment">// Wrap the CpModelProto we are presolving with extra data structure like the</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="comment">// in-memory domain of each variables and the constraint variable graph.</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html"> 71</a></span><span class="keyword">class </span><a class="code hl_class" href="classoperations__research_1_1sat_1_1_presolve_context.html">PresolveContext</a> {</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a1718a4c289ba4833e88f7e6cd0207a81"> 73</a></span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a1718a4c289ba4833e88f7e6cd0207a81">PresolveContext</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>, <a class="code hl_class" href="classoperations__research_1_1sat_1_1_cp_model_proto.html">CpModelProto</a>* cp_model, <a class="code hl_class" href="classoperations__research_1_1sat_1_1_cp_model_proto.html">CpModelProto</a>* mapping)</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> : <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#a928c29f37c6ed9d5bba711f905783417">working_model</a>(cp_model),</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4b3b9ef9c5f214dd4427daa2646eceda">mapping_model</a>(mapping),</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> logger_(<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_1_solver_logger.html">SolverLogger</a>&gt;()),</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> params_(*<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="l00078" name="l00078"></a><span class="lineno"> 78</span> time_limit_(<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_1_time_limit.html">TimeLimit</a>&gt;()),</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</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="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="comment">// Helpers to adds new variables to the presolved model.</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="comment">//</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="comment">// TODO(user): We should control more how this is called so we can update</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="comment">// a solution hint accordingly.</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a67699a1a5830ef51dab6941449b02044">NewIntVar</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1_domain.html">Domain</a>&amp; domain);</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a0967c575f9db0c79ed2e7930a0d6a091">NewBoolVar</a>();</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ada5d036ab04018d9ee3ed60888843102">GetOrCreateConstantVar</a>(int64_t cst);</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> </div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="comment">// a =&gt; b.</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a1aadaad9b8af16ab5a208c682e2e1717">AddImplication</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="constraint__solver_2table_8cc.html#acb18315d548212835cd8ed4287e6c0b6">a</a>, <span class="keywordtype">int</span> <a class="code hl_variable" href="constraint__solver_2table_8cc.html#a9293e4d29cac928301645070dd307683">b</a>);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="comment">// b =&gt; x in [lb, ub].</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#af0280b2bda95804c4166638e7b490ce9">AddImplyInDomain</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="constraint__solver_2table_8cc.html#a9293e4d29cac928301645070dd307683">b</a>, <span class="keywordtype">int</span> x, <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1_domain.html">Domain</a>&amp; domain);</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="comment">// Helpers to query the current domain of a variable.</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a77e37831a01ff737a7b5bd7e12c2ecf7">DomainIsEmpty</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#abb6eb29f56c3a33b8ae1b74b08b755c2">IsFixed</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#af188bac2776d4545aab9405f5c801cd8">CanBeUsedAsLiteral</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a890f923209473cf55ac002d1b14bd9e2">LiteralIsTrue</a>(<span class="keywordtype">int</span> lit) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a9f3443b281c705edf1779f746637ad9b">LiteralIsFalse</a>(<span class="keywordtype">int</span> lit) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> int64_t <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#af597da31a1aed22d4bbd0e9398728a9b">MinOf</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> int64_t <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a00f995618e00d575372ff823a12553a9">MaxOf</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a9dd01897679ba54fca524a3b0b7d5612">DomainContains</a>(<span class="keywordtype">int</span> ref, 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="l00104" name="l00104"></a><span class="lineno"> 104</span> <a class="code hl_class" href="classoperations__research_1_1_domain.html">Domain</a> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5e86fd5ce0fc653d355ab7303f373e00">DomainOf</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> </div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="comment">// Helper to query the state of an interval.</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a9da1edd6532c2c2b0c09544eade57805">IntervalIsConstant</a>(<span class="keywordtype">int</span> ct_ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> int64_t <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a308f62525f1941cc6ef7f943bd2c4c18">StartMin</a>(<span class="keywordtype">int</span> ct_ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> int64_t <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a83cb3816d487395542f17a17776b9a1a">StartMax</a>(<span class="keywordtype">int</span> ct_ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> int64_t <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#aef0a687ec05a3e5dd7aa78745e9fb382">SizeMin</a>(<span class="keywordtype">int</span> ct_ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> int64_t <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ae3ad719e8a03c11498d2d0ab18558f95">SizeMax</a>(<span class="keywordtype">int</span> ct_ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> int64_t <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5cc6a3ed49ec11734164c7ef646b15d5">EndMin</a>(<span class="keywordtype">int</span> ct_ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> int64_t <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ad6ab55f6b68272caeaf24ff0d69818a4">EndMax</a>(<span class="keywordtype">int</span> ct_ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> std::string <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#acb5ca2d891a58b6b9e55eee532c2557c">IntervalDebugString</a>(<span class="keywordtype">int</span> ct_ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="comment">// Helpers to query the current domain of a linear expression.</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="comment">// This doesn&#39;t check for integer overflow, but our linear expression</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="comment">// should be such that this cannot happen (tested at validation).</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> int64_t <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#af597da31a1aed22d4bbd0e9398728a9b">MinOf</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; expr) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> int64_t <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a00f995618e00d575372ff823a12553a9">MaxOf</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; expr) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="comment">// Return a super-set of the domain of the linear expression.</span></div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <a class="code hl_class" href="classoperations__research_1_1_domain.html">Domain</a> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ae7450e5b3b9b22663ec7e1fe0d82b6b9">DomainSuperSetOf</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; expr) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> </div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="comment">// Returns true iff the expr is of the for a * literal + b.</span></div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="comment">// The other function can be used to get the liteal that achieve MaxOf().</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#adff3b5f900c3d62132781fc25b54fb1a">ExpressionIsAffineBoolean</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; expr) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ad1cddf8749d0ce1686f1f428926cfb1d">LiteralForExpressionMax</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; expr) <span class="keyword">const</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">// This function takes a positive variable reference.</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a33f90dcf20e1ce9197e60eb3bed25974"> 131</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a33f90dcf20e1ce9197e60eb3bed25974">DomainOfVarIsIncludedIn</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1_domain.html">Domain</a>&amp; domain) {</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">return</span> domains[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>].IsIncludedIn(domain);</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> }</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> <span class="comment">// Returns true if a presolve transformation is allowed to remove this</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="comment">// variable.</span></div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a0000c1621c1de75511d17c9d14aae0e8">VariableIsRemovable</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="comment">// Returns true if this ref only appear in one constraint.</span></div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a54cf7f0077717d59a828b656b60c1615">VariableIsUniqueAndRemovable</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> </div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="comment">// Returns true if this ref no longer appears in the model.</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ab246112417bad87cb948820e304208ab">VariableIsNotUsedAnymore</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> </div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="comment">// Functions to make sure that once we remove a variable, we no longer reuse</span></div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="comment">// it.</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a6939dc7b9db01cf3deff10405e260461">MarkVariableAsRemoved</a>(<span class="keywordtype">int</span> ref);</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#af248c1021eda72d628e2f3537eb98ded">VariableWasRemoved</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> </div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="comment">// Same as VariableIsUniqueAndRemovable() except that in this case the</span></div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="comment">// variable also appear in the objective in addition to a single constraint.</span></div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a34e2cd343e0dfb06af9f67df8c4c3502">VariableWithCostIsUniqueAndRemovable</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="comment">// Returns true if an integer variable is only appearing in the rhs of</span></div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="comment">// constraints of the form lit =&gt; var in domain. When this is the case, then</span></div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="comment">// we can usually remove this variable and replace these constraints with</span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="comment">// the proper constraints on the enforcement literals.</span></div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#af7e074480c08f4887da40ca045624b6c">VariableIsOnlyUsedInEncodingAndMaybeInObjective</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> </div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="comment">// Returns false if the new domain is empty. Sets &#39;domain_modified&#39; (if</span></div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="comment">// provided) to true iff the domain is modified otherwise does not change it.</span></div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a20097880105b02917a50dd5d97b80e55">IntersectDomainWith</a>(</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="keywordtype">int</span> ref, <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1_domain.html">Domain</a>&amp; domain, <span class="keywordtype">bool</span>* domain_modified = <span class="keyword">nullptr</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">// Returns false if the &#39;lit&#39; doesn&#39;t have the desired value in the domain.</span></div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ad0d1a630c07ba2321cf43d97a425bc30">SetLiteralToFalse</a>(<span class="keywordtype">int</span> lit);</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a37ed950834f3f3b427a707631fd745f4">SetLiteralToTrue</a>(<span class="keywordtype">int</span> lit);</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="comment">// Same as IntersectDomainWith() but take a linear expression as input.</span></div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="comment">// If this expression if of size &gt; 1, this does nothing for now, so it will</span></div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="comment">// only propagates for constant and affine expression.</span></div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a20097880105b02917a50dd5d97b80e55">IntersectDomainWith</a>(</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; expr, <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1_domain.html">Domain</a>&amp; domain,</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keywordtype">bool</span>* domain_modified = <span class="keyword">nullptr</span>);</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> </div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="comment">// This function always return false. It is just a way to make a little bit</span></div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="comment">// more sure that we abort right away when infeasibility is detected.</span></div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5aa53538ba8adaa0bea1c3c0727425b0"> 178</a></span> ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5aa53538ba8adaa0bea1c3c0727425b0">NotifyThatModelIsUnsat</a>(</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="keyword">const</span> std::string&amp; <a class="code hl_variable" href="trace_8cc.html#a36bd74109f547f7f8198faf5a12d2879">message</a> = <span class="stringliteral">&quot;&quot;</span>) {</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="comment">// TODO(user): Report any explanation for the client in a nicer way?</span></div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> <a class="code hl_define" href="base_2logging_8h.html#afcaa7cadd41741bb855c2ada1d2ef927">VLOG</a>(1) &lt;&lt; <span class="stringliteral">&quot;INFEASIBLE: &#39;&quot;</span> &lt;&lt; <a class="code hl_variable" href="trace_8cc.html#a36bd74109f547f7f8198faf5a12d2879">message</a> &lt;&lt; <span class="stringliteral">&quot;&#39;&quot;</span>;</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(!is_unsat_);</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> is_unsat_ = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keywordflow">return</span> <span class="keyword">false</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"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a1cd25a05e3e88efc9ffe50461fb21d63"> 186</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a1cd25a05e3e88efc9ffe50461fb21d63">ModelIsUnsat</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> is_unsat_; }</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> </div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="comment">// Stores a description of a rule that was just applied to have a summary of</span></div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <span class="comment">// what the presolve did at the end.</span></div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#aa49a8967edab300018eeaa14a27b7210">UpdateRuleStats</a>(<span class="keyword">const</span> std::string&amp; <a class="code hl_variable" href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a>, <span class="keywordtype">int</span> num_times = 1);</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <span class="comment">// Updates the constraints &lt;-&gt; variables graph. This needs to be called each</span></div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="comment">// time a constraint is modified.</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ab75a27c0aeda2de9c3957719b8196c36">UpdateConstraintVariableUsage</a>(<span class="keywordtype">int</span> c);</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> </div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="comment">// At the beginning of the presolve, we delay the costly creation of this</span></div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="comment">// &quot;graph&quot; until we at least ran some basic presolve. This is because during</span></div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <span class="comment">// a LNS neighbhorhood, many constraints will be reduced significantly by</span></div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <span class="comment">// this &quot;simple&quot; presolve.</span></div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a2563663eeef59c23110ae4e2a80d8c9f">ConstraintVariableGraphIsUpToDate</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="comment">// Calls UpdateConstraintVariableUsage() on all newly created constraints.</span></div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a52bccf051bec19d96584096844070eaa">UpdateNewConstraintsVariableUsage</a>();</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> </div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="comment">// Returns true if our current constraints &lt;-&gt; variables graph is ok.</span></div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <span class="comment">// This is meant to be used in DEBUG mode only.</span></div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a11f5290ed8216eea13b9d7383cb4c55f">ConstraintVariableUsageIsConsistent</a>();</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> </div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <span class="comment">// Regroups fixed variables with the same value.</span></div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> <span class="comment">// TODO(user): Also regroup cte and -cte?</span></div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#af4847724208dd09ba3fea8b53132d197">ExploitFixedDomain</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="l00212" name="l00212"></a><span class="lineno"> 212</span> </div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="comment">// Adds the relation (ref_x = coeff * ref_y + offset) to the repository.</span></div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <span class="comment">// Once the relation is added, it doesn&#39;t need to be enforced by a constraint</span></div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> <span class="comment">// in the model proto, since we will propagate such relation directly and add</span></div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <span class="comment">// them to the proto at the end of the presolve.</span></div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="comment">//</span></div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <span class="comment">// Returns true if the relation was added.</span></div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <span class="comment">// In some rare case, like if x = 3*z and y = 5*t are already added, we</span></div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <span class="comment">// currently cannot add x = 2 * y and we will return false in these case. So</span></div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="comment">// when this returns false, the relation needs to be enforced by a separate</span></div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <span class="comment">// constraint.</span></div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="comment">//</span></div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <span class="comment">// If the relation was added, both variables will be marked to appear in the</span></div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="comment">// special kAffineRelationConstraint. This will allow to identify when a</span></div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> <span class="comment">// variable is no longer needed (only appear there and is not a</span></div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> <span class="comment">// representative).</span></div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a3999a4ff1f53b54b40c8cd396105572a">StoreAffineRelation</a>(<span class="keywordtype">int</span> ref_x, <span class="keywordtype">int</span> ref_y, int64_t coeff, int64_t offset);</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> <span class="comment">// Adds the fact that ref_a == ref_b using StoreAffineRelation() above.</span></div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <span class="comment">// This should never fail, so the relation will always be added.</span></div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a8fc1d49d1e1bf7261f15ccc6c23c4b10">StoreBooleanEqualityRelation</a>(<span class="keywordtype">int</span> ref_a, <span class="keywordtype">int</span> ref_b);</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> </div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> <span class="comment">// Stores/Get the relation target_ref = abs(ref); The first function returns</span></div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <span class="comment">// false if it already exist and the second false if it is not present.</span></div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a06f0856b91c0399720273b5da85ce280">StoreAbsRelation</a>(<span class="keywordtype">int</span> target_ref, <span class="keywordtype">int</span> ref);</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#af97bdc26758ff0f27314cafb7c2d7044">GetAbsRelation</a>(<span class="keywordtype">int</span> target_ref, <span class="keywordtype">int</span>* ref);</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> </div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> <span class="comment">// Returns the representative of a literal.</span></div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a37770bda4577c8ad121d77d99a63cb0f">GetLiteralRepresentative</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> </div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> <span class="comment">// Returns another reference with exactly the same value.</span></div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a6387e91b098c081f059892e1346a29ed">GetVariableRepresentative</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> </div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> <span class="comment">// Used for statistics.</span></div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#abd6f7af5d9b31061a7b03ec44488ea4c"> 246</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#abd6f7af5d9b31061a7b03ec44488ea4c">NumAffineRelations</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> affine_relations_.<a class="code hl_function" href="classoperations__research_1_1_affine_relation.html#acee7699cd3aad1b8ce9721e4952b36e7">NumRelations</a>(); }</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#acb73a5ab7e240d5f93938262f2d8b826"> 247</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#acb73a5ab7e240d5f93938262f2d8b826">NumEquivRelations</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> var_equiv_relations_.<a class="code hl_function" href="classoperations__research_1_1_affine_relation.html#acee7699cd3aad1b8ce9721e4952b36e7">NumRelations</a>(); }</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> </div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="comment">// This makes sure that the affine relation only uses one of the</span></div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <span class="comment">// representative from the var_equiv_relations.</span></div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> <a class="code hl_struct" href="structoperations__research_1_1_affine_relation_1_1_relation.html">AffineRelation::Relation</a> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#aaddc5f58e8a40a5a308531949153f814">GetAffineRelation</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> </div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> <span class="comment">// To facilitate debugging.</span></div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> std::string <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ad5e9882b154b8a7e8619b29c5631386e">RefDebugString</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> std::string <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a66810fcd97b5e9c5fd745226607cd7aa">AffineRelationDebugString</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> </div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> <span class="comment">// Makes sure the domain of ref and of its representative are in sync.</span></div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> <span class="comment">// Returns false on unsat.</span></div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5c2f01871b9baa2bc0dc556803c5a1ad">PropagateAffineRelation</a>(<span class="keywordtype">int</span> ref);</div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> </div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> <span class="comment">// Creates the internal structure for any new variables in working_model.</span></div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a62cd771660767621e917b2c256182c4e">InitializeNewDomains</a>();</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> </div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> <span class="comment">// Clears the &quot;rules&quot; statistics.</span></div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a24b22e509fdbdb4cd49ccec6a88c46ab">ClearStats</a>();</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> <span class="comment">// Inserts the given literal to encode ref == value.</span></div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> <span class="comment">// If an encoding already exists, it adds the two implications between</span></div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> <span class="comment">// the previous encoding and the new encoding.</span></div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="comment">//</span></div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <span class="comment">// Important: This does not update the constraint&lt;-&gt;variable graph, so</span></div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <span class="comment">// ConstraintVariableGraphIsUpToDate() will be false until</span></div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> <span class="comment">// UpdateNewConstraintsVariableUsage() is called.</span></div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> <span class="comment">//</span></div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> <span class="comment">// Returns false if the model become UNSAT.</span></div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> <span class="comment">//</span></div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> <span class="comment">// TODO(user): This function is not always correct if</span></div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> <span class="comment">// !context-&gt;DomainOf(ref).contains(value), we could make it correct but it</span></div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> <span class="comment">// might be a bit expansive to do so. For now we just have a DCHECK().</span></div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a69fea604a632b4b91ed950a0e622489c">InsertVarValueEncoding</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>, <span class="keywordtype">int</span> ref, int64_t <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> </div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> <span class="comment">// Gets the associated literal if it is already created. Otherwise</span></div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <span class="comment">// create it, add the corresponding constraints and returns it.</span></div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <span class="comment">//</span></div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> <span class="comment">// Important: This does not update the constraint&lt;-&gt;variable graph, so</span></div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> <span class="comment">// ConstraintVariableGraphIsUpToDate() will be false until</span></div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> <span class="comment">// UpdateNewConstraintsVariableUsage() is called.</span></div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4f9423ff72ed20e477fff16e8887df96">GetOrCreateVarValueEncoding</a>(<span class="keywordtype">int</span> ref, int64_t <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</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> <span class="comment">// If not already done, adds a Boolean to represent any integer variables that</span></div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> <span class="comment">// take only two values. Make sure all the relevant affine and encoding</span></div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> <span class="comment">// relations are updated.</span></div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> <span class="comment">//</span></div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> <span class="comment">// Note that this might create a new Boolean variable.</span></div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a7ea7bb314db4dbe4f3b2cac16a2af20f">CanonicalizeDomainOfSizeTwo</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="l00296" name="l00296"></a><span class="lineno"> 296</span> </div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> <span class="comment">// Returns true if a literal attached to ref == var exists.</span></div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> <span class="comment">// It assigns the corresponding to `literal` if non null.</span></div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a9925335988ccbe70e9150a9ce71b9952">HasVarValueEncoding</a>(<span class="keywordtype">int</span> ref, int64_t <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>, <span class="keywordtype">int</span>* <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a> = <span class="keyword">nullptr</span>);</div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> </div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> <span class="comment">// Stores the fact that literal implies var == value.</span></div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> <span class="comment">// It returns true if that information is new.</span></div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#afdf0f5e877efe4e1d003300f0ce1234f">StoreLiteralImpliesVarEqValue</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>, <span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, int64_t <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</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> <span class="comment">// Stores the fact that literal implies var != value.</span></div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> <span class="comment">// It returns true if that information is new.</span></div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a2877bce637c80df492977b5b6487d563">StoreLiteralImpliesVarNEqValue</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>, <span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, int64_t <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> </div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> <span class="comment">// Objective handling functions. We load it at the beginning so that during</span></div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> <span class="comment">// presolve we can work on the more efficient hash_map representation.</span></div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> <span class="comment">//</span></div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> <span class="comment">// Note that ReadObjectiveFromProto() makes sure that var_to_constraints of</span></div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> <span class="comment">// all the variable that appear in the objective contains -1. This is later</span></div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> <span class="comment">// enforced by all the functions modifying the objective.</span></div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> <span class="comment">//</span></div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> <span class="comment">// Note(user): Because we process affine relation only on</span></div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> <span class="comment">// CanonicalizeObjective(), it is possible that when processing a</span></div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> <span class="comment">// canonicalized linear constraint, we don&#39;t detect that a variable in affine</span></div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> <span class="comment">// relation is in the objective. For now this is fine, because when this is</span></div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> <span class="comment">// the case, we also have an affine linear constraint, so we can&#39;t really do</span></div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> <span class="comment">// anything with that variable since it appear in at least two constraints.</span></div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#aed2a07aad05b4ad8e05cf5fe7b239a1a">ReadObjectiveFromProto</a>();</div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#aa62da782b2270ca293531a0aea153fba">CanonicalizeObjective</a>();</div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a36794cf424ca2d69bc4774437a61a88e">WriteObjectiveToProto</a>() <span class="keyword">const</span>;</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> <span class="comment">// Checks if the given exactly_one is included in the objective, and simplify</span></div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> <span class="comment">// the objective by adding a constant value to all the exactly one terms.</span></div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ae42cae46d8792621471dd137bf9bb3cc">ExploitExactlyOneInObjective</a>(absl::Span&lt;const int&gt; exactly_one);</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="comment">// Allows to manipulate the objective coefficients.</span></div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#aaed725b098e5d931862a74b496564e37">RemoveVariableFromObjective</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="l00332" name="l00332"></a><span class="lineno"> 332</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a1e65dc236d5729de4938834d779d9f6f">AddToObjective</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, int64_t <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a02a3444590b38a8e99aba5eb8a1ca9d9">AddToObjectiveOffset</a>(int64_t <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> </div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> <span class="comment">// Given a variable defined by the given inequality that also appear in the</span></div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> <span class="comment">// objective, remove it from the objective by transferring its cost to other</span></div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> <span class="comment">// variables in the equality.</span></div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> <span class="comment">//</span></div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> <span class="comment">// If new_vars_in_objective is not nullptr, it will be filled with &quot;new&quot;</span></div>
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> <span class="comment">// variables that where not in the objective before and are after</span></div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> <span class="comment">// substitution.</span></div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> <span class="comment">//</span></div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> <span class="comment">// Returns false, if the substitution cannot be done. This is the case if the</span></div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> <span class="comment">// model become UNSAT or if doing it will result in an objective that do not</span></div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> <span class="comment">// satisfy our overflow preconditions. Note that this can only happen if the</span></div>
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> <span class="comment">// substitued variable is not implied free (i.e. if its domain is smaller than</span></div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> <span class="comment">// the implied domain from the equality).</span></div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4bf47c6b5724e9a3a7df78486f9bdc41">SubstituteVariableInObjective</a>(</div>
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> <span class="keywordtype">int</span> var_in_equality, int64_t coeff_in_equality,</div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_constraint_proto.html">ConstraintProto</a>&amp; equality,</div>
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> std::vector&lt;int&gt;* new_vars_in_objective = <span class="keyword">nullptr</span>);</div>
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span> </div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> <span class="comment">// Objective getters.</span></div>
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#afed8dbc0462255ec9df4c98384d6e7d7"> 354</a></span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1_domain.html">Domain</a>&amp; <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#afed8dbc0462255ec9df4c98384d6e7d7">ObjectiveDomain</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> objective_domain_; }</div>
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a89521813136093d6dcbff6ce1d4f45d2"> 355</a></span> <span class="keyword">const</span> absl::flat_hash_map&lt;int, int64_t&gt;&amp; <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a89521813136093d6dcbff6ce1d4f45d2">ObjectiveMap</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"> 356</span> <span class="keywordflow">return</span> objective_map_;</div>
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</span> }</div>
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a483ddc58170919b851be240df84c77af"> 358</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a483ddc58170919b851be240df84c77af">ObjectiveDomainIsConstraining</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> <span class="keywordflow">return</span> objective_domain_is_constraining_;</div>
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> }</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="comment">// Advanced usage. This should be called when a variable can be removed from</span></div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> <span class="comment">// the problem, so we don&#39;t count it as part of an affine relation anymore.</span></div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5763f8709716596a3aa728bacae05a7b">RemoveVariableFromAffineRelation</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="l00365" name="l00365"></a><span class="lineno"> 365</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#aabb328e6969888226a7a69a972e22c56">RemoveAllVariablesFromAffineRelationConstraint</a>();</div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> </div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> <span class="comment">// Variable &lt;-&gt; constraint graph.</span></div>
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"> 368</span> <span class="comment">// The vector list is sorted and contains unique elements.</span></div>
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"> 369</span> <span class="comment">//</span></div>
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</span> <span class="comment">// Important: To properly handle the objective, var_to_constraints[objective]</span></div>
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"> 371</span> <span class="comment">// contains -1 so that if the objective appear in only one constraint, the</span></div>
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> <span class="comment">// constraint cannot be simplified.</span></div>
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a86f29c8b6fd538e5b35bc79044ce3fc8"> 373</a></span> <span class="keyword">const</span> std::vector&lt;int&gt;&amp; <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a86f29c8b6fd538e5b35bc79044ce3fc8">ConstraintToVars</a>(<span class="keywordtype">int</span> c)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</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_presolve_context.html#a2563663eeef59c23110ae4e2a80d8c9f">ConstraintVariableGraphIsUpToDate</a>());</div>
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span> <span class="keywordflow">return</span> constraint_to_vars_[c];</div>
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"> 376</span> }</div>
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a131ebbc155a924f0bc825b1e234d5960"> 377</a></span> <span class="keyword">const</span> absl::flat_hash_set&lt;int&gt;&amp; <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a131ebbc155a924f0bc825b1e234d5960">VarToConstraints</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="l00378" name="l00378"></a><span class="lineno"> 378</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_presolve_context.html#a2563663eeef59c23110ae4e2a80d8c9f">ConstraintVariableGraphIsUpToDate</a>());</div>
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span> <span class="keywordflow">return</span> var_to_constraints_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>];</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"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a90674fa816d7a066e251337852214e84"> 381</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a90674fa816d7a066e251337852214e84">IntervalUsage</a>(<span class="keywordtype">int</span> c)<span class="keyword"> const </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#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(<a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a2563663eeef59c23110ae4e2a80d8c9f">ConstraintVariableGraphIsUpToDate</a>());</div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"> 383</span> <span class="keywordflow">return</span> interval_usage_[c];</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> <span class="comment">// Checks if a constraint contains an enforcement literal set to false,</span></div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span> <span class="comment">// or if it has been cleared.</span></div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno"> 388</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a100a8cc947bbdb3fd264d42eeeeaa849">ConstraintIsInactive</a>(<span class="keywordtype">int</span> ct_index) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"> 389</span> </div>
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span> <span class="comment">// Checks if a constraint contains an enforcement literal not fixed, and</span></div>
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno"> 391</span> <span class="comment">// no enforcement literals set to false.</span></div>
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ad72f81052c0b904f369ac1cee7217b83">ConstraintIsOptional</a>(<span class="keywordtype">int</span> ct_ref) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span> </div>
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span> <span class="comment">// Make sure we never delete an &quot;assumption&quot; literal by using a special</span></div>
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span> <span class="comment">// constraint for that.</span></div>
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#af35921d036d22c6497777d7a5964a13d"> 396</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#af35921d036d22c6497777d7a5964a13d">RegisterVariablesUsedInAssumptions</a>() {</div>
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> ref : <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#a928c29f37c6ed9d5bba711f905783417">working_model</a>-&gt;<a class="code hl_function" href="classoperations__research_1_1sat_1_1_cp_model_proto.html#ae4e8815b1f4564c29618b0fb285908fb">assumptions</a>()) {</div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"> 398</span> var_to_constraints_[<a class="code hl_function" href="namespaceoperations__research_1_1sat.html#acdbc8ad33149d45a6e6fcd8b72fd68ed">PositiveRef</a>(ref)].insert(<a class="code hl_variable" href="namespaceoperations__research_1_1sat.html#abe4ecb2ef8f498b18a55fbcbbf54e550">kAssumptionsConstraint</a>);</div>
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"> 399</span> }</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> </div>
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno"> 402</span> <span class="comment">// The &quot;expansion&quot; phase should be done once and allow to transform complex</span></div>
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> <span class="comment">// constraints into basic ones (see cp_model_expand.h). Some presolve rules</span></div>
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span> <span class="comment">// need to know if the expansion was ran before beeing applied.</span></div>
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a13c8d5cf71bf7735663c489f5493d036"> 405</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a13c8d5cf71bf7735663c489f5493d036">ModelIsExpanded</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> model_is_expanded_; }</div>
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a268e694a54b376ada250df521eab2e07"> 406</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a268e694a54b376ada250df521eab2e07">NotifyThatModelIsExpanded</a>() { model_is_expanded_ = <span class="keyword">true</span>; }</div>
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno"> 407</span> </div>
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno"> 408</span> <span class="comment">// The following helper adds the following constraint:</span></div>
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno"> 409</span> <span class="comment">// result &lt;=&gt; (time_i &lt;= time_j &amp;&amp; active_i is true &amp;&amp; active_j is true)</span></div>
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"> 410</span> <span class="comment">// and returns the (cached) literal result.</span></div>
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> <span class="comment">//</span></div>
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"> 412</span> <span class="comment">// Note that this cache should just be used temporarily and then cleared</span></div>
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span> <span class="comment">// with ClearPrecedenceCache() because there is no mechanism to update the</span></div>
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> <span class="comment">// cached literals when literal equivalence are detected.</span></div>
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno"> 415</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#adc37a02104d979e9943fadfd2e209686">GetOrCreateReifiedPrecedenceLiteral</a>(<span class="keywordtype">int</span> time_i, <span class="keywordtype">int</span> time_j, <span class="keywordtype">int</span> active_i,</div>
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"> 416</span> <span class="keywordtype">int</span> active_j);</div>
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span> </div>
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno"> 418</span> <span class="comment">// Clear the precedence cache.</span></div>
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno"> 419</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ae58b8c61c87bd4625b0a5db975652151">ClearPrecedenceCache</a>();</div>
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno"> 420</span> </div>
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"> 421</span> <span class="comment">// Logs stats to the logger.</span></div>
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno"> 422</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a40432f5ffa1ea8255071161d96f598d1">LogInfo</a>();</div>
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno"> 423</span> </div>
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#ae6409447bd52c1eac2a2349b182abbf5"> 424</a></span> <a class="code hl_class" href="classoperations__research_1_1_solver_logger.html">SolverLogger</a>* <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ae6409447bd52c1eac2a2349b182abbf5">logger</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> logger_; }</div>
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#adf692eb15f403dc98a748ac0d3e3f897"> 425</a></span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a>&amp; <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#adf692eb15f403dc98a748ac0d3e3f897">params</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> params_; }</div>
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#ac1bcd5d5de204f78ff2c6c5ccdd0e35a"> 426</a></span> <a class="code hl_class" href="classoperations__research_1_1_time_limit.html">TimeLimit</a>* <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#ac1bcd5d5de204f78ff2c6c5ccdd0e35a">time_limit</a>() { <span class="keywordflow">return</span> time_limit_; }</div>
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a6afa6731a456dda14071be84ca9f0209"> 427</a></span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_model_random_generator.html">ModelRandomGenerator</a>* <a class="code hl_function" href="classoperations__research_1_1sat_1_1_presolve_context.html#a6afa6731a456dda14071be84ca9f0209">random</a>() { <span class="keywordflow">return</span> random_; }</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> <span class="comment">// For each variables, list the constraints that just enforce a lower bound</span></div>
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno"> 430</span> <span class="comment">// (resp. upper bound) on that variable. If all the constraints in which a</span></div>
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"> 431</span> <span class="comment">// variable appear are in the same direction, then we can usually fix a</span></div>
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno"> 432</span> <span class="comment">// variable to one of its bound (modulo its cost).</span></div>
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno"> 433</span> <span class="comment">//</span></div>
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno"> 434</span> <span class="comment">// TODO(user): Keeping these extra vector of hash_set seems inefficient. Come</span></div>
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno"> 435</span> <span class="comment">// up with a better way to detect if a variable is only constrainted in one</span></div>
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"> 436</span> <span class="comment">// direction.</span></div>
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a47714f887512a3d7acebfcb4a348291a"> 437</a></span> std::vector&lt;absl::flat_hash_set&lt;int&gt;&gt; <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#a47714f887512a3d7acebfcb4a348291a">var_to_ub_only_constraints</a>;</div>
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a23aa815e8a7a860998c4d35760fa087e"> 438</a></span> std::vector&lt;absl::flat_hash_set&lt;int&gt;&gt; <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#a23aa815e8a7a860998c4d35760fa087e">var_to_lb_only_constraints</a>;</div>
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"> 439</span> </div>
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a928c29f37c6ed9d5bba711f905783417"> 440</a></span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_cp_model_proto.html">CpModelProto</a>* <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#a928c29f37c6ed9d5bba711f905783417">working_model</a> = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4b3b9ef9c5f214dd4427daa2646eceda"> 441</a></span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_cp_model_proto.html">CpModelProto</a>* <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4b3b9ef9c5f214dd4427daa2646eceda">mapping_model</a> = <span class="keyword">nullptr</span>;</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> <span class="comment">// Indicate if we are allowed to remove irrelevant feasible solution from the</span></div>
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"> 444</span> <span class="comment">// set of feasible solution. For example, if a variable is unused, can we fix</span></div>
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno"> 445</span> <span class="comment">// it to an arbitrary value (or its mimimum objective one)? This must be true</span></div>
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno"> 446</span> <span class="comment">// if the client wants to enumerate all solutions or wants correct tightened</span></div>
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno"> 447</span> <span class="comment">// bounds in the response.</span></div>
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#ab7b13b808e3dea6fc1e4006f7134e9f9"> 448</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#ab7b13b808e3dea6fc1e4006f7134e9f9">keep_all_feasible_solutions</a> = <span class="keyword">false</span>;</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> <span class="comment">// Number of &quot;rules&quot; applied. This should be equal to the sum of all numbers</span></div>
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno"> 451</span> <span class="comment">// in stats_by_rule_name. This is used to decide if we should do one more pass</span></div>
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno"> 452</span> <span class="comment">// of the presolve or not. Note that depending on the presolve transformation,</span></div>
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"> 453</span> <span class="comment">// a rule can correspond to a tiny change or a big change. Because of that,</span></div>
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span> <span class="comment">// this isn&#39;t a perfect proxy for the efficacy of the presolve.</span></div>
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5f9c1ea2555cc36fcd716296e54ed17a"> 455</a></span> int64_t <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5f9c1ea2555cc36fcd716296e54ed17a">num_presolve_operations</a> = 0;</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> <span class="comment">// Temporary storage.</span></div>
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a436752c51b5f6010033151b7bd7966da"> 458</a></span> std::vector&lt;int&gt; <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#a436752c51b5f6010033151b7bd7966da">tmp_literals</a>;</div>
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#ac3d1eecbbf2000282606576273ccf06c"> 459</a></span> std::vector&lt;Domain&gt; <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#ac3d1eecbbf2000282606576273ccf06c">tmp_term_domains</a>;</div>
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a7305c507aa07aea8104037f2e2441876"> 460</a></span> std::vector&lt;Domain&gt; <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#a7305c507aa07aea8104037f2e2441876">tmp_left_domains</a>;</div>
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#aeb77639debea43978becf1d990581537"> 461</a></span> absl::flat_hash_set&lt;int&gt; <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#aeb77639debea43978becf1d990581537">tmp_literal_set</a>;</div>
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span> </div>
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"> 463</span> <span class="comment">// Each time a domain is modified this is set to true.</span></div>
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a02302d3a45d02003dcbf288d045ebd86"> 464</a></span> <a class="code hl_class" href="classoperations__research_1_1_sparse_bitset.html">SparseBitset&lt;int64_t&gt;</a> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#a02302d3a45d02003dcbf288d045ebd86">modified_domains</a>;</div>
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno"> 465</span> </div>
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno"> 466</span> <span class="comment">// Advanced presolve. See this class comment.</span></div>
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a6e086436e931cd8b341d85e6889b838d"> 467</a></span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_domain_deductions.html">DomainDeductions</a> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_presolve_context.html#a6e086436e931cd8b341d85e6889b838d">deductions</a>;</div>
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"> 468</span> </div>
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno"> 469</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno"> 470</span> <span class="comment">// Helper to add an affine relation x = c.y + o to the given repository.</span></div>
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno"> 471</span> <span class="keywordtype">bool</span> AddRelation(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, int64_t c, int64_t o, <a class="code hl_class" href="classoperations__research_1_1_affine_relation.html">AffineRelation</a>* repo);</div>
<div class="line"><a id="l00472" name="l00472"></a><span class="lineno"> 472</span> </div>
<div class="line"><a id="l00473" name="l00473"></a><span class="lineno"> 473</span> <span class="keywordtype">void</span> AddVariableUsage(<span class="keywordtype">int</span> c);</div>
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno"> 474</span> <span class="keywordtype">void</span> UpdateLinear1Usage(<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>, <span class="keywordtype">int</span> c);</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">// Returns true iff the variable is not the representative of an equivalence</span></div>
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"> 477</span> <span class="comment">// class of size at least 2.</span></div>
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> <span class="keywordtype">bool</span> VariableIsNotRepresentativeOfEquivalenceClass(<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="l00479" name="l00479"></a><span class="lineno"> 479</span> </div>
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"> 480</span> <span class="comment">// Process encoding_remap_queue_ and updates the encoding maps. This could</span></div>
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"> 481</span> <span class="comment">// lead to UNSAT being detected, in which case it will return false.</span></div>
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno"> 482</span> <span class="keywordtype">bool</span> RemapEncodingMaps();</div>
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno"> 483</span> </div>
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno"> 484</span> <span class="comment">// Makes sure we only insert encoding about the current representative.</span></div>
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"> 485</span> <span class="comment">//</span></div>
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno"> 486</span> <span class="comment">// Returns false if ref cannot take the given value (it might not have been</span></div>
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno"> 487</span> <span class="comment">// propagated yet).</span></div>
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno"> 488</span> <span class="keywordtype">bool</span> CanonicalizeEncoding(<span class="keywordtype">int</span>* ref, int64_t* <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</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> <span class="comment">// Inserts an half reified var value encoding (literal =&gt; var ==/!= value).</span></div>
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno"> 491</span> <span class="comment">// It returns true if the new state is different from the old state.</span></div>
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno"> 492</span> <span class="comment">// Not that if imply_eq is false, the literal will be stored in its negated</span></div>
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno"> 493</span> <span class="comment">// form.</span></div>
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno"> 494</span> <span class="comment">//</span></div>
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"> 495</span> <span class="comment">// Thus, if you detect literal &lt;=&gt; var == value, then two calls must be made:</span></div>
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> <span class="comment">// InsertHalfVarValueEncoding(literal, var, value, true);</span></div>
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"> 497</span> <span class="comment">// InsertHalfVarValueEncoding(NegatedRef(literal), var, value, false);</span></div>
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span> <span class="keywordtype">bool</span> InsertHalfVarValueEncoding(<span class="keywordtype">int</span> <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>, <span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, int64_t <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>,</div>
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span> <span class="keywordtype">bool</span> imply_eq);</div>
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> </div>
<div class="line"><a id="l00501" name="l00501"></a><span class="lineno"> 501</span> <span class="comment">// Insert fully reified var-value encoding.</span></div>
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno"> 502</span> <span class="keywordtype">void</span> InsertVarValueEncodingInternal(<span class="keywordtype">int</span> <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>, <span class="keywordtype">int</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, int64_t <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>,</div>
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno"> 503</span> <span class="keywordtype">bool</span> add_constraints);</div>
<div class="line"><a id="l00504" name="l00504"></a><span class="lineno"> 504</span> </div>
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"> 505</span> <a class="code hl_class" href="classoperations__research_1_1_solver_logger.html">SolverLogger</a>* logger_;</div>
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a>&amp; params_;</div>
<div class="line"><a id="l00507" name="l00507"></a><span class="lineno"> 507</span> <a class="code hl_class" href="classoperations__research_1_1_time_limit.html">TimeLimit</a>* time_limit_;</div>
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"> 508</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_model_random_generator.html">ModelRandomGenerator</a>* random_;</div>
<div class="line"><a id="l00509" name="l00509"></a><span class="lineno"> 509</span> </div>
<div class="line"><a id="l00510" name="l00510"></a><span class="lineno"> 510</span> <span class="comment">// Initially false, and set to true on the first inconsistency.</span></div>
<div class="line"><a id="l00511" name="l00511"></a><span class="lineno"> 511</span> <span class="keywordtype">bool</span> is_unsat_ = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00512" name="l00512"></a><span class="lineno"> 512</span> </div>
<div class="line"><a id="l00513" name="l00513"></a><span class="lineno"> 513</span> <span class="comment">// The current domain of each variables.</span></div>
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"> 514</span> std::vector&lt;Domain&gt; domains;</div>
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span> </div>
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno"> 516</span> <span class="comment">// Internal representation of the objective. During presolve, we first load</span></div>
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno"> 517</span> <span class="comment">// the objective in this format in order to have more efficient substitution</span></div>
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno"> 518</span> <span class="comment">// on large problems (also because the objective is often dense). At the end</span></div>
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno"> 519</span> <span class="comment">// we re-convert it to its proto form.</span></div>
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno"> 520</span> absl::flat_hash_map&lt;int, int64_t&gt; objective_map_;</div>
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno"> 521</span> int64_t objective_overflow_detection_;</div>
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno"> 522</span> std::vector&lt;std::pair&lt;int, int64_t&gt;&gt; tmp_entries_;</div>
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno"> 523</span> <span class="keywordtype">bool</span> objective_domain_is_constraining_ = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno"> 524</span> <a class="code hl_class" href="classoperations__research_1_1_domain.html">Domain</a> objective_domain_;</div>
<div class="line"><a id="l00525" name="l00525"></a><span class="lineno"> 525</span> <span class="keywordtype">double</span> objective_offset_;</div>
<div class="line"><a id="l00526" name="l00526"></a><span class="lineno"> 526</span> <span class="keywordtype">double</span> objective_scaling_factor_;</div>
<div class="line"><a id="l00527" name="l00527"></a><span class="lineno"> 527</span> </div>
<div class="line"><a id="l00528" name="l00528"></a><span class="lineno"> 528</span> <span class="comment">// Constraints &lt;-&gt; Variables graph.</span></div>
<div class="line"><a id="l00529" name="l00529"></a><span class="lineno"> 529</span> std::vector&lt;std::vector&lt;int&gt;&gt; constraint_to_vars_;</div>
<div class="line"><a id="l00530" name="l00530"></a><span class="lineno"> 530</span> std::vector&lt;absl::flat_hash_set&lt;int&gt;&gt; var_to_constraints_;</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> <span class="comment">// Number of constraints of the form [lit =&gt;] var in domain.</span></div>
<div class="line"><a id="l00533" name="l00533"></a><span class="lineno"> 533</span> std::vector&lt;int&gt; constraint_to_linear1_var_;</div>
<div class="line"><a id="l00534" name="l00534"></a><span class="lineno"> 534</span> std::vector&lt;int&gt; var_to_num_linear1_;</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">// We maintain how many time each interval is used.</span></div>
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno"> 537</span> std::vector&lt;std::vector&lt;int&gt;&gt; constraint_to_intervals_;</div>
<div class="line"><a id="l00538" name="l00538"></a><span class="lineno"> 538</span> std::vector&lt;int&gt; interval_usage_;</div>
<div class="line"><a id="l00539" name="l00539"></a><span class="lineno"> 539</span> </div>
<div class="line"><a id="l00540" name="l00540"></a><span class="lineno"> 540</span> <span class="comment">// Contains abs relation (key = abs(saved_variable)).</span></div>
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno"> 541</span> absl::flat_hash_map&lt;int, SavedVariable&gt; abs_relations_;</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="comment">// For each constant variable appearing in the model, we maintain a reference</span></div>
<div class="line"><a id="l00544" name="l00544"></a><span class="lineno"> 544</span> <span class="comment">// variable with the same constant value. If two variables end up having the</span></div>
<div class="line"><a id="l00545" name="l00545"></a><span class="lineno"> 545</span> <span class="comment">// same fixed value, then we can detect it using this and add a new</span></div>
<div class="line"><a id="l00546" name="l00546"></a><span class="lineno"> 546</span> <span class="comment">// equivalence relation. See ExploitFixedDomain().</span></div>
<div class="line"><a id="l00547" name="l00547"></a><span class="lineno"> 547</span> absl::flat_hash_map&lt;int64_t, SavedVariable&gt; constant_to_ref_;</div>
<div class="line"><a id="l00548" name="l00548"></a><span class="lineno"> 548</span> </div>
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno"> 549</span> <span class="comment">// When a &quot;representative&quot; gets a new representative, it should be enqueued</span></div>
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno"> 550</span> <span class="comment">// here so that we can lazily update the *encoding_ maps below.</span></div>
<div class="line"><a id="l00551" name="l00551"></a><span class="lineno"> 551</span> std::deque&lt;int&gt; encoding_remap_queue_;</div>
<div class="line"><a id="l00552" name="l00552"></a><span class="lineno"> 552</span> </div>
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno"> 553</span> <span class="comment">// Contains variables with some encoded value: encoding_[i][v] points</span></div>
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno"> 554</span> <span class="comment">// to the literal attached to the value v of the variable i.</span></div>
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno"> 555</span> absl::flat_hash_map&lt;int, absl::flat_hash_map&lt;int64_t, SavedLiteral&gt;&gt;</div>
<div class="line"><a id="l00556" name="l00556"></a><span class="lineno"> 556</span> encoding_;</div>
<div class="line"><a id="l00557" name="l00557"></a><span class="lineno"> 557</span> </div>
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno"> 558</span> <span class="comment">// Contains the currently collected half value encodings:</span></div>
<div class="line"><a id="l00559" name="l00559"></a><span class="lineno"> 559</span> <span class="comment">// i.e.: literal =&gt; var ==/!= value</span></div>
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno"> 560</span> <span class="comment">// The state is accumulated (adding x =&gt; var == value then !x =&gt; var != value)</span></div>
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno"> 561</span> <span class="comment">// will deduce that x equivalent to var == value.</span></div>
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno"> 562</span> absl::flat_hash_map&lt;int,</div>
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno"> 563</span> absl::flat_hash_map&lt;int64_t, absl::flat_hash_set&lt;int&gt;&gt;&gt;</div>
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno"> 564</span> eq_half_encoding_;</div>
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno"> 565</span> absl::flat_hash_map&lt;int,</div>
<div class="line"><a id="l00566" name="l00566"></a><span class="lineno"> 566</span> absl::flat_hash_map&lt;int64_t, absl::flat_hash_set&lt;int&gt;&gt;&gt;</div>
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno"> 567</span> neq_half_encoding_;</div>
<div class="line"><a id="l00568" name="l00568"></a><span class="lineno"> 568</span> </div>
<div class="line"><a id="l00569" name="l00569"></a><span class="lineno"> 569</span> <span class="comment">// This regroups all the affine relations between variables. Note that the</span></div>
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno"> 570</span> <span class="comment">// constraints used to detect such relations will not be removed from the</span></div>
<div class="line"><a id="l00571" name="l00571"></a><span class="lineno"> 571</span> <span class="comment">// model at detection time (thus allowing proper domain propagation). However,</span></div>
<div class="line"><a id="l00572" name="l00572"></a><span class="lineno"> 572</span> <span class="comment">// if the arity of a variable becomes one, then such constraint will be</span></div>
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno"> 573</span> <span class="comment">// removed.</span></div>
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno"> 574</span> <a class="code hl_class" href="classoperations__research_1_1_affine_relation.html">AffineRelation</a> affine_relations_;</div>
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno"> 575</span> <a class="code hl_class" href="classoperations__research_1_1_affine_relation.html">AffineRelation</a> var_equiv_relations_;</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> std::vector&lt;int&gt; tmp_new_usage_;</div>
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno"> 578</span> </div>
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno"> 579</span> <span class="comment">// Used by SetVariableAsRemoved() and VariableWasRemoved().</span></div>
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno"> 580</span> absl::flat_hash_set&lt;int&gt; removed_variables_;</div>
<div class="line"><a id="l00581" name="l00581"></a><span class="lineno"> 581</span> </div>
<div class="line"><a id="l00582" name="l00582"></a><span class="lineno"> 582</span> <span class="comment">// Cache for the reified precedence literals created during the expansion of</span></div>
<div class="line"><a id="l00583" name="l00583"></a><span class="lineno"> 583</span> <span class="comment">// the reservoir constraint. This cache is only valid during the expansion</span></div>
<div class="line"><a id="l00584" name="l00584"></a><span class="lineno"> 584</span> <span class="comment">// phase, and is cleared afterwards.</span></div>
<div class="line"><a id="l00585" name="l00585"></a><span class="lineno"> 585</span> absl::flat_hash_map&lt;std::tuple&lt;int, int, int, int&gt;, <span class="keywordtype">int</span>&gt;</div>
<div class="line"><a id="l00586" name="l00586"></a><span class="lineno"> 586</span> reified_precedences_cache_;</div>
<div class="line"><a id="l00587" name="l00587"></a><span class="lineno"> 587</span> </div>
<div class="line"><a id="l00588" name="l00588"></a><span class="lineno"> 588</span> <span class="comment">// Just used to display statistics on the presolve rules that were used.</span></div>
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno"> 589</span> absl::flat_hash_map&lt;std::string, int&gt; stats_by_rule_name_;</div>
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno"> 590</span> </div>
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno"> 591</span> <span class="keywordtype">bool</span> model_is_expanded_ = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00592" name="l00592"></a><span class="lineno"> 592</span>};</div>
<div class="line"><a id="l00593" name="l00593"></a><span class="lineno"> 593</span> </div>
<div class="line"><a id="l00594" name="l00594"></a><span class="lineno"> 594</span>} <span class="comment">// namespace sat</span></div>
<div class="line"><a id="l00595" name="l00595"></a><span class="lineno"> 595</span>} <span class="comment">// namespace operations_research</span></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><span class="preprocessor">#endif </span><span class="comment">// OR_TOOLS_SAT_PRESOLVE_CONTEXT_H_</span></div>
<div class="ttc" id="aaffine__relation_8h_html"><div class="ttname"><a href="affine__relation_8h.html">affine_relation.h</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="abase_2logging_8h_html_afcaa7cadd41741bb855c2ada1d2ef927"><div class="ttname"><a href="base_2logging_8h.html#afcaa7cadd41741bb855c2ada1d2ef927">VLOG</a></div><div class="ttdeci">#define VLOG(verboselevel)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00979">base/logging.h:979</a></div></div>
<div class="ttc" id="abitset_8h_html"><div class="ttname"><a href="bitset_8h.html">bitset.h</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_affine_relation_html"><div class="ttname"><a href="classoperations__research_1_1_affine_relation.html">operations_research::AffineRelation</a></div><div class="ttdef"><b>Definition:</b> <a href="affine__relation_8h_source.html#l00036">affine_relation.h:36</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_affine_relation_html_acee7699cd3aad1b8ce9721e4952b36e7"><div class="ttname"><a href="classoperations__research_1_1_affine_relation.html#acee7699cd3aad1b8ce9721e4952b36e7">operations_research::AffineRelation::NumRelations</a></div><div class="ttdeci">int NumRelations() const</div><div class="ttdef"><b>Definition:</b> <a href="affine__relation_8h_source.html#l00041">affine_relation.h:41</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_domain_html"><div class="ttname"><a href="classoperations__research_1_1_domain.html">operations_research::Domain</a></div><div class="ttdoc">We call domain any subset of Int64 = [kint64min, kint64max].</div><div class="ttdef"><b>Definition:</b> <a href="sorted__interval__list_8h_source.html#l00081">sorted_interval_list.h:81</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_solver_logger_html"><div class="ttname"><a href="classoperations__research_1_1_solver_logger.html">operations_research::SolverLogger</a></div><div class="ttdef"><b>Definition:</b> <a href="util_2logging_8h_source.html#l00033">util/logging.h:33</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_sparse_bitset_html"><div class="ttname"><a href="classoperations__research_1_1_sparse_bitset.html">operations_research::SparseBitset</a></div><div class="ttdef"><b>Definition:</b> <a href="bitset_8h_source.html#l00766">bitset.h:766</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_time_limit_html"><div class="ttname"><a href="classoperations__research_1_1_time_limit.html">operations_research::TimeLimit</a></div><div class="ttdoc">A simple class to enforce both an elapsed time limit and a deterministic time limit in the same threa...</div><div class="ttdef"><b>Definition:</b> <a href="time__limit_8h_source.html#l00105">time_limit.h:105</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_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_ae4e8815b1f4564c29618b0fb285908fb"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_proto.html#ae4e8815b1f4564c29618b0fb285908fb">operations_research::sat::CpModelProto::assumptions</a></div><div class="ttdeci">::PROTOBUF_NAMESPACE_ID::int32 assumptions(int index) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l12461">cp_model.pb.h:12461</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_domain_deductions_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_domain_deductions.html">operations_research::sat::DomainDeductions</a></div><div class="ttdef"><b>Definition:</b> <a href="presolve__util_8h_source.html#l00047">presolve_util.h:47</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_linear_expression_proto_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">operations_research::sat::LinearExpressionProto</a></div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l00766">cp_model.pb.h:767</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_presolve_context_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html">operations_research::sat::PresolveContext</a></div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00071">presolve_context.h:71</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a0000c1621c1de75511d17c9d14aae0e8"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a0000c1621c1de75511d17c9d14aae0e8">operations_research::sat::PresolveContext::VariableIsRemovable</a></div><div class="ttdeci">bool VariableIsRemovable(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00273">presolve_context.cc:273</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a00f995618e00d575372ff823a12553a9"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a00f995618e00d575372ff823a12553a9">operations_research::sat::PresolveContext::MaxOf</a></div><div class="ttdeci">int64_t MaxOf(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00118">presolve_context.cc:118</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a02302d3a45d02003dcbf288d045ebd86"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a02302d3a45d02003dcbf288d045ebd86">operations_research::sat::PresolveContext::modified_domains</a></div><div class="ttdeci">SparseBitset&lt; int64_t &gt; modified_domains</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00464">presolve_context.h:464</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a02a3444590b38a8e99aba5eb8a1ca9d9"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a02a3444590b38a8e99aba5eb8a1ca9d9">operations_research::sat::PresolveContext::AddToObjectiveOffset</a></div><div class="ttdeci">void AddToObjectiveOffset(int64_t value)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01512">presolve_context.cc:1512</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a06f0856b91c0399720273b5da85ce280"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a06f0856b91c0399720273b5da85ce280">operations_research::sat::PresolveContext::StoreAbsRelation</a></div><div class="ttdeci">bool StoreAbsRelation(int target_ref, int ref)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00845">presolve_context.cc:845</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a0967c575f9db0c79ed2e7930a0d6a091"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a0967c575f9db0c79ed2e7930a0d6a091">operations_research::sat::PresolveContext::NewBoolVar</a></div><div class="ttdeci">int NewBoolVar()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00046">presolve_context.cc:46</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a100a8cc947bbdb3fd264d42eeeeaa849"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a100a8cc947bbdb3fd264d42eeeeaa849">operations_research::sat::PresolveContext::ConstraintIsInactive</a></div><div class="ttdeci">bool ConstraintIsInactive(int ct_index) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00420">presolve_context.cc:420</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a11f5290ed8216eea13b9d7383cb4c55f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a11f5290ed8216eea13b9d7383cb4c55f">operations_research::sat::PresolveContext::ConstraintVariableUsageIsConsistent</a></div><div class="ttdeci">bool ConstraintVariableUsageIsConsistent()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00529">presolve_context.cc:529</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a131ebbc155a924f0bc825b1e234d5960"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a131ebbc155a924f0bc825b1e234d5960">operations_research::sat::PresolveContext::VarToConstraints</a></div><div class="ttdeci">const absl::flat_hash_set&lt; int &gt; &amp; VarToConstraints(int var) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00377">presolve_context.h:377</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a13c8d5cf71bf7735663c489f5493d036"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a13c8d5cf71bf7735663c489f5493d036">operations_research::sat::PresolveContext::ModelIsExpanded</a></div><div class="ttdeci">bool ModelIsExpanded() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00405">presolve_context.h:405</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a1718a4c289ba4833e88f7e6cd0207a81"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a1718a4c289ba4833e88f7e6cd0207a81">operations_research::sat::PresolveContext::PresolveContext</a></div><div class="ttdeci">PresolveContext(Model *model, CpModelProto *cp_model, CpModelProto *mapping)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00073">presolve_context.h:73</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a1aadaad9b8af16ab5a208c682e2e1717"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a1aadaad9b8af16ab5a208c682e2e1717">operations_research::sat::PresolveContext::AddImplication</a></div><div class="ttdeci">void AddImplication(int a, int b)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00060">presolve_context.cc:60</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a1cd25a05e3e88efc9ffe50461fb21d63"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a1cd25a05e3e88efc9ffe50461fb21d63">operations_research::sat::PresolveContext::ModelIsUnsat</a></div><div class="ttdeci">bool ModelIsUnsat() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00186">presolve_context.h:186</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a1e65dc236d5729de4938834d779d9f6f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a1e65dc236d5729de4938834d779d9f6f">operations_research::sat::PresolveContext::AddToObjective</a></div><div class="ttdeci">void AddToObjective(int var, int64_t value)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01501">presolve_context.cc:1501</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a20097880105b02917a50dd5d97b80e55"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a20097880105b02917a50dd5d97b80e55">operations_research::sat::PresolveContext::IntersectDomainWith</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool IntersectDomainWith(int ref, const Domain &amp;domain, bool *domain_modified=nullptr)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00356">presolve_context.cc:356</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a23aa815e8a7a860998c4d35760fa087e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a23aa815e8a7a860998c4d35760fa087e">operations_research::sat::PresolveContext::var_to_lb_only_constraints</a></div><div class="ttdeci">std::vector&lt; absl::flat_hash_set&lt; int &gt; &gt; var_to_lb_only_constraints</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00438">presolve_context.h:438</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a24b22e509fdbdb4cd49ccec6a88c46ab"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a24b22e509fdbdb4cd49ccec6a88c46ab">operations_research::sat::PresolveContext::ClearStats</a></div><div class="ttdeci">void ClearStats()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00037">presolve_context.cc:37</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a2563663eeef59c23110ae4e2a80d8c9f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a2563663eeef59c23110ae4e2a80d8c9f">operations_research::sat::PresolveContext::ConstraintVariableGraphIsUpToDate</a></div><div class="ttdeci">bool ConstraintVariableGraphIsUpToDate() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00510">presolve_context.cc:510</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a268e694a54b376ada250df521eab2e07"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a268e694a54b376ada250df521eab2e07">operations_research::sat::PresolveContext::NotifyThatModelIsExpanded</a></div><div class="ttdeci">void NotifyThatModelIsExpanded()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00406">presolve_context.h:406</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a2877bce637c80df492977b5b6487d563"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a2877bce637c80df492977b5b6487d563">operations_research::sat::PresolveContext::StoreLiteralImpliesVarNEqValue</a></div><div class="ttdeci">bool StoreLiteralImpliesVarNEqValue(int literal, int var, int64_t value)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01241">presolve_context.cc:1241</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a308f62525f1941cc6ef7f943bd2c4c18"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a308f62525f1941cc6ef7f943bd2c4c18">operations_research::sat::PresolveContext::StartMin</a></div><div class="ttdeci">int64_t StartMin(int ct_ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00215">presolve_context.cc:215</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a33f90dcf20e1ce9197e60eb3bed25974"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a33f90dcf20e1ce9197e60eb3bed25974">operations_research::sat::PresolveContext::DomainOfVarIsIncludedIn</a></div><div class="ttdeci">bool DomainOfVarIsIncludedIn(int var, const Domain &amp;domain)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00131">presolve_context.h:131</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a34e2cd343e0dfb06af9f67df8c4c3502"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a34e2cd343e0dfb06af9f67df8c4c3502">operations_research::sat::PresolveContext::VariableWithCostIsUniqueAndRemovable</a></div><div class="ttdeci">bool VariableWithCostIsUniqueAndRemovable(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00290">presolve_context.cc:290</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a36794cf424ca2d69bc4774437a61a88e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a36794cf424ca2d69bc4774437a61a88e">operations_research::sat::PresolveContext::WriteObjectiveToProto</a></div><div class="ttdeci">void WriteObjectiveToProto() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01650">presolve_context.cc:1650</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a37770bda4577c8ad121d77d99a63cb0f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a37770bda4577c8ad121d77d99a63cb0f">operations_research::sat::PresolveContext::GetLiteralRepresentative</a></div><div class="ttdeci">int GetLiteralRepresentative(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00879">presolve_context.cc:879</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a37ed950834f3f3b427a707631fd745f4"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a37ed950834f3f3b427a707631fd745f4">operations_research::sat::PresolveContext::SetLiteralToTrue</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool SetLiteralToTrue(int lit)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00416">presolve_context.cc:416</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a3999a4ff1f53b54b40c8cd396105572a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a3999a4ff1f53b54b40c8cd396105572a">operations_research::sat::PresolveContext::StoreAffineRelation</a></div><div class="ttdeci">bool StoreAffineRelation(int ref_x, int ref_y, int64_t coeff, int64_t offset)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00703">presolve_context.cc:703</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a40432f5ffa1ea8255071161d96f598d1"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a40432f5ffa1ea8255071161d96f598d1">operations_research::sat::PresolveContext::LogInfo</a></div><div class="ttdeci">void LogInfo()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01743">presolve_context.cc:1743</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a436752c51b5f6010033151b7bd7966da"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a436752c51b5f6010033151b7bd7966da">operations_research::sat::PresolveContext::tmp_literals</a></div><div class="ttdeci">std::vector&lt; int &gt; tmp_literals</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00458">presolve_context.h:458</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a47714f887512a3d7acebfcb4a348291a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a47714f887512a3d7acebfcb4a348291a">operations_research::sat::PresolveContext::var_to_ub_only_constraints</a></div><div class="ttdeci">std::vector&lt; absl::flat_hash_set&lt; int &gt; &gt; var_to_ub_only_constraints</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00437">presolve_context.h:437</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a483ddc58170919b851be240df84c77af"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a483ddc58170919b851be240df84c77af">operations_research::sat::PresolveContext::ObjectiveDomainIsConstraining</a></div><div class="ttdeci">bool ObjectiveDomainIsConstraining() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00358">presolve_context.h:358</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a4b3b9ef9c5f214dd4427daa2646eceda"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a4b3b9ef9c5f214dd4427daa2646eceda">operations_research::sat::PresolveContext::mapping_model</a></div><div class="ttdeci">CpModelProto * mapping_model</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00441">presolve_context.h:441</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a4bf47c6b5724e9a3a7df78486f9bdc41"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a4bf47c6b5724e9a3a7df78486f9bdc41">operations_research::sat::PresolveContext::SubstituteVariableInObjective</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool SubstituteVariableInObjective(int var_in_equality, int64_t coeff_in_equality, const ConstraintProto &amp;equality, std::vector&lt; int &gt; *new_vars_in_objective=nullptr)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01518">presolve_context.cc:1518</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a4f9423ff72ed20e477fff16e8887df96"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a4f9423ff72ed20e477fff16e8887df96">operations_research::sat::PresolveContext::GetOrCreateVarValueEncoding</a></div><div class="ttdeci">int GetOrCreateVarValueEncoding(int ref, int64_t value)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01265">presolve_context.cc:1265</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a52bccf051bec19d96584096844070eaa"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a52bccf051bec19d96584096844070eaa">operations_research::sat::PresolveContext::UpdateNewConstraintsVariableUsage</a></div><div class="ttdeci">void UpdateNewConstraintsVariableUsage()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00514">presolve_context.cc:514</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a54cf7f0077717d59a828b656b60c1615"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a54cf7f0077717d59a828b656b60c1615">operations_research::sat::PresolveContext::VariableIsUniqueAndRemovable</a></div><div class="ttdeci">bool VariableIsUniqueAndRemovable(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00283">presolve_context.cc:283</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a5763f8709716596a3aa728bacae05a7b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a5763f8709716596a3aa728bacae05a7b">operations_research::sat::PresolveContext::RemoveVariableFromAffineRelation</a></div><div class="ttdeci">void RemoveVariableFromAffineRelation(int var)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00675">presolve_context.cc:675</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a5aa53538ba8adaa0bea1c3c0727425b0"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a5aa53538ba8adaa0bea1c3c0727425b0">operations_research::sat::PresolveContext::NotifyThatModelIsUnsat</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool NotifyThatModelIsUnsat(const std::string &amp;message=&quot;&quot;)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00178">presolve_context.h:178</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a5c2f01871b9baa2bc0dc556803c5a1ad"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a5c2f01871b9baa2bc0dc556803c5a1ad">operations_research::sat::PresolveContext::PropagateAffineRelation</a></div><div class="ttdeci">bool PropagateAffineRelation(int ref)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00644">presolve_context.cc:644</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a5cc6a3ed49ec11734164c7ef646b15d5"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a5cc6a3ed49ec11734164c7ef646b15d5">operations_research::sat::PresolveContext::EndMin</a></div><div class="ttdeci">int64_t EndMin(int ct_ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00229">presolve_context.cc:229</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a5e86fd5ce0fc653d355ab7303f373e00"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a5e86fd5ce0fc653d355ab7303f373e00">operations_research::sat::PresolveContext::DomainOf</a></div><div class="ttdeci">Domain DomainOf(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00339">presolve_context.cc:339</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a5f9c1ea2555cc36fcd716296e54ed17a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a5f9c1ea2555cc36fcd716296e54ed17a">operations_research::sat::PresolveContext::num_presolve_operations</a></div><div class="ttdeci">int64_t num_presolve_operations</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00455">presolve_context.h:455</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a62cd771660767621e917b2c256182c4e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a62cd771660767621e917b2c256182c4e">operations_research::sat::PresolveContext::InitializeNewDomains</a></div><div class="ttdeci">void InitializeNewDomains()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00942">presolve_context.cc:942</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a6387e91b098c081f059892e1346a29ed"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a6387e91b098c081f059892e1346a29ed">operations_research::sat::PresolveContext::GetVariableRepresentative</a></div><div class="ttdeci">int GetVariableRepresentative(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00908">presolve_context.cc:908</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a66810fcd97b5e9c5fd745226607cd7aa"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a66810fcd97b5e9c5fd745226607cd7aa">operations_research::sat::PresolveContext::AffineRelationDebugString</a></div><div class="ttdeci">std::string AffineRelationDebugString(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00935">presolve_context.cc:935</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a67699a1a5830ef51dab6941449b02044"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a67699a1a5830ef51dab6941449b02044">operations_research::sat::PresolveContext::NewIntVar</a></div><div class="ttdeci">int NewIntVar(const Domain &amp;domain)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00039">presolve_context.cc:39</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a6939dc7b9db01cf3deff10405e260461"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a6939dc7b9db01cf3deff10405e260461">operations_research::sat::PresolveContext::MarkVariableAsRemoved</a></div><div class="ttdeci">void MarkVariableAsRemoved(int ref)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00305">presolve_context.cc:305</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a69fea604a632b4b91ed950a0e622489c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a69fea604a632b4b91ed950a0e622489c">operations_research::sat::PresolveContext::InsertVarValueEncoding</a></div><div class="ttdeci">bool InsertVarValueEncoding(int literal, int ref, int64_t value)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01222">presolve_context.cc:1222</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a6afa6731a456dda14071be84ca9f0209"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a6afa6731a456dda14071be84ca9f0209">operations_research::sat::PresolveContext::random</a></div><div class="ttdeci">ModelRandomGenerator * random()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00427">presolve_context.h:427</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a6e086436e931cd8b341d85e6889b838d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a6e086436e931cd8b341d85e6889b838d">operations_research::sat::PresolveContext::deductions</a></div><div class="ttdeci">DomainDeductions deductions</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00467">presolve_context.h:467</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a7305c507aa07aea8104037f2e2441876"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a7305c507aa07aea8104037f2e2441876">operations_research::sat::PresolveContext::tmp_left_domains</a></div><div class="ttdeci">std::vector&lt; Domain &gt; tmp_left_domains</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00460">presolve_context.h:460</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a77e37831a01ff737a7b5bd7e12c2ecf7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a77e37831a01ff737a7b5bd7e12c2ecf7">operations_research::sat::PresolveContext::DomainIsEmpty</a></div><div class="ttdeci">bool DomainIsEmpty(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00079">presolve_context.cc:79</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a7ea7bb314db4dbe4f3b2cac16a2af20f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a7ea7bb314db4dbe4f3b2cac16a2af20f">operations_research::sat::PresolveContext::CanonicalizeDomainOfSizeTwo</a></div><div class="ttdeci">void CanonicalizeDomainOfSizeTwo(int var)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01041">presolve_context.cc:1041</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a83cb3816d487395542f17a17776b9a1a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a83cb3816d487395542f17a17776b9a1a">operations_research::sat::PresolveContext::StartMax</a></div><div class="ttdeci">int64_t StartMax(int ct_ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00222">presolve_context.cc:222</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a86f29c8b6fd538e5b35bc79044ce3fc8"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a86f29c8b6fd538e5b35bc79044ce3fc8">operations_research::sat::PresolveContext::ConstraintToVars</a></div><div class="ttdeci">const std::vector&lt; int &gt; &amp; ConstraintToVars(int c) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00373">presolve_context.h:373</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a890f923209473cf55ac002d1b14bd9e2"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a890f923209473cf55ac002d1b14bd9e2">operations_research::sat::PresolveContext::LiteralIsTrue</a></div><div class="ttdeci">bool LiteralIsTrue(int lit) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00094">presolve_context.cc:94</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a89521813136093d6dcbff6ce1d4f45d2"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a89521813136093d6dcbff6ce1d4f45d2">operations_research::sat::PresolveContext::ObjectiveMap</a></div><div class="ttdeci">const absl::flat_hash_map&lt; int, int64_t &gt; &amp; ObjectiveMap() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00355">presolve_context.h:355</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a8fc1d49d1e1bf7261f15ccc6c23c4b10"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a8fc1d49d1e1bf7261f15ccc6c23c4b10">operations_research::sat::PresolveContext::StoreBooleanEqualityRelation</a></div><div class="ttdeci">void StoreBooleanEqualityRelation(int ref_a, int ref_b)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00819">presolve_context.cc:819</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a90674fa816d7a066e251337852214e84"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a90674fa816d7a066e251337852214e84">operations_research::sat::PresolveContext::IntervalUsage</a></div><div class="ttdeci">int IntervalUsage(int c) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00381">presolve_context.h:381</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a928c29f37c6ed9d5bba711f905783417"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a928c29f37c6ed9d5bba711f905783417">operations_research::sat::PresolveContext::working_model</a></div><div class="ttdeci">CpModelProto * working_model</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00440">presolve_context.h:440</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a9925335988ccbe70e9150a9ce71b9952"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a9925335988ccbe70e9150a9ce71b9952">operations_research::sat::PresolveContext::HasVarValueEncoding</a></div><div class="ttdeci">bool HasVarValueEncoding(int ref, int64_t value, int *literal=nullptr)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01249">presolve_context.cc:1249</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a9da1edd6532c2c2b0c09544eade57805"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a9da1edd6532c2c2b0c09544eade57805">operations_research::sat::PresolveContext::IntervalIsConstant</a></div><div class="ttdeci">bool IntervalIsConstant(int ct_ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00173">presolve_context.cc:173</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a9dd01897679ba54fca524a3b0b7d5612"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a9dd01897679ba54fca524a3b0b7d5612">operations_research::sat::PresolveContext::DomainContains</a></div><div class="ttdeci">bool DomainContains(int ref, int64_t value) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00349">presolve_context.cc:349</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a9f3443b281c705edf1779f746637ad9b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a9f3443b281c705edf1779f746637ad9b">operations_research::sat::PresolveContext::LiteralIsFalse</a></div><div class="ttdeci">bool LiteralIsFalse(int lit) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00103">presolve_context.cc:103</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aa49a8967edab300018eeaa14a27b7210"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aa49a8967edab300018eeaa14a27b7210">operations_research::sat::PresolveContext::UpdateRuleStats</a></div><div class="ttdeci">void UpdateRuleStats(const std::string &amp;name, int num_times=1)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00442">presolve_context.cc:442</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aa62da782b2270ca293531a0aea153fba"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aa62da782b2270ca293531a0aea153fba">operations_research::sat::PresolveContext::CanonicalizeObjective</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool CanonicalizeObjective()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01373">presolve_context.cc:1373</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aabb328e6969888226a7a69a972e22c56"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aabb328e6969888226a7a69a972e22c56">operations_research::sat::PresolveContext::RemoveAllVariablesFromAffineRelationConstraint</a></div><div class="ttdeci">void RemoveAllVariablesFromAffineRelationConstraint()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00666">presolve_context.cc:666</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aaddc5f58e8a40a5a308531949153f814"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aaddc5f58e8a40a5a308531949153f814">operations_research::sat::PresolveContext::GetAffineRelation</a></div><div class="ttdeci">AffineRelation::Relation GetAffineRelation(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00918">presolve_context.cc:918</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aaed725b098e5d931862a74b496564e37"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aaed725b098e5d931862a74b496564e37">operations_research::sat::PresolveContext::RemoveVariableFromObjective</a></div><div class="ttdeci">void RemoveVariableFromObjective(int var)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01496">presolve_context.cc:1496</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ab246112417bad87cb948820e304208ab"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ab246112417bad87cb948820e304208ab">operations_research::sat::PresolveContext::VariableIsNotUsedAnymore</a></div><div class="ttdeci">bool VariableIsNotUsedAnymore(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00300">presolve_context.cc:300</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ab75a27c0aeda2de9c3957719b8196c36"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ab75a27c0aeda2de9c3957719b8196c36">operations_research::sat::PresolveContext::UpdateConstraintVariableUsage</a></div><div class="ttdeci">void UpdateConstraintVariableUsage(int c)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00476">presolve_context.cc:476</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ab7b13b808e3dea6fc1e4006f7134e9f9"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ab7b13b808e3dea6fc1e4006f7134e9f9">operations_research::sat::PresolveContext::keep_all_feasible_solutions</a></div><div class="ttdeci">bool keep_all_feasible_solutions</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00448">presolve_context.h:448</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_abb6eb29f56c3a33b8ae1b74b08b755c2"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#abb6eb29f56c3a33b8ae1b74b08b755c2">operations_research::sat::PresolveContext::IsFixed</a></div><div class="ttdeci">bool IsFixed(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00083">presolve_context.cc:83</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_abd6f7af5d9b31061a7b03ec44488ea4c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#abd6f7af5d9b31061a7b03ec44488ea4c">operations_research::sat::PresolveContext::NumAffineRelations</a></div><div class="ttdeci">int NumAffineRelations() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00246">presolve_context.h:246</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ac1bcd5d5de204f78ff2c6c5ccdd0e35a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ac1bcd5d5de204f78ff2c6c5ccdd0e35a">operations_research::sat::PresolveContext::time_limit</a></div><div class="ttdeci">TimeLimit * time_limit()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00426">presolve_context.h:426</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ac3d1eecbbf2000282606576273ccf06c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ac3d1eecbbf2000282606576273ccf06c">operations_research::sat::PresolveContext::tmp_term_domains</a></div><div class="ttdeci">std::vector&lt; Domain &gt; tmp_term_domains</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00459">presolve_context.h:459</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_acb5ca2d891a58b6b9e55eee532c2557c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#acb5ca2d891a58b6b9e55eee532c2557c">operations_research::sat::PresolveContext::IntervalDebugString</a></div><div class="ttdeci">std::string IntervalDebugString(int ct_ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00189">presolve_context.cc:189</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_acb73a5ab7e240d5f93938262f2d8b826"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#acb73a5ab7e240d5f93938262f2d8b826">operations_research::sat::PresolveContext::NumEquivRelations</a></div><div class="ttdeci">int NumEquivRelations() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00247">presolve_context.h:247</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ad0d1a630c07ba2321cf43d97a425bc30"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ad0d1a630c07ba2321cf43d97a425bc30">operations_research::sat::PresolveContext::SetLiteralToFalse</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool SetLiteralToFalse(int lit)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00410">presolve_context.cc:410</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ad1cddf8749d0ce1686f1f428926cfb1d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ad1cddf8749d0ce1686f1f428926cfb1d">operations_research::sat::PresolveContext::LiteralForExpressionMax</a></div><div class="ttdeci">int LiteralForExpressionMax(const LinearExpressionProto &amp;expr) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00166">presolve_context.cc:166</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ad5e9882b154b8a7e8619b29c5631386e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ad5e9882b154b8a7e8619b29c5631386e">operations_research::sat::PresolveContext::RefDebugString</a></div><div class="ttdeci">std::string RefDebugString(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00930">presolve_context.cc:930</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ad6ab55f6b68272caeaf24ff0d69818a4"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ad6ab55f6b68272caeaf24ff0d69818a4">operations_research::sat::PresolveContext::EndMax</a></div><div class="ttdeci">int64_t EndMax(int ct_ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00236">presolve_context.cc:236</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ad72f81052c0b904f369ac1cee7217b83"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ad72f81052c0b904f369ac1cee7217b83">operations_research::sat::PresolveContext::ConstraintIsOptional</a></div><div class="ttdeci">bool ConstraintIsOptional(int ct_ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00432">presolve_context.cc:432</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ada5d036ab04018d9ee3ed60888843102"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ada5d036ab04018d9ee3ed60888843102">operations_research::sat::PresolveContext::GetOrCreateConstantVar</a></div><div class="ttdeci">int GetOrCreateConstantVar(int64_t cst)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00048">presolve_context.cc:48</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_adc37a02104d979e9943fadfd2e209686"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#adc37a02104d979e9943fadfd2e209686">operations_research::sat::PresolveContext::GetOrCreateReifiedPrecedenceLiteral</a></div><div class="ttdeci">int GetOrCreateReifiedPrecedenceLiteral(int time_i, int time_j, int active_i, int active_j)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01670">presolve_context.cc:1670</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_adf692eb15f403dc98a748ac0d3e3f897"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#adf692eb15f403dc98a748ac0d3e3f897">operations_research::sat::PresolveContext::params</a></div><div class="ttdeci">const SatParameters &amp; params() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00425">presolve_context.h:425</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_adff3b5f900c3d62132781fc25b54fb1a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#adff3b5f900c3d62132781fc25b54fb1a">operations_research::sat::PresolveContext::ExpressionIsAffineBoolean</a></div><div class="ttdeci">bool ExpressionIsAffineBoolean(const LinearExpressionProto &amp;expr) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00160">presolve_context.cc:160</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ae3ad719e8a03c11498d2d0ab18558f95"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ae3ad719e8a03c11498d2d0ab18558f95">operations_research::sat::PresolveContext::SizeMax</a></div><div class="ttdeci">int64_t SizeMax(int ct_ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00250">presolve_context.cc:250</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ae42cae46d8792621471dd137bf9bb3cc"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ae42cae46d8792621471dd137bf9bb3cc">operations_research::sat::PresolveContext::ExploitExactlyOneInObjective</a></div><div class="ttdeci">bool ExploitExactlyOneInObjective(absl::Span&lt; const int &gt; exactly_one)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01601">presolve_context.cc:1601</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ae58b8c61c87bd4625b0a5db975652151"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ae58b8c61c87bd4625b0a5db975652151">operations_research::sat::PresolveContext::ClearPrecedenceCache</a></div><div class="ttdeci">void ClearPrecedenceCache()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01739">presolve_context.cc:1739</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ae6409447bd52c1eac2a2349b182abbf5"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ae6409447bd52c1eac2a2349b182abbf5">operations_research::sat::PresolveContext::logger</a></div><div class="ttdeci">SolverLogger * logger() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00424">presolve_context.h:424</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ae7450e5b3b9b22663ec7e1fe0d82b6b9"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ae7450e5b3b9b22663ec7e1fe0d82b6b9">operations_research::sat::PresolveContext::DomainSuperSetOf</a></div><div class="ttdeci">Domain DomainSuperSetOf(const LinearExpressionProto &amp;expr) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00150">presolve_context.cc:150</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aeb77639debea43978becf1d990581537"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aeb77639debea43978becf1d990581537">operations_research::sat::PresolveContext::tmp_literal_set</a></div><div class="ttdeci">absl::flat_hash_set&lt; int &gt; tmp_literal_set</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00461">presolve_context.h:461</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aed2a07aad05b4ad8e05cf5fe7b239a1a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aed2a07aad05b4ad8e05cf5fe7b239a1a">operations_research::sat::PresolveContext::ReadObjectiveFromProto</a></div><div class="ttdeci">void ReadObjectiveFromProto()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01330">presolve_context.cc:1330</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aef0a687ec05a3e5dd7aa78745e9fb382"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aef0a687ec05a3e5dd7aa78745e9fb382">operations_research::sat::PresolveContext::SizeMin</a></div><div class="ttdeci">int64_t SizeMin(int ct_ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00243">presolve_context.cc:243</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_af0280b2bda95804c4166638e7b490ce9"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#af0280b2bda95804c4166638e7b490ce9">operations_research::sat::PresolveContext::AddImplyInDomain</a></div><div class="ttdeci">void AddImplyInDomain(int b, int x, const Domain &amp;domain)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00067">presolve_context.cc:67</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_af188bac2776d4545aab9405f5c801cd8"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#af188bac2776d4545aab9405f5c801cd8">operations_research::sat::PresolveContext::CanBeUsedAsLiteral</a></div><div class="ttdeci">bool CanBeUsedAsLiteral(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00089">presolve_context.cc:89</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_af248c1021eda72d628e2f3537eb98ded"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#af248c1021eda72d628e2f3537eb98ded">operations_research::sat::PresolveContext::VariableWasRemoved</a></div><div class="ttdeci">bool VariableWasRemoved(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00312">presolve_context.cc:312</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_af35921d036d22c6497777d7a5964a13d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#af35921d036d22c6497777d7a5964a13d">operations_research::sat::PresolveContext::RegisterVariablesUsedInAssumptions</a></div><div class="ttdeci">void RegisterVariablesUsedInAssumptions()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00396">presolve_context.h:396</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_af4847724208dd09ba3fea8b53132d197"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#af4847724208dd09ba3fea8b53132d197">operations_research::sat::PresolveContext::ExploitFixedDomain</a></div><div class="ttdeci">void ExploitFixedDomain(int var)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00622">presolve_context.cc:622</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_af597da31a1aed22d4bbd0e9398728a9b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#af597da31a1aed22d4bbd0e9398728a9b">operations_research::sat::PresolveContext::MinOf</a></div><div class="ttdeci">int64_t MinOf(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00112">presolve_context.cc:112</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_af7e074480c08f4887da40ca045624b6c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#af7e074480c08f4887da40ca045624b6c">operations_research::sat::PresolveContext::VariableIsOnlyUsedInEncodingAndMaybeInObjective</a></div><div class="ttdeci">bool VariableIsOnlyUsedInEncodingAndMaybeInObjective(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00330">presolve_context.cc:330</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_af97bdc26758ff0f27314cafb7c2d7044"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#af97bdc26758ff0f27314cafb7c2d7044">operations_research::sat::PresolveContext::GetAbsRelation</a></div><div class="ttdeci">bool GetAbsRelation(int target_ref, int *ref)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00860">presolve_context.cc:860</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_afdf0f5e877efe4e1d003300f0ce1234f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#afdf0f5e877efe4e1d003300f0ce1234f">operations_research::sat::PresolveContext::StoreLiteralImpliesVarEqValue</a></div><div class="ttdeci">bool StoreLiteralImpliesVarEqValue(int literal, int var, int64_t value)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01233">presolve_context.cc:1233</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_afed8dbc0462255ec9df4c98384d6e7d7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#afed8dbc0462255ec9df4c98384d6e7d7">operations_research::sat::PresolveContext::ObjectiveDomain</a></div><div class="ttdeci">const Domain &amp; ObjectiveDomain() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00354">presolve_context.h:354</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_saved_literal_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_literal.html">operations_research::sat::SavedLiteral</a></div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00048">presolve_context.h:48</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_literal_html_a24f5a711e542ac97673337e549a74e7c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_literal.html#a24f5a711e542ac97673337e549a74e7c">operations_research::sat::SavedLiteral::SavedLiteral</a></div><div class="ttdeci">SavedLiteral()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00050">presolve_context.h:50</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_literal_html_ad134f35430fd7787cea20a3714c123e0"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_literal.html#ad134f35430fd7787cea20a3714c123e0">operations_research::sat::SavedLiteral::SavedLiteral</a></div><div class="ttdeci">SavedLiteral(int ref)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00051">presolve_context.h:51</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_literal_html_adf2db0610413d540ca6c4e4f1cce5fd6"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_literal.html#adf2db0610413d540ca6c4e4f1cce5fd6">operations_research::sat::SavedLiteral::Get</a></div><div class="ttdeci">int Get(PresolveContext *context) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00029">presolve_context.cc:29</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_variable_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_variable.html">operations_research::sat::SavedVariable</a></div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00059">presolve_context.h:59</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_variable_html_abbc9b5ccc44af7db8e8a5703dce41b7d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_variable.html#abbc9b5ccc44af7db8e8a5703dce41b7d">operations_research::sat::SavedVariable::SavedVariable</a></div><div class="ttdeci">SavedVariable(int ref)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00062">presolve_context.h:62</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_variable_html_adf2db0610413d540ca6c4e4f1cce5fd6"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_variable.html#adf2db0610413d540ca6c4e4f1cce5fd6">operations_research::sat::SavedVariable::Get</a></div><div class="ttdeci">int Get(PresolveContext *context) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00033">presolve_context.cc:33</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_variable_html_aea29b5bb569ea104749893b9f321697c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_variable.html#aea29b5bb569ea104749893b9f321697c">operations_research::sat::SavedVariable::SavedVariable</a></div><div class="ttdeci">SavedVariable()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00061">presolve_context.h:61</a></div></div>
<div class="ttc" id="aconstraint__solver_2table_8cc_html_a9293e4d29cac928301645070dd307683"><div class="ttname"><a href="constraint__solver_2table_8cc.html#a9293e4d29cac928301645070dd307683">b</a></div><div class="ttdeci">int64_t b</div><div class="ttdef"><b>Definition:</b> <a href="constraint__solver_2table_8cc_source.html#l00047">constraint_solver/table.cc:47</a></div></div>
<div class="ttc" id="aconstraint__solver_2table_8cc_html_acb18315d548212835cd8ed4287e6c0b6"><div class="ttname"><a href="constraint__solver_2table_8cc.html#acb18315d548212835cd8ed4287e6c0b6">a</a></div><div class="ttdeci">int64_t a</div><div class="ttdef"><b>Definition:</b> <a href="constraint__solver_2table_8cc_source.html#l00046">constraint_solver/table.cc:46</a></div></div>
<div class="ttc" id="acp__model_8pb_8h_html"><div class="ttname"><a href="cp__model_8pb_8h.html">cp_model.pb.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="agurobi__interface_8cc_html_a5f287b83a753915ae862fed64f8640a6"><div class="ttname"><a href="gurobi__interface_8cc.html#a5f287b83a753915ae862fed64f8640a6">context</a></div><div class="ttdeci">GurobiMPCallbackContext * context</div><div class="ttdef"><b>Definition:</b> <a href="gurobi__interface_8cc_source.html#l00513">gurobi_interface.cc:513</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a55963ffe87280b37dce97b9a8cbd03ae"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a55963ffe87280b37dce97b9a8cbd03ae">operations_research::sat::kAffineRelationConstraint</a></div><div class="ttdeci">constexpr int kAffineRelationConstraint</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00039">presolve_context.h:39</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_abe4ecb2ef8f498b18a55fbcbbf54e550"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#abe4ecb2ef8f498b18a55fbcbbf54e550">operations_research::sat::kAssumptionsConstraint</a></div><div class="ttdeci">constexpr int kAssumptionsConstraint</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00040">presolve_context.h:40</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_aca25bc3ffa54b3f2668c6eeddffd8d1d"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#aca25bc3ffa54b3f2668c6eeddffd8d1d">operations_research::sat::kObjectiveConstraint</a></div><div class="ttdeci">constexpr int kObjectiveConstraint</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00038">presolve_context.h:38</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_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="aoptimization_8cc_html_af63dcc00f2023fdf498e0829e6fb8a6b"><div class="ttname"><a href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a></div><div class="ttdeci">Literal literal</div><div class="ttdef"><b>Definition:</b> <a href="optimization_8cc_source.html#l00085">optimization.cc:85</a></div></div>
<div class="ttc" id="apresolve__util_8h_html"><div class="ttname"><a href="presolve__util_8h.html">presolve_util.h</a></div></div>
<div class="ttc" id="asat_2model_8h_html"><div class="ttname"><a href="sat_2model_8h.html">model.h</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="asat__parameters_8pb_8h_html"><div class="ttname"><a href="sat__parameters_8pb_8h.html">sat_parameters.pb.h</a></div></div>
<div class="ttc" id="asorted__interval__list_8h_html"><div class="ttname"><a href="sorted__interval__list_8h.html">sorted_interval_list.h</a></div></div>
<div class="ttc" id="astructoperations__research_1_1_affine_relation_1_1_relation_html"><div class="ttname"><a href="structoperations__research_1_1_affine_relation_1_1_relation.html">operations_research::AffineRelation::Relation</a></div><div class="ttdef"><b>Definition:</b> <a href="affine__relation_8h_source.html#l00076">affine_relation.h:76</a></div></div>
<div class="ttc" id="atime__limit_8h_html"><div class="ttname"><a href="time__limit_8h.html">time_limit.h</a></div></div>
<div class="ttc" id="atrace_8cc_html_a36bd74109f547f7f8198faf5a12d2879"><div class="ttname"><a href="trace_8cc.html#a36bd74109f547f7f8198faf5a12d2879">message</a></div><div class="ttdeci">std::string message</div><div class="ttdef"><b>Definition:</b> <a href="trace_8cc_source.html#l00398">trace.cc:398</a></div></div>
<div class="ttc" id="autil_2logging_8h_html"><div class="ttname"><a href="util_2logging_8h.html">logging.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_a7cc1eeded8f693d0da6c729bc88c45a.html">ortools</a></li><li class="navelem"><a class="el" href="dir_dddac007a45022d9da6ea1dee012c3b9.html">sat</a></li><li class="navelem"><a class="el" href="presolve__context_8h.html">presolve_context.h</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>