Files
ortools-clone/docs/cpp/presolve__context_8h_source.html
Laurent Perron a2ad6677e1 regenerate doc
2022-01-16 18:02:36 +01:00

279 lines
214 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.8.15"/>
<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>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</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.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('presolve__context_8h_source.html','');});
/* @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 name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// Copyright 2010-2021 Google LLC</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">// You may obtain a copy of the License at</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment">// limitations under the License.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor">#ifndef OR_TOOLS_SAT_PRESOLVE_CONTEXT_H_</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#define OR_TOOLS_SAT_PRESOLVE_CONTEXT_H_</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#include &lt;cstdint&gt;</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#include &lt;deque&gt;</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &quot;absl/base/attributes.h&quot;</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<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 name="l00024"></a><span class="lineno"> 24</span>&#160;<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 name="l00025"></a><span class="lineno"> 25</span>&#160;<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 name="l00026"></a><span class="lineno"> 26</span>&#160;<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 name="l00027"></a><span class="lineno"> 27</span>&#160;<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 name="l00028"></a><span class="lineno"> 28</span>&#160;<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 name="l00029"></a><span class="lineno"> 29</span>&#160;<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 name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="bitset_8h.html">ortools/util/bitset.h</a>&quot;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<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 name="l00032"></a><span class="lineno"> 32</span>&#160;<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 name="l00033"></a><span class="lineno"> 33</span>&#160;<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 name="l00034"></a><span class="lineno"> 34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceoperations__research.html">operations_research</a> {</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="keyword">namespace </span>sat {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="comment">// We use some special constraint index in our variable &lt;-&gt; constraint graph.</span></div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#aca25bc3ffa54b3f2668c6eeddffd8d1d"> 39</a></span>&#160;constexpr <span class="keywordtype">int</span> <a class="code" href="namespaceoperations__research_1_1sat.html#aca25bc3ffa54b3f2668c6eeddffd8d1d">kObjectiveConstraint</a> = -1;</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#a55963ffe87280b37dce97b9a8cbd03ae"> 40</a></span>&#160;constexpr <span class="keywordtype">int</span> <a class="code" href="namespaceoperations__research_1_1sat.html#a55963ffe87280b37dce97b9a8cbd03ae">kAffineRelationConstraint</a> = -2;</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#abe4ecb2ef8f498b18a55fbcbbf54e550"> 41</a></span>&#160;constexpr <span class="keywordtype">int</span> <a class="code" href="namespaceoperations__research_1_1sat.html#abe4ecb2ef8f498b18a55fbcbbf54e550">kAssumptionsConstraint</a> = -3;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="keyword">class </span><a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html">PresolveContext</a>;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="comment">// When storing a reference to a literal, it is important not to forget when</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="comment">// reading it back to take its representative. Otherwise, we might introduce</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="comment">// literal that have already been removed, which will break invariants in a</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="comment">// bunch of places.</span></div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_literal.html"> 49</a></span>&#160;<span class="keyword">class </span><a class="code" href="classoperations__research_1_1sat_1_1_saved_literal.html">SavedLiteral</a> {</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_literal.html#a24f5a711e542ac97673337e549a74e7c"> 51</a></span>&#160; <a class="code" href="classoperations__research_1_1sat_1_1_saved_literal.html#a24f5a711e542ac97673337e549a74e7c">SavedLiteral</a>() {}</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_literal.html#ad134f35430fd7787cea20a3714c123e0"> 52</a></span>&#160; <span class="keyword">explicit</span> <a class="code" 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 name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordtype">int</span> <a class="code" href="classoperations__research_1_1sat_1_1_saved_literal.html#adf2db0610413d540ca6c4e4f1cce5fd6">Get</a>(<a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html">PresolveContext</a>* <a class="code" href="gurobi__interface_8cc.html#a5f287b83a753915ae862fed64f8640a6">context</a>) <span class="keyword">const</span>;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="keywordtype">int</span> ref_ = 0;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;};</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="comment">// Same as SavedLiteral for variable.</span></div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_variable.html"> 60</a></span>&#160;<span class="keyword">class </span><a class="code" href="classoperations__research_1_1sat_1_1_saved_variable.html">SavedVariable</a> {</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_variable.html#aea29b5bb569ea104749893b9f321697c"> 62</a></span>&#160; <a class="code" href="classoperations__research_1_1sat_1_1_saved_variable.html#aea29b5bb569ea104749893b9f321697c">SavedVariable</a>() {}</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_variable.html#abbc9b5ccc44af7db8e8a5703dce41b7d"> 63</a></span>&#160; <span class="keyword">explicit</span> <a class="code" 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 name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keywordtype">int</span> <a class="code" href="classoperations__research_1_1sat_1_1_saved_variable.html#adf2db0610413d540ca6c4e4f1cce5fd6">Get</a>(<a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html">PresolveContext</a>* <a class="code" href="gurobi__interface_8cc.html#a5f287b83a753915ae862fed64f8640a6">context</a>) <span class="keyword">const</span>;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keywordtype">int</span> ref_ = 0;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;};</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="comment">// Wrap the CpModelProto we are presolving with extra data structure like the</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;<span class="comment">// in-memory domain of each variables and the constraint variable graph.</span></div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html"> 72</a></span>&#160;<span class="keyword">class </span><a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html">PresolveContext</a> {</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a1718a4c289ba4833e88f7e6cd0207a81"> 74</a></span>&#160; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a1718a4c289ba4833e88f7e6cd0207a81">PresolveContext</a>(<a class="code" href="classoperations__research_1_1sat_1_1_model.html">Model</a>* <a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>, <a class="code" href="classoperations__research_1_1sat_1_1_cp_model_proto.html">CpModelProto</a>* cp_model, <a class="code" href="classoperations__research_1_1sat_1_1_cp_model_proto.html">CpModelProto</a>* mapping)</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; : <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a928c29f37c6ed9d5bba711f905783417">working_model</a>(cp_model),</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4b3b9ef9c5f214dd4427daa2646eceda">mapping_model</a>(mapping),</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; logger_(<a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;GetOrCreate&lt;<a class="code" href="classoperations__research_1_1_solver_logger.html">SolverLogger</a>&gt;()),</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; params_(*<a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;GetOrCreate&lt;<a class="code" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a>&gt;()),</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; time_limit_(<a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;GetOrCreate&lt;<a class="code" href="classoperations__research_1_1_time_limit.html">TimeLimit</a>&gt;()),</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; random_(<a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>-&gt;GetOrCreate&lt;<a class="code" href="classoperations__research_1_1sat_1_1_model_random_generator.html">ModelRandomGenerator</a>&gt;()) {}</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="comment">// Helpers to adds new variables to the presolved model.</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="comment">// TODO(user): We should control more how this is called so we can update</span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="comment">// a solution hint accordingly.</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keywordtype">int</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a67699a1a5830ef51dab6941449b02044">NewIntVar</a>(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1_domain.html">Domain</a>&amp; domain);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keywordtype">int</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a0967c575f9db0c79ed2e7930a0d6a091">NewBoolVar</a>();</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keywordtype">int</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#ada5d036ab04018d9ee3ed60888843102">GetOrCreateConstantVar</a>(int64_t cst);</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="comment">// a =&gt; b.</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a1aadaad9b8af16ab5a208c682e2e1717">AddImplication</a>(<span class="keywordtype">int</span> <a class="code" href="constraint__solver_2table_8cc.html#acb18315d548212835cd8ed4287e6c0b6">a</a>, <span class="keywordtype">int</span> <a class="code" href="constraint__solver_2table_8cc.html#a9293e4d29cac928301645070dd307683">b</a>);</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="comment">// b =&gt; x in [lb, ub].</span></div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#af0280b2bda95804c4166638e7b490ce9">AddImplyInDomain</a>(<span class="keywordtype">int</span> <a class="code" href="constraint__solver_2table_8cc.html#a9293e4d29cac928301645070dd307683">b</a>, <span class="keywordtype">int</span> x, <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1_domain.html">Domain</a>&amp; domain);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="comment">// Helpers to query the current domain of a variable.</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00102"></a><span class="lineno"> 102</span>&#160; int64_t <a class="code" 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 name="l00103"></a><span class="lineno"> 103</span>&#160; int64_t <a class="code" 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 name="l00104"></a><span class="lineno"> 104</span>&#160; int64_t <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a8851194fe8ce04aab258d31f06c472e2">FixedValue</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a9dd01897679ba54fca524a3b0b7d5612">DomainContains</a>(<span class="keywordtype">int</span> ref, int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>) <span class="keyword">const</span>;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <a class="code" href="classoperations__research_1_1_domain.html">Domain</a> <a class="code" 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 name="l00107"></a><span class="lineno"> 107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="comment">// Helper to query the state of an interval.</span></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00110"></a><span class="lineno"> 110</span>&#160; int64_t <a class="code" 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 name="l00111"></a><span class="lineno"> 111</span>&#160; int64_t <a class="code" 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 name="l00112"></a><span class="lineno"> 112</span>&#160; int64_t <a class="code" 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 name="l00113"></a><span class="lineno"> 113</span>&#160; int64_t <a class="code" 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 name="l00114"></a><span class="lineno"> 114</span>&#160; int64_t <a class="code" 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 name="l00115"></a><span class="lineno"> 115</span>&#160; int64_t <a class="code" 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 name="l00116"></a><span class="lineno"> 116</span>&#160; std::string <a class="code" 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 name="l00117"></a><span class="lineno"> 117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="comment">// Helpers to query the current domain of a linear expression.</span></div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="comment">// This doesn&#39;t check for integer overflow, but our linear expression</span></div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="comment">// should be such that this cannot happen (tested at validation).</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; int64_t <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#af597da31a1aed22d4bbd0e9398728a9b">MinOf</a>(<span class="keyword">const</span> <a class="code" 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 name="l00122"></a><span class="lineno"> 122</span>&#160; int64_t <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a00f995618e00d575372ff823a12553a9">MaxOf</a>(<span class="keyword">const</span> <a class="code" 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 name="l00123"></a><span class="lineno"> 123</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#abb6eb29f56c3a33b8ae1b74b08b755c2">IsFixed</a>(<span class="keyword">const</span> <a class="code" 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 name="l00124"></a><span class="lineno"> 124</span>&#160; int64_t <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a8851194fe8ce04aab258d31f06c472e2">FixedValue</a>(<span class="keyword">const</span> <a class="code" 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 name="l00125"></a><span class="lineno"> 125</span>&#160;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="comment">// This methods only works for affine expressions (checked).</span></div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a9dd01897679ba54fca524a3b0b7d5612">DomainContains</a>(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; expr, int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>) <span class="keyword">const</span>;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="comment">// Return a super-set of the domain of the linear expression.</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <a class="code" href="classoperations__research_1_1_domain.html">Domain</a> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#ae7450e5b3b9b22663ec7e1fe0d82b6b9">DomainSuperSetOf</a>(<span class="keyword">const</span> <a class="code" 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 name="l00131"></a><span class="lineno"> 131</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="comment">// Returns true iff the expr is of the form a * literal + b.</span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="comment">// The other function can be used to get the literal that achieve MaxOf().</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#adff3b5f900c3d62132781fc25b54fb1a">ExpressionIsAffineBoolean</a>(<span class="keyword">const</span> <a class="code" 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 name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordtype">int</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#ad1cddf8749d0ce1686f1f428926cfb1d">LiteralForExpressionMax</a>(<span class="keyword">const</span> <a class="code" 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 name="l00136"></a><span class="lineno"> 136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="comment">// Returns true iff the expr is of the form 1 * var + 0.</span></div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a36a3dfcbe2bf048497070296b91ed97d">ExpressionIsSingleVariable</a>(<span class="keyword">const</span> <a class="code" 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 name="l00139"></a><span class="lineno"> 139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="comment">// Returns true iff the expr is a literal (x or not(x)).</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a0481547ad6462a8cb545e2533bff1dc3">ExpressionIsALiteral</a>(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; expr,</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keywordtype">int</span>* <a class="code" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a> = <span class="keyword">nullptr</span>) <span class="keyword">const</span>;</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="comment">// This function takes a positive variable reference.</span></div><div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a33f90dcf20e1ce9197e60eb3bed25974"> 145</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a33f90dcf20e1ce9197e60eb3bed25974">DomainOfVarIsIncludedIn</a>(<span class="keywordtype">int</span> <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1_domain.html">Domain</a>&amp; domain) {</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordflow">return</span> domains[<a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>].IsIncludedIn(domain);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; }</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="comment">// Returns true if a presolve transformation is allowed to remove this</span></div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="comment">// variable.</span></div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00152"></a><span class="lineno"> 152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="comment">// Returns true if this ref only appear in one constraint.</span></div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00155"></a><span class="lineno"> 155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="comment">// Returns true if this ref no longer appears in the model.</span></div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00158"></a><span class="lineno"> 158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="comment">// Functions to make sure that once we remove a variable, we no longer reuse</span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="comment">// it.</span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a6939dc7b9db01cf3deff10405e260461">MarkVariableAsRemoved</a>(<span class="keywordtype">int</span> ref);</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00163"></a><span class="lineno"> 163</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="comment">// Same as VariableIsUniqueAndRemovable() except that in this case the</span></div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="comment">// variable also appear in the objective in addition to a single constraint.</span></div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a0d7555344bad8a6d860796d76df34c31">VariableWithCostIsUnique</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00168"></a><span class="lineno"> 168</span>&#160;</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="comment">// Returns true if an integer variable is only appearing in the rhs of</span></div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="comment">// constraints of the form lit =&gt; var in domain. When this is the case, then</span></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="comment">// we can usually remove this variable and replace these constraints with</span></div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="comment">// the proper constraints on the enforcement literals.</span></div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00174"></a><span class="lineno"> 174</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="comment">// Returns false if the new domain is empty. Sets &#39;domain_modified&#39; (if</span></div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="comment">// provided) to true iff the domain is modified otherwise does not change it.</span></div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a20097880105b02917a50dd5d97b80e55">IntersectDomainWith</a>(</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="keywordtype">int</span> ref, <span class="keyword">const</span> <a class="code" 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 name="l00179"></a><span class="lineno"> 179</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <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 name="l00181"></a><span class="lineno"> 181</span>&#160; ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#ad0d1a630c07ba2321cf43d97a425bc30">SetLiteralToFalse</a>(<span class="keywordtype">int</span> lit);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a37ed950834f3f3b427a707631fd745f4">SetLiteralToTrue</a>(<span class="keywordtype">int</span> lit);</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="comment">// Same as IntersectDomainWith() but take a linear expression as input.</span></div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <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 name="l00186"></a><span class="lineno"> 186</span>&#160; <span class="comment">// only propagates for constant and affine expression.</span></div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a20097880105b02917a50dd5d97b80e55">IntersectDomainWith</a>(</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; expr, <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1_domain.html">Domain</a>&amp; domain,</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="keywordtype">bool</span>* domain_modified = <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <span class="comment">// This function always return false. It is just a way to make a little bit</span></div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="comment">// more sure that we abort right away when infeasibility is detected.</span></div><div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5aa53538ba8adaa0bea1c3c0727425b0"> 193</a></span>&#160; ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5aa53538ba8adaa0bea1c3c0727425b0">NotifyThatModelIsUnsat</a>(</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keyword">const</span> std::string&amp; <a class="code" href="trace_8cc.html#a36bd74109f547f7f8198faf5a12d2879">message</a> = <span class="stringliteral">&quot;&quot;</span>) {</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <span class="comment">// TODO(user): Report any explanation for the client in a nicer way?</span></div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <a class="code" href="util_2logging_8h.html#a5f67b653dd99ddbe5e3367e3b4b7b532">SOLVER_LOG</a>(logger_, <span class="stringliteral">&quot;INFEASIBLE: &#39;&quot;</span>, <a class="code" href="trace_8cc.html#a36bd74109f547f7f8198faf5a12d2879">message</a>, <span class="stringliteral">&quot;&#39;&quot;</span>);</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; <a class="code" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(!is_unsat_);</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; is_unsat_ = <span class="keyword">true</span>;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; }</div><div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a1cd25a05e3e88efc9ffe50461fb21d63"> 201</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00202"></a><span class="lineno"> 202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <span class="comment">// Stores a description of a rule that was just applied to have a summary of</span></div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <span class="comment">// what the presolve did at the end.</span></div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#aa49a8967edab300018eeaa14a27b7210">UpdateRuleStats</a>(<span class="keyword">const</span> std::string&amp; <a class="code" href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a>, <span class="keywordtype">int</span> num_times = 1);</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <span class="comment">// Updates the constraints &lt;-&gt; variables graph. This needs to be called each</span></div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; <span class="comment">// time a constraint is modified.</span></div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#ab75a27c0aeda2de9c3957719b8196c36">UpdateConstraintVariableUsage</a>(<span class="keywordtype">int</span> c);</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160;</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; <span class="comment">// At the beginning of the presolve, we delay the costly creation of this</span></div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; <span class="comment">// &quot;graph&quot; until we at least ran some basic presolve. This is because during</span></div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <span class="comment">// a LNS neighbhorhood, many constraints will be reduced significantly by</span></div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; <span class="comment">// this &quot;simple&quot; presolve.</span></div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a2563663eeef59c23110ae4e2a80d8c9f">ConstraintVariableGraphIsUpToDate</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160;</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <span class="comment">// Calls UpdateConstraintVariableUsage() on all newly created constraints.</span></div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a52bccf051bec19d96584096844070eaa">UpdateNewConstraintsVariableUsage</a>();</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <span class="comment">// Returns true if our current constraints &lt;-&gt; variables graph is ok.</span></div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <span class="comment">// This is meant to be used in DEBUG mode only.</span></div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a11f5290ed8216eea13b9d7383cb4c55f">ConstraintVariableUsageIsConsistent</a>();</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; <span class="comment">// Regroups fixed variables with the same value.</span></div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; <span class="comment">// TODO(user): Also regroup cte and -cte?</span></div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#af4847724208dd09ba3fea8b53132d197">ExploitFixedDomain</a>(<span class="keywordtype">int</span> <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160;</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; <span class="comment">// A &quot;canonical domain&quot; always have a MinOf() equal to zero.</span></div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; <span class="comment">// If needed we introduce a new variable with such canonical domain and</span></div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; <span class="comment">// add the relation X = Y + offset.</span></div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; <span class="comment">// This is useful in some corner case to avoid overflow.</span></div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; <span class="comment">// TODO(user): When we can always get rid of affine relation, it might be good</span></div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; <span class="comment">// to do a final pass to canonicalize all domains in a model after presolve.</span></div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a7b54dd25e40790d8161c7e7b5ba64242">CanonicalizeVariable</a>(<span class="keywordtype">int</span> ref);</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <span class="comment">// Given the relation (X * coeff % mod = rhs % mod), this creates a new</span></div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; <span class="comment">// variable so that X = mod * Y + cte.</span></div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <span class="comment">// This requires mod != 0 and coeff != 0.</span></div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <span class="comment">// Note that the new variable will have a canonical domain (i.e. min == 0).</span></div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <span class="comment">// We also do not create anything if this fixes the given variable or the</span></div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <span class="comment">// relation simplifies. Returns false if the model is infeasible.</span></div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a0106fb380cd3f9c642575e6318e95f07">CanonicalizeAffineVariable</a>(<span class="keywordtype">int</span> ref, int64_t coeff, int64_t mod,</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; int64_t rhs);</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; <span class="comment">// Adds the relation (ref_x = coeff * ref_y + offset) to the repository.</span></div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; <span class="comment">// Returns false if we detect infeasability because of this.</span></div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <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 name="l00253"></a><span class="lineno"> 253</span>&#160; <span class="comment">// in the model proto, since we will propagate such relation directly and add</span></div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; <span class="comment">// them to the proto at the end of the presolve.</span></div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <span class="comment">// Note that this should always add a relation, even though it might need to</span></div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; <span class="comment">// create a new representative for both ref_x and ref_y in some cases. Like if</span></div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; <span class="comment">// x = 3z and y = 5t are already added, if we add x = 2y, we have 3z = 10t and</span></div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; <span class="comment">// can only resolve this by creating a new variable r such that z = 10r and t</span></div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; <span class="comment">// = 3r.</span></div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; <span class="comment">// All involved variables will be marked to appear in the special</span></div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; <span class="comment">// kAffineRelationConstraint. This will allow to identify when a variable is</span></div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; <span class="comment">// no longer needed (only appear there and is not a representative).</span></div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#ac43d47cf9df6d6e9c8e8ffb7fc01c138">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 name="l00266"></a><span class="lineno"> 266</span>&#160; <span class="keywordtype">bool</span> debug_no_recursion = <span class="keyword">false</span>);</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160;</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; <span class="comment">// Adds the fact that ref_a == ref_b using StoreAffineRelation() above.</span></div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; <span class="comment">// Returns false if this makes the problem infeasible.</span></div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a307dddcaccf0a7efca0143d0cdf0cacd">StoreBooleanEqualityRelation</a>(<span class="keywordtype">int</span> ref_a, <span class="keywordtype">int</span> ref_b);</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160;</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; <span class="comment">// Stores/Get the relation target_ref = abs(ref); The first function returns</span></div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; <span class="comment">// false if it already exist and the second false if it is not present.</span></div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00275"></a><span class="lineno"> 275</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00276"></a><span class="lineno"> 276</span>&#160;</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; <span class="comment">// Returns the representative of a literal.</span></div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; <span class="keywordtype">int</span> <a class="code" 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 name="l00279"></a><span class="lineno"> 279</span>&#160;</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; <span class="comment">// Returns another reference with exactly the same value.</span></div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; <span class="keywordtype">int</span> <a class="code" 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 name="l00282"></a><span class="lineno"> 282</span>&#160;</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; <span class="comment">// Used for statistics.</span></div><div class="line"><a name="l00284"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#abd6f7af5d9b31061a7b03ec44488ea4c"> 284</a></span>&#160; <span class="keywordtype">int</span> <a class="code" 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" href="classoperations__research_1_1_affine_relation.html#acee7699cd3aad1b8ce9721e4952b36e7">NumRelations</a>(); }</div><div class="line"><a name="l00285"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#acb73a5ab7e240d5f93938262f2d8b826"> 285</a></span>&#160; <span class="keywordtype">int</span> <a class="code" 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" href="classoperations__research_1_1_affine_relation.html#acee7699cd3aad1b8ce9721e4952b36e7">NumRelations</a>(); }</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160;</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; <span class="comment">// This makes sure that the affine relation only uses one of the</span></div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; <span class="comment">// representative from the var_equiv_relations.</span></div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; <a class="code" href="structoperations__research_1_1_affine_relation_1_1_relation.html">AffineRelation::Relation</a> <a class="code" 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 name="l00290"></a><span class="lineno"> 290</span>&#160;</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; <span class="comment">// To facilitate debugging.</span></div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; std::string <a class="code" 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 name="l00293"></a><span class="lineno"> 293</span>&#160; std::string <a class="code" 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 name="l00294"></a><span class="lineno"> 294</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <span class="comment">// Makes sure the domain of ref and of its representative are in sync.</span></div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <span class="comment">// Returns false on unsat.</span></div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5c2f01871b9baa2bc0dc556803c5a1ad">PropagateAffineRelation</a>(<span class="keywordtype">int</span> ref);</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160;</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; <span class="comment">// Creates the internal structure for any new variables in working_model.</span></div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a62cd771660767621e917b2c256182c4e">InitializeNewDomains</a>();</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160;</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; <span class="comment">// Clears the &quot;rules&quot; statistics.</span></div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a24b22e509fdbdb4cd49ccec6a88c46ab">ClearStats</a>();</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; <span class="comment">// Inserts the given literal to encode ref == value.</span></div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; <span class="comment">// If an encoding already exists, it adds the two implications between</span></div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; <span class="comment">// the previous encoding and the new encoding.</span></div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; <span class="comment">// Important: This does not update the constraint&lt;-&gt;variable graph, so</span></div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; <span class="comment">// ConstraintVariableGraphIsUpToDate() will be false until</span></div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; <span class="comment">// UpdateNewConstraintsVariableUsage() is called.</span></div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; <span class="comment">// Returns false if the model become UNSAT.</span></div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; <span class="comment">// TODO(user): This function is not always correct if</span></div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160; <span class="comment">// !context-&gt;DomainOf(ref).contains(value), we could make it correct but it</span></div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; <span class="comment">// might be a bit expansive to do so. For now we just have a DCHECK().</span></div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a69fea604a632b4b91ed950a0e622489c">InsertVarValueEncoding</a>(<span class="keywordtype">int</span> <a class="code" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>, <span class="keywordtype">int</span> ref, int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160;</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; <span class="comment">// Gets the associated literal if it is already created. Otherwise</span></div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; <span class="comment">// create it, add the corresponding constraints and returns it.</span></div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; <span class="comment">// Important: This does not update the constraint&lt;-&gt;variable graph, so</span></div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; <span class="comment">// ConstraintVariableGraphIsUpToDate() will be false until</span></div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; <span class="comment">// UpdateNewConstraintsVariableUsage() is called.</span></div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; <span class="keywordtype">int</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4f9423ff72ed20e477fff16e8887df96">GetOrCreateVarValueEncoding</a>(<span class="keywordtype">int</span> ref, int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160;</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; <span class="comment">// Gets the associated literal if it is already created. Otherwise</span></div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; <span class="comment">// create it, add the corresponding constraints and returns it.</span></div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160; <span class="comment">// Important: This does not update the constraint&lt;-&gt;variable graph, so</span></div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; <span class="comment">// ConstraintVariableGraphIsUpToDate() will be false until</span></div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; <span class="comment">// UpdateNewConstraintsVariableUsage() is called.</span></div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; <span class="keywordtype">int</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a3bb6775f0bab3c01b35622e3ce68ab1d">GetOrCreateAffineValueEncoding</a>(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; expr,</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160;</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160; <span class="comment">// If not already done, adds a Boolean to represent any integer variables that</span></div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160; <span class="comment">// take only two values. Make sure all the relevant affine and encoding</span></div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160; <span class="comment">// relations are updated.</span></div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160; <span class="comment">// Note that this might create a new Boolean variable.</span></div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a7ea7bb314db4dbe4f3b2cac16a2af20f">CanonicalizeDomainOfSizeTwo</a>(<span class="keywordtype">int</span> <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160;</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160; <span class="comment">// Returns true if a literal attached to ref == var exists.</span></div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160; <span class="comment">// It assigns the corresponding to `literal` if non null.</span></div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a9925335988ccbe70e9150a9ce71b9952">HasVarValueEncoding</a>(<span class="keywordtype">int</span> ref, int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>, <span class="keywordtype">int</span>* <a class="code" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a> = <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>&#160;</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>&#160; <span class="comment">// Returns true if we have literal &lt;=&gt; var = value for all values of var.</span></div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>&#160; <span class="comment">// TODO(user): If the domain was shrunk, we can have a false positive.</span></div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160; <span class="comment">// Still it means that the number of values removed is greater than the number</span></div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>&#160; <span class="comment">// of values not encoded.</span></div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a058746ebd0b438afbdd49eb5bd290d8f">IsFullyEncoded</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160;</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>&#160; <span class="comment">// This methods only works for affine expressions (checked).</span></div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>&#160; <span class="comment">// It returns true iff the expression is constant or its one variable is full</span></div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>&#160; <span class="comment">// encoded.</span></div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a058746ebd0b438afbdd49eb5bd290d8f">IsFullyEncoded</a>(<span class="keyword">const</span> <a class="code" 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 name="l00359"></a><span class="lineno"> 359</span>&#160;</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>&#160; <span class="comment">// Stores the fact that literal implies var == value.</span></div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>&#160; <span class="comment">// It returns true if that information is new.</span></div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#afdf0f5e877efe4e1d003300f0ce1234f">StoreLiteralImpliesVarEqValue</a>(<span class="keywordtype">int</span> <a class="code" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>, <span class="keywordtype">int</span> <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160;</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160; <span class="comment">// Stores the fact that literal implies var != value.</span></div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160; <span class="comment">// It returns true if that information is new.</span></div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a2877bce637c80df492977b5b6487d563">StoreLiteralImpliesVarNEqValue</a>(<span class="keywordtype">int</span> <a class="code" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>, <span class="keywordtype">int</span> <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160;</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>&#160; <span class="comment">// Objective handling functions. We load it at the beginning so that during</span></div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>&#160; <span class="comment">// presolve we can work on the more efficient hash_map representation.</span></div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>&#160; <span class="comment">// Note that ReadObjectiveFromProto() makes sure that var_to_constraints of</span></div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160; <span class="comment">// all the variable that appear in the objective contains -1. This is later</span></div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>&#160; <span class="comment">// enforced by all the functions modifying the objective.</span></div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>&#160; <span class="comment">// Note(user): Because we process affine relation only on</span></div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>&#160; <span class="comment">// CanonicalizeObjective(), it is possible that when processing a</span></div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160; <span class="comment">// canonicalized linear constraint, we don&#39;t detect that a variable in affine</span></div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>&#160; <span class="comment">// relation is in the objective. For now this is fine, because when this is</span></div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>&#160; <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 name="l00380"></a><span class="lineno"> 380</span>&#160; <span class="comment">// anything with that variable since it appear in at least two constraints.</span></div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#aed2a07aad05b4ad8e05cf5fe7b239a1a">ReadObjectiveFromProto</a>();</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>&#160; ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a2ff0654486b944d24ec212846d9ea4c1">CanonicalizeObjective</a>(<span class="keywordtype">bool</span> simplify_domain = <span class="keyword">true</span>);</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a36794cf424ca2d69bc4774437a61a88e">WriteObjectiveToProto</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>&#160; ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a46a91d63a8cc54d2d4d7660022eb1c87">ScaleFloatingPointObjective</a>();</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span>&#160;</div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>&#160; <span class="comment">// Some function need the domain to be up to date in the proto.</span></div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>&#160; <span class="comment">// This make sures our in-memory domain are writted back to the proto.</span></div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a6dbf60b03175ebeb45b650fb76b53dbc">WriteVariableDomainsToProto</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>&#160;</div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>&#160; <span class="comment">// Checks if the given exactly_one is included in the objective, and simplify</span></div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>&#160; <span class="comment">// the objective by adding a constant value to all the exactly one terms.</span></div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00393"></a><span class="lineno"> 393</span>&#160;</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>&#160; <span class="comment">// Allows to manipulate the objective coefficients.</span></div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#aaed725b098e5d931862a74b496564e37">RemoveVariableFromObjective</a>(<span class="keywordtype">int</span> <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a1e65dc236d5729de4938834d779d9f6f">AddToObjective</a>(<span class="keywordtype">int</span> <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a02a3444590b38a8e99aba5eb8a1ca9d9">AddToObjectiveOffset</a>(int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>&#160;</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>&#160; <span class="comment">// Given a variable defined by the given inequality that also appear in the</span></div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>&#160; <span class="comment">// objective, remove it from the objective by transferring its cost to other</span></div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>&#160; <span class="comment">// variables in the equality.</span></div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>&#160; <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 name="l00404"></a><span class="lineno"> 404</span>&#160; <span class="comment">// variables that where not in the objective before and are after</span></div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>&#160; <span class="comment">// substitution.</span></div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>&#160; <span class="comment">// Returns false, if the substitution cannot be done. This is the case if the</span></div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>&#160; <span class="comment">// model become UNSAT or if doing it will result in an objective that do not</span></div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>&#160; <span class="comment">// satisfy our overflow preconditions. Note that this can only happen if the</span></div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>&#160; <span class="comment">// substitued variable is not implied free (i.e. if its domain is smaller than</span></div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>&#160; <span class="comment">// the implied domain from the equality).</span></div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>&#160; ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4bf47c6b5724e9a3a7df78486f9bdc41">SubstituteVariableInObjective</a>(</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>&#160; <span class="keywordtype">int</span> var_in_equality, int64_t coeff_in_equality,</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>&#160; <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1sat_1_1_constraint_proto.html">ConstraintProto</a>&amp; equality,</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>&#160; std::vector&lt;int&gt;* new_vars_in_objective = <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>&#160;</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>&#160; <span class="comment">// Objective getters.</span></div><div class="line"><a name="l00418"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a31d9b7763fd739fe805438b464096c32"> 418</a></span>&#160; <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1_domain.html">Domain</a>&amp; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a31d9b7763fd739fe805438b464096c32">ObjectiveDomain</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> objective_domain_; }</div><div class="line"><a name="l00419"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a66fc178adf4c7e56b3a6f1a5e052d3e5"> 419</a></span>&#160; <span class="keyword">const</span> absl::flat_hash_map&lt;int, int64_t&gt;&amp; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a66fc178adf4c7e56b3a6f1a5e052d3e5">ObjectiveMap</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>&#160; <span class="keywordflow">return</span> objective_map_;</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>&#160; }</div><div class="line"><a name="l00422"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a483ddc58170919b851be240df84c77af"> 422</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a483ddc58170919b851be240df84c77af">ObjectiveDomainIsConstraining</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>&#160; <span class="keywordflow">return</span> objective_domain_is_constraining_;</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>&#160; }</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>&#160;</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>&#160; <span class="comment">// Advanced usage. This should be called when a variable can be removed from</span></div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>&#160; <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 name="l00428"></a><span class="lineno"> 428</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5763f8709716596a3aa728bacae05a7b">RemoveVariableFromAffineRelation</a>(<span class="keywordtype">int</span> <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#aabb328e6969888226a7a69a972e22c56">RemoveAllVariablesFromAffineRelationConstraint</a>();</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>&#160;</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>&#160; <span class="comment">// Variable &lt;-&gt; constraint graph.</span></div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>&#160; <span class="comment">// The vector list is sorted and contains unique elements.</span></div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>&#160; <span class="comment">// Important: To properly handle the objective, var_to_constraints[objective]</span></div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>&#160; <span class="comment">// contains -1 so that if the objective appear in only one constraint, the</span></div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>&#160; <span class="comment">// constraint cannot be simplified.</span></div><div class="line"><a name="l00437"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4d724b2f4bd1d1cab7b11dafd3448d8b"> 437</a></span>&#160; <span class="keyword">const</span> std::vector&lt;int&gt;&amp; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4d724b2f4bd1d1cab7b11dafd3448d8b">ConstraintToVars</a>(<span class="keywordtype">int</span> c)<span class="keyword"> const </span>{</div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>&#160; <a class="code" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(<a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a2563663eeef59c23110ae4e2a80d8c9f">ConstraintVariableGraphIsUpToDate</a>());</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>&#160; <span class="keywordflow">return</span> constraint_to_vars_[c];</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>&#160; }</div><div class="line"><a name="l00441"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#acf72cafd3dab9ac4b5e5b1a3aaa75192"> 441</a></span>&#160; <span class="keyword">const</span> absl::flat_hash_set&lt;int&gt;&amp; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#acf72cafd3dab9ac4b5e5b1a3aaa75192">VarToConstraints</a>(<span class="keywordtype">int</span> <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)<span class="keyword"> const </span>{</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>&#160; <a class="code" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(<a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a2563663eeef59c23110ae4e2a80d8c9f">ConstraintVariableGraphIsUpToDate</a>());</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>&#160; <span class="keywordflow">return</span> var_to_constraints_[<a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>];</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>&#160; }</div><div class="line"><a name="l00445"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a90674fa816d7a066e251337852214e84"> 445</a></span>&#160; <span class="keywordtype">int</span> <a class="code" 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 name="l00446"></a><span class="lineno"> 446</span>&#160; <a class="code" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(<a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a2563663eeef59c23110ae4e2a80d8c9f">ConstraintVariableGraphIsUpToDate</a>());</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>&#160; <span class="keywordflow">return</span> interval_usage_[c];</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>&#160; }</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>&#160;</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>&#160; <span class="comment">// Checks if a constraint contains an enforcement literal set to false,</span></div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>&#160; <span class="comment">// or if it has been cleared.</span></div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00453"></a><span class="lineno"> 453</span>&#160;</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>&#160; <span class="comment">// Checks if a constraint contains an enforcement literal not fixed, and</span></div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>&#160; <span class="comment">// no enforcement literals set to false.</span></div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00457"></a><span class="lineno"> 457</span>&#160;</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>&#160; <span class="comment">// Make sure we never delete an &quot;assumption&quot; literal by using a special</span></div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>&#160; <span class="comment">// constraint for that.</span></div><div class="line"><a name="l00460"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#af35921d036d22c6497777d7a5964a13d"> 460</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#af35921d036d22c6497777d7a5964a13d">RegisterVariablesUsedInAssumptions</a>() {</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> ref : <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a928c29f37c6ed9d5bba711f905783417">working_model</a>-&gt;<a class="code" href="classoperations__research_1_1sat_1_1_cp_model_proto.html#ad40b6ec6853d69d892b396a1e4de27d5">assumptions</a>()) {</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160; var_to_constraints_[<a class="code" href="namespaceoperations__research_1_1sat.html#acdbc8ad33149d45a6e6fcd8b72fd68ed">PositiveRef</a>(ref)].insert(<a class="code" href="namespaceoperations__research_1_1sat.html#abe4ecb2ef8f498b18a55fbcbbf54e550">kAssumptionsConstraint</a>);</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>&#160; }</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>&#160; }</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>&#160;</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>&#160; <span class="comment">// The &quot;expansion&quot; phase should be done once and allow to transform complex</span></div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>&#160; <span class="comment">// constraints into basic ones (see cp_model_expand.h). Some presolve rules</span></div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>&#160; <span class="comment">// need to know if the expansion was ran before beeing applied.</span></div><div class="line"><a name="l00469"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a13c8d5cf71bf7735663c489f5493d036"> 469</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00470"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a268e694a54b376ada250df521eab2e07"> 470</a></span>&#160; <span class="keywordtype">void</span> <a class="code" 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 name="l00471"></a><span class="lineno"> 471</span>&#160;</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>&#160; <span class="comment">// The following helper adds the following constraint:</span></div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>&#160; <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 name="l00474"></a><span class="lineno"> 474</span>&#160; <span class="comment">// and returns the (cached) literal result.</span></div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>&#160; <span class="comment">// Note that this cache should just be used temporarily and then cleared</span></div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>&#160; <span class="comment">// with ClearPrecedenceCache() because there is no mechanism to update the</span></div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>&#160; <span class="comment">// cached literals when literal equivalence are detected.</span></div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>&#160; <span class="keywordtype">int</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a2b7f0524381be1a7b01b5f707b98cb9a">GetOrCreateReifiedPrecedenceLiteral</a>(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; time_i,</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>&#160; <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; time_j,</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>&#160; <span class="keywordtype">int</span> active_i, <span class="keywordtype">int</span> active_j);</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>&#160;</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>&#160; std::tuple&lt;int, int64_t, int, int64_t, int64_t, int, int&gt;</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>&#160; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a8d58acb908ccc68472fe1a162957086a">GetReifiedPrecedenceKey</a>(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; time_i,</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>&#160; <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1sat_1_1_linear_expression_proto.html">LinearExpressionProto</a>&amp; time_j, <span class="keywordtype">int</span> active_i,</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>&#160; <span class="keywordtype">int</span> active_j);</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>&#160;</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>&#160; <span class="comment">// Clear the precedence cache.</span></div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#ae58b8c61c87bd4625b0a5db975652151">ClearPrecedenceCache</a>();</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>&#160;</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>&#160; <span class="comment">// Logs stats to the logger.</span></div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a40432f5ffa1ea8255071161d96f598d1">LogInfo</a>();</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>&#160;</div><div class="line"><a name="l00494"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a3269ba23127e4ee02e1ab7eecccb620f"> 494</a></span>&#160; <a class="code" href="classoperations__research_1_1_solver_logger.html">SolverLogger</a>* <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a3269ba23127e4ee02e1ab7eecccb620f">logger</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> logger_; }</div><div class="line"><a name="l00495"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#aaabb604ccac4a6136be93bfe64e2290d"> 495</a></span>&#160; <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a>&amp; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#aaabb604ccac4a6136be93bfe64e2290d">params</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> params_; }</div><div class="line"><a name="l00496"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a0704cc50211ab739309aa9f54aa8c606"> 496</a></span>&#160; <a class="code" href="classoperations__research_1_1_time_limit.html">TimeLimit</a>* <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a0704cc50211ab739309aa9f54aa8c606">time_limit</a>() { <span class="keywordflow">return</span> time_limit_; }</div><div class="line"><a name="l00497"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#ad02c7812cfbc2a8c4c05d955c9681259"> 497</a></span>&#160; <a class="code" href="classoperations__research_1_1sat_1_1_model_random_generator.html">ModelRandomGenerator</a>* <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#ad02c7812cfbc2a8c4c05d955c9681259">random</a>() { <span class="keywordflow">return</span> random_; }</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>&#160;</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>&#160; <span class="comment">// For each variables, list the constraints that just enforce a lower bound</span></div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>&#160; <span class="comment">// (resp. upper bound) on that variable. If all the constraints in which a</span></div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>&#160; <span class="comment">// variable appear are in the same direction, then we can usually fix a</span></div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>&#160; <span class="comment">// variable to one of its bound (modulo its cost).</span></div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>&#160; <span class="comment">// TODO(user): Keeping these extra vector of hash_set seems inefficient. Come</span></div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>&#160; <span class="comment">// up with a better way to detect if a variable is only constrainted in one</span></div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>&#160; <span class="comment">// direction.</span></div><div class="line"><a name="l00507"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a47714f887512a3d7acebfcb4a348291a"> 507</a></span>&#160; std::vector&lt;absl::flat_hash_set&lt;int&gt;&gt; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a47714f887512a3d7acebfcb4a348291a">var_to_ub_only_constraints</a>;</div><div class="line"><a name="l00508"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a23aa815e8a7a860998c4d35760fa087e"> 508</a></span>&#160; std::vector&lt;absl::flat_hash_set&lt;int&gt;&gt; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a23aa815e8a7a860998c4d35760fa087e">var_to_lb_only_constraints</a>;</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>&#160;</div><div class="line"><a name="l00510"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a928c29f37c6ed9d5bba711f905783417"> 510</a></span>&#160; <a class="code" href="classoperations__research_1_1sat_1_1_cp_model_proto.html">CpModelProto</a>* <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a928c29f37c6ed9d5bba711f905783417">working_model</a> = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00511"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4b3b9ef9c5f214dd4427daa2646eceda"> 511</a></span>&#160; <a class="code" href="classoperations__research_1_1sat_1_1_cp_model_proto.html">CpModelProto</a>* <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4b3b9ef9c5f214dd4427daa2646eceda">mapping_model</a> = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>&#160;</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>&#160; <span class="comment">// Indicate if we are allowed to remove irrelevant feasible solution from the</span></div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>&#160; <span class="comment">// set of feasible solution. For example, if a variable is unused, can we fix</span></div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>&#160; <span class="comment">// it to an arbitrary value (or its mimimum objective one)? This must be true</span></div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>&#160; <span class="comment">// if the client wants to enumerate all solutions or wants correct tightened</span></div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>&#160; <span class="comment">// bounds in the response.</span></div><div class="line"><a name="l00518"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#ab7b13b808e3dea6fc1e4006f7134e9f9"> 518</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" 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 name="l00519"></a><span class="lineno"> 519</span>&#160;</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>&#160; <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 name="l00521"></a><span class="lineno"> 521</span>&#160; <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 name="l00522"></a><span class="lineno"> 522</span>&#160; <span class="comment">// of the presolve or not. Note that depending on the presolve transformation,</span></div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>&#160; <span class="comment">// a rule can correspond to a tiny change or a big change. Because of that,</span></div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>&#160; <span class="comment">// this isn&#39;t a perfect proxy for the efficacy of the presolve.</span></div><div class="line"><a name="l00525"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5f9c1ea2555cc36fcd716296e54ed17a"> 525</a></span>&#160; int64_t <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5f9c1ea2555cc36fcd716296e54ed17a">num_presolve_operations</a> = 0;</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>&#160;</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>&#160; <span class="comment">// Temporary storage.</span></div><div class="line"><a name="l00528"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a436752c51b5f6010033151b7bd7966da"> 528</a></span>&#160; std::vector&lt;int&gt; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a436752c51b5f6010033151b7bd7966da">tmp_literals</a>;</div><div class="line"><a name="l00529"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#ac3d1eecbbf2000282606576273ccf06c"> 529</a></span>&#160; std::vector&lt;Domain&gt; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#ac3d1eecbbf2000282606576273ccf06c">tmp_term_domains</a>;</div><div class="line"><a name="l00530"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a7305c507aa07aea8104037f2e2441876"> 530</a></span>&#160; std::vector&lt;Domain&gt; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a7305c507aa07aea8104037f2e2441876">tmp_left_domains</a>;</div><div class="line"><a name="l00531"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#aeb77639debea43978becf1d990581537"> 531</a></span>&#160; absl::flat_hash_set&lt;int&gt; <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#aeb77639debea43978becf1d990581537">tmp_literal_set</a>;</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>&#160;</div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>&#160; <span class="comment">// Each time a domain is modified this is set to true.</span></div><div class="line"><a name="l00534"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a02302d3a45d02003dcbf288d045ebd86"> 534</a></span>&#160; <a class="code" href="classoperations__research_1_1_sparse_bitset.html">SparseBitset&lt;int64_t&gt;</a> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a02302d3a45d02003dcbf288d045ebd86">modified_domains</a>;</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>&#160;</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>&#160; <span class="comment">// Advanced presolve. See this class comment.</span></div><div class="line"><a name="l00537"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a6e086436e931cd8b341d85e6889b838d"> 537</a></span>&#160; <a class="code" href="classoperations__research_1_1sat_1_1_domain_deductions.html">DomainDeductions</a> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a6e086436e931cd8b341d85e6889b838d">deductions</a>;</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>&#160;</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>&#160; <span class="comment">// Helper to add an affine relation x = c.y + o to the given repository.</span></div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>&#160; <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" href="classoperations__research_1_1_affine_relation.html">AffineRelation</a>* repo);</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>&#160;</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>&#160; <span class="keywordtype">void</span> AddVariableUsage(<span class="keywordtype">int</span> c);</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>&#160; <span class="keywordtype">void</span> UpdateLinear1Usage(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1sat_1_1_constraint_proto.html">ConstraintProto</a>&amp; <a class="code" href="demon__profiler_8cc.html#a05da18ca9c7b657a4a6ea24e07c9b695">ct</a>, <span class="keywordtype">int</span> c);</div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>&#160;</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>&#160; <span class="comment">// Returns true iff the variable is not the representative of an equivalence</span></div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span>&#160; <span class="comment">// class of size at least 2.</span></div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span>&#160; <span class="keywordtype">bool</span> VariableIsNotRepresentativeOfEquivalenceClass(<span class="keywordtype">int</span> <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>) <span class="keyword">const</span>;</div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>&#160;</div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span>&#160; <span class="comment">// Makes sure we only insert encoding about the current representative.</span></div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>&#160; <span class="comment">// Returns false if ref cannot take the given value (it might not have been</span></div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>&#160; <span class="comment">// propagated yet).</span></div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>&#160; <span class="keywordtype">bool</span> CanonicalizeEncoding(<span class="keywordtype">int</span>* ref, int64_t* <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>&#160;</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>&#160; <span class="comment">// Inserts an half reified var value encoding (literal =&gt; var ==/!= value).</span></div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>&#160; <span class="comment">// It returns true if the new state is different from the old state.</span></div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>&#160; <span class="comment">// Not that if imply_eq is false, the literal will be stored in its negated</span></div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>&#160; <span class="comment">// form.</span></div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>&#160; <span class="comment">// Thus, if you detect literal &lt;=&gt; var == value, then two calls must be made:</span></div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>&#160; <span class="comment">// InsertHalfVarValueEncoding(literal, var, value, true);</span></div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>&#160; <span class="comment">// InsertHalfVarValueEncoding(NegatedRef(literal), var, value, false);</span></div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span>&#160; <span class="keywordtype">bool</span> InsertHalfVarValueEncoding(<span class="keywordtype">int</span> <a class="code" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>, <span class="keywordtype">int</span> <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>,</div><div class="line"><a name="l00565"></a><span class="lineno"> 565</span>&#160; <span class="keywordtype">bool</span> imply_eq);</div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span>&#160;</div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>&#160; <span class="comment">// Insert fully reified var-value encoding.</span></div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>&#160; <span class="keywordtype">void</span> InsertVarValueEncodingInternal(<span class="keywordtype">int</span> <a class="code" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>, <span class="keywordtype">int</span> <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>,</div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>&#160; <span class="keywordtype">bool</span> add_constraints);</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>&#160;</div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>&#160; <a class="code" href="classoperations__research_1_1_solver_logger.html">SolverLogger</a>* logger_;</div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span>&#160; <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1sat_1_1_sat_parameters.html">SatParameters</a>&amp; params_;</div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>&#160; <a class="code" href="classoperations__research_1_1_time_limit.html">TimeLimit</a>* time_limit_;</div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>&#160; <a class="code" href="classoperations__research_1_1sat_1_1_model_random_generator.html">ModelRandomGenerator</a>* random_;</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>&#160;</div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>&#160; <span class="comment">// Initially false, and set to true on the first inconsistency.</span></div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>&#160; <span class="keywordtype">bool</span> is_unsat_ = <span class="keyword">false</span>;</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>&#160;</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>&#160; <span class="comment">// The current domain of each variables.</span></div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span>&#160; std::vector&lt;Domain&gt; domains;</div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span>&#160;</div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span>&#160; <span class="comment">// Internal representation of the objective. During presolve, we first load</span></div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span>&#160; <span class="comment">// the objective in this format in order to have more efficient substitution</span></div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>&#160; <span class="comment">// on large problems (also because the objective is often dense). At the end</span></div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>&#160; <span class="comment">// we re-convert it to its proto form.</span></div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span>&#160; absl::flat_hash_map&lt;int, int64_t&gt; objective_map_;</div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>&#160; int64_t objective_overflow_detection_;</div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>&#160; std::vector&lt;std::pair&lt;int, int64_t&gt;&gt; tmp_entries_;</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span>&#160; <span class="keywordtype">bool</span> objective_domain_is_constraining_ = <span class="keyword">false</span>;</div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>&#160; <a class="code" href="classoperations__research_1_1_domain.html">Domain</a> objective_domain_;</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>&#160; <span class="keywordtype">double</span> objective_offset_;</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>&#160; <span class="keywordtype">double</span> objective_scaling_factor_;</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span>&#160; int64_t objective_integer_offset_;</div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span>&#160; int64_t objective_integer_scaling_factor_;</div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>&#160;</div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span>&#160; <span class="comment">// Constraints &lt;-&gt; Variables graph.</span></div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>&#160; std::vector&lt;std::vector&lt;int&gt;&gt; constraint_to_vars_;</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span>&#160; std::vector&lt;absl::flat_hash_set&lt;int&gt;&gt; var_to_constraints_;</div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span>&#160;</div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span>&#160; <span class="comment">// Number of constraints of the form [lit =&gt;] var in domain.</span></div><div class="line"><a name="l00601"></a><span class="lineno"> 601</span>&#160; std::vector&lt;int&gt; constraint_to_linear1_var_;</div><div class="line"><a name="l00602"></a><span class="lineno"> 602</span>&#160; std::vector&lt;int&gt; var_to_num_linear1_;</div><div class="line"><a name="l00603"></a><span class="lineno"> 603</span>&#160;</div><div class="line"><a name="l00604"></a><span class="lineno"> 604</span>&#160; <span class="comment">// We maintain how many time each interval is used.</span></div><div class="line"><a name="l00605"></a><span class="lineno"> 605</span>&#160; std::vector&lt;std::vector&lt;int&gt;&gt; constraint_to_intervals_;</div><div class="line"><a name="l00606"></a><span class="lineno"> 606</span>&#160; std::vector&lt;int&gt; interval_usage_;</div><div class="line"><a name="l00607"></a><span class="lineno"> 607</span>&#160;</div><div class="line"><a name="l00608"></a><span class="lineno"> 608</span>&#160; <span class="comment">// Contains abs relation (key = abs(saved_variable)).</span></div><div class="line"><a name="l00609"></a><span class="lineno"> 609</span>&#160; absl::flat_hash_map&lt;int, SavedVariable&gt; abs_relations_;</div><div class="line"><a name="l00610"></a><span class="lineno"> 610</span>&#160;</div><div class="line"><a name="l00611"></a><span class="lineno"> 611</span>&#160; <span class="comment">// For each constant variable appearing in the model, we maintain a reference</span></div><div class="line"><a name="l00612"></a><span class="lineno"> 612</span>&#160; <span class="comment">// variable with the same constant value. If two variables end up having the</span></div><div class="line"><a name="l00613"></a><span class="lineno"> 613</span>&#160; <span class="comment">// same fixed value, then we can detect it using this and add a new</span></div><div class="line"><a name="l00614"></a><span class="lineno"> 614</span>&#160; <span class="comment">// equivalence relation. See ExploitFixedDomain().</span></div><div class="line"><a name="l00615"></a><span class="lineno"> 615</span>&#160; absl::flat_hash_map&lt;int64_t, SavedVariable&gt; constant_to_ref_;</div><div class="line"><a name="l00616"></a><span class="lineno"> 616</span>&#160;</div><div class="line"><a name="l00617"></a><span class="lineno"> 617</span>&#160; <span class="comment">// Contains variables with some encoded value: encoding_[i][v] points</span></div><div class="line"><a name="l00618"></a><span class="lineno"> 618</span>&#160; <span class="comment">// to the literal attached to the value v of the variable i.</span></div><div class="line"><a name="l00619"></a><span class="lineno"> 619</span>&#160; absl::flat_hash_map&lt;int, absl::flat_hash_map&lt;int64_t, SavedLiteral&gt;&gt;</div><div class="line"><a name="l00620"></a><span class="lineno"> 620</span>&#160; encoding_;</div><div class="line"><a name="l00621"></a><span class="lineno"> 621</span>&#160;</div><div class="line"><a name="l00622"></a><span class="lineno"> 622</span>&#160; <span class="comment">// Contains the currently collected half value encodings:</span></div><div class="line"><a name="l00623"></a><span class="lineno"> 623</span>&#160; <span class="comment">// i.e.: literal =&gt; var ==/!= value</span></div><div class="line"><a name="l00624"></a><span class="lineno"> 624</span>&#160; <span class="comment">// The state is accumulated (adding x =&gt; var == value then !x =&gt; var != value)</span></div><div class="line"><a name="l00625"></a><span class="lineno"> 625</span>&#160; <span class="comment">// will deduce that x equivalent to var == value.</span></div><div class="line"><a name="l00626"></a><span class="lineno"> 626</span>&#160; absl::flat_hash_map&lt;int,</div><div class="line"><a name="l00627"></a><span class="lineno"> 627</span>&#160; absl::flat_hash_map&lt;int64_t, absl::flat_hash_set&lt;int&gt;&gt;&gt;</div><div class="line"><a name="l00628"></a><span class="lineno"> 628</span>&#160; eq_half_encoding_;</div><div class="line"><a name="l00629"></a><span class="lineno"> 629</span>&#160; absl::flat_hash_map&lt;int,</div><div class="line"><a name="l00630"></a><span class="lineno"> 630</span>&#160; absl::flat_hash_map&lt;int64_t, absl::flat_hash_set&lt;int&gt;&gt;&gt;</div><div class="line"><a name="l00631"></a><span class="lineno"> 631</span>&#160; neq_half_encoding_;</div><div class="line"><a name="l00632"></a><span class="lineno"> 632</span>&#160;</div><div class="line"><a name="l00633"></a><span class="lineno"> 633</span>&#160; <span class="comment">// This regroups all the affine relations between variables. Note that the</span></div><div class="line"><a name="l00634"></a><span class="lineno"> 634</span>&#160; <span class="comment">// constraints used to detect such relations will not be removed from the</span></div><div class="line"><a name="l00635"></a><span class="lineno"> 635</span>&#160; <span class="comment">// model at detection time (thus allowing proper domain propagation). However,</span></div><div class="line"><a name="l00636"></a><span class="lineno"> 636</span>&#160; <span class="comment">// if the arity of a variable becomes one, then such constraint will be</span></div><div class="line"><a name="l00637"></a><span class="lineno"> 637</span>&#160; <span class="comment">// removed.</span></div><div class="line"><a name="l00638"></a><span class="lineno"> 638</span>&#160; <a class="code" href="classoperations__research_1_1_affine_relation.html">AffineRelation</a> affine_relations_;</div><div class="line"><a name="l00639"></a><span class="lineno"> 639</span>&#160; <a class="code" href="classoperations__research_1_1_affine_relation.html">AffineRelation</a> var_equiv_relations_;</div><div class="line"><a name="l00640"></a><span class="lineno"> 640</span>&#160;</div><div class="line"><a name="l00641"></a><span class="lineno"> 641</span>&#160; std::vector&lt;int&gt; tmp_new_usage_;</div><div class="line"><a name="l00642"></a><span class="lineno"> 642</span>&#160;</div><div class="line"><a name="l00643"></a><span class="lineno"> 643</span>&#160; <span class="comment">// Used by SetVariableAsRemoved() and VariableWasRemoved().</span></div><div class="line"><a name="l00644"></a><span class="lineno"> 644</span>&#160; absl::flat_hash_set&lt;int&gt; removed_variables_;</div><div class="line"><a name="l00645"></a><span class="lineno"> 645</span>&#160;</div><div class="line"><a name="l00646"></a><span class="lineno"> 646</span>&#160; <span class="comment">// Cache for the reified precedence literals created during the expansion of</span></div><div class="line"><a name="l00647"></a><span class="lineno"> 647</span>&#160; <span class="comment">// the reservoir constraint. This cache is only valid during the expansion</span></div><div class="line"><a name="l00648"></a><span class="lineno"> 648</span>&#160; <span class="comment">// phase, and is cleared afterwards.</span></div><div class="line"><a name="l00649"></a><span class="lineno"> 649</span>&#160; absl::flat_hash_map&lt;std::tuple&lt;int, int64_t, int, int64_t, int64_t, int, int&gt;,</div><div class="line"><a name="l00650"></a><span class="lineno"> 650</span>&#160; <span class="keywordtype">int</span>&gt;</div><div class="line"><a name="l00651"></a><span class="lineno"> 651</span>&#160; reified_precedences_cache_;</div><div class="line"><a name="l00652"></a><span class="lineno"> 652</span>&#160;</div><div class="line"><a name="l00653"></a><span class="lineno"> 653</span>&#160; <span class="comment">// Just used to display statistics on the presolve rules that were used.</span></div><div class="line"><a name="l00654"></a><span class="lineno"> 654</span>&#160; absl::flat_hash_map&lt;std::string, int&gt; stats_by_rule_name_;</div><div class="line"><a name="l00655"></a><span class="lineno"> 655</span>&#160;</div><div class="line"><a name="l00656"></a><span class="lineno"> 656</span>&#160; <span class="keywordtype">bool</span> model_is_expanded_ = <span class="keyword">false</span>;</div><div class="line"><a name="l00657"></a><span class="lineno"> 657</span>&#160;};</div><div class="line"><a name="l00658"></a><span class="lineno"> 658</span>&#160;</div><div class="line"><a name="l00659"></a><span class="lineno"> 659</span>&#160;<span class="comment">// Utility function to load the current problem into a in-memory representation</span></div><div class="line"><a name="l00660"></a><span class="lineno"> 660</span>&#160;<span class="comment">// that will be used for probing. Returns false if UNSAT.</span></div><div class="line"><a name="l00661"></a><span class="lineno"> 661</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="namespaceoperations__research_1_1sat.html#ac2ccdb02f35bbd7a53cc10a09210b200">LoadModelForProbing</a>(<a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html">PresolveContext</a>* <a class="code" href="gurobi__interface_8cc.html#a5f287b83a753915ae862fed64f8640a6">context</a>, <a class="code" href="classoperations__research_1_1sat_1_1_model.html">Model</a>* local_model);</div><div class="line"><a name="l00662"></a><span class="lineno"> 662</span>&#160;</div><div class="line"><a name="l00663"></a><span class="lineno"> 663</span>&#160;} <span class="comment">// namespace sat</span></div><div class="line"><a name="l00664"></a><span class="lineno"> 664</span>&#160;} <span class="comment">// namespace operations_research</span></div><div class="line"><a name="l00665"></a><span class="lineno"> 665</span>&#160;</div><div class="line"><a name="l00666"></a><span class="lineno"> 666</span>&#160;<span class="preprocessor">#endif // OR_TOOLS_SAT_PRESOLVE_CONTEXT_H_</span></div><div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a0106fb380cd3f9c642575e6318e95f07"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a0106fb380cd3f9c642575e6318e95f07">operations_research::sat::PresolveContext::CanonicalizeAffineVariable</a></div><div class="ttdeci">bool CanonicalizeAffineVariable(int ref, int64_t coeff, int64_t mod, int64_t rhs)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00798">presolve_context.cc:798</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_cp_model_proto_html_ad40b6ec6853d69d892b396a1e4de27d5"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_cp_model_proto.html#ad40b6ec6853d69d892b396a1e4de27d5">operations_research::sat::CpModelProto::assumptions</a></div><div class="ttdeci">int32_t assumptions(int index) const</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8pb_8h_source.html#l12624">cp_model.pb.h:12624</a></div></div>
<div class="ttc" id="classoperations__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#l00032">presolve_context.cc:32</a></div></div>
<div class="ttc" id="classoperations__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#l00115">presolve_context.cc:115</a></div></div>
<div class="ttc" id="classoperations__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#l00106">time_limit.h:106</a></div></div>
<div class="ttc" id="classoperations__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#l00528">presolve_context.h:528</a></div></div>
<div class="ttc" id="classoperations__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#l01152">presolve_context.cc:1152</a></div></div>
<div class="ttc" id="classoperations__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#l00323">presolve_context.cc:323</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a307dddcaccf0a7efca0143d0cdf0cacd"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a307dddcaccf0a7efca0143d0cdf0cacd">operations_research::sat::PresolveContext::StoreBooleanEqualityRelation</a></div><div class="ttdeci">bool StoreBooleanEqualityRelation(int ref_a, int ref_b)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01032">presolve_context.cc:1032</a></div></div>
<div class="ttc" id="classoperations__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#l00201">presolve_context.h:201</a></div></div>
<div class="ttc" id="classoperations__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#l00470">presolve_context.h:470</a></div></div>
<div class="ttc" id="classoperations__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#l01488">presolve_context.cc:1488</a></div></div>
<div class="ttc" id="util_2logging_8h_html_a5f67b653dd99ddbe5e3367e3b4b7b532"><div class="ttname"><a href="util_2logging_8h.html#a5f67b653dd99ddbe5e3367e3b4b7b532">SOLVER_LOG</a></div><div class="ttdeci">#define SOLVER_LOG(logger,...)</div><div class="ttdef"><b>Definition:</b> <a href="util_2logging_8h_source.html#l00069">util/logging.h:69</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_ad02c7812cfbc2a8c4c05d955c9681259"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ad02c7812cfbc2a8c4c05d955c9681259">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#l00497">presolve_context.h:497</a></div></div>
<div class="ttc" id="classoperations__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#l00740">presolve_context.cc:740</a></div></div>
<div class="ttc" id="classoperations__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#l00575">presolve_context.cc:575</a></div></div>
<div class="ttc" id="classoperations__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#l00594">presolve_context.cc:594</a></div></div>
<div class="ttc" id="classoperations__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#l00534">presolve_context.h:534</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a0704cc50211ab739309aa9f54aa8c606"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a0704cc50211ab739309aa9f54aa8c606">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#l00496">presolve_context.h:496</a></div></div>
<div class="ttc" id="classoperations__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#l00507">presolve_context.cc:507</a></div></div>
<div class="ttc" id="classoperations__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="classoperations__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#l01677">presolve_context.cc:1677</a></div></div>
<div class="ttc" id="classoperations__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#l01361">presolve_context.cc:1361</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_acf72cafd3dab9ac4b5e5b1a3aaa75192"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#acf72cafd3dab9ac4b5e5b1a3aaa75192">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#l00441">presolve_context.h:441</a></div></div>
<div class="ttc" id="classoperations__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#l00497">presolve_context.cc:497</a></div></div>
<div class="ttc" id="classoperations__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#l00051">presolve_context.cc:51</a></div></div>
<div class="ttc" id="classoperations__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#l01168">presolve_context.cc:1168</a></div></div>
<div class="ttc" id="classoperations__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#l00261">presolve_context.cc:261</a></div></div>
<div class="ttc" id="namespaceoperations__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#l00041">presolve_context.h:41</a></div></div>
<div class="ttc" id="sat_2model_8h_html"><div class="ttname"><a href="sat_2model_8h.html">model.h</a></div></div>
<div class="ttc" id="classoperations__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#l00485">presolve_context.cc:485</a></div></div>
<div class="ttc" id="classoperations__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#l01070">presolve_context.cc:1070</a></div></div>
<div class="ttc" id="classoperations__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="default__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="classoperations__research_1_1sat_1_1_presolve_context_html_a31d9b7763fd739fe805438b464096c32"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a31d9b7763fd739fe805438b464096c32">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#l00418">presolve_context.h:418</a></div></div>
<div class="ttc" id="classoperations__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="classoperations__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#l01140">presolve_context.cc:1140</a></div></div>
<div class="ttc" id="namespaceoperations__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#l00040">presolve_context.h:40</a></div></div>
<div class="ttc" id="classoperations__research_1_1_sparse_bitset_html"><div class="ttname"><a href="classoperations__research_1_1_sparse_bitset.html">operations_research::SparseBitset&lt; int64_t &gt;</a></div></div>
<div class="ttc" id="namespaceoperations__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="time__limit_8h_html"><div class="ttname"><a href="time__limit_8h.html">time_limit.h</a></div></div>
<div class="ttc" id="classoperations__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#l00049">presolve_context.cc:49</a></div></div>
<div class="ttc" id="classoperations__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#l00350">presolve_context.cc:350</a></div></div>
<div class="ttc" id="classoperations__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#l00518">presolve_context.h:518</a></div></div>
<div class="ttc" id="classoperations__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#l01145">presolve_context.cc:1145</a></div></div>
<div class="ttc" id="gurobi__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#l00274">gurobi_interface.cc:274</a></div></div>
<div class="ttc" id="classoperations__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#l01055">presolve_context.cc:1055</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a8851194fe8ce04aab258d31f06c472e2"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a8851194fe8ce04aab258d31f06c472e2">operations_research::sat::PresolveContext::FixedValue</a></div><div class="ttdeci">int64_t FixedValue(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00127">presolve_context.cc:127</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a6dbf60b03175ebeb45b650fb76b53dbc"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a6dbf60b03175ebeb45b650fb76b53dbc">operations_research::sat::PresolveContext::WriteVariableDomainsToProto</a></div><div class="ttdeci">void WriteVariableDomainsToProto() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01869">presolve_context.cc:1869</a></div></div>
<div class="ttc" id="classoperations__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#l00192">presolve_context.cc:192</a></div></div>
<div class="ttc" id="classoperations__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#l00273">presolve_context.cc:273</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a4d724b2f4bd1d1cab7b11dafd3448d8b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a4d724b2f4bd1d1cab7b11dafd3448d8b">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#l00437">presolve_context.h:437</a></div></div>
<div class="ttc" id="classoperations__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#l00186">presolve_context.cc:186</a></div></div>
<div class="ttc" id="classoperations__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#l00511">presolve_context.h:511</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_ac43d47cf9df6d6e9c8e8ffb7fc01c138"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ac43d47cf9df6d6e9c8e8ffb7fc01c138">operations_research::sat::PresolveContext::StoreAffineRelation</a></div><div class="ttdeci">bool StoreAffineRelation(int ref_x, int ref_y, int64_t coeff, int64_t offset, bool debug_no_recursion=false)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00858">presolve_context.cc:858</a></div></div>
<div class="ttc" id="classoperations__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#l00060">presolve_context.h:60</a></div></div>
<div class="ttc" id="classoperations__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="classoperations__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#l00380">presolve_context.cc:380</a></div></div>
<div class="ttc" id="util_2logging_8h_html"><div class="ttname"><a href="util_2logging_8h.html">logging.h</a></div></div>
<div class="ttc" id="classoperations__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#l00525">presolve_context.h:525</a></div></div>
<div class="ttc" id="classoperations__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#l00541">presolve_context.cc:541</a></div></div>
<div class="ttc" id="classoperations__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#l00510">presolve_context.h:510</a></div></div>
<div class="ttc" id="constraint__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="classoperations__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#l00422">presolve_context.h:422</a></div></div>
<div class="ttc" id="classoperations__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#l00687">presolve_context.cc:687</a></div></div>
<div class="ttc" id="classoperations__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#l00092">presolve_context.cc:92</a></div></div>
<div class="ttc" id="classoperations__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#l00063">presolve_context.h:63</a></div></div>
<div class="ttc" id="classoperations__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#l00445">presolve_context.h:445</a></div></div>
<div class="ttc" id="classoperations__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#l00475">presolve_context.cc:475</a></div></div>
<div class="ttc" id="classoperations__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#l00389">presolve_context.cc:389</a></div></div>
<div class="ttc" id="classoperations__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="classoperations__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#l01979">presolve_context.cc:1979</a></div></div>
<div class="ttc" id="classoperations__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#l00042">presolve_context.cc:42</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_aaabb604ccac4a6136be93bfe64e2290d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aaabb604ccac4a6136be93bfe64e2290d">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#l00495">presolve_context.h:495</a></div></div>
<div class="ttc" id="namespaceoperations__research_1_1sat_html_ac2ccdb02f35bbd7a53cc10a09210b200"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#ac2ccdb02f35bbd7a53cc10a09210b200">operations_research::sat::LoadModelForProbing</a></div><div class="ttdeci">bool LoadModelForProbing(PresolveContext *context, Model *local_model)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01996">presolve_context.cc:1996</a></div></div>
<div class="ttc" id="classoperations__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#l01368">presolve_context.cc:1368</a></div></div>
<div class="ttc" id="classoperations__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#l00313">presolve_context.cc:313</a></div></div>
<div class="ttc" id="classoperations__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#l00279">presolve_context.cc:279</a></div></div>
<div class="ttc" id="classoperations__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#l03772">cp_model.pb.h:3772</a></div></div>
<div class="ttc" id="affine__relation_8h_html"><div class="ttname"><a href="affine__relation_8h.html">affine_relation.h</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a36a3dfcbe2bf048497070296b91ed97d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a36a3dfcbe2bf048497070296b91ed97d">operations_research::sat::PresolveContext::ExpressionIsSingleVariable</a></div><div class="ttdeci">bool ExpressionIsSingleVariable(const LinearExpressionProto &amp;expr) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00198">presolve_context.cc:198</a></div></div>
<div class="ttc" id="classoperations__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#l00291">presolve_context.cc:291</a></div></div>
<div class="ttc" id="classoperations__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#l00051">presolve_context.h:51</a></div></div>
<div class="ttc" id="classoperations__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#l00040">presolve_context.cc:40</a></div></div>
<div class="ttc" id="classoperations__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#l00362">presolve_context.cc:362</a></div></div>
<div class="ttc" id="classoperations__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#l01975">presolve_context.cc:1975</a></div></div>
<div class="ttc" id="classoperations__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#l00121">presolve_context.cc:121</a></div></div>
<div class="ttc" id="classoperations__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#l00460">presolve_context.h:460</a></div></div>
<div class="ttc" id="classoperations__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#l01843">presolve_context.cc:1843</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a8d58acb908ccc68472fe1a162957086a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a8d58acb908ccc68472fe1a162957086a">operations_research::sat::PresolveContext::GetReifiedPrecedenceKey</a></div><div class="ttdeci">std::tuple&lt; int, int64_t, int, int64_t, int64_t, int, int &gt; GetReifiedPrecedenceKey(const LinearExpressionProto &amp;time_i, const LinearExpressionProto &amp;time_j, int active_i, int active_j)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01956">presolve_context.cc:1956</a></div></div>
<div class="ttc" id="classoperations__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#l06111">cp_model.pb.h:6111</a></div></div>
<div class="ttc" id="classoperations__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#l00709">presolve_context.cc:709</a></div></div>
<div class="ttc" id="structoperations__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="sorted__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="classoperations__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#l01688">presolve_context.cc:1688</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a46a91d63a8cc54d2d4d7660022eb1c87"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a46a91d63a8cc54d2d4d7660022eb1c87">operations_research::sat::PresolveContext::ScaleFloatingPointObjective</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool ScaleFloatingPointObjective()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00779">presolve_context.cc:779</a></div></div>
<div class="ttc" id="cp__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="classoperations__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#l00090">sat/util.h:90</a></div></div>
<div class="ttc" id="classoperations__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#l00355">presolve_context.cc:355</a></div></div>
<div class="ttc" id="classoperations__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#l00507">presolve_context.h:507</a></div></div>
<div class="ttc" id="classoperations__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#l00082">presolve_context.cc:82</a></div></div>
<div class="ttc" id="classoperations__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#l00416">presolve_context.cc:416</a></div></div>
<div class="ttc" id="trace_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="classoperations__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#l00531">presolve_context.h:531</a></div></div>
<div class="ttc" id="classoperations__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#l00341">presolve_context.cc:341</a></div></div>
<div class="ttc" id="classoperations__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#l00193">presolve_context.h:193</a></div></div>
<div class="ttc" id="classoperations__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#l01695">presolve_context.cc:1695</a></div></div>
<div class="ttc" id="classoperations__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#l00469">presolve_context.h:469</a></div></div>
<div class="ttc" id="sat__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="classoperations__research_1_1sat_1_1_presolve_context_html_a3269ba23127e4ee02e1ab7eecccb620f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a3269ba23127e4ee02e1ab7eecccb620f">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#l00494">presolve_context.h:494</a></div></div>
<div class="ttc" id="classoperations__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#l00399">presolve_context.cc:399</a></div></div>
<div class="ttc" id="sat_2util_8h_html"><div class="ttname"><a href="sat_2util_8h.html">util.h</a></div></div>
<div class="ttc" id="base_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#l00889">base/logging.h:889</a></div></div>
<div class="ttc" id="classoperations__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#l00097">presolve_context.cc:97</a></div></div>
<div class="ttc" id="classoperations__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="classoperations__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#l00062">presolve_context.h:62</a></div></div>
<div class="ttc" id="classoperations__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#l00036">presolve_context.cc:36</a></div></div>
<div class="ttc" id="classoperations__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#l00063">presolve_context.cc:63</a></div></div>
<div class="ttc" id="classoperations__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#l00579">presolve_context.cc:579</a></div></div>
<div class="ttc" id="classoperations__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#l00267">presolve_context.cc:267</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a0d7555344bad8a6d860796d76df34c31"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a0d7555344bad8a6d860796d76df34c31">operations_research::sat::PresolveContext::VariableWithCostIsUnique</a></div><div class="ttdeci">bool VariableWithCostIsUnique(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00329">presolve_context.cc:329</a></div></div>
<div class="ttc" id="classoperations__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#l00176">presolve_context.cc:176</a></div></div>
<div class="ttc" id="classoperations__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#l00072">presolve_context.h:72</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a058746ebd0b438afbdd49eb5bd290d8f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a058746ebd0b438afbdd49eb5bd290d8f">operations_research::sat::PresolveContext::IsFullyEncoded</a></div><div class="ttdeci">bool IsFullyEncoded(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01383">presolve_context.cc:1383</a></div></div>
<div class="ttc" id="classoperations__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#l00608">cp_model.pb.h:608</a></div></div>
<div class="ttc" id="classoperations__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#l00537">presolve_context.h:537</a></div></div>
<div class="ttc" id="classoperations__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#l00508">presolve_context.h:508</a></div></div>
<div class="ttc" id="classoperations__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#l01344">presolve_context.cc:1344</a></div></div>
<div class="ttc" id="cp__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="classoperations__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#l00145">presolve_context.h:145</a></div></div>
<div class="ttc" id="classoperations__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#l00529">presolve_context.h:529</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a7b54dd25e40790d8161c7e7b5ba64242"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a7b54dd25e40790d8161c7e7b5ba64242">operations_research::sat::PresolveContext::CanonicalizeVariable</a></div><div class="ttdeci">void CanonicalizeVariable(int ref)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00768">presolve_context.cc:768</a></div></div>
<div class="ttc" id="presolve__util_8h_html"><div class="ttname"><a href="presolve__util_8h.html">presolve_util.h</a></div></div>
<div class="ttc" id="classoperations__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#l00070">presolve_context.cc:70</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a0481547ad6462a8cb545e2533bff1dc3"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a0481547ad6462a8cb545e2533bff1dc3">operations_research::sat::PresolveContext::ExpressionIsALiteral</a></div><div class="ttdeci">bool ExpressionIsALiteral(const LinearExpressionProto &amp;expr, int *literal=nullptr) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00203">presolve_context.cc:203</a></div></div>
<div class="ttc" id="classoperations__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#l01118">presolve_context.cc:1118</a></div></div>
<div class="ttc" id="classoperations__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#l01354">presolve_context.cc:1354</a></div></div>
<div class="ttc" id="namespaceoperations__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="classoperations__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#l00086">presolve_context.cc:86</a></div></div>
<div class="ttc" id="classoperations__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#l00285">presolve_context.cc:285</a></div></div>
<div class="ttc" id="classoperations__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#l01791">presolve_context.cc:1791</a></div></div>
<div class="ttc" id="classoperations__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#l00226">presolve_context.cc:226</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a2ff0654486b944d24ec212846d9ea4c1"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a2ff0654486b944d24ec212846d9ea4c1">operations_research::sat::PresolveContext::CanonicalizeObjective</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool CanonicalizeObjective(bool simplify_domain=true)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01542">presolve_context.cc:1542</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a66fc178adf4c7e56b3a6f1a5e052d3e5"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a66fc178adf4c7e56b3a6f1a5e052d3e5">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#l00419">presolve_context.h:419</a></div></div>
<div class="ttc" id="classoperations__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#l00052">presolve_context.h:52</a></div></div>
<div class="ttc" id="classoperations__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#l00731">presolve_context.cc:731</a></div></div>
<div class="ttc" id="classoperations__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#l00530">presolve_context.h:530</a></div></div>
<div class="ttc" id="classoperations__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#l00235">presolve_context.cc:235</a></div></div>
<div class="ttc" id="namespaceoperations__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#l00039">presolve_context.h:39</a></div></div>
<div class="ttc" id="expr__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="bitset_8h_html"><div class="ttname"><a href="bitset_8h.html">bitset.h</a></div></div>
<div class="ttc" id="classoperations__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#l00106">presolve_context.cc:106</a></div></div>
<div class="ttc" id="classoperations__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#l00481">presolve_context.cc:481</a></div></div>
<div class="ttc" id="classoperations__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#l01397">presolve_context.cc:1397</a></div></div>
<div class="ttc" id="classoperations__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#l01672">presolve_context.cc:1672</a></div></div>
<div class="ttc" id="classoperations__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#l00285">presolve_context.h:285</a></div></div>
<div class="ttc" id="gurobi__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#l00514">gurobi_interface.cc:514</a></div></div>
<div class="ttc" id="classoperations__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#l00284">presolve_context.h:284</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a3bb6775f0bab3c01b35622e3ce68ab1d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a3bb6775f0bab3c01b35622e3ce68ab1d">operations_research::sat::PresolveContext::GetOrCreateAffineValueEncoding</a></div><div class="ttdeci">int GetOrCreateAffineValueEncoding(const LinearExpressionProto &amp;expr, int64_t value)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01469">presolve_context.cc:1469</a></div></div>
<div class="ttc" id="classoperations__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:347</a></div></div>
<div class="ttc" id="classoperations__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#l00074">presolve_context.h:74</a></div></div>
<div class="ttc" id="classoperations__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#l00049">presolve_context.h:49</a></div></div>
<div class="ttc" id="demon__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="optimization_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="classoperations__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#l01128">presolve_context.cc:1128</a></div></div>
<div class="ttc" id="demon__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="classoperations__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#l01089">presolve_context.cc:1089</a></div></div>
<div class="ttc" id="classoperations__research_1_1sat_1_1_presolve_context_html_a2b7f0524381be1a7b01b5f707b98cb9a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a2b7f0524381be1a7b01b5f707b98cb9a">operations_research::sat::PresolveContext::GetOrCreateReifiedPrecedenceLiteral</a></div><div class="ttdeci">int GetOrCreateReifiedPrecedenceLiteral(const LinearExpressionProto &amp;time_i, const LinearExpressionProto &amp;time_j, int active_i, int active_j)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01875">presolve_context.cc:1875</a></div></div>
<div class="ttc" id="constraint__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><!-- 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.8.15 </li>
</ul>
</div>
</body>
</html>