768 lines
169 KiB
HTML
768 lines
169 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.20"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>OR-Tools: presolve_context.h Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="styleSheet.tmp.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><img alt="Logo" src="orLogo.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">OR-Tools
|
|
 <span id="projectnumber">8.1</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.20 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&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&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&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(function(){initNavTree('presolve__context_8h_source.html',''); initResizable(); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">presolve_context.h</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="presolve__context_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Copyright 2010-2018 Google LLC</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// you may not use this file except in compliance with the License.</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">// You may obtain a copy of the License at</span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// See the License for the specific language governing permissions and</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment">// limitations under the License.</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  </div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#ifndef OR_TOOLS_SAT_PRESOLVE_CONTEXT_H_</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#define OR_TOOLS_SAT_PRESOLVE_CONTEXT_H_</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  </div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include <deque></span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include <vector></span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  </div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "<a class="code" href="cp__model_8pb_8h.html">ortools/sat/cp_model.pb.h</a>"</span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "<a class="code" href="cp__model__utils_8h.html">ortools/sat/cp_model_utils.h</a>"</span></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include "<a class="code" href="sat_2model_8h.html">ortools/sat/model.h</a>"</span></div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include "<a class="code" href="presolve__util_8h.html">ortools/sat/presolve_util.h</a>"</span></div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include "<a class="code" href="sat__parameters_8pb_8h.html">ortools/sat/sat_parameters.pb.h</a>"</span></div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include "<a class="code" href="sat_2util_8h.html">ortools/sat/util.h</a>"</span></div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include "<a class="code" href="affine__relation_8h.html">ortools/util/affine_relation.h</a>"</span></div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include "<a class="code" href="bitset_8h.html">ortools/util/bitset.h</a>"</span></div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include "<a class="code" href="sorted__interval__list_8h.html">ortools/util/sorted_interval_list.h</a>"</span></div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="time__limit_8h.html">ortools/util/time_limit.h</a>"</span></div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  </div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">namespace </span><a class="code" href="namespaceoperations__research.html">operations_research</a> {</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">namespace </span>sat {</div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  </div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment">// We use some special constraint index in our variable <-> constraint graph.</span></div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#aca25bc3ffa54b3f2668c6eeddffd8d1d"> 35</a></span> 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="l00036"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#a55963ffe87280b37dce97b9a8cbd03ae"> 36</a></span> 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="l00037"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#abe4ecb2ef8f498b18a55fbcbbf54e550"> 37</a></span> 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="l00038"></a><span class="lineno"> 38</span>  </div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <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="l00040"></a><span class="lineno"> 40</span>  </div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="comment">// When storing a reference to a literal, it is important not to forget when</span></div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="comment">// reading it back to take its representative. Otherwise, we might introduce</span></div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment">// literal that have already been removed, which will break invariants in a</span></div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment">// bunch of places.</span></div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_literal.html"> 45</a></span> <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="l00046"></a><span class="lineno"> 46</span>  <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_literal.html#a24f5a711e542ac97673337e549a74e7c"> 47</a></span>  <a class="code" href="classoperations__research_1_1sat_1_1_saved_literal.html#a24f5a711e542ac97673337e549a74e7c">SavedLiteral</a>() {}</div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_literal.html#ad134f35430fd7787cea20a3714c123e0"> 48</a></span>  <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="l00049"></a><span class="lineno"> 49</span>  <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="l00050"></a><span class="lineno"> 50</span>  </div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keywordtype">int</span> ref_ = 0;</div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> };</div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  </div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment">// Same as SavedLiteral for variable.</span></div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_variable.html"> 56</a></span> <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="l00057"></a><span class="lineno"> 57</span>  <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_variable.html#aea29b5bb569ea104749893b9f321697c"> 58</a></span>  <a class="code" href="classoperations__research_1_1sat_1_1_saved_variable.html#aea29b5bb569ea104749893b9f321697c">SavedVariable</a>() {}</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_saved_variable.html#abbc9b5ccc44af7db8e8a5703dce41b7d"> 59</a></span>  <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="l00060"></a><span class="lineno"> 60</span>  <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="l00061"></a><span class="lineno"> 61</span>  </div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordtype">int</span> ref_ = 0;</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> };</div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  </div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="comment">// Wrap the CpModelProto we are presolving with extra data structure like the</span></div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// in-memory domain of each variables and the constraint variable graph.</span></div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html"> 68</a></span> <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="l00069"></a><span class="lineno"> 69</span>  <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#aa4772b0766a8dffc56f18e69cf704a25"> 70</a></span>  <span class="keyword">explicit</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#aa4772b0766a8dffc56f18e69cf704a25">PresolveContext</a>(<span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a238f4904cf327109443ec992981355ff">log_info</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>, CpModelProto* cp_model,</div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  CpModelProto* mapping)</div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  : <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="l00073"></a><span class="lineno"> 73</span>  <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4b3b9ef9c5f214dd4427daa2646eceda">mapping_model</a>(mapping),</div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  log_info_(<a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a238f4904cf327109443ec992981355ff">log_info</a>),</div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  params_(*<a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>->GetOrCreate<SatParameters>()),</div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  time_limit_(<a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>->GetOrCreate<<a class="code" href="classoperations__research_1_1_time_limit.html">TimeLimit</a>>()),</div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  random_(<a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>->GetOrCreate<<a class="code" href="classoperations__research_1_1sat_1_1_model_random_generator.html">ModelRandomGenerator</a>>()) {}</div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  </div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="comment">// Helpers to adds new variables to the presolved model.</span></div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <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>& domain);</div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <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="l00082"></a><span class="lineno"> 82</span>  <span class="keywordtype">int</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a98bc002ea916e55fddfa4740f373ac22">GetOrCreateConstantVar</a>(<a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> cst);</div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  </div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="comment">// a => b.</span></div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <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#af730895c6c6ef6e03caaf6251192dfd2">a</a>, <span class="keywordtype">int</span> <a class="code" href="constraint__solver_2table_8cc.html#a344010e26426d6a13411648d988bc9b6">b</a>);</div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  </div>
|
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="comment">// b => x in [lb, ub].</span></div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <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#a344010e26426d6a13411648d988bc9b6">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>& domain);</div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  </div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="comment">// Helpers to query the current domain of a variable.</span></div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <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="l00092"></a><span class="lineno"> 92</span>  <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="l00093"></a><span class="lineno"> 93</span>  <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="l00094"></a><span class="lineno"> 94</span>  <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="l00095"></a><span class="lineno"> 95</span>  <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="l00096"></a><span class="lineno"> 96</span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#ad9ef96aefec987eddaf785de53059740">MinOf</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a44425dd2b07f30c04f03e410de301aec">MaxOf</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>  <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a317c6b2e0028a326f3bc7eec22073de7">DomainContains</a>(<span class="keywordtype">int</span> ref, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a>) <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <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="l00100"></a><span class="lineno"> 100</span>  </div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="comment">// Helpers to query the current domain of a linear expression.</span></div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="comment">// This doesn't check for integer overflow, but our linear expression</span></div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="comment">// should be such that this cannot happen (tested at validation).</span></div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#ad9ef96aefec987eddaf785de53059740">MinOf</a>(<span class="keyword">const</span> LinearExpressionProto& expr) <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a44425dd2b07f30c04f03e410de301aec">MaxOf</a>(<span class="keyword">const</span> LinearExpressionProto& expr) <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  </div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="comment">// This function takes a positive variable reference.</span></div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a33f90dcf20e1ce9197e60eb3bed25974"> 108</a></span>  <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>& domain) {</div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <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="l00110"></a><span class="lineno"> 110</span>  }</div>
|
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  </div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="comment">// Returns true if this ref only appear in one constraint.</span></div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <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="l00114"></a><span class="lineno"> 114</span>  </div>
|
|
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="comment">// Returns true if this ref no longer appears in the model.</span></div>
|
|
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <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="l00117"></a><span class="lineno"> 117</span>  </div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="comment">// Functions to make sure that once we remove a variable, we no longer reuse</span></div>
|
|
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="comment">// it.</span></div>
|
|
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <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="l00121"></a><span class="lineno"> 121</span>  <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="l00122"></a><span class="lineno"> 122</span>  </div>
|
|
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="comment">// Same as VariableIsUniqueAndRemovable() except that in this case the</span></div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="comment">// variable also appear in the objective in addition to a single constraint.</span></div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <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="l00126"></a><span class="lineno"> 126</span>  </div>
|
|
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="comment">// Returns true if an integer variable is only appearing in the rhs of</span></div>
|
|
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="comment">// constraints of the form lit => var in domain. When this is the case, then</span></div>
|
|
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="comment">// we can usually remove this variable and replace these constraints with</span></div>
|
|
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="comment">// the proper constraints on the enforcement literals.</span></div>
|
|
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a1f14cd478667f1b005ee54215a07565e">VariableIsOnlyUsedInEncoding</a>(<span class="keywordtype">int</span> ref) <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  </div>
|
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="comment">// Returns false if the new domain is empty. Sets 'domain_modified' (if</span></div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="comment">// provided) to true iff the domain is modified otherwise does not change it.</span></div>
|
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  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="l00136"></a><span class="lineno"> 136</span>  <span class="keywordtype">int</span> ref, <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1_domain.html">Domain</a>& domain, <span class="keywordtype">bool</span>* domain_modified = <span class="keyword">nullptr</span>);</div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  </div>
|
|
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="comment">// Returns false if the 'lit' doesn't have the desired value in the domain.</span></div>
|
|
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  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="l00140"></a><span class="lineno"> 140</span>  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="l00141"></a><span class="lineno"> 141</span>  </div>
|
|
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="comment">// This function always return false. It is just a way to make a little bit</span></div>
|
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="comment">// more sure that we abort right away when infeasibility is detected.</span></div>
|
|
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5aa53538ba8adaa0bea1c3c0727425b0"> 144</a></span>  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="l00145"></a><span class="lineno"> 145</span>  <span class="keyword">const</span> std::string& <a class="code" href="trace_8cc.html#a36bd74109f547f7f8198faf5a12d2879">message</a> = <span class="stringliteral">""</span>) {</div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="comment">// TODO(user): Report any explanation for the client in a nicer way?</span></div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <a class="code" href="base_2logging_8h.html#afcaa7cadd41741bb855c2ada1d2ef927">VLOG</a>(1) << <span class="stringliteral">"INFEASIBLE: "</span> << <a class="code" href="trace_8cc.html#a36bd74109f547f7f8198faf5a12d2879">message</a>;</div>
|
|
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <a class="code" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(!is_unsat);</div>
|
|
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  is_unsat = <span class="keyword">true</span>;</div>
|
|
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  }</div>
|
|
<div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a1cd25a05e3e88efc9ffe50461fb21d63"> 152</a></span>  <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="l00153"></a><span class="lineno"> 153</span>  </div>
|
|
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="comment">// Stores a description of a rule that was just applied to have a summary of</span></div>
|
|
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="comment">// what the presolve did at the end.</span></div>
|
|
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <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& <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="l00157"></a><span class="lineno"> 157</span>  </div>
|
|
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="comment">// Updates the constraints <-> variables graph. This needs to be called each</span></div>
|
|
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="comment">// time a constraint is modified.</span></div>
|
|
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <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="l00161"></a><span class="lineno"> 161</span>  </div>
|
|
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="comment">// At the beginning of the presolve, we delay the costly creation of this</span></div>
|
|
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="comment">// "graph" until we at least ran some basic presolve. This is because during</span></div>
|
|
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="comment">// a LNS neighbhorhood, many constraints will be reduced significantly by</span></div>
|
|
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="comment">// this "simple" presolve.</span></div>
|
|
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <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="l00167"></a><span class="lineno"> 167</span>  </div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="comment">// Calls UpdateConstraintVariableUsage() on all newly created constraints.</span></div>
|
|
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <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="l00170"></a><span class="lineno"> 170</span>  </div>
|
|
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="comment">// Returns true if our current constraints <-> variables graph is ok.</span></div>
|
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="comment">// This is meant to be used in DEBUG mode only.</span></div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <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="l00174"></a><span class="lineno"> 174</span>  </div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="comment">// Regroups fixed variables with the same value.</span></div>
|
|
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="comment">// TODO(user): Also regroup cte and -cte?</span></div>
|
|
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <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="l00178"></a><span class="lineno"> 178</span>  </div>
|
|
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="comment">// Adds the relation (ref_x = coeff * ref_y + offset) to the repository.</span></div>
|
|
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="comment">// Once the relation is added, it doesn't need to be enforced by a constraint</span></div>
|
|
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="comment">// in the model proto, since we will propagate such relation directly and add</span></div>
|
|
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="comment">// them to the proto at the end of the presolve.</span></div>
|
|
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="comment">// Returns true if the relation was added.</span></div>
|
|
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="comment">// In some rare case, like if x = 3*z and y = 5*t are already added, we</span></div>
|
|
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="comment">// currently cannot add x = 2 * y and we will return false in these case. So</span></div>
|
|
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <span class="comment">// when this returns false, the relation needs to be enforced by a separate</span></div>
|
|
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="comment">// constraint.</span></div>
|
|
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="comment">// If the relation was added, both variables will be marked to appear in the</span></div>
|
|
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="comment">// special kAffineRelationConstraint. This will allow to identify when a</span></div>
|
|
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="comment">// variable is no longer needed (only appear there and is not a</span></div>
|
|
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <span class="comment">// representative).</span></div>
|
|
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#afad3c5370d5ef3338d7a5455198e6364">StoreAffineRelation</a>(<span class="keywordtype">int</span> ref_x, <span class="keywordtype">int</span> ref_y, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> coeff, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> offset);</div>
|
|
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  </div>
|
|
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="comment">// Adds the fact that ref_a == ref_b using StoreAffineRelation() above.</span></div>
|
|
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="comment">// This should never fail, so the relation will always be added.</span></div>
|
|
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a8fc1d49d1e1bf7261f15ccc6c23c4b10">StoreBooleanEqualityRelation</a>(<span class="keywordtype">int</span> ref_a, <span class="keywordtype">int</span> ref_b);</div>
|
|
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  </div>
|
|
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="comment">// Stores/Get the relation target_ref = abs(ref); The first function returns</span></div>
|
|
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="comment">// false if it already exist and the second false if it is not present.</span></div>
|
|
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <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="l00203"></a><span class="lineno"> 203</span>  <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="l00204"></a><span class="lineno"> 204</span>  </div>
|
|
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="comment">// Returns the representative of a literal.</span></div>
|
|
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <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="l00207"></a><span class="lineno"> 207</span>  </div>
|
|
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="comment">// Returns another reference with exactly the same value.</span></div>
|
|
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <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="l00210"></a><span class="lineno"> 210</span>  </div>
|
|
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="comment">// Used for statistics.</span></div>
|
|
<div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#abd6f7af5d9b31061a7b03ec44488ea4c"> 212</a></span>  <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="l00213"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#acb73a5ab7e240d5f93938262f2d8b826"> 213</a></span>  <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="l00214"></a><span class="lineno"> 214</span>  </div>
|
|
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="comment">// This makes sure that the affine relation only uses one of the</span></div>
|
|
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="comment">// representative from the var_equiv_relations.</span></div>
|
|
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <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="l00218"></a><span class="lineno"> 218</span>  </div>
|
|
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="comment">// To facilitate debugging.</span></div>
|
|
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  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="l00221"></a><span class="lineno"> 221</span>  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="l00222"></a><span class="lineno"> 222</span>  </div>
|
|
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <span class="comment">// Makes sure the domain of ref and of its representative are in sync.</span></div>
|
|
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="comment">// Returns false on unsat.</span></div>
|
|
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <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="l00226"></a><span class="lineno"> 226</span>  </div>
|
|
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="comment">// Creates the internal structure for any new variables in working_model.</span></div>
|
|
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <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="l00229"></a><span class="lineno"> 229</span>  </div>
|
|
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="comment">// Clears the "rules" statistics.</span></div>
|
|
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <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="l00232"></a><span class="lineno"> 232</span>  </div>
|
|
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <span class="comment">// Inserts the given literal to encode ref == value.</span></div>
|
|
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="comment">// If an encoding already exists, it adds the two implications between</span></div>
|
|
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="comment">// the previous encoding and the new encoding.</span></div>
|
|
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="comment">// Important: This does not update the constraint<->variable graph, so</span></div>
|
|
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="comment">// ConstraintVariableGraphIsUpToDate() will be false until</span></div>
|
|
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="comment">// UpdateNewConstraintsVariableUsage() is called.</span></div>
|
|
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a22b3d2a2f17c55ceb35a363c5225e9c0">InsertVarValueEncoding</a>(<span class="keywordtype">int</span> <a class="code" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>, <span class="keywordtype">int</span> ref, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a>);</div>
|
|
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  </div>
|
|
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <span class="comment">// Gets the associated literal if it is already created. Otherwise</span></div>
|
|
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  <span class="comment">// create it, add the corresponding constraints and returns it.</span></div>
|
|
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <span class="comment">// Important: This does not update the constraint<->variable graph, so</span></div>
|
|
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <span class="comment">// ConstraintVariableGraphIsUpToDate() will be false until</span></div>
|
|
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="comment">// UpdateNewConstraintsVariableUsage() is called.</span></div>
|
|
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <span class="keywordtype">int</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a2d3663d98d826c7d782de9cda7b42344">GetOrCreateVarValueEncoding</a>(<span class="keywordtype">int</span> ref, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a>);</div>
|
|
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  </div>
|
|
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  <span class="comment">// If not already done, adds a Boolean to represent any integer variables that</span></div>
|
|
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <span class="comment">// take only two values. Make sure all the relevant affine and encoding</span></div>
|
|
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="comment">// relations are updated.</span></div>
|
|
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="comment">// Note that this might create a new Boolean variable.</span></div>
|
|
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <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="l00256"></a><span class="lineno"> 256</span>  </div>
|
|
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="comment">// Returns true if a literal attached to ref == var exists.</span></div>
|
|
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <span class="comment">// It assigns the corresponding to `literal` if non null.</span></div>
|
|
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5dc188ab37464f666fcf4fed4ebbce0a">HasVarValueEncoding</a>(<span class="keywordtype">int</span> ref, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">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="l00260"></a><span class="lineno"> 260</span>  </div>
|
|
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <span class="comment">// Stores the fact that literal implies var == value.</span></div>
|
|
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <span class="comment">// It returns true if that information is new.</span></div>
|
|
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a3dc318518f2e4259ed03b5d1c95316ef">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>, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a>);</div>
|
|
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  </div>
|
|
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <span class="comment">// Stores the fact that literal implies var != value.</span></div>
|
|
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <span class="comment">// It returns true if that information is new.</span></div>
|
|
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a31ade354475e7f6052e62f7befc21cf8">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>, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a>);</div>
|
|
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  </div>
|
|
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <span class="comment">// Objective handling functions. We load it at the beginning so that during</span></div>
|
|
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="comment">// presolve we can work on the more efficient hash_map representation.</span></div>
|
|
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="comment">// Note that ReadObjectiveFromProto() makes sure that var_to_constraints of</span></div>
|
|
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <span class="comment">// all the variable that appear in the objective contains -1. This is later</span></div>
|
|
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="comment">// enforced by all the functions modifying the objective.</span></div>
|
|
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  <span class="comment">// Note(user): Because we process affine relation only on</span></div>
|
|
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="comment">// CanonicalizeObjective(), it is possible that when processing a</span></div>
|
|
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <span class="comment">// canonicalized linear constraint, we don't detect that a variable in affine</span></div>
|
|
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="comment">// relation is in the objective. For now this is fine, because when this is</span></div>
|
|
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="comment">// the case, we also have an affine linear constraint, so we can't really do</span></div>
|
|
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="comment">// anything with that variable since it appear in at least two constraints.</span></div>
|
|
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <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="l00283"></a><span class="lineno"> 283</span>  ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#aa62da782b2270ca293531a0aea153fba">CanonicalizeObjective</a>();</div>
|
|
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <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="l00285"></a><span class="lineno"> 285</span>  </div>
|
|
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="comment">// Given a variable defined by the given inequality that also appear in the</span></div>
|
|
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  <span class="comment">// objective, remove it from the objective by transferring its cost to other</span></div>
|
|
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <span class="comment">// variables in the equality.</span></div>
|
|
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="comment">// If new_vars_in_objective is not nullptr, it will be filled with "new"</span></div>
|
|
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="comment">// variables that where not in the objective before and are after</span></div>
|
|
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="comment">// substitution.</span></div>
|
|
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  <span class="comment">// Returns false, if the substitution cannot be done. This is the case if the</span></div>
|
|
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="comment">// model become UNSAT or if doing it will result in an objective that do not</span></div>
|
|
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <span class="comment">// satisfy our overflow preconditions. Note that this can only happen if the</span></div>
|
|
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  <span class="comment">// substitued variable is not implied free (i.e. if its domain is smaller than</span></div>
|
|
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="comment">// the implied domain from the equality).</span></div>
|
|
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a94ad431a9582ee939e6e3aa8961a2f90">SubstituteVariableInObjective</a>(</div>
|
|
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  <span class="keywordtype">int</span> var_in_equality, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> coeff_in_equality,</div>
|
|
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="keyword">const</span> ConstraintProto& equality,</div>
|
|
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  std::vector<int>* new_vars_in_objective = <span class="keyword">nullptr</span>);</div>
|
|
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  </div>
|
|
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="comment">// Objective getters.</span></div>
|
|
<div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a31d9b7763fd739fe805438b464096c32"> 305</a></span>  <span class="keyword">const</span> <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#a31d9b7763fd739fe805438b464096c32">ObjectiveDomain</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> objective_domain_; }</div>
|
|
<div class="line"><a name="l00306"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#aa1829c33b506457c1b39645d73b26678"> 306</a></span>  <span class="keyword">const</span> absl::flat_hash_map<int, int64>& <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#aa1829c33b506457c1b39645d73b26678">ObjectiveMap</a>()<span class="keyword"> const </span>{</div>
|
|
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="keywordflow">return</span> objective_map_;</div>
|
|
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  }</div>
|
|
<div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a483ddc58170919b851be240df84c77af"> 309</a></span>  <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="l00310"></a><span class="lineno"> 310</span>  <span class="keywordflow">return</span> objective_domain_is_constraining_;</div>
|
|
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  }</div>
|
|
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  </div>
|
|
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  <span class="comment">// Advanced usage. This should be called when a variable can be removed from</span></div>
|
|
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <span class="comment">// the problem, so we don't count it as part of an affine relation anymore.</span></div>
|
|
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  <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="l00316"></a><span class="lineno"> 316</span>  <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="l00317"></a><span class="lineno"> 317</span>  </div>
|
|
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  <span class="comment">// Variable <-> constraint graph.</span></div>
|
|
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  <span class="comment">// The vector list is sorted and contains unique elements.</span></div>
|
|
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  <span class="comment">// Important: To properly handle the objective, var_to_constraints[objective]</span></div>
|
|
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="comment">// contains -1 so that if the objective appear in only one constraint, the</span></div>
|
|
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  <span class="comment">// constraint cannot be simplified.</span></div>
|
|
<div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4d724b2f4bd1d1cab7b11dafd3448d8b"> 324</a></span>  <span class="keyword">const</span> std::vector<int>& <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="l00325"></a><span class="lineno"> 325</span>  <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="l00326"></a><span class="lineno"> 326</span>  <span class="keywordflow">return</span> constraint_to_vars_[c];</div>
|
|
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  }</div>
|
|
<div class="line"><a name="l00328"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#acf72cafd3dab9ac4b5e5b1a3aaa75192"> 328</a></span>  <span class="keyword">const</span> absl::flat_hash_set<int>& <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="l00329"></a><span class="lineno"> 329</span>  <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="l00330"></a><span class="lineno"> 330</span>  <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="l00331"></a><span class="lineno"> 331</span>  }</div>
|
|
<div class="line"><a name="l00332"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a90674fa816d7a066e251337852214e84"> 332</a></span>  <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="l00333"></a><span class="lineno"> 333</span>  <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="l00334"></a><span class="lineno"> 334</span>  <span class="keywordflow">return</span> interval_usage_[c];</div>
|
|
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  }</div>
|
|
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  </div>
|
|
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  <span class="comment">// Make sure we never delete an "assumption" literal by using a special</span></div>
|
|
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <span class="comment">// constraint for that.</span></div>
|
|
<div class="line"><a name="l00339"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#af35921d036d22c6497777d7a5964a13d"> 339</a></span>  <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="l00340"></a><span class="lineno"> 340</span>  <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>->assumptions()) {</div>
|
|
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  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="l00342"></a><span class="lineno"> 342</span>  }</div>
|
|
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  }</div>
|
|
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  </div>
|
|
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  <span class="comment">// The following helper adds the following constraint:</span></div>
|
|
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  <span class="comment">// result <=> (time_i <= time_j && active_i is true && active_j is true)</span></div>
|
|
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  <span class="comment">// and returns the (cached) literal result.</span></div>
|
|
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <span class="comment">// Note that this cache should just be used temporarily and then cleared</span></div>
|
|
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  <span class="comment">// with ClearPrecedenceCache() because there is no mechanism to update the</span></div>
|
|
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <span class="comment">// cached literals when literal equivalence are detected.</span></div>
|
|
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  <span class="keywordtype">int</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#adc37a02104d979e9943fadfd2e209686">GetOrCreateReifiedPrecedenceLiteral</a>(<span class="keywordtype">int</span> time_i, <span class="keywordtype">int</span> time_j, <span class="keywordtype">int</span> active_i,</div>
|
|
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <span class="keywordtype">int</span> active_j);</div>
|
|
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  </div>
|
|
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <span class="comment">// Clear the precedence cache.</span></div>
|
|
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  <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="l00357"></a><span class="lineno"> 357</span>  </div>
|
|
<div class="line"><a name="l00358"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a238f4904cf327109443ec992981355ff"> 358</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a238f4904cf327109443ec992981355ff">log_info</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> log_info_; }</div>
|
|
<div class="line"><a name="l00359"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#aaabb604ccac4a6136be93bfe64e2290d"> 359</a></span>  <span class="keyword">const</span> SatParameters& <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="l00360"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a0704cc50211ab739309aa9f54aa8c606"> 360</a></span>  <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="l00361"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#ad02c7812cfbc2a8c4c05d955c9681259"> 361</a></span>  <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="l00362"></a><span class="lineno"> 362</span>  </div>
|
|
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  <span class="comment">// For each variables, list the constraints that just enforce a lower bound</span></div>
|
|
<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  <span class="comment">// (resp. upper bound) on that variable. If all the constraints in which a</span></div>
|
|
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <span class="comment">// variable appear are in the same direction, then we can usually fix a</span></div>
|
|
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  <span class="comment">// variable to one of its bound (modulo its cost).</span></div>
|
|
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <span class="comment">// TODO(user): Keeping these extra vector of hash_set seems inefficient. Come</span></div>
|
|
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <span class="comment">// up with a better way to detect if a variable is only constrainted in one</span></div>
|
|
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <span class="comment">// direction.</span></div>
|
|
<div class="line"><a name="l00371"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a47714f887512a3d7acebfcb4a348291a"> 371</a></span>  std::vector<absl::flat_hash_set<int>> <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="l00372"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a23aa815e8a7a860998c4d35760fa087e"> 372</a></span>  std::vector<absl::flat_hash_set<int>> <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="l00373"></a><span class="lineno"> 373</span>  </div>
|
|
<div class="line"><a name="l00374"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a928c29f37c6ed9d5bba711f905783417"> 374</a></span>  CpModelProto* <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="l00375"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a4b3b9ef9c5f214dd4427daa2646eceda"> 375</a></span>  CpModelProto* <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="l00376"></a><span class="lineno"> 376</span>  </div>
|
|
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="comment">// Indicate if we are allowed to remove irrelevant feasible solution from the</span></div>
|
|
<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  <span class="comment">// set of feasible solution. For example, if a variable is unused, can we fix</span></div>
|
|
<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <span class="comment">// it to an arbitrary value (or its mimimum objective one)? This must be true</span></div>
|
|
<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  <span class="comment">// if the client wants to enumerate all solutions or wants correct tightened</span></div>
|
|
<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  <span class="comment">// bounds in the response.</span></div>
|
|
<div class="line"><a name="l00382"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#ab7b13b808e3dea6fc1e4006f7134e9f9"> 382</a></span>  <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="l00383"></a><span class="lineno"> 383</span>  </div>
|
|
<div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  <span class="comment">// If true, fills stats_by_rule_name, otherwise do not do that. This can take</span></div>
|
|
<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  <span class="comment">// a few percent of the run time with a lot of LNS threads.</span></div>
|
|
<div class="line"><a name="l00386"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5accb3bf06cb7a63ce818d54f5741b31"> 386</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a5accb3bf06cb7a63ce818d54f5741b31">enable_stats</a> = <span class="keyword">true</span>;</div>
|
|
<div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  </div>
|
|
<div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  <span class="comment">// Just used to display statistics on the presolve rules that were used.</span></div>
|
|
<div class="line"><a name="l00389"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a8abe16435f55971a49965eb6616c5783"> 389</a></span>  absl::flat_hash_map<std::string, int> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a8abe16435f55971a49965eb6616c5783">stats_by_rule_name</a>;</div>
|
|
<div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  </div>
|
|
<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  <span class="comment">// Number of "rules" applied. This should be equal to the sum of all numbers</span></div>
|
|
<div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  <span class="comment">// in stats_by_rule_name. This is used to decide if we should do one more pass</span></div>
|
|
<div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  <span class="comment">// of the presolve or not. Note that depending on the presolve transformation,</span></div>
|
|
<div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  <span class="comment">// a rule can correspond to a tiny change or a big change. Because of that,</span></div>
|
|
<div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <span class="comment">// this isn't a perfect proxy for the efficacy of the presolve.</span></div>
|
|
<div class="line"><a name="l00396"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a191114cb797b24e33cf74b97152806f7"> 396</a></span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a191114cb797b24e33cf74b97152806f7">num_presolve_operations</a> = 0;</div>
|
|
<div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  </div>
|
|
<div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  <span class="comment">// Temporary storage.</span></div>
|
|
<div class="line"><a name="l00399"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a436752c51b5f6010033151b7bd7966da"> 399</a></span>  std::vector<int> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a436752c51b5f6010033151b7bd7966da">tmp_literals</a>;</div>
|
|
<div class="line"><a name="l00400"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#ac3d1eecbbf2000282606576273ccf06c"> 400</a></span>  std::vector<Domain> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#ac3d1eecbbf2000282606576273ccf06c">tmp_term_domains</a>;</div>
|
|
<div class="line"><a name="l00401"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a7305c507aa07aea8104037f2e2441876"> 401</a></span>  std::vector<Domain> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a7305c507aa07aea8104037f2e2441876">tmp_left_domains</a>;</div>
|
|
<div class="line"><a name="l00402"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#aeb77639debea43978becf1d990581537"> 402</a></span>  absl::flat_hash_set<int> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#aeb77639debea43978becf1d990581537">tmp_literal_set</a>;</div>
|
|
<div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  </div>
|
|
<div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  <span class="comment">// Each time a domain is modified this is set to true.</span></div>
|
|
<div class="line"><a name="l00405"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a0934a9198bfc690e958ea42a64a9338e"> 405</a></span>  <a class="code" href="classoperations__research_1_1_sparse_bitset.html">SparseBitset<int64></a> <a class="code" href="classoperations__research_1_1sat_1_1_presolve_context.html#a0934a9198bfc690e958ea42a64a9338e">modified_domains</a>;</div>
|
|
<div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  </div>
|
|
<div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <span class="comment">// Advanced presolve. See this class comment.</span></div>
|
|
<div class="line"><a name="l00408"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_presolve_context.html#a6e086436e931cd8b341d85e6889b838d"> 408</a></span>  <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="l00409"></a><span class="lineno"> 409</span>  </div>
|
|
<div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  <span class="comment">// Helper to add an affine relation x = c.y + o to the given repository.</span></div>
|
|
<div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <span class="keywordtype">bool</span> AddRelation(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> c, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> o, <a class="code" href="classoperations__research_1_1_affine_relation.html">AffineRelation</a>* repo);</div>
|
|
<div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  </div>
|
|
<div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="keywordtype">void</span> AddVariableUsage(<span class="keywordtype">int</span> c);</div>
|
|
<div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <span class="keywordtype">void</span> UpdateLinear1Usage(<span class="keyword">const</span> ConstraintProto& <a class="code" href="demon__profiler_8cc.html#a05da18ca9c7b657a4a6ea24e07c9b695">ct</a>, <span class="keywordtype">int</span> c);</div>
|
|
<div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  </div>
|
|
<div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <span class="comment">// Returns true iff the variable is not the representative of an equivalence</span></div>
|
|
<div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="comment">// class of size at least 2.</span></div>
|
|
<div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  <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="l00420"></a><span class="lineno"> 420</span>  </div>
|
|
<div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  <span class="comment">// Process encoding_remap_queue_ and updates the encoding maps. This could</span></div>
|
|
<div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  <span class="comment">// lead to UNSAT being detected, in which case it will return false.</span></div>
|
|
<div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  <span class="keywordtype">bool</span> RemapEncodingMaps();</div>
|
|
<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  </div>
|
|
<div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  <span class="comment">// Makes sure we only insert encoding about the current representative.</span></div>
|
|
<div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  <span class="comment">// Returns false if ref cannot take the given value (it might not have been</span></div>
|
|
<div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  <span class="comment">// propagated yed).</span></div>
|
|
<div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  <span class="keywordtype">bool</span> CanonicalizeEncoding(<span class="keywordtype">int</span>* ref, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a>* <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a>);</div>
|
|
<div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  </div>
|
|
<div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  <span class="comment">// Inserts an half reified var value encoding (literal => var ==/!= value).</span></div>
|
|
<div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  <span class="comment">// It returns true if the new state is different from the old state.</span></div>
|
|
<div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="comment">// Not that if imply_eq is false, the literal will be stored in its negated</span></div>
|
|
<div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  <span class="comment">// form.</span></div>
|
|
<div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <span class="comment">// Thus, if you detect literal <=> var == value, then two calls must be made:</span></div>
|
|
<div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  <span class="comment">// InsertHalfVarValueEncoding(literal, var, value, true);</span></div>
|
|
<div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  <span class="comment">// InsertHalfVarValueEncoding(NegatedRef(literal), var, value, false);</span></div>
|
|
<div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <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>, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a>,</div>
|
|
<div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  <span class="keywordtype">bool</span> imply_eq);</div>
|
|
<div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  </div>
|
|
<div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <span class="comment">// Insert fully reified var-value encoding.</span></div>
|
|
<div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  <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>, <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a>,</div>
|
|
<div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  <span class="keywordtype">bool</span> add_constraints);</div>
|
|
<div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  </div>
|
|
<div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  <span class="keyword">const</span> <span class="keywordtype">bool</span> log_info_;</div>
|
|
<div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  <span class="keyword">const</span> SatParameters& params_;</div>
|
|
<div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  <a class="code" href="classoperations__research_1_1_time_limit.html">TimeLimit</a>* time_limit_;</div>
|
|
<div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  <a class="code" href="classoperations__research_1_1sat_1_1_model_random_generator.html">ModelRandomGenerator</a>* random_;</div>
|
|
<div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  </div>
|
|
<div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  <span class="comment">// Initially false, and set to true on the first inconsistency.</span></div>
|
|
<div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  <span class="keywordtype">bool</span> is_unsat = <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  </div>
|
|
<div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  <span class="comment">// The current domain of each variables.</span></div>
|
|
<div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  std::vector<Domain> domains;</div>
|
|
<div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  </div>
|
|
<div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  <span class="comment">// Internal representation of the objective. During presolve, we first load</span></div>
|
|
<div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  <span class="comment">// the objective in this format in order to have more efficient substitution</span></div>
|
|
<div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  <span class="comment">// on large problems (also because the objective is often dense). At the end</span></div>
|
|
<div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  <span class="comment">// we re-convert it to its proto form.</span></div>
|
|
<div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  absl::flat_hash_map<int, int64> objective_map_;</div>
|
|
<div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> objective_overflow_detection_;</div>
|
|
<div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  std::vector<std::pair<int, int64>> tmp_entries_;</div>
|
|
<div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  <span class="keywordtype">bool</span> objective_domain_is_constraining_ = <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  <a class="code" href="classoperations__research_1_1_domain.html">Domain</a> objective_domain_;</div>
|
|
<div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  <span class="keywordtype">double</span> objective_offset_;</div>
|
|
<div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  <span class="keywordtype">double</span> objective_scaling_factor_;</div>
|
|
<div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  </div>
|
|
<div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  <span class="comment">// Constraints <-> Variables graph.</span></div>
|
|
<div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  std::vector<std::vector<int>> constraint_to_vars_;</div>
|
|
<div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  std::vector<absl::flat_hash_set<int>> var_to_constraints_;</div>
|
|
<div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  </div>
|
|
<div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  <span class="comment">// Number of constraints of the form [lit =>] var in domain.</span></div>
|
|
<div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  std::vector<int> constraint_to_linear1_var_;</div>
|
|
<div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  std::vector<int> var_to_num_linear1_;</div>
|
|
<div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  </div>
|
|
<div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  <span class="comment">// We maintain how many time each interval is used.</span></div>
|
|
<div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  std::vector<std::vector<int>> constraint_to_intervals_;</div>
|
|
<div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  std::vector<int> interval_usage_;</div>
|
|
<div class="line"><a name="l00480"></a><span class="lineno"> 480</span>  </div>
|
|
<div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  <span class="comment">// Contains abs relation (key = abs(saved_variable)).</span></div>
|
|
<div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  absl::flat_hash_map<int, SavedVariable> abs_relations_;</div>
|
|
<div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  </div>
|
|
<div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  <span class="comment">// For each constant variable appearing in the model, we maintain a reference</span></div>
|
|
<div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  <span class="comment">// variable with the same constant value. If two variables end up having the</span></div>
|
|
<div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  <span class="comment">// same fixed value, then we can detect it using this and add a new</span></div>
|
|
<div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  <span class="comment">// equivalence relation. See ExploitFixedDomain().</span></div>
|
|
<div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  absl::flat_hash_map<int64, SavedVariable> constant_to_ref_;</div>
|
|
<div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  </div>
|
|
<div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  <span class="comment">// When a "representative" gets a new representative, it should be enqueued</span></div>
|
|
<div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  <span class="comment">// here so that we can lazily update the *encoding_ maps below.</span></div>
|
|
<div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  std::deque<int> encoding_remap_queue_;</div>
|
|
<div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  </div>
|
|
<div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  <span class="comment">// Contains variables with some encoded value: encoding_[i][v] points</span></div>
|
|
<div class="line"><a name="l00495"></a><span class="lineno"> 495</span>  <span class="comment">// to the literal attached to the value v of the variable i.</span></div>
|
|
<div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  absl::flat_hash_map<int, absl::flat_hash_map<int64, SavedLiteral>> encoding_;</div>
|
|
<div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  </div>
|
|
<div class="line"><a name="l00498"></a><span class="lineno"> 498</span>  <span class="comment">// Contains the currently collected half value encodings:</span></div>
|
|
<div class="line"><a name="l00499"></a><span class="lineno"> 499</span>  <span class="comment">// i.e.: literal => var ==/!= value</span></div>
|
|
<div class="line"><a name="l00500"></a><span class="lineno"> 500</span>  <span class="comment">// The state is accumulated (adding x => var == value then !x => var != value)</span></div>
|
|
<div class="line"><a name="l00501"></a><span class="lineno"> 501</span>  <span class="comment">// will deduce that x equivalent to var == value.</span></div>
|
|
<div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  absl::flat_hash_map<int, absl::flat_hash_map<int64, absl::flat_hash_set<int>>></div>
|
|
<div class="line"><a name="l00503"></a><span class="lineno"> 503</span>  eq_half_encoding_;</div>
|
|
<div class="line"><a name="l00504"></a><span class="lineno"> 504</span>  absl::flat_hash_map<int, absl::flat_hash_map<int64, absl::flat_hash_set<int>>></div>
|
|
<div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  neq_half_encoding_;</div>
|
|
<div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  </div>
|
|
<div class="line"><a name="l00507"></a><span class="lineno"> 507</span>  <span class="comment">// This regroups all the affine relations between variables. Note that the</span></div>
|
|
<div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  <span class="comment">// constraints used to detect such relations will not be removed from the</span></div>
|
|
<div class="line"><a name="l00509"></a><span class="lineno"> 509</span>  <span class="comment">// model at detection time (thus allowing proper domain propagation). However,</span></div>
|
|
<div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  <span class="comment">// if the arity of a variable becomes one, then such constraint will be</span></div>
|
|
<div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  <span class="comment">// removed.</span></div>
|
|
<div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  <a class="code" href="classoperations__research_1_1_affine_relation.html">AffineRelation</a> affine_relations_;</div>
|
|
<div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  <a class="code" href="classoperations__research_1_1_affine_relation.html">AffineRelation</a> var_equiv_relations_;</div>
|
|
<div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  </div>
|
|
<div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  std::vector<int> tmp_new_usage_;</div>
|
|
<div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  </div>
|
|
<div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  <span class="comment">// Used by SetVariableAsRemoved() and VariableWasRemoved().</span></div>
|
|
<div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  absl::flat_hash_set<int> removed_variables_;</div>
|
|
<div class="line"><a name="l00519"></a><span class="lineno"> 519</span>  </div>
|
|
<div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  <span class="comment">// Cache for the reified precedence literals created during the expansion of</span></div>
|
|
<div class="line"><a name="l00521"></a><span class="lineno"> 521</span>  <span class="comment">// the reservoir constraint. This cache is only valid during the expansion</span></div>
|
|
<div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  <span class="comment">// phase, and is cleared afterwards.</span></div>
|
|
<div class="line"><a name="l00523"></a><span class="lineno"> 523</span>  absl::flat_hash_map<std::tuple<int, int, int, int>, <span class="keywordtype">int</span>></div>
|
|
<div class="line"><a name="l00524"></a><span class="lineno"> 524</span>  reified_precedences_cache_;</div>
|
|
<div class="line"><a name="l00525"></a><span class="lineno"> 525</span> };</div>
|
|
<div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  </div>
|
|
<div class="line"><a name="l00527"></a><span class="lineno"> 527</span> } <span class="comment">// namespace sat</span></div>
|
|
<div class="line"><a name="l00528"></a><span class="lineno"> 528</span> } <span class="comment">// namespace operations_research</span></div>
|
|
<div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  </div>
|
|
<div class="line"><a name="l00530"></a><span class="lineno"> 530</span> <span class="preprocessor">#endif // OR_TOOLS_SAT_PRESOLVE_CONTEXT_H_</span></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a4b3b9ef9c5f214dd4427daa2646eceda"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a4b3b9ef9c5f214dd4427daa2646eceda">operations_research::sat::PresolveContext::mapping_model</a></div><div class="ttdeci">CpModelProto * mapping_model</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00375">presolve_context.h:375</a></div></div>
|
|
<div class="ttc" id="aexpr__array_8cc_html_a472a99923cbe11ae7b5a5d157d9ad465"><div class="ttname"><a href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a></div><div class="ttdeci">IntVar * var</div><div class="ttdef"><b>Definition:</b> <a href="expr__array_8cc_source.html#l01858">expr_array.cc:1858</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a1aadaad9b8af16ab5a208c682e2e1717"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a1aadaad9b8af16ab5a208c682e2e1717">operations_research::sat::PresolveContext::AddImplication</a></div><div class="ttdeci">void AddImplication(int a, int b)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00055">presolve_context.cc:55</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_afad3c5370d5ef3338d7a5455198e6364"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#afad3c5370d5ef3338d7a5455198e6364">operations_research::sat::PresolveContext::StoreAffineRelation</a></div><div class="ttdeci">bool StoreAffineRelation(int ref_x, int ref_y, int64 coeff, int64 offset)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00530">presolve_context.cc:530</a></div></div>
|
|
<div class="ttc" id="aclassoperations__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< int > & ConstraintToVars(int c) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00324">presolve_context.h:324</a></div></div>
|
|
<div class="ttc" id="aclassoperations__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< int > & VarToConstraints(int var) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00328">presolve_context.h:328</a></div></div>
|
|
<div class="ttc" id="abase_2logging_8h_html_afcaa7cadd41741bb855c2ada1d2ef927"><div class="ttname"><a href="base_2logging_8h.html#afcaa7cadd41741bb855c2ada1d2ef927">VLOG</a></div><div class="ttdeci">#define VLOG(verboselevel)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00978">base/logging.h:978</a></div></div>
|
|
<div class="ttc" id="acp__model_8pb_8h_html"><div class="ttname"><a href="cp__model_8pb_8h.html">cp_model.pb.h</a></div></div>
|
|
<div class="ttc" id="aclassoperations__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#l00361">presolve_context.h:361</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a3dc318518f2e4259ed03b5d1c95316ef"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a3dc318518f2e4259ed03b5d1c95316ef">operations_research::sat::PresolveContext::StoreLiteralImpliesVarEqValue</a></div><div class="ttdeci">bool StoreLiteralImpliesVarEqValue(int literal, int var, int64 value)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01048">presolve_context.cc:1048</a></div></div>
|
|
<div class="ttc" id="atime__limit_8h_html"><div class="ttname"><a href="time__limit_8h.html">time_limit.h</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a0934a9198bfc690e958ea42a64a9338e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a0934a9198bfc690e958ea42a64a9338e">operations_research::sat::PresolveContext::modified_domains</a></div><div class="ttdeci">SparseBitset< int64 > modified_domains</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00405">presolve_context.h:405</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_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 &domain)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00062">presolve_context.cc:62</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a5e86fd5ce0fc653d355ab7303f373e00"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a5e86fd5ce0fc653d355ab7303f373e00">operations_research::sat::PresolveContext::DomainOf</a></div><div class="ttdeci">Domain DomainOf(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00221">presolve_context.cc:221</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ab75a27c0aeda2de9c3957719b8196c36"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ab75a27c0aeda2de9c3957719b8196c36">operations_research::sat::PresolveContext::UpdateConstraintVariableUsage</a></div><div class="ttdeci">void UpdateConstraintVariableUsage(int c)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00318">presolve_context.cc:318</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a34e2cd343e0dfb06af9f67df8c4c3502"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a34e2cd343e0dfb06af9f67df8c4c3502">operations_research::sat::PresolveContext::VariableWithCostIsUniqueAndRemovable</a></div><div class="ttdeci">bool VariableWithCostIsUniqueAndRemovable(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00174">presolve_context.cc:174</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aed2a07aad05b4ad8e05cf5fe7b239a1a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aed2a07aad05b4ad8e05cf5fe7b239a1a">operations_research::sat::PresolveContext::ReadObjectiveFromProto</a></div><div class="ttdeci">void ReadObjectiveFromProto()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01137">presolve_context.cc:1137</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a44425dd2b07f30c04f03e410de301aec"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a44425dd2b07f30c04f03e410de301aec">operations_research::sat::PresolveContext::MaxOf</a></div><div class="ttdeci">int64 MaxOf(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00113">presolve_context.cc:113</a></div></div>
|
|
<div class="ttc" id="atrace_8cc_html_a36bd74109f547f7f8198faf5a12d2879"><div class="ttname"><a href="trace_8cc.html#a36bd74109f547f7f8198faf5a12d2879">message</a></div><div class="ttdeci">std::string message</div><div class="ttdef"><b>Definition:</b> <a href="trace_8cc_source.html#l00395">trace.cc:395</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_domain_deductions_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_domain_deductions.html">operations_research::sat::DomainDeductions</a></div><div class="ttdef"><b>Definition:</b> <a href="presolve__util_8h_source.html#l00046">presolve_util.h:46</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a67699a1a5830ef51dab6941449b02044"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a67699a1a5830ef51dab6941449b02044">operations_research::sat::PresolveContext::NewIntVar</a></div><div class="ttdeci">int NewIntVar(const Domain &domain)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00034">presolve_context.cc:34</a></div></div>
|
|
<div class="ttc" id="ademon__profiler_8cc_html_a21edc7ca4cc5802c8779d68556bc09cf"><div class="ttname"><a href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a></div><div class="ttdeci">int64 value</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="aclassoperations__research_1_1sat_1_1_presolve_context_html_adc37a02104d979e9943fadfd2e209686"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#adc37a02104d979e9943fadfd2e209686">operations_research::sat::PresolveContext::GetOrCreateReifiedPrecedenceLiteral</a></div><div class="ttdeci">int GetOrCreateReifiedPrecedenceLiteral(int time_i, int time_j, int active_i, int active_j)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01404">presolve_context.cc:1404</a></div></div>
|
|
<div class="ttc" id="asat_2model_8h_html"><div class="ttname"><a href="sat_2model_8h.html">model.h</a></div></div>
|
|
<div class="ttc" id="anamespaceoperations__research_html"><div class="ttname"><a href="namespaceoperations__research.html">operations_research</a></div><div class="ttdoc">The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...</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="aclassoperations__research_1_1sat_1_1_presolve_context_html_a5c2f01871b9baa2bc0dc556803c5a1ad"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a5c2f01871b9baa2bc0dc556803c5a1ad">operations_research::sat::PresolveContext::PropagateAffineRelation</a></div><div class="ttdeci">bool PropagateAffineRelation(int ref)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00471">presolve_context.cc:471</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a7305c507aa07aea8104037f2e2441876"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a7305c507aa07aea8104037f2e2441876">operations_research::sat::PresolveContext::tmp_left_domains</a></div><div class="ttdeci">std::vector< Domain > tmp_left_domains</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00401">presolve_context.h:401</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a890f923209473cf55ac002d1b14bd9e2"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a890f923209473cf55ac002d1b14bd9e2">operations_research::sat::PresolveContext::LiteralIsTrue</a></div><div class="ttdeci">bool LiteralIsTrue(int lit) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00089">presolve_context.cc:89</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_acb73a5ab7e240d5f93938262f2d8b826"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#acb73a5ab7e240d5f93938262f2d8b826">operations_research::sat::PresolveContext::NumEquivRelations</a></div><div class="ttdeci">int NumEquivRelations() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00213">presolve_context.h:213</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_abb6eb29f56c3a33b8ae1b74b08b755c2"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#abb6eb29f56c3a33b8ae1b74b08b755c2">operations_research::sat::PresolveContext::IsFixed</a></div><div class="ttdeci">bool IsFixed(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00078">presolve_context.cc:78</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_af248c1021eda72d628e2f3537eb98ded"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#af248c1021eda72d628e2f3537eb98ded">operations_research::sat::PresolveContext::VariableWasRemoved</a></div><div class="ttdeci">bool VariableWasRemoved(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00197">presolve_context.cc:197</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a77e37831a01ff737a7b5bd7e12c2ecf7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a77e37831a01ff737a7b5bd7e12c2ecf7">operations_research::sat::PresolveContext::DomainIsEmpty</a></div><div class="ttdeci">bool DomainIsEmpty(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00074">presolve_context.cc:74</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a20097880105b02917a50dd5d97b80e55"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a20097880105b02917a50dd5d97b80e55">operations_research::sat::PresolveContext::IntersectDomainWith</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool IntersectDomainWith(int ref, const Domain &domain, bool *domain_modified=nullptr)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00238">presolve_context.cc:238</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1_domain_html"><div class="ttname"><a href="classoperations__research_1_1_domain.html">operations_research::Domain</a></div><div class="ttdoc">We call domain any subset of Int64 = [kint64min, kint64max].</div><div class="ttdef"><b>Definition:</b> <a href="sorted__interval__list_8h_source.html#l00081">sorted_interval_list.h:81</a></div></div>
|
|
<div class="ttc" id="aintegral__types_8h_html_a7cde0074dfd288f2d70c0e035dacb28a"><div class="ttname"><a href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a></div><div class="ttdeci">int64_t int64</div><div class="ttdef"><b>Definition:</b> <a href="integral__types_8h_source.html#l00034">integral_types.h:34</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a37770bda4577c8ad121d77d99a63cb0f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a37770bda4577c8ad121d77d99a63cb0f">operations_research::sat::PresolveContext::GetLiteralRepresentative</a></div><div class="ttdeci">int GetLiteralRepresentative(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00704">presolve_context.cc:704</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_literal_html_adf2db0610413d540ca6c4e4f1cce5fd6"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_literal.html#adf2db0610413d540ca6c4e4f1cce5fd6">operations_research::sat::SavedLiteral::Get</a></div><div class="ttdeci">int Get(PresolveContext *context) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00024">presolve_context.cc:24</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a98bc002ea916e55fddfa4740f373ac22"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a98bc002ea916e55fddfa4740f373ac22">operations_research::sat::PresolveContext::GetOrCreateConstantVar</a></div><div class="ttdeci">int GetOrCreateConstantVar(int64 cst)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00043">presolve_context.cc:43</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1_time_limit_html"><div class="ttname"><a href="classoperations__research_1_1_time_limit.html">operations_research::TimeLimit</a></div><div class="ttdoc">A simple class to enforce both an elapsed time limit and a deterministic time limit in the same threa...</div><div class="ttdef"><b>Definition:</b> <a href="time__limit_8h_source.html#l00105">time_limit.h:105</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_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< absl::flat_hash_set< int > > var_to_lb_only_constraints</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00372">presolve_context.h:372</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aaddc5f58e8a40a5a308531949153f814"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aaddc5f58e8a40a5a308531949153f814">operations_research::sat::PresolveContext::GetAffineRelation</a></div><div class="ttdeci">AffineRelation::Relation GetAffineRelation(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00743">presolve_context.cc:743</a></div></div>
|
|
<div class="ttc" id="agurobi__interface_8cc_html_a5f287b83a753915ae862fed64f8640a6"><div class="ttname"><a href="gurobi__interface_8cc.html#a5f287b83a753915ae862fed64f8640a6">context</a></div><div class="ttdeci">GurobiMPCallbackContext * context</div><div class="ttdef"><b>Definition:</b> <a href="gurobi__interface_8cc_source.html#l00509">gurobi_interface.cc:509</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ab7b13b808e3dea6fc1e4006f7134e9f9"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ab7b13b808e3dea6fc1e4006f7134e9f9">operations_research::sat::PresolveContext::keep_all_feasible_solutions</a></div><div class="ttdeci">bool keep_all_feasible_solutions</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00382">presolve_context.h:382</a></div></div>
|
|
<div class="ttc" id="aclassoperations__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 & ObjectiveDomain() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00305">presolve_context.h:305</a></div></div>
|
|
<div class="ttc" id="apresolve__util_8h_html"><div class="ttname"><a href="presolve__util_8h.html">presolve_util.h</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a5763f8709716596a3aa728bacae05a7b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a5763f8709716596a3aa728bacae05a7b">operations_research::sat::PresolveContext::RemoveVariableFromAffineRelation</a></div><div class="ttdeci">void RemoveVariableFromAffineRelation(int var)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00502">presolve_context.cc:502</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_variable_html_aea29b5bb569ea104749893b9f321697c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_variable.html#aea29b5bb569ea104749893b9f321697c">operations_research::sat::SavedVariable::SavedVariable</a></div><div class="ttdeci">SavedVariable()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00058">presolve_context.h:58</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a317c6b2e0028a326f3bc7eec22073de7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a317c6b2e0028a326f3bc7eec22073de7">operations_research::sat::PresolveContext::DomainContains</a></div><div class="ttdeci">bool DomainContains(int ref, int64 value) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00231">presolve_context.cc:231</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a54cf7f0077717d59a828b656b60c1615"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a54cf7f0077717d59a828b656b60c1615">operations_research::sat::PresolveContext::VariableIsUniqueAndRemovable</a></div><div class="ttdeci">bool VariableIsUniqueAndRemovable(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00165">presolve_context.cc:165</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a33f90dcf20e1ce9197e60eb3bed25974"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a33f90dcf20e1ce9197e60eb3bed25974">operations_research::sat::PresolveContext::DomainOfVarIsIncludedIn</a></div><div class="ttdeci">bool DomainOfVarIsIncludedIn(int var, const Domain &domain)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00108">presolve_context.h:108</a></div></div>
|
|
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_acdbc8ad33149d45a6e6fcd8b72fd68ed"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#acdbc8ad33149d45a6e6fcd8b72fd68ed">operations_research::sat::PositiveRef</a></div><div class="ttdeci">int PositiveRef(int ref)</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__utils_8h_source.html#l00033">cp_model_utils.h:33</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a6e086436e931cd8b341d85e6889b838d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a6e086436e931cd8b341d85e6889b838d">operations_research::sat::PresolveContext::deductions</a></div><div class="ttdeci">DomainDeductions deductions</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00408">presolve_context.h:408</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_af4847724208dd09ba3fea8b53132d197"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#af4847724208dd09ba3fea8b53132d197">operations_research::sat::PresolveContext::ExploitFixedDomain</a></div><div class="ttdeci">void ExploitFixedDomain(int var)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00447">presolve_context.cc:447</a></div></div>
|
|
<div class="ttc" id="aconstraint__solver_2table_8cc_html_af730895c6c6ef6e03caaf6251192dfd2"><div class="ttname"><a href="constraint__solver_2table_8cc.html#af730895c6c6ef6e03caaf6251192dfd2">a</a></div><div class="ttdeci">int64 a</div><div class="ttdef"><b>Definition:</b> <a href="constraint__solver_2table_8cc_source.html#l00042">constraint_solver/table.cc:42</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a8fc1d49d1e1bf7261f15ccc6c23c4b10"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a8fc1d49d1e1bf7261f15ccc6c23c4b10">operations_research::sat::PresolveContext::StoreBooleanEqualityRelation</a></div><div class="ttdeci">void StoreBooleanEqualityRelation(int ref_a, int ref_b)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00645">presolve_context.cc:645</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_variable_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_variable.html">operations_research::sat::SavedVariable</a></div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00056">presolve_context.h:56</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1_affine_relation_html_acee7699cd3aad1b8ce9721e4952b36e7"><div class="ttname"><a href="classoperations__research_1_1_affine_relation.html#acee7699cd3aad1b8ce9721e4952b36e7">operations_research::AffineRelation::NumRelations</a></div><div class="ttdeci">int NumRelations() const</div><div class="ttdef"><b>Definition:</b> <a href="affine__relation_8h_source.html#l00041">affine_relation.h:41</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_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#l00190">presolve_context.cc:190</a></div></div>
|
|
<div class="ttc" id="aclassoperations__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#l00360">presolve_context.h:360</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1_sparse_bitset_html"><div class="ttname"><a href="classoperations__research_1_1_sparse_bitset.html">operations_research::SparseBitset< int64 ></a></div></div>
|
|
<div class="ttc" id="asat__parameters_8pb_8h_html"><div class="ttname"><a href="sat__parameters_8pb_8h.html">sat_parameters.pb.h</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a8abe16435f55971a49965eb6616c5783"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a8abe16435f55971a49965eb6616c5783">operations_research::sat::PresolveContext::stats_by_rule_name</a></div><div class="ttdeci">absl::flat_hash_map< std::string, int > stats_by_rule_name</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00389">presolve_context.h:389</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a2d3663d98d826c7d782de9cda7b42344"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a2d3663d98d826c7d782de9cda7b42344">operations_research::sat::PresolveContext::GetOrCreateVarValueEncoding</a></div><div class="ttdeci">int GetOrCreateVarValueEncoding(int ref, int64 value)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01078">presolve_context.cc:1078</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a9f3443b281c705edf1779f746637ad9b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a9f3443b281c705edf1779f746637ad9b">operations_research::sat::PresolveContext::LiteralIsFalse</a></div><div class="ttdeci">bool LiteralIsFalse(int lit) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00098">presolve_context.cc:98</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a191114cb797b24e33cf74b97152806f7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a191114cb797b24e33cf74b97152806f7">operations_research::sat::PresolveContext::num_presolve_operations</a></div><div class="ttdeci">int64 num_presolve_operations</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00396">presolve_context.h:396</a></div></div>
|
|
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_abe4ecb2ef8f498b18a55fbcbbf54e550"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#abe4ecb2ef8f498b18a55fbcbbf54e550">operations_research::sat::kAssumptionsConstraint</a></div><div class="ttdeci">constexpr int kAssumptionsConstraint</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00037">presolve_context.h:37</a></div></div>
|
|
<div class="ttc" id="astructoperations__research_1_1_affine_relation_1_1_relation_html"><div class="ttname"><a href="structoperations__research_1_1_affine_relation_1_1_relation.html">operations_research::AffineRelation::Relation</a></div><div class="ttdef"><b>Definition:</b> <a href="affine__relation_8h_source.html#l00076">affine_relation.h:76</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aabb328e6969888226a7a69a972e22c56"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aabb328e6969888226a7a69a972e22c56">operations_research::sat::PresolveContext::RemoveAllVariablesFromAffineRelationConstraint</a></div><div class="ttdeci">void RemoveAllVariablesFromAffineRelationConstraint()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00493">presolve_context.cc:493</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a62cd771660767621e917b2c256182c4e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a62cd771660767621e917b2c256182c4e">operations_research::sat::PresolveContext::InitializeNewDomains</a></div><div class="ttdeci">void InitializeNewDomains()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00767">presolve_context.cc:767</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a238f4904cf327109443ec992981355ff"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a238f4904cf327109443ec992981355ff">operations_research::sat::PresolveContext::log_info</a></div><div class="ttdeci">bool log_info() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00358">presolve_context.h:358</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_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="ademon__profiler_8cc_html_a05da18ca9c7b657a4a6ea24e07c9b695"><div class="ttname"><a href="demon__profiler_8cc.html#a05da18ca9c7b657a4a6ea24e07c9b695">ct</a></div><div class="ttdeci">const Constraint * ct</div><div class="ttdef"><b>Definition:</b> <a href="demon__profiler_8cc_source.html#l00042">demon_profiler.cc:42</a></div></div>
|
|
<div class="ttc" id="aclassoperations__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 & params() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00359">presolve_context.h:359</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a483ddc58170919b851be240df84c77af"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a483ddc58170919b851be240df84c77af">operations_research::sat::PresolveContext::ObjectiveDomainIsConstraining</a></div><div class="ttdeci">bool ObjectiveDomainIsConstraining() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00309">presolve_context.h:309</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aa4772b0766a8dffc56f18e69cf704a25"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aa4772b0766a8dffc56f18e69cf704a25">operations_research::sat::PresolveContext::PresolveContext</a></div><div class="ttdeci">PresolveContext(bool log_info, Model *model, CpModelProto *cp_model, CpModelProto *mapping)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00070">presolve_context.h:70</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ad9ef96aefec987eddaf785de53059740"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ad9ef96aefec987eddaf785de53059740">operations_research::sat::PresolveContext::MinOf</a></div><div class="ttdeci">int64 MinOf(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00107">presolve_context.cc:107</a></div></div>
|
|
<div class="ttc" id="abase_2logging_8h_html_ae17f8119c108cf3070bad3449c7e0006"><div class="ttname"><a href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a></div><div class="ttdeci">#define DCHECK(condition)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00884">base/logging.h:884</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aeb77639debea43978becf1d990581537"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aeb77639debea43978becf1d990581537">operations_research::sat::PresolveContext::tmp_literal_set</a></div><div class="ttdeci">absl::flat_hash_set< int > tmp_literal_set</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00402">presolve_context.h:402</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a6387e91b098c081f059892e1346a29ed"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a6387e91b098c081f059892e1346a29ed">operations_research::sat::PresolveContext::GetVariableRepresentative</a></div><div class="ttdeci">int GetVariableRepresentative(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00733">presolve_context.cc:733</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a436752c51b5f6010033151b7bd7966da"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a436752c51b5f6010033151b7bd7966da">operations_research::sat::PresolveContext::tmp_literals</a></div><div class="ttdeci">std::vector< int > tmp_literals</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00399">presolve_context.h:399</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ac3d1eecbbf2000282606576273ccf06c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ac3d1eecbbf2000282606576273ccf06c">operations_research::sat::PresolveContext::tmp_term_domains</a></div><div class="ttdeci">std::vector< Domain > tmp_term_domains</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00400">presolve_context.h:400</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a52bccf051bec19d96584096844070eaa"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a52bccf051bec19d96584096844070eaa">operations_research::sat::PresolveContext::UpdateNewConstraintsVariableUsage</a></div><div class="ttdeci">void UpdateNewConstraintsVariableUsage()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00356">presolve_context.cc:356</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ae58b8c61c87bd4625b0a5db975652151"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ae58b8c61c87bd4625b0a5db975652151">operations_research::sat::PresolveContext::ClearPrecedenceCache</a></div><div class="ttdeci">void ClearPrecedenceCache()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01466">presolve_context.cc:1466</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a36794cf424ca2d69bc4774437a61a88e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a36794cf424ca2d69bc4774437a61a88e">operations_research::sat::PresolveContext::WriteObjectiveToProto</a></div><div class="ttdeci">void WriteObjectiveToProto() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01384">presolve_context.cc:1384</a></div></div>
|
|
<div class="ttc" id="asorted__interval__list_8h_html"><div class="ttname"><a href="sorted__interval__list_8h.html">sorted_interval_list.h</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_literal_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_literal.html">operations_research::sat::SavedLiteral</a></div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00045">presolve_context.h:45</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a06f0856b91c0399720273b5da85ce280"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a06f0856b91c0399720273b5da85ce280">operations_research::sat::PresolveContext::StoreAbsRelation</a></div><div class="ttdeci">bool StoreAbsRelation(int target_ref, int ref)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00671">presolve_context.cc:671</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html">operations_research::sat::PresolveContext</a></div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00068">presolve_context.h:68</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aa62da782b2270ca293531a0aea153fba"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aa62da782b2270ca293531a0aea153fba">operations_research::sat::PresolveContext::CanonicalizeObjective</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool CanonicalizeObjective()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01180">presolve_context.cc:1180</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a5aa53538ba8adaa0bea1c3c0727425b0"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a5aa53538ba8adaa0bea1c3c0727425b0">operations_research::sat::PresolveContext::NotifyThatModelIsUnsat</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool NotifyThatModelIsUnsat(const std::string &message="")</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00144">presolve_context.h:144</a></div></div>
|
|
<div class="ttc" id="agurobi__interface_8cc_html_a0728f23c9a47655d38e0bf1a2f200bcf"><div class="ttname"><a href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a></div><div class="ttdeci">GRBmodel * model</div><div class="ttdef"><b>Definition:</b> <a href="gurobi__interface_8cc_source.html#l00269">gurobi_interface.cc:269</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_af35921d036d22c6497777d7a5964a13d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#af35921d036d22c6497777d7a5964a13d">operations_research::sat::PresolveContext::RegisterVariablesUsedInAssumptions</a></div><div class="ttdeci">void RegisterVariablesUsedInAssumptions()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00339">presolve_context.h:339</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a11f5290ed8216eea13b9d7383cb4c55f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a11f5290ed8216eea13b9d7383cb4c55f">operations_research::sat::PresolveContext::ConstraintVariableUsageIsConsistent</a></div><div class="ttdeci">bool ConstraintVariableUsageIsConsistent()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00371">presolve_context.cc:371</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a1cd25a05e3e88efc9ffe50461fb21d63"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a1cd25a05e3e88efc9ffe50461fb21d63">operations_research::sat::PresolveContext::ModelIsUnsat</a></div><div class="ttdeci">bool ModelIsUnsat() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00152">presolve_context.h:152</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_variable_html_abbc9b5ccc44af7db8e8a5703dce41b7d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_variable.html#abbc9b5ccc44af7db8e8a5703dce41b7d">operations_research::sat::SavedVariable::SavedVariable</a></div><div class="ttdeci">SavedVariable(int ref)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00059">presolve_context.h:59</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_variable_html_adf2db0610413d540ca6c4e4f1cce5fd6"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_variable.html#adf2db0610413d540ca6c4e4f1cce5fd6">operations_research::sat::SavedVariable::Get</a></div><div class="ttdeci">int Get(PresolveContext *context) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00028">presolve_context.cc:28</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_aa49a8967edab300018eeaa14a27b7210"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aa49a8967edab300018eeaa14a27b7210">operations_research::sat::PresolveContext::UpdateRuleStats</a></div><div class="ttdeci">void UpdateRuleStats(const std::string &name, int num_times=1)</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="aclassoperations__research_1_1sat_1_1_presolve_context_html_aa1829c33b506457c1b39645d73b26678"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#aa1829c33b506457c1b39645d73b26678">operations_research::sat::PresolveContext::ObjectiveMap</a></div><div class="ttdeci">const absl::flat_hash_map< int, int64 > & ObjectiveMap() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00306">presolve_context.h:306</a></div></div>
|
|
<div class="ttc" id="asat_2util_8h_html"><div class="ttname"><a href="sat_2util_8h.html">util.h</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a2563663eeef59c23110ae4e2a80d8c9f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a2563663eeef59c23110ae4e2a80d8c9f">operations_research::sat::PresolveContext::ConstraintVariableGraphIsUpToDate</a></div><div class="ttdeci">bool ConstraintVariableGraphIsUpToDate() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00352">presolve_context.cc:352</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a1f14cd478667f1b005ee54215a07565e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a1f14cd478667f1b005ee54215a07565e">operations_research::sat::PresolveContext::VariableIsOnlyUsedInEncoding</a></div><div class="ttdeci">bool VariableIsOnlyUsedInEncoding(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00215">presolve_context.cc:215</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_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#l00332">presolve_context.h:332</a></div></div>
|
|
<div class="ttc" id="aaffine__relation_8h_html"><div class="ttname"><a href="affine__relation_8h.html">affine_relation.h</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a94ad431a9582ee939e6e3aa8961a2f90"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a94ad431a9582ee939e6e3aa8961a2f90">operations_research::sat::PresolveContext::SubstituteVariableInObjective</a></div><div class="ttdeci">bool SubstituteVariableInObjective(int var_in_equality, int64 coeff_in_equality, const ConstraintProto &equality, std::vector< int > *new_vars_in_objective=nullptr)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01301">presolve_context.cc:1301</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ab246112417bad87cb948820e304208ab"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ab246112417bad87cb948820e304208ab">operations_research::sat::PresolveContext::VariableIsNotUsedAnymore</a></div><div class="ttdeci">bool VariableIsNotUsedAnymore(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00185">presolve_context.cc:185</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_model_random_generator_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_model_random_generator.html">operations_research::sat::ModelRandomGenerator</a></div><div class="ttdef"><b>Definition:</b> <a href="sat_2util_8h_source.html#l00039">sat/util.h:39</a></div></div>
|
|
<div class="ttc" id="aconstraint__solver_2table_8cc_html_a344010e26426d6a13411648d988bc9b6"><div class="ttname"><a href="constraint__solver_2table_8cc.html#a344010e26426d6a13411648d988bc9b6">b</a></div><div class="ttdeci">int64 b</div><div class="ttdef"><b>Definition:</b> <a href="constraint__solver_2table_8cc_source.html#l00043">constraint_solver/table.cc:43</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a7ea7bb314db4dbe4f3b2cac16a2af20f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a7ea7bb314db4dbe4f3b2cac16a2af20f">operations_research::sat::PresolveContext::CanonicalizeDomainOfSizeTwo</a></div><div class="ttdeci">void CanonicalizeDomainOfSizeTwo(int var)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00865">presolve_context.cc:865</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a928c29f37c6ed9d5bba711f905783417"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a928c29f37c6ed9d5bba711f905783417">operations_research::sat::PresolveContext::working_model</a></div><div class="ttdeci">CpModelProto * working_model</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00374">presolve_context.h:374</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a5dc188ab37464f666fcf4fed4ebbce0a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a5dc188ab37464f666fcf4fed4ebbce0a">operations_research::sat::PresolveContext::HasVarValueEncoding</a></div><div class="ttdeci">bool HasVarValueEncoding(int ref, int64 value, int *literal=nullptr)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01064">presolve_context.cc:1064</a></div></div>
|
|
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_aca25bc3ffa54b3f2668c6eeddffd8d1d"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#aca25bc3ffa54b3f2668c6eeddffd8d1d">operations_research::sat::kObjectiveConstraint</a></div><div class="ttdeci">constexpr int kObjectiveConstraint</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00035">presolve_context.h:35</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a22b3d2a2f17c55ceb35a363c5225e9c0"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a22b3d2a2f17c55ceb35a363c5225e9c0">operations_research::sat::PresolveContext::InsertVarValueEncoding</a></div><div class="ttdeci">void InsertVarValueEncoding(int literal, int ref, int64 value)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01040">presolve_context.cc:1040</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a66810fcd97b5e9c5fd745226607cd7aa"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a66810fcd97b5e9c5fd745226607cd7aa">operations_research::sat::PresolveContext::AffineRelationDebugString</a></div><div class="ttdeci">std::string AffineRelationDebugString(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00760">presolve_context.cc:760</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_af188bac2776d4545aab9405f5c801cd8"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#af188bac2776d4545aab9405f5c801cd8">operations_research::sat::PresolveContext::CanBeUsedAsLiteral</a></div><div class="ttdeci">bool CanBeUsedAsLiteral(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00084">presolve_context.cc:84</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ad5e9882b154b8a7e8619b29c5631386e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ad5e9882b154b8a7e8619b29c5631386e">operations_research::sat::PresolveContext::RefDebugString</a></div><div class="ttdeci">std::string RefDebugString(int ref) const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00755">presolve_context.cc:755</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1_affine_relation_html"><div class="ttname"><a href="classoperations__research_1_1_affine_relation.html">operations_research::AffineRelation</a></div><div class="ttdef"><b>Definition:</b> <a href="affine__relation_8h_source.html#l00036">affine_relation.h:36</a></div></div>
|
|
<div class="ttc" id="aoptimization_8cc_html_af63dcc00f2023fdf498e0829e6fb8a6b"><div class="ttname"><a href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a></div><div class="ttdeci">Literal literal</div><div class="ttdef"><b>Definition:</b> <a href="optimization_8cc_source.html#l00084">optimization.cc:84</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_af97bdc26758ff0f27314cafb7c2d7044"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#af97bdc26758ff0f27314cafb7c2d7044">operations_research::sat::PresolveContext::GetAbsRelation</a></div><div class="ttdeci">bool GetAbsRelation(int target_ref, int *ref)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00686">presolve_context.cc:686</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a37ed950834f3f3b427a707631fd745f4"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a37ed950834f3f3b427a707631fd745f4">operations_research::sat::PresolveContext::SetLiteralToTrue</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool SetLiteralToTrue(int lit)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00281">presolve_context.cc:281</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a0967c575f9db0c79ed2e7930a0d6a091"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a0967c575f9db0c79ed2e7930a0d6a091">operations_research::sat::PresolveContext::NewBoolVar</a></div><div class="ttdeci">int NewBoolVar()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00041">presolve_context.cc:41</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_ad0d1a630c07ba2321cf43d97a425bc30"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#ad0d1a630c07ba2321cf43d97a425bc30">operations_research::sat::PresolveContext::SetLiteralToFalse</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool SetLiteralToFalse(int lit)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00275">presolve_context.cc:275</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a31ade354475e7f6052e62f7befc21cf8"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a31ade354475e7f6052e62f7befc21cf8">operations_research::sat::PresolveContext::StoreLiteralImpliesVarNEqValue</a></div><div class="ttdeci">bool StoreLiteralImpliesVarNEqValue(int literal, int var, int64 value)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l01056">presolve_context.cc:1056</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a47714f887512a3d7acebfcb4a348291a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a47714f887512a3d7acebfcb4a348291a">operations_research::sat::PresolveContext::var_to_ub_only_constraints</a></div><div class="ttdeci">std::vector< absl::flat_hash_set< int > > var_to_ub_only_constraints</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00371">presolve_context.h:371</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a5accb3bf06cb7a63ce818d54f5741b31"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a5accb3bf06cb7a63ce818d54f5741b31">operations_research::sat::PresolveContext::enable_stats</a></div><div class="ttdeci">bool enable_stats</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00386">presolve_context.h:386</a></div></div>
|
|
<div class="ttc" id="adefault__search_8cc_html_ac673bc430bdc3fdaa09f7becf98ef267"><div class="ttname"><a href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a></div><div class="ttdeci">const std::string name</div><div class="ttdef"><b>Definition:</b> <a href="default__search_8cc_source.html#l00808">default_search.cc:808</a></div></div>
|
|
<div class="ttc" id="abitset_8h_html"><div class="ttname"><a href="bitset_8h.html">bitset.h</a></div></div>
|
|
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a55963ffe87280b37dce97b9a8cbd03ae"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a55963ffe87280b37dce97b9a8cbd03ae">operations_research::sat::kAffineRelationConstraint</a></div><div class="ttdeci">constexpr int kAffineRelationConstraint</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00036">presolve_context.h:36</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_abd6f7af5d9b31061a7b03ec44488ea4c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#abd6f7af5d9b31061a7b03ec44488ea4c">operations_research::sat::PresolveContext::NumAffineRelations</a></div><div class="ttdeci">int NumAffineRelations() const</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00212">presolve_context.h:212</a></div></div>
|
|
<div class="ttc" id="acp__model__utils_8h_html"><div class="ttname"><a href="cp__model__utils_8h.html">cp_model_utils.h</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_presolve_context_html_a24b22e509fdbdb4cd49ccec6a88c46ab"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_presolve_context.html#a24b22e509fdbdb4cd49ccec6a88c46ab">operations_research::sat::PresolveContext::ClearStats</a></div><div class="ttdeci">void ClearStats()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8cc_source.html#l00032">presolve_context.cc:32</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_literal_html_ad134f35430fd7787cea20a3714c123e0"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_literal.html#ad134f35430fd7787cea20a3714c123e0">operations_research::sat::SavedLiteral::SavedLiteral</a></div><div class="ttdeci">SavedLiteral(int ref)</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00048">presolve_context.h:48</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_saved_literal_html_a24f5a711e542ac97673337e549a74e7c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_saved_literal.html#a24f5a711e542ac97673337e549a74e7c">operations_research::sat::SavedLiteral::SavedLiteral</a></div><div class="ttdeci">SavedLiteral()</div><div class="ttdef"><b>Definition:</b> <a href="presolve__context_8h_source.html#l00047">presolve_context.h:47</a></div></div>
|
|
<!-- 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.20 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|