367 lines
64 KiB
HTML
367 lines
64 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.18"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>OR-Tools: linear_constraint_manager.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.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.18 -->
|
|
<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('linear__constraint__manager_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">linear_constraint_manager.h</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="linear__constraint__manager_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_LINEAR_CONSTRAINT_MANAGER_H_</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#define OR_TOOLS_SAT_LINEAR_CONSTRAINT_MANAGER_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 <cstddef></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 "absl/container/flat_hash_map.h"</span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "absl/container/flat_hash_set.h"</span></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include "<a class="code" href="revised__simplex_8h.html">ortools/glop/revised_simplex.h</a>"</span></div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include "<a class="code" href="linear__constraint_8h.html">ortools/sat/linear_constraint.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_2model_8h.html">ortools/sat/model.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__parameters_8pb_8h.html">ortools/sat/sat_parameters.pb.h</a>"</span></div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</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="l00027"></a><span class="lineno"> 27</span>  </div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">namespace </span><a class="code" href="namespaceoperations__research.html">operations_research</a> {</div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">namespace </span>sat {</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="comment">// This class holds a list of globally valid linear constraints and has some</span></div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// logic to decide which one should be part of the LP relaxation. We want more</span></div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment">// for a better relaxation, but for efficiency we do not want to have too much</span></div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment">// constraints while solving the LP.</span></div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// This class is meant to contain all the initial constraints of the LP</span></div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment">// relaxation and to get new cuts as they are generated. Thus, it can both</span></div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment">// manage cuts but also only add the initial constraints lazily if there is too</span></div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment">// many of them.</span></div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html"> 40</a></span> <span class="keyword">class </span><a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html">LinearConstraintManager</a> {</div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html"> 42</a></span>  <span class="keyword">struct </span><a class="code" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html">ConstraintInfo</a> {</div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a032d3e55dc38f64c8914c8a6f9d3ba66"> 43</a></span>  <a class="code" href="structoperations__research_1_1sat_1_1LinearConstraint.html">LinearConstraint</a> <a class="code" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a032d3e55dc38f64c8914c8a6f9d3ba66">constraint</a>;</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a2a897122b37c5a906205687aecdb627b"> 44</a></span>  <span class="keywordtype">double</span> <a class="code" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a2a897122b37c5a906205687aecdb627b">l2_norm</a> = 0.0;</div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#ad49d1fd0ab44be51168b3f203f273c1e"> 45</a></span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#ad49d1fd0ab44be51168b3f203f273c1e">inactive_count</a> = 0;</div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a0e28c752246171950355c329b48f2642"> 46</a></span>  <span class="keywordtype">double</span> <a class="code" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a0e28c752246171950355c329b48f2642">objective_parallelism</a> = 0.0;</div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a9b067b51be5391d99da97806a62da560"> 47</a></span>  <span class="keywordtype">bool</span> <a class="code" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a9b067b51be5391d99da97806a62da560">objective_parallelism_computed</a> = <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a04af0b6ebbb703c086fd02f565893b77"> 48</a></span>  <span class="keywordtype">bool</span> <a class="code" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a04af0b6ebbb703c086fd02f565893b77">is_in_lp</a> = <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a2b07c49e916f21a26aa731f4db68785a"> 49</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a2b07c49e916f21a26aa731f4db68785a">hash</a>;</div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a8a4f9b10d73c36bcab51eaeec3f1e5b6"> 50</a></span>  <span class="keywordtype">double</span> <a class="code" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a8a4f9b10d73c36bcab51eaeec3f1e5b6">current_score</a> = 0.0;</div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  </div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="comment">// Updated only for deletable constraints. This is incremented every time</span></div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="comment">// ChangeLp() is called and the constraint is active in the LP or not in the</span></div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="comment">// LP and violated.</span></div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a64cbd77208a462a2d718ed0be41d4b6c"> 55</a></span>  <span class="keywordtype">double</span> <a class="code" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a64cbd77208a462a2d718ed0be41d4b6c">active_count</a> = 0.0;</div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  </div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="comment">// For now, we mark all the generated cuts as deletable and the problem</span></div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="comment">// constraints as undeletable.</span></div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="comment">// TODO(user): We can have a better heuristics. Some generated good cuts</span></div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="comment">// can be marked undeletable and some unused problem specified constraints</span></div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="comment">// can be marked deletable.</span></div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a3aff95685ad7d3e3e26fe0427d3ed1b4"> 62</a></span>  <span class="keywordtype">bool</span> <a class="code" href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a3aff95685ad7d3e3e26fe0427d3ed1b4">is_deletable</a> = <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  };</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  </div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#ae6b8a1c5b934ebd045481bbd0825229d"> 65</a></span>  <span class="keyword">explicit</span> <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#ae6b8a1c5b934ebd045481bbd0825229d">LinearConstraintManager</a>(<a class="code" href="classoperations__research_1_1sat_1_1Model.html">Model</a>* <a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>)</div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  : sat_parameters_(*<a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>->GetOrCreate<SatParameters>()),</div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  integer_trail_(*<a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>->GetOrCreate<<a class="code" href="classoperations__research_1_1sat_1_1IntegerTrail.html">IntegerTrail</a>>()),</div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  time_limit_(<a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>->GetOrCreate<<a class="code" href="classoperations__research_1_1TimeLimit.html">TimeLimit</a>>()),</div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  model_(<a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>) {}</div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a032fff0a8f02355526b35c826af7804e">~LinearConstraintManager</a>();</div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  </div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="comment">// Add a new constraint to the manager. Note that we canonicalize constraints</span></div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="comment">// and merge the bounds of constraints with the same terms. We also perform</span></div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="comment">// basic preprocessing. If added is given, it will be set to true if this</span></div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="comment">// constraint was actually a new one and to false if it was dominated by an</span></div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="comment">// already existing one.</span></div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a22483b5c88e08d5407ba0d4aa1b021fe"> 77</a></span>  <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a22483b5c88e08d5407ba0d4aa1b021fe">DEFINE_INT_TYPE</a>(ConstraintIndex, <a class="code" href="integral__types_8h.html#a56f1a81c92849566ae864511088eb7e8">int32</a>);</div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  ConstraintIndex <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a40e3f0f21a2c16b673c84f734ba6d095">Add</a>(<a class="code" href="structoperations__research_1_1sat_1_1LinearConstraint.html">LinearConstraint</a> <a class="code" href="demon__profiler_8cc.html#a05da18ca9c7b657a4a6ea24e07c9b695">ct</a>, <span class="keywordtype">bool</span>* added = <span class="keyword">nullptr</span>);</div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  </div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="comment">// Same as Add(), but logs some information about the newly added constraint.</span></div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="comment">// Cuts are also handled slightly differently than normal constraints.</span></div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="comment">// Returns true if a new cut was added and false if this cut is not</span></div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="comment">// efficacious or if it is a duplicate of an already existing one.</span></div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#ad7adb503e78ae317a4406bdaca027494">AddCut</a>(<a class="code" href="structoperations__research_1_1sat_1_1LinearConstraint.html">LinearConstraint</a> <a class="code" href="demon__profiler_8cc.html#a05da18ca9c7b657a4a6ea24e07c9b695">ct</a>, std::string type_name,</div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keyword">const</span> <a class="code" href="classgtl_1_1ITIVector.html">gtl::ITIVector<IntegerVariable, double></a>& lp_solution,</div>
|
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  std::string extra_info = <span class="stringliteral">""</span>);</div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  </div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="comment">// The objective is used as one of the criterion to score cuts.</span></div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="comment">// The more a cut is parallel to the objective, the better its score is.</span></div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a36295bfe464bcdb6465fe796a43d02bf">SetObjectiveCoefficient</a>(IntegerVariable <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, IntegerValue coeff);</div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  </div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="comment">// Heuristic to decides what LP is best solved next. The given lp_solution</span></div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="comment">// should usually be the optimal solution of the LP returned by GetLp() before</span></div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="comment">// this call, but is just used as an heuristic.</span></div>
|
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="comment">// The current solution state is used for detecting inactive constraints. It</span></div>
|
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="comment">// is also updated correctly on constraint deletion/addition so that the</span></div>
|
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="comment">// simplex can be fully iterative on restart by loading this modified state.</span></div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="comment">// Returns true iff LpConstraints() will return a different LP than before.</span></div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a6331d8bf294b5b9109c00587edbbbfd4">ChangeLp</a>(<span class="keyword">const</span> <a class="code" href="classgtl_1_1ITIVector.html">gtl::ITIVector<IntegerVariable, double></a>& lp_solution,</div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <a class="code" href="structoperations__research_1_1glop_1_1BasisState.html">glop::BasisState</a>* solution_state);</div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  </div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="comment">// This can be called initially to add all the current constraint to the LP</span></div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="comment">// returned by GetLp().</span></div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a87cc96a3e72099107712a0386d89d851">AddAllConstraintsToLp</a>();</div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  </div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="comment">// All the constraints managed by this class.</span></div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a9237eb694669db60141fc6edccf47123"> 110</a></span>  <span class="keyword">const</span> <a class="code" href="classgtl_1_1ITIVector.html">gtl::ITIVector<ConstraintIndex, ConstraintInfo></a>& <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a9237eb694669db60141fc6edccf47123">AllConstraints</a>()<span class="keyword"></span></div>
|
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="keyword"> const </span>{</div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keywordflow">return</span> constraint_infos_;</div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</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">// The set of constraints indices in AllConstraints() that should be part</span></div>
|
|
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="comment">// of the next LP to solve.</span></div>
|
|
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a84ae5ff883fcce91f758a729af446864"> 117</a></span>  <span class="keyword">const</span> std::vector<ConstraintIndex>& <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a84ae5ff883fcce91f758a729af446864">LpConstraints</a>()<span class="keyword"> const </span>{</div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">return</span> lp_constraints_;</div>
|
|
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  }</div>
|
|
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  </div>
|
|
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#aacee5a7830a4e0094e7d0f6781d51615"> 121</a></span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#aacee5a7830a4e0094e7d0f6781d51615">num_cuts</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> num_cuts_; }</div>
|
|
<div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a2f12f20ef76075b36e0be0543bd6e9f3"> 122</a></span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a2f12f20ef76075b36e0be0543bd6e9f3">num_shortened_constraints</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> num_shortened_constraints_; }</div>
|
|
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a345d5056b2f5d5a5a2f415ecc73faa27"> 123</a></span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a345d5056b2f5d5a5a2f415ecc73faa27">num_coeff_strenghtening</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> num_coeff_strenghtening_; }</div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  </div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="comment">// If a debug solution has been loaded, this checks if the given constaint cut</span></div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="comment">// it or not. Returns true iff everything is fine and the cut does not violate</span></div>
|
|
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="comment">// the loaded solution.</span></div>
|
|
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a1afbe8d162a9cba17a520812ec6d3dd4">DebugCheckConstraint</a>(<span class="keyword">const</span> <a class="code" href="structoperations__research_1_1sat_1_1LinearConstraint.html">LinearConstraint</a>& cut);</div>
|
|
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  </div>
|
|
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="comment">// Heuristic that decide which constraints we should remove from the current</span></div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="comment">// LP. Note that such constraints can be added back later by the heuristic</span></div>
|
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="comment">// responsible for adding new constraints from the pool.</span></div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="comment">// Returns true iff one or more constraints where removed.</span></div>
|
|
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="comment">// If the solutions_state is empty, then this function does nothing and</span></div>
|
|
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="comment">// returns false (this is used for tests). Otherwise, the solutions_state is</span></div>
|
|
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="comment">// assumed to correspond to the current LP and to be of the correct size.</span></div>
|
|
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordtype">bool</span> MaybeRemoveSomeInactiveConstraints(<a class="code" href="structoperations__research_1_1glop_1_1BasisState.html">glop::BasisState</a>* solution_state);</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">// Apply basic inprocessing simplification rules:</span></div>
|
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="comment">// - remove fixed variable</span></div>
|
|
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="comment">// - reduce large coefficient (i.e. coeff strenghtenning or big-M reduction).</span></div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="comment">// This uses level-zero bounds.</span></div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="comment">// Returns true if the terms of the constraint changed.</span></div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keywordtype">bool</span> SimplifyConstraint(<a class="code" href="structoperations__research_1_1sat_1_1LinearConstraint.html">LinearConstraint</a>* <a class="code" href="demon__profiler_8cc.html#a05da18ca9c7b657a4a6ea24e07c9b695">ct</a>);</div>
|
|
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  </div>
|
|
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="comment">// Helper method to compute objective parallelism for a given constraint. This</span></div>
|
|
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="comment">// also lazily computes objective norm.</span></div>
|
|
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="keywordtype">void</span> ComputeObjectiveParallelism(<span class="keyword">const</span> ConstraintIndex ct_index);</div>
|
|
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  </div>
|
|
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="comment">// Multiplies all active counts and the increment counter by the given</span></div>
|
|
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="comment">// 'scaling_factor'. This should be called when at least one of the active</span></div>
|
|
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="comment">// counts is too high.</span></div>
|
|
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keywordtype">void</span> RescaleActiveCounts(<span class="keywordtype">double</span> scaling_factor);</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">// Removes some deletable constraints with low active counts. For now, we</span></div>
|
|
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="comment">// don't remove any constraints which are already in LP.</span></div>
|
|
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordtype">void</span> PermanentlyRemoveSomeConstraints();</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="keyword">const</span> SatParameters& sat_parameters_;</div>
|
|
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1sat_1_1IntegerTrail.html">IntegerTrail</a>& integer_trail_;</div>
|
|
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  </div>
|
|
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="comment">// Set at true by Add()/SimplifyConstraint() and at false by ChangeLp().</span></div>
|
|
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keywordtype">bool</span> current_lp_is_changed_ = <span class="keyword">false</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">// Optimization to avoid calling SimplifyConstraint() when not needed.</span></div>
|
|
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> last_simplification_timestamp_ = 0;</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>  <a class="code" href="classgtl_1_1ITIVector.html">gtl::ITIVector<ConstraintIndex, ConstraintInfo></a> constraint_infos_;</div>
|
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  </div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="comment">// The subset of constraints currently in the lp.</span></div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  std::vector<ConstraintIndex> lp_constraints_;</div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  </div>
|
|
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="comment">// We keep a map from the hash of our constraint terms to their position in</span></div>
|
|
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="comment">// constraints_. This is an optimization to detect duplicate constraints. We</span></div>
|
|
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="comment">// are robust to collisions because we always relies on the ground truth</span></div>
|
|
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="comment">// contained in constraints_ and the code is still okay if we do not merge the</span></div>
|
|
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="comment">// constraints.</span></div>
|
|
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  absl::flat_hash_map<size_t, ConstraintIndex> equiv_constraints_;</div>
|
|
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  </div>
|
|
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> num_merged_constraints_ = 0;</div>
|
|
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> num_shortened_constraints_ = 0;</div>
|
|
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> num_splitted_constraints_ = 0;</div>
|
|
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> num_coeff_strenghtening_ = 0;</div>
|
|
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  </div>
|
|
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <a class="code" href="integral__types_8h.html#a7cde0074dfd288f2d70c0e035dacb28a">int64</a> num_cuts_ = 0;</div>
|
|
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  std::map<std::string, int> type_to_num_cuts_;</div>
|
|
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  </div>
|
|
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keywordtype">bool</span> objective_is_defined_ = <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordtype">bool</span> objective_norm_computed_ = <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <span class="keywordtype">double</span> objective_l2_norm_ = 0.0;</div>
|
|
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  </div>
|
|
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="comment">// Dense representation of the objective coeffs indexed by positive variables</span></div>
|
|
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="comment">// indices. It contains 0.0 where the variables does not appear in the</span></div>
|
|
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="comment">// objective.</span></div>
|
|
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <a class="code" href="classgtl_1_1ITIVector.html">gtl::ITIVector<IntegerVariable, double></a> dense_objective_coeffs_;</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>  <a class="code" href="classoperations__research_1_1TimeLimit.html">TimeLimit</a>* time_limit_;</div>
|
|
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <a class="code" href="classoperations__research_1_1sat_1_1Model.html">Model</a>* model_;</div>
|
|
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  </div>
|
|
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="comment">// We want to decay the active counts of all constraints at each call and</span></div>
|
|
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="comment">// increase the active counts of active/violated constraints. However this can</span></div>
|
|
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="comment">// be too slow in practice. So instead, we keep an increment counter and</span></div>
|
|
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="comment">// update only the active/violated constraints. The counter itself is</span></div>
|
|
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="comment">// increased by a factor at each call. This has the same effect as decaying</span></div>
|
|
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="comment">// all the active counts at each call. This trick is similar to sat clause</span></div>
|
|
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="comment">// management.</span></div>
|
|
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="keywordtype">double</span> constraint_active_count_increase_ = 1.0;</div>
|
|
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  </div>
|
|
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <a class="code" href="integral__types_8h.html#a56f1a81c92849566ae864511088eb7e8">int32</a> num_deletable_constraints_ = 0;</div>
|
|
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span> };</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">// namespace sat</span></div>
|
|
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span> } <span class="comment">// namespace operations_research</span></div>
|
|
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  </div>
|
|
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span> <span class="preprocessor">#endif // OR_TOOLS_SAT_LINEAR_CONSTRAINT_MANAGER_H_</span></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1LinearConstraintManager_html_ae6b8a1c5b934ebd045481bbd0825229d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#ae6b8a1c5b934ebd045481bbd0825229d">operations_research::sat::LinearConstraintManager::LinearConstraintManager</a></div><div class="ttdeci">LinearConstraintManager(Model *model)</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00065">linear_constraint_manager.h:65</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1LinearConstraintManager_html_a345d5056b2f5d5a5a2f415ecc73faa27"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a345d5056b2f5d5a5a2f415ecc73faa27">operations_research::sat::LinearConstraintManager::num_coeff_strenghtening</a></div><div class="ttdeci">int64 num_coeff_strenghtening() const</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00123">linear_constraint_manager.h:123</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="atime__limit_8h_html"><div class="ttname"><a href="time__limit_8h.html">time_limit.h</a></div></div>
|
|
<div class="ttc" id="alinear__constraint_8h_html"><div class="ttname"><a href="linear__constraint_8h.html">linear_constraint.h</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1LinearConstraintManager_html_a2f12f20ef76075b36e0be0543bd6e9f3"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a2f12f20ef76075b36e0be0543bd6e9f3">operations_research::sat::LinearConstraintManager::num_shortened_constraints</a></div><div class="ttdeci">int64 num_shortened_constraints() const</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00122">linear_constraint_manager.h:122</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1LinearConstraintManager_html_ad7adb503e78ae317a4406bdaca027494"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#ad7adb503e78ae317a4406bdaca027494">operations_research::sat::LinearConstraintManager::AddCut</a></div><div class="ttdeci">bool AddCut(LinearConstraint ct, std::string type_name, const gtl::ITIVector< IntegerVariable, double > &lp_solution, std::string extra_info="")</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8cc_source.html#l00204">linear_constraint_manager.cc:204</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="astructoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo_html_a2b07c49e916f21a26aa731f4db68785a"><div class="ttname"><a href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a2b07c49e916f21a26aa731f4db68785a">operations_research::sat::LinearConstraintManager::ConstraintInfo::hash</a></div><div class="ttdeci">size_t hash</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00049">linear_constraint_manager.h:49</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1LinearConstraintManager_html_a6331d8bf294b5b9109c00587edbbbfd4"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a6331d8bf294b5b9109c00587edbbbfd4">operations_research::sat::LinearConstraintManager::ChangeLp</a></div><div class="ttdeci">bool ChangeLp(const gtl::ITIVector< IntegerVariable, double > &lp_solution, glop::BasisState *solution_state)</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8cc_source.html#l00437">linear_constraint_manager.cc:437</a></div></div>
|
|
<div class="ttc" id="astructoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo_html_a04af0b6ebbb703c086fd02f565893b77"><div class="ttname"><a href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a04af0b6ebbb703c086fd02f565893b77">operations_research::sat::LinearConstraintManager::ConstraintInfo::is_in_lp</a></div><div class="ttdeci">bool is_in_lp</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00048">linear_constraint_manager.h:48</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1IntegerTrail_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1IntegerTrail.html">operations_research::sat::IntegerTrail</a></div><div class="ttdef"><b>Definition:</b> <a href="integer_8h_source.html#l00534">integer.h:534</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="astructoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo_html_ad49d1fd0ab44be51168b3f203f273c1e"><div class="ttname"><a href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#ad49d1fd0ab44be51168b3f203f273c1e">operations_research::sat::LinearConstraintManager::ConstraintInfo::inactive_count</a></div><div class="ttdeci">int64 inactive_count</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00045">linear_constraint_manager.h:45</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1Model_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1Model.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="aintegral__types_8h_html_a56f1a81c92849566ae864511088eb7e8"><div class="ttname"><a href="integral__types_8h.html#a56f1a81c92849566ae864511088eb7e8">int32</a></div><div class="ttdeci">int int32</div><div class="ttdef"><b>Definition:</b> <a href="integral__types_8h_source.html#l00033">integral_types.h:33</a></div></div>
|
|
<div class="ttc" id="arevised__simplex_8h_html"><div class="ttname"><a href="revised__simplex_8h.html">revised_simplex.h</a></div></div>
|
|
<div class="ttc" id="astructoperations__research_1_1glop_1_1BasisState_html"><div class="ttname"><a href="structoperations__research_1_1glop_1_1BasisState.html">operations_research::glop::BasisState</a></div><div class="ttdef"><b>Definition:</b> <a href="revised__simplex_8h_source.html#l00132">revised_simplex.h:132</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1LinearConstraintManager_html_a40e3f0f21a2c16b673c84f734ba6d095"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a40e3f0f21a2c16b673c84f734ba6d095">operations_research::sat::LinearConstraintManager::Add</a></div><div class="ttdeci">ConstraintIndex Add(LinearConstraint ct, bool *added=nullptr)</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8cc_source.html#l00122">linear_constraint_manager.cc:122</a></div></div>
|
|
<div class="ttc" id="astructoperations__research_1_1sat_1_1LinearConstraint_html"><div class="ttname"><a href="structoperations__research_1_1sat_1_1LinearConstraint.html">operations_research::sat::LinearConstraint</a></div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint_8h_source.html#l00039">linear_constraint.h:39</a></div></div>
|
|
<div class="ttc" id="astructoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo_html_a032d3e55dc38f64c8914c8a6f9d3ba66"><div class="ttname"><a href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a032d3e55dc38f64c8914c8a6f9d3ba66">operations_research::sat::LinearConstraintManager::ConstraintInfo::constraint</a></div><div class="ttdeci">LinearConstraint constraint</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00043">linear_constraint_manager.h:43</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_1LinearConstraintManager_html_a22483b5c88e08d5407ba0d4aa1b021fe"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a22483b5c88e08d5407ba0d4aa1b021fe">operations_research::sat::LinearConstraintManager::DEFINE_INT_TYPE</a></div><div class="ttdeci">DEFINE_INT_TYPE(ConstraintIndex, int32)</div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1TimeLimit_html"><div class="ttname"><a href="classoperations__research_1_1TimeLimit.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="astructoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo_html_a8a4f9b10d73c36bcab51eaeec3f1e5b6"><div class="ttname"><a href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a8a4f9b10d73c36bcab51eaeec3f1e5b6">operations_research::sat::LinearConstraintManager::ConstraintInfo::current_score</a></div><div class="ttdeci">double current_score</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00050">linear_constraint_manager.h:50</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_1LinearConstraintManager_html_a84ae5ff883fcce91f758a729af446864"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a84ae5ff883fcce91f758a729af446864">operations_research::sat::LinearConstraintManager::LpConstraints</a></div><div class="ttdeci">const std::vector< ConstraintIndex > & LpConstraints() const</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00117">linear_constraint_manager.h:117</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1LinearConstraintManager_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html">operations_research::sat::LinearConstraintManager</a></div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00040">linear_constraint_manager.h:40</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#l00195">gurobi_interface.cc:195</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1LinearConstraintManager_html_a87cc96a3e72099107712a0386d89d851"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a87cc96a3e72099107712a0386d89d851">operations_research::sat::LinearConstraintManager::AddAllConstraintsToLp</a></div><div class="ttdeci">void AddAllConstraintsToLp()</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8cc_source.html#l00669">linear_constraint_manager.cc:669</a></div></div>
|
|
<div class="ttc" id="astructoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo_html_a9b067b51be5391d99da97806a62da560"><div class="ttname"><a href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a9b067b51be5391d99da97806a62da560">operations_research::sat::LinearConstraintManager::ConstraintInfo::objective_parallelism_computed</a></div><div class="ttdeci">bool objective_parallelism_computed</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00047">linear_constraint_manager.h:47</a></div></div>
|
|
<div class="ttc" id="astructoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo_html_a0e28c752246171950355c329b48f2642"><div class="ttname"><a href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a0e28c752246171950355c329b48f2642">operations_research::sat::LinearConstraintManager::ConstraintInfo::objective_parallelism</a></div><div class="ttdeci">double objective_parallelism</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00046">linear_constraint_manager.h:46</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1LinearConstraintManager_html_a9237eb694669db60141fc6edccf47123"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a9237eb694669db60141fc6edccf47123">operations_research::sat::LinearConstraintManager::AllConstraints</a></div><div class="ttdeci">const gtl::ITIVector< ConstraintIndex, ConstraintInfo > & AllConstraints() const</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00110">linear_constraint_manager.h:110</a></div></div>
|
|
<div class="ttc" id="astructoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo_html_a2a897122b37c5a906205687aecdb627b"><div class="ttname"><a href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a2a897122b37c5a906205687aecdb627b">operations_research::sat::LinearConstraintManager::ConstraintInfo::l2_norm</a></div><div class="ttdeci">double l2_norm</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00044">linear_constraint_manager.h:44</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1LinearConstraintManager_html_aacee5a7830a4e0094e7d0f6781d51615"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#aacee5a7830a4e0094e7d0f6781d51615">operations_research::sat::LinearConstraintManager::num_cuts</a></div><div class="ttdeci">int64 num_cuts() const</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00121">linear_constraint_manager.h:121</a></div></div>
|
|
<div class="ttc" id="astructoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo_html_a3aff95685ad7d3e3e26fe0427d3ed1b4"><div class="ttname"><a href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a3aff95685ad7d3e3e26fe0427d3ed1b4">operations_research::sat::LinearConstraintManager::ConstraintInfo::is_deletable</a></div><div class="ttdeci">bool is_deletable</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00062">linear_constraint_manager.h:62</a></div></div>
|
|
<div class="ttc" id="astructoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo_html"><div class="ttname"><a href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html">operations_research::sat::LinearConstraintManager::ConstraintInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00042">linear_constraint_manager.h:42</a></div></div>
|
|
<div class="ttc" id="aclassgtl_1_1ITIVector_html"><div class="ttname"><a href="classgtl_1_1ITIVector.html">gtl::ITIVector< IntegerVariable, double ></a></div></div>
|
|
<div class="ttc" id="astructoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo_html_a64cbd77208a462a2d718ed0be41d4b6c"><div class="ttname"><a href="structoperations__research_1_1sat_1_1LinearConstraintManager_1_1ConstraintInfo.html#a64cbd77208a462a2d718ed0be41d4b6c">operations_research::sat::LinearConstraintManager::ConstraintInfo::active_count</a></div><div class="ttdeci">double active_count</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8h_source.html#l00055">linear_constraint_manager.h:55</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1LinearConstraintManager_html_a032fff0a8f02355526b35c826af7804e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a032fff0a8f02355526b35c826af7804e">operations_research::sat::LinearConstraintManager::~LinearConstraintManager</a></div><div class="ttdeci">~LinearConstraintManager()</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8cc_source.html#l00045">linear_constraint_manager.cc:45</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1LinearConstraintManager_html_a1afbe8d162a9cba17a520812ec6d3dd4"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a1afbe8d162a9cba17a520812ec6d3dd4">operations_research::sat::LinearConstraintManager::DebugCheckConstraint</a></div><div class="ttdeci">bool DebugCheckConstraint(const LinearConstraint &cut)</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8cc_source.html#l00677">linear_constraint_manager.cc:677</a></div></div>
|
|
<div class="ttc" id="aclassoperations__research_1_1sat_1_1LinearConstraintManager_html_a36295bfe464bcdb6465fe796a43d02bf"><div class="ttname"><a href="classoperations__research_1_1sat_1_1LinearConstraintManager.html#a36295bfe464bcdb6465fe796a43d02bf">operations_research::sat::LinearConstraintManager::SetObjectiveCoefficient</a></div><div class="ttdeci">void SetObjectiveCoefficient(IntegerVariable var, IntegerValue coeff)</div><div class="ttdef"><b>Definition:</b> <a href="linear__constraint__manager_8cc_source.html#l00298">linear_constraint_manager.cc:298</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="linear__constraint__manager_8h.html">linear_constraint_manager.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.18 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|