Files
ortools-clone/docs/cpp/math__opt_2cpp_2model_8cc_source.html
Mizux Seiha 3b81c981c2 Update doc
2022-03-04 00:19:15 +01:00

401 lines
96 KiB
HTML

<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OR-Tools: model.cc Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="styleSheet.tmp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="orLogo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">OR-Tools
&#160;<span id="projectnumber">9.3</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('math__opt_2cpp_2model_8cc_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle"><div class="title">math_opt/cpp/model.cc</div></div>
</div><!--header-->
<div class="contents">
<a href="math__opt_2cpp_2model_8cc.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright 2010-2021 Google LLC</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">// you may not use this file except in compliance with the License.</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// You may obtain a copy of the License at</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">//</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">//</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// See the License for the specific language governing permissions and</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// limitations under the License.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &quot;<a class="code" href="math__opt_2cpp_2model_8h.html">ortools/math_opt/cpp/model.h</a>&quot;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include &lt;algorithm&gt;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &lt;utility&gt;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &quot;absl/container/flat_hash_map.h&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include &quot;absl/memory/memory.h&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include &quot;absl/status/status.h&quot;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#include &quot;absl/status/statusor.h&quot;</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="preprocessor">#include &quot;absl/strings/string_view.h&quot;</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor">#include &quot;<a class="code" href="base_2logging_8h.html">ortools/base/logging.h</a>&quot;</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor">#include &quot;<a class="code" href="base_2status__macros_8h.html">ortools/base/status_macros.h</a>&quot;</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor">#include &quot;<a class="code" href="strong__int_8h.html">ortools/base/strong_int.h</a>&quot;</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#include &quot;<a class="code" href="model__storage_8h.html">ortools/math_opt/core/model_storage.h</a>&quot;</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceoperations__research.html">operations_research</a> {</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceoperations__research_1_1math__opt.html">math_opt</a> {</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#a08f1235014ffac45467dca8c681cc72e"> 34</a></span>absl::StatusOr&lt;std::unique_ptr&lt;Model&gt;&gt; <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a08f1235014ffac45467dca8c681cc72e">Model::FromModelProto</a>(</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">const</span> ModelProto&amp; <a class="code hl_variable" href="cp__model__solver_8cc.html#a6ac76d8a372013f67c4973012948ec84">model_proto</a>) {</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <a class="code hl_define" href="base_2status__macros_8h.html#a600de4b8f65fe0a4b1898041634f9011">ASSIGN_OR_RETURN</a>(std::unique_ptr&lt;ModelStorage&gt; <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>,</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#a30e9766ac7cab4f98ac1dab04006cb85">ModelStorage::FromModelProto</a>(<a class="code hl_variable" href="cp__model__solver_8cc.html#a6ac76d8a372013f67c4973012948ec84">model_proto</a>));</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordflow">return</span> std::make_unique&lt;Model&gt;(std::move(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>));</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span>}</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#a4ba5e324b0384967ee724c9475ad9962"> 41</a></span><a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a4ba5e324b0384967ee724c9475ad9962">Model::Model</a>(<span class="keyword">const</span> absl::string_view <a class="code hl_variable" href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a>)</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> : storage_(<a class="code hl_namespace" href="namespacestd.html">std</a>::make_shared&lt;<a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_model_storage.html">ModelStorage</a>&gt;(<a class="code hl_variable" href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a>)) {}</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#a9f08ef7c44fc6b3c202e2e427b80e2a6"> 44</a></span><a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a4ba5e324b0384967ee724c9475ad9962">Model::Model</a>(std::unique_ptr&lt;ModelStorage&gt; storage)</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> : storage_(<a class="code hl_namespace" href="namespacestd.html">std</a>::move(storage)) {}</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#ab3161231bd30e3d2c6dfa891bee50351"> 47</a></span>std::unique_ptr&lt;Model&gt; <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#ab3161231bd30e3d2c6dfa891bee50351">Model::Clone</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">return</span> std::make_unique&lt;Model&gt;(storage_-&gt;Clone());</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span>}</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#a653db00bc10c458fb55a04f11c5f45c7"> 51</a></span><a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html">LinearConstraint</a> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a6bb7c904b32900d54a230a3baa210222">Model::AddLinearConstraint</a>(</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keyword">const</span> <a class="code hl_struct" href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html">BoundedLinearExpression</a>&amp; bounded_expr, absl::string_view <a class="code hl_variable" href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a>) {</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> CheckOptionalModel(bounded_expr.<a class="code hl_variable" href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html#a4a753905fdb2765209204ba37e6acc8d">expression</a>.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>());</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keyword">const</span> LinearConstraintId constraint = <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#aef798fd853e39de45ca855559f0df129">AddLinearConstraint</a>(</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> bounded_expr.<a class="code hl_function" href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html#afd871230f4ba44e57a59680fd1f558c8">lower_bound_minus_offset</a>(),</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> bounded_expr.<a class="code hl_function" href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html#a14eb87b4d0595a686844a9c07a4a2c36">upper_bound_minus_offset</a>(), <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a24dcbf29c0d6cd766009a182a6484e3b">name</a>);</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> [<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a573de99e23b221b80212e64166216b1d">variable</a>, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>] : bounded_expr.<a class="code hl_variable" href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html#a4a753905fdb2765209204ba37e6acc8d">expression</a>.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#ab68933b3045472cd31611b2bdb907da7">raw_terms</a>()) {</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#a773cd96209ac3afb1256dc1852f93ae7">set_linear_constraint_coefficient</a>(constraint, <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a573de99e23b221b80212e64166216b1d">variable</a>, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>);</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> }</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">return</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html">LinearConstraint</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>(), constraint);</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span>}</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#ac457c02a490aced8a2c1f9c9f470949d"> 64</a></span>std::vector&lt;Variable&gt; <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#ac457c02a490aced8a2c1f9c9f470949d">Model::Variables</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> std::vector&lt;Variable&gt; result;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> result.reserve(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a663e6fd290b30b948686c43cea697140">num_variables</a>());</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> VariableId var_id : <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;variables()) {</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> result.push_back(<a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_variable.html">Variable</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>(), var_id));</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> }</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>}</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#af7a9a5d5474c651ec1f3f608c435ec69"> 73</a></span>std::vector&lt;Variable&gt; <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7a9a5d5474c651ec1f3f608c435ec69">Model::SortedVariables</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> std::vector&lt;Variable&gt; result = <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#ac457c02a490aced8a2c1f9c9f470949d">Variables</a>();</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> std::sort(result.begin(), result.end(),</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> [](<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_variable.html">Variable</a>&amp; l, <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_variable.html">Variable</a>&amp; r) {</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> return l.typed_id() &lt; r.typed_id();</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> });</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span>}</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#ac633b0bee7b8716fd668e03fd1b8de1e"> 82</a></span>std::vector&lt;LinearConstraint&gt; <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#ac633b0bee7b8716fd668e03fd1b8de1e">Model::ColumnNonzeros</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_variable.html">Variable</a> variable) {</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> CheckModel(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a573de99e23b221b80212e64166216b1d">variable</a>.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_variable.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>());</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> std::vector&lt;LinearConstraint&gt; result;</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> LinearConstraintId constraint :</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;linear_constraints_with_variable(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a573de99e23b221b80212e64166216b1d">variable</a>.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_variable.html#afb60247d45f3b1af36cf247ea88ee42f">typed_id</a>())) {</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> result.push_back(<a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html">LinearConstraint</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>(), constraint));</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> }</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span>}</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#a204125848d0c24e3d01fec07c5b374e1"> 92</a></span>std::vector&lt;Variable&gt; <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a204125848d0c24e3d01fec07c5b374e1">Model::RowNonzeros</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html">LinearConstraint</a> constraint) {</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> CheckModel(constraint.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>());</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> std::vector&lt;Variable&gt; result;</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> VariableId <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a573de99e23b221b80212e64166216b1d">variable</a> :</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;variables_in_linear_constraint(constraint.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html#a88923ea053b4651fc41243579e6d9ede">typed_id</a>())) {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> result.push_back(<a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_variable.html">Variable</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>(), <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a573de99e23b221b80212e64166216b1d">variable</a>));</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> }</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span>}</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#a3e37b8b4fb56bb347c1dce5b84963bef"> 102</a></span><a class="code hl_struct" href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html">BoundedLinearExpression</a> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a3e37b8b4fb56bb347c1dce5b84963bef">Model::AsBoundedLinearExpression</a>(</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html">LinearConstraint</a> constraint) {</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> CheckModel(constraint.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>());</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_expression.html">LinearExpression</a> terms;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> VariableId <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a> :</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;variables_in_linear_constraint(constraint.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html#a88923ea053b4651fc41243579e6d9ede">typed_id</a>())) {</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> terms +=</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_variable.html">Variable</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>(), <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>) *</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#a3ddc996c67fe0a2aad20b724fd800128">linear_constraint_coefficient</a>(constraint.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html#a88923ea053b4651fc41243579e6d9ede">typed_id</a>(), <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> }</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#a678b766d3d2755e11ea611d010121c33">linear_constraint_lower_bound</a>(constraint.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html#a88923ea053b4651fc41243579e6d9ede">typed_id</a>()) &lt;=</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> std::move(terms) &lt;=</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#ab992747a7ee98bacfe6f73613de541b2">linear_constraint_upper_bound</a>(constraint.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html#a88923ea053b4651fc41243579e6d9ede">typed_id</a>());</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span>}</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#ace9c41488775289d7078818a4ed2735d"> 117</a></span>std::vector&lt;LinearConstraint&gt; <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#ace9c41488775289d7078818a4ed2735d">Model::LinearConstraints</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> std::vector&lt;LinearConstraint&gt; result;</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> result.reserve(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a2e6856997ce83e9841705b40d7fc626c">num_linear_constraints</a>());</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> LinearConstraintId lin_con_id : <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;linear_constraints()) {</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> result.push_back(<a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html">LinearConstraint</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>(), lin_con_id));</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> }</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span>}</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#adb61e0e02a25c120ed8abe9cf1b39749"> 126</a></span>std::vector&lt;LinearConstraint&gt; <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#adb61e0e02a25c120ed8abe9cf1b39749">Model::SortedLinearConstraints</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> std::vector&lt;LinearConstraint&gt; result = <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#ace9c41488775289d7078818a4ed2735d">LinearConstraints</a>();</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> std::sort(result.begin(), result.end(),</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> [](<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html">LinearConstraint</a>&amp; l, <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_constraint.html">LinearConstraint</a>&amp; r) {</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> return l.typed_id() &lt; r.typed_id();</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> });</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span>}</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#ae0795cbe289d18b76d9c7d2de80b72ac"> 135</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a411c84c15b9b55a9291bb48f05bef5b1">Model::SetObjective</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_expression.html">LinearExpression</a>&amp; objective,</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_maximize) {</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> CheckOptionalModel(objective.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>());</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#ad97af219ab4d62c806c052848a69dab3">clear_objective</a>();</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#aafbe56ff1eada47dff1b4626d455498f">set_is_maximize</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#aab068699099bdffd5c834f440cdc7e51">is_maximize</a>);</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#afe1e374f83d18136957c73fcaf399ba7">set_objective_offset</a>(objective.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#a96ffc785b7b2135c7980c985883ffdd3">offset</a>());</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> [<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>] : objective.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#ab68933b3045472cd31611b2bdb907da7">raw_terms</a>()) {</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#a41e65f404be4194aa05001eeccb35e25">set_linear_objective_coefficient</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>);</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> }</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span>}</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#a0fce64a8fc39376e029ea8c1f392124a"> 146</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a411c84c15b9b55a9291bb48f05bef5b1">Model::SetObjective</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html">QuadraticExpression</a>&amp; objective,</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_maximize) {</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> CheckOptionalModel(objective.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>());</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#ad97af219ab4d62c806c052848a69dab3">clear_objective</a>();</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#aafbe56ff1eada47dff1b4626d455498f">set_is_maximize</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#aab068699099bdffd5c834f440cdc7e51">is_maximize</a>);</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#afe1e374f83d18136957c73fcaf399ba7">set_objective_offset</a>(objective.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html#a96ffc785b7b2135c7980c985883ffdd3">offset</a>());</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> [<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>] : objective.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html#ab815a7226f7903753f05b8d135a297b2">raw_linear_terms</a>()) {</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#a41e65f404be4194aa05001eeccb35e25">set_linear_objective_coefficient</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>);</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> }</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> [vars, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>] : objective.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html#ab7b922f2437b3c5e6c134556e161f321">raw_quadratic_terms</a>()) {</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#a0ddfd5df19c6bb23ba205b2baf32cda3">set_quadratic_objective_coefficient</a>(vars.first, vars.second,</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>);</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> }</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span>}</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> </div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#a44d07fda87de8e523d654f7641128b8a"> 161</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a9a0051c4fb01225f8b101f8e06302027">Model::AddToObjective</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_expression.html">LinearExpression</a>&amp; objective_terms) {</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> CheckOptionalModel(objective_terms.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>());</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#afe1e374f83d18136957c73fcaf399ba7">set_objective_offset</a>(objective_terms.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#a96ffc785b7b2135c7980c985883ffdd3">offset</a>() +</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a6f3611559b9d19eb580c5768c963bd99">objective_offset</a>());</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> [<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>] : objective_terms.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#ab68933b3045472cd31611b2bdb907da7">raw_terms</a>()) {</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#a41e65f404be4194aa05001eeccb35e25">set_linear_objective_coefficient</a>(</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a> + <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;linear_objective_coefficient(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>));</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> }</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span>}</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> </div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#ae09cb1d2c37a70763663bab016d8485b"> 171</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a9a0051c4fb01225f8b101f8e06302027">Model::AddToObjective</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html">QuadraticExpression</a>&amp; objective_terms) {</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> CheckOptionalModel(objective_terms.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>());</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#afe1e374f83d18136957c73fcaf399ba7">set_objective_offset</a>(objective_terms.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html#a96ffc785b7b2135c7980c985883ffdd3">offset</a>() +</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a6f3611559b9d19eb580c5768c963bd99">objective_offset</a>());</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> [<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>] : objective_terms.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html#ab815a7226f7903753f05b8d135a297b2">raw_linear_terms</a>()) {</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#a41e65f404be4194aa05001eeccb35e25">set_linear_objective_coefficient</a>(</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a> + <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;linear_objective_coefficient(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>));</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> }</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> [vars, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>] : objective_terms.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html#ab7b922f2437b3c5e6c134556e161f321">raw_quadratic_terms</a>()) {</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#a0ddfd5df19c6bb23ba205b2baf32cda3">set_quadratic_objective_coefficient</a>(</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> vars.first, vars.second,</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a> + <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;quadratic_objective_coefficient(vars.first,</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> vars.second));</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> }</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span>}</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> </div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#a499fe16dd3550a9e1075cae616edcede"> 187</a></span><a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_expression.html">LinearExpression</a> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a499fe16dd3550a9e1075cae616edcede">Model::ObjectiveAsLinearExpression</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <a class="code hl_define" href="base_2logging_8h.html#a3e1cfef60e774a81f30eaddf26a3a274">CHECK</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;quadratic_objective().empty())</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> &lt;&lt; <span class="stringliteral">&quot;The objective function contains quadratic terms and cannot be &quot;</span></div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="stringliteral">&quot;represented as a LinearExpression&quot;</span>;</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_expression.html">LinearExpression</a> result = <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#a6f3611559b9d19eb580c5768c963bd99">objective_offset</a>();</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; [v, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>] : <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;linear_objective()) {</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> result += <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_variable.html">Variable</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>(), v) * <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>;</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> }</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span>}</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> </div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#abf7df57e999a0722ba15adb146815523"> 198</a></span><a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html">QuadraticExpression</a> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#abf7df57e999a0722ba15adb146815523">Model::ObjectiveAsQuadraticExpression</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html">QuadraticExpression</a> result = <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#a6f3611559b9d19eb580c5768c963bd99">objective_offset</a>();</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; [v, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>] : <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;linear_objective()) {</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> result += <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_variable.html">Variable</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>(), v) * <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>;</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> }</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; [vars, <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>] : <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;quadratic_objective()) {</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> result += <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_quadratic_term.html">QuadraticTerm</a>(<a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_variable.html">Variable</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>(), vars.first),</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_variable.html">Variable</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>(), vars.second), <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>);</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> }</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span>}</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> </div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#aa850c403983019f6676dda010d9ac3a5"> 210</a></span>ModelProto <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#aa850c403983019f6676dda010d9ac3a5">Model::ExportModel</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#aa850c403983019f6676dda010d9ac3a5">ExportModel</a>(); }</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> </div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#a450c7273cad88218b638714c83f7292b"> 212</a></span>std::unique_ptr&lt;UpdateTracker&gt; <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a450c7273cad88218b638714c83f7292b">Model::NewUpdateTracker</a>() {</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keywordflow">return</span> std::make_unique&lt;UpdateTracker&gt;(storage_);</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span>}</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> </div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_model.html#a735ce45a5a18153e276fb6199e2d99b3"> 216</a></span>absl::Status <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#a735ce45a5a18153e276fb6199e2d99b3">Model::ApplyUpdateProto</a>(<span class="keyword">const</span> ModelUpdateProto&amp; update_proto) {</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">storage</a>()-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_model_storage.html#a735ce45a5a18153e276fb6199e2d99b3">ApplyUpdateProto</a>(update_proto);</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span>}</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> </div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span>} <span class="comment">// namespace math_opt</span></div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span>} <span class="comment">// namespace operations_research</span></div>
<div class="ttc" id="abase_2logging_8h_html"><div class="ttname"><a href="base_2logging_8h.html">logging.h</a></div></div>
<div class="ttc" id="abase_2logging_8h_html_a3e1cfef60e774a81f30eaddf26a3a274"><div class="ttname"><a href="base_2logging_8h.html#a3e1cfef60e774a81f30eaddf26a3a274">CHECK</a></div><div class="ttdeci">#define CHECK(condition)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00495">base/logging.h:495</a></div></div>
<div class="ttc" id="abase_2status__macros_8h_html"><div class="ttname"><a href="base_2status__macros_8h.html">status_macros.h</a></div></div>
<div class="ttc" id="abase_2status__macros_8h_html_a600de4b8f65fe0a4b1898041634f9011"><div class="ttname"><a href="base_2status__macros_8h.html#a600de4b8f65fe0a4b1898041634f9011">ASSIGN_OR_RETURN</a></div><div class="ttdeci">#define ASSIGN_OR_RETURN(lhs, rexpr)</div><div class="ttdef"><b>Definition:</b> <a href="base_2status__macros_8h_source.html#l00046">base/status_macros.h:46</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_linear_constraint_html"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_linear_constraint.html">operations_research::math_opt::LinearConstraint</a></div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2linear__constraint_8h_source.html#l00033">math_opt/cpp/linear_constraint.h:33</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_linear_constraint_html_a88923ea053b4651fc41243579e6d9ede"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_linear_constraint.html#a88923ea053b4651fc41243579e6d9ede">operations_research::math_opt::LinearConstraint::typed_id</a></div><div class="ttdeci">LinearConstraintId typed_id() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2linear__constraint_8h_source.html#l00082">math_opt/cpp/linear_constraint.h:82</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_linear_constraint_html_af7b0464ca3ebd77bc51804e590e9b503"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_linear_constraint.html#af7b0464ca3ebd77bc51804e590e9b503">operations_research::math_opt::LinearConstraint::storage</a></div><div class="ttdeci">const ModelStorage * storage() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2linear__constraint_8h_source.html#l00084">math_opt/cpp/linear_constraint.h:84</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_linear_expression_html"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_linear_expression.html">operations_research::math_opt::LinearExpression</a></div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l00193">variable_and_expressions.h:193</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_linear_expression_html_a96ffc785b7b2135c7980c985883ffdd3"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_linear_expression.html#a96ffc785b7b2135c7980c985883ffdd3">operations_research::math_opt::LinearExpression::offset</a></div><div class="ttdeci">double offset() const</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l01254">variable_and_expressions.h:1254</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_linear_expression_html_ab68933b3045472cd31611b2bdb907da7"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_linear_expression.html#ab68933b3045472cd31611b2bdb907da7">operations_research::math_opt::LinearExpression::raw_terms</a></div><div class="ttdeci">const absl::flat_hash_map&lt; VariableId, double &gt; &amp; raw_terms() const</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l01260">variable_and_expressions.h:1260</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_linear_expression_html_af7b0464ca3ebd77bc51804e590e9b503"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_linear_expression.html#af7b0464ca3ebd77bc51804e590e9b503">operations_research::math_opt::LinearExpression::storage</a></div><div class="ttdeci">const ModelStorage * storage() const</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l01256">variable_and_expressions.h:1256</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a08f1235014ffac45467dca8c681cc72e"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a08f1235014ffac45467dca8c681cc72e">operations_research::math_opt::Model::FromModelProto</a></div><div class="ttdeci">static absl::StatusOr&lt; std::unique_ptr&lt; Model &gt; &gt; FromModelProto(const ModelProto &amp;model_proto)</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00034">math_opt/cpp/model.cc:34</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a204125848d0c24e3d01fec07c5b374e1"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a204125848d0c24e3d01fec07c5b374e1">operations_research::math_opt::Model::RowNonzeros</a></div><div class="ttdeci">std::vector&lt; Variable &gt; RowNonzeros(LinearConstraint constraint)</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00092">math_opt/cpp/model.cc:92</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a24dcbf29c0d6cd766009a182a6484e3b"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a24dcbf29c0d6cd766009a182a6484e3b">operations_research::math_opt::Model::name</a></div><div class="ttdeci">const std::string &amp; name() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8h_source.html#l00486">math_opt/cpp/model.h:486</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a2e6856997ce83e9841705b40d7fc626c"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a2e6856997ce83e9841705b40d7fc626c">operations_research::math_opt::Model::num_linear_constraints</a></div><div class="ttdeci">int num_linear_constraints() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8h_source.html#l00600">math_opt/cpp/model.h:600</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a3e37b8b4fb56bb347c1dce5b84963bef"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a3e37b8b4fb56bb347c1dce5b84963bef">operations_research::math_opt::Model::AsBoundedLinearExpression</a></div><div class="ttdeci">BoundedLinearExpression AsBoundedLinearExpression(LinearConstraint constraint)</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00102">math_opt/cpp/model.cc:102</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a411c84c15b9b55a9291bb48f05bef5b1"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a411c84c15b9b55a9291bb48f05bef5b1">operations_research::math_opt::Model::SetObjective</a></div><div class="ttdeci">void SetObjective(double objective, bool is_maximize)</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8h_source.html#l00711">math_opt/cpp/model.h:711</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a450c7273cad88218b638714c83f7292b"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a450c7273cad88218b638714c83f7292b">operations_research::math_opt::Model::NewUpdateTracker</a></div><div class="ttdeci">std::unique_ptr&lt; UpdateTracker &gt; NewUpdateTracker()</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00212">math_opt/cpp/model.cc:212</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a499fe16dd3550a9e1075cae616edcede"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a499fe16dd3550a9e1075cae616edcede">operations_research::math_opt::Model::ObjectiveAsLinearExpression</a></div><div class="ttdeci">LinearExpression ObjectiveAsLinearExpression() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00187">math_opt/cpp/model.cc:187</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a4ba5e324b0384967ee724c9475ad9962"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a4ba5e324b0384967ee724c9475ad9962">operations_research::math_opt::Model::Model</a></div><div class="ttdeci">Model(absl::string_view name=&quot;&quot;)</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00041">math_opt/cpp/model.cc:41</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a573de99e23b221b80212e64166216b1d"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a573de99e23b221b80212e64166216b1d">operations_research::math_opt::Model::variable</a></div><div class="ttdeci">Variable variable(int64_t id) const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8h_source.html#l00533">math_opt/cpp/model.h:533</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a663e6fd290b30b948686c43cea697140"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a663e6fd290b30b948686c43cea697140">operations_research::math_opt::Model::num_variables</a></div><div class="ttdeci">int num_variables() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8h_source.html#l00519">math_opt/cpp/model.h:519</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a6bb7c904b32900d54a230a3baa210222"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a6bb7c904b32900d54a230a3baa210222">operations_research::math_opt::Model::AddLinearConstraint</a></div><div class="ttdeci">LinearConstraint AddLinearConstraint(absl::string_view name=&quot;&quot;)</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8h_source.html#l00585">math_opt/cpp/model.h:585</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a6f3611559b9d19eb580c5768c963bd99"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a6f3611559b9d19eb580c5768c963bd99">operations_research::math_opt::Model::objective_offset</a></div><div class="ttdeci">double objective_offset() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8h_source.html#l00775">math_opt/cpp/model.h:775</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a735ce45a5a18153e276fb6199e2d99b3"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a735ce45a5a18153e276fb6199e2d99b3">operations_research::math_opt::Model::ApplyUpdateProto</a></div><div class="ttdeci">absl::Status ApplyUpdateProto(const ModelUpdateProto &amp;update_proto)</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00216">math_opt/cpp/model.cc:216</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_a9a0051c4fb01225f8b101f8e06302027"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#a9a0051c4fb01225f8b101f8e06302027">operations_research::math_opt::Model::AddToObjective</a></div><div class="ttdeci">void AddToObjective(double objective)</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8h_source.html#l00721">math_opt/cpp/model.h:721</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_aa850c403983019f6676dda010d9ac3a5"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#aa850c403983019f6676dda010d9ac3a5">operations_research::math_opt::Model::ExportModel</a></div><div class="ttdeci">ModelProto ExportModel() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00210">math_opt/cpp/model.cc:210</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_aab068699099bdffd5c834f440cdc7e51"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#aab068699099bdffd5c834f440cdc7e51">operations_research::math_opt::Model::is_maximize</a></div><div class="ttdeci">bool is_maximize() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8h_source.html#l00781">math_opt/cpp/model.h:781</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_ab3161231bd30e3d2c6dfa891bee50351"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#ab3161231bd30e3d2c6dfa891bee50351">operations_research::math_opt::Model::Clone</a></div><div class="ttdeci">std::unique_ptr&lt; Model &gt; Clone() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00047">math_opt/cpp/model.cc:47</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_abf7df57e999a0722ba15adb146815523"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#abf7df57e999a0722ba15adb146815523">operations_research::math_opt::Model::ObjectiveAsQuadraticExpression</a></div><div class="ttdeci">QuadraticExpression ObjectiveAsQuadraticExpression() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00198">math_opt/cpp/model.cc:198</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_ac457c02a490aced8a2c1f9c9f470949d"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#ac457c02a490aced8a2c1f9c9f470949d">operations_research::math_opt::Model::Variables</a></div><div class="ttdeci">std::vector&lt; Variable &gt; Variables() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00064">math_opt/cpp/model.cc:64</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_ac633b0bee7b8716fd668e03fd1b8de1e"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#ac633b0bee7b8716fd668e03fd1b8de1e">operations_research::math_opt::Model::ColumnNonzeros</a></div><div class="ttdeci">std::vector&lt; LinearConstraint &gt; ColumnNonzeros(Variable variable)</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00082">math_opt/cpp/model.cc:82</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_ace9c41488775289d7078818a4ed2735d"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#ace9c41488775289d7078818a4ed2735d">operations_research::math_opt::Model::LinearConstraints</a></div><div class="ttdeci">std::vector&lt; LinearConstraint &gt; LinearConstraints() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00117">math_opt/cpp/model.cc:117</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_adb61e0e02a25c120ed8abe9cf1b39749"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#adb61e0e02a25c120ed8abe9cf1b39749">operations_research::math_opt::Model::SortedLinearConstraints</a></div><div class="ttdeci">std::vector&lt; LinearConstraint &gt; SortedLinearConstraints() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00126">math_opt/cpp/model.cc:126</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_af7a9a5d5474c651ec1f3f608c435ec69"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#af7a9a5d5474c651ec1f3f608c435ec69">operations_research::math_opt::Model::SortedVariables</a></div><div class="ttdeci">std::vector&lt; Variable &gt; SortedVariables() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8cc_source.html#l00073">math_opt/cpp/model.cc:73</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_html_af7b0464ca3ebd77bc51804e590e9b503"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model.html#af7b0464ca3ebd77bc51804e590e9b503">operations_research::math_opt::Model::storage</a></div><div class="ttdeci">const ModelStorage * storage() const</div><div class="ttdef"><b>Definition:</b> <a href="math__opt_2cpp_2model_8h_source.html#l00453">math_opt/cpp/model.h:453</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html">operations_research::math_opt::ModelStorage</a></div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8h_source.html#l00155">model_storage.h:155</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_a0ddfd5df19c6bb23ba205b2baf32cda3"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#a0ddfd5df19c6bb23ba205b2baf32cda3">operations_research::math_opt::ModelStorage::set_quadratic_objective_coefficient</a></div><div class="ttdeci">void set_quadratic_objective_coefficient(VariableId first_variable, VariableId second_variable, double value)</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8h_source.html#l00976">model_storage.h:976</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_a30e9766ac7cab4f98ac1dab04006cb85"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#a30e9766ac7cab4f98ac1dab04006cb85">operations_research::math_opt::ModelStorage::FromModelProto</a></div><div class="ttdeci">static absl::StatusOr&lt; std::unique_ptr&lt; ModelStorage &gt; &gt; FromModelProto(const ModelProto &amp;model_proto)</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8cc_source.html#l00148">model_storage.cc:148</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_a3ddc996c67fe0a2aad20b724fd800128"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#a3ddc996c67fe0a2aad20b724fd800128">operations_research::math_opt::ModelStorage::linear_constraint_coefficient</a></div><div class="ttdeci">double linear_constraint_coefficient(LinearConstraintId constraint, VariableId variable) const</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8h_source.html#l00834">model_storage.h:834</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_a41e65f404be4194aa05001eeccb35e25"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#a41e65f404be4194aa05001eeccb35e25">operations_research::math_opt::ModelStorage::set_linear_objective_coefficient</a></div><div class="ttdeci">void set_linear_objective_coefficient(VariableId variable, double value)</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8h_source.html#l00954">model_storage.h:954</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_a678b766d3d2755e11ea611d010121c33"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#a678b766d3d2755e11ea611d010121c33">operations_research::math_opt::ModelStorage::linear_constraint_lower_bound</a></div><div class="ttdeci">double linear_constraint_lower_bound(LinearConstraintId id) const</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8h_source.html#l00776">model_storage.h:776</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_a6f3611559b9d19eb580c5768c963bd99"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#a6f3611559b9d19eb580c5768c963bd99">operations_research::math_opt::ModelStorage::objective_offset</a></div><div class="ttdeci">double objective_offset() const</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8h_source.html#l00912">model_storage.h:912</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_a735ce45a5a18153e276fb6199e2d99b3"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#a735ce45a5a18153e276fb6199e2d99b3">operations_research::math_opt::ModelStorage::ApplyUpdateProto</a></div><div class="ttdeci">absl::Status ApplyUpdateProto(const ModelUpdateProto &amp;update_proto)</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8cc_source.html#l00804">model_storage.cc:804</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_a773cd96209ac3afb1256dc1852f93ae7"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#a773cd96209ac3afb1256dc1852f93ae7">operations_research::math_opt::ModelStorage::set_linear_constraint_coefficient</a></div><div class="ttdeci">void set_linear_constraint_coefficient(LinearConstraintId constraint, VariableId variable, double value)</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8h_source.html#l00845">model_storage.h:845</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_aa850c403983019f6676dda010d9ac3a5"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#aa850c403983019f6676dda010d9ac3a5">operations_research::math_opt::ModelStorage::ExportModel</a></div><div class="ttdeci">ModelProto ExportModel() const</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8cc_source.html#l00423">model_storage.cc:423</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_aafbe56ff1eada47dff1b4626d455498f"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#aafbe56ff1eada47dff1b4626d455498f">operations_research::math_opt::ModelStorage::set_is_maximize</a></div><div class="ttdeci">void set_is_maximize(bool is_maximize)</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8h_source.html#l00936">model_storage.h:936</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_ab992747a7ee98bacfe6f73613de541b2"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#ab992747a7ee98bacfe6f73613de541b2">operations_research::math_opt::ModelStorage::linear_constraint_upper_bound</a></div><div class="ttdeci">double linear_constraint_upper_bound(LinearConstraintId id) const</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8h_source.html#l00781">model_storage.h:781</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_ad97af219ab4d62c806c052848a69dab3"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#ad97af219ab4d62c806c052848a69dab3">operations_research::math_opt::ModelStorage::clear_objective</a></div><div class="ttdeci">void clear_objective()</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8h_source.html#l01009">model_storage.h:1009</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_aef798fd853e39de45ca855559f0df129"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#aef798fd853e39de45ca855559f0df129">operations_research::math_opt::ModelStorage::AddLinearConstraint</a></div><div class="ttdeci">LinearConstraintId AddLinearConstraint(absl::string_view name=&quot;&quot;)</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8h_source.html#l00771">model_storage.h:771</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_model_storage_html_afe1e374f83d18136957c73fcaf399ba7"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_model_storage.html#afe1e374f83d18136957c73fcaf399ba7">operations_research::math_opt::ModelStorage::set_objective_offset</a></div><div class="ttdeci">void set_objective_offset(double value)</div><div class="ttdef"><b>Definition:</b> <a href="model__storage_8h_source.html#l00947">model_storage.h:947</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_quadratic_expression_html"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html">operations_research::math_opt::QuadraticExpression</a></div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l00696">variable_and_expressions.h:696</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_quadratic_expression_html_a96ffc785b7b2135c7980c985883ffdd3"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html#a96ffc785b7b2135c7980c985883ffdd3">operations_research::math_opt::QuadraticExpression::offset</a></div><div class="ttdeci">double offset() const</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l01720">variable_and_expressions.h:1720</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_quadratic_expression_html_ab7b922f2437b3c5e6c134556e161f321"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html#ab7b922f2437b3c5e6c134556e161f321">operations_research::math_opt::QuadraticExpression::raw_quadratic_terms</a></div><div class="ttdeci">const absl::flat_hash_map&lt; QuadraticProductId, double &gt; &amp; raw_quadratic_terms() const</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l01736">variable_and_expressions.h:1736</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_quadratic_expression_html_ab815a7226f7903753f05b8d135a297b2"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html#ab815a7226f7903753f05b8d135a297b2">operations_research::math_opt::QuadraticExpression::raw_linear_terms</a></div><div class="ttdeci">const absl::flat_hash_map&lt; VariableId, double &gt; &amp; raw_linear_terms() const</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l01731">variable_and_expressions.h:1731</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_quadratic_expression_html_af7b0464ca3ebd77bc51804e590e9b503"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_quadratic_expression.html#af7b0464ca3ebd77bc51804e590e9b503">operations_research::math_opt::QuadraticExpression::storage</a></div><div class="ttdeci">const ModelStorage * storage() const</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l01712">variable_and_expressions.h:1712</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_quadratic_term_html"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_quadratic_term.html">operations_research::math_opt::QuadraticTerm</a></div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l00638">variable_and_expressions.h:638</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_variable_html"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_variable.html">operations_research::math_opt::Variable</a></div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l00115">variable_and_expressions.h:115</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_variable_html_af7b0464ca3ebd77bc51804e590e9b503"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_variable.html#af7b0464ca3ebd77bc51804e590e9b503">operations_research::math_opt::Variable::storage</a></div><div class="ttdeci">const ModelStorage * storage() const</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l00891">variable_and_expressions.h:891</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_variable_html_afb60247d45f3b1af36cf247ea88ee42f"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_variable.html#afb60247d45f3b1af36cf247ea88ee42f">operations_research::math_opt::Variable::typed_id</a></div><div class="ttdeci">VariableId typed_id() const</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l00889">variable_and_expressions.h:889</a></div></div>
<div class="ttc" id="acp__model__solver_8cc_html_a6ac76d8a372013f67c4973012948ec84"><div class="ttname"><a href="cp__model__solver_8cc.html#a6ac76d8a372013f67c4973012948ec84">model_proto</a></div><div class="ttdeci">CpModelProto const * model_proto</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__solver_8cc_source.html#l02048">cp_model_solver.cc:2048</a></div></div>
<div class="ttc" id="adefault__search_8cc_html_ac673bc430bdc3fdaa09f7becf98ef267"><div class="ttname"><a href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a></div><div class="ttdeci">const std::string name</div><div class="ttdef"><b>Definition:</b> <a href="default__search_8cc_source.html#l00813">default_search.cc:813</a></div></div>
<div class="ttc" id="aexpr__array_8cc_html_a472a99923cbe11ae7b5a5d157d9ad465"><div class="ttname"><a href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a></div><div class="ttdeci">IntVar * var</div><div class="ttdef"><b>Definition:</b> <a href="expr__array_8cc_source.html#l01874">expr_array.cc:1874</a></div></div>
<div class="ttc" id="aexpr__array_8cc_html_abda708e4a6f0de72a842382f919a7c31"><div class="ttname"><a href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a></div><div class="ttdeci">int64_t coef</div><div class="ttdef"><b>Definition:</b> <a href="expr__array_8cc_source.html#l01875">expr_array.cc:1875</a></div></div>
<div class="ttc" id="amath__opt_2cpp_2model_8h_html"><div class="ttname"><a href="math__opt_2cpp_2model_8h.html">model.h</a></div></div>
<div class="ttc" id="amodel__storage_8h_html"><div class="ttname"><a href="model__storage_8h.html">model_storage.h</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1math__opt_html"><div class="ttname"><a href="namespaceoperations__research_1_1math__opt.html">operations_research::math_opt</a></div><div class="ttdef"><b>Definition:</b> <a href="arrow__operator__proxy_8h_source.html#l00020">arrow_operator_proxy.h:20</a></div></div>
<div class="ttc" id="anamespaceoperations__research_html"><div class="ttname"><a href="namespaceoperations__research.html">operations_research</a></div><div class="ttdoc">Collection of objects used to extend the Constraint Solver library.</div><div class="ttdef"><b>Definition:</b> <a href="dense__doubly__linked__list_8h_source.html#l00021">dense_doubly_linked_list.h:21</a></div></div>
<div class="ttc" id="anamespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdoc">STL namespace.</div></div>
<div class="ttc" id="astrong__int_8h_html"><div class="ttname"><a href="strong__int_8h.html">strong_int.h</a></div></div>
<div class="ttc" id="astructoperations__research_1_1math__opt_1_1_bounded_linear_expression_html"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html">operations_research::math_opt::BoundedLinearExpression</a></div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l00479">variable_and_expressions.h:479</a></div></div>
<div class="ttc" id="astructoperations__research_1_1math__opt_1_1_bounded_linear_expression_html_a14eb87b4d0595a686844a9c07a4a2c36"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html#a14eb87b4d0595a686844a9c07a4a2c36">operations_research::math_opt::BoundedLinearExpression::upper_bound_minus_offset</a></div><div class="ttdeci">double upper_bound_minus_offset() const</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l01332">variable_and_expressions.h:1332</a></div></div>
<div class="ttc" id="astructoperations__research_1_1math__opt_1_1_bounded_linear_expression_html_a4a753905fdb2765209204ba37e6acc8d"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html#a4a753905fdb2765209204ba37e6acc8d">operations_research::math_opt::BoundedLinearExpression::expression</a></div><div class="ttdeci">LinearExpression expression</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l00502">variable_and_expressions.h:502</a></div></div>
<div class="ttc" id="astructoperations__research_1_1math__opt_1_1_bounded_linear_expression_html_afd871230f4ba44e57a59680fd1f558c8"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html#afd871230f4ba44e57a59680fd1f558c8">operations_research::math_opt::BoundedLinearExpression::lower_bound_minus_offset</a></div><div class="ttdeci">double lower_bound_minus_offset() const</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l01328">variable_and_expressions.h:1328</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_a7cc1eeded8f693d0da6c729bc88c45a.html">ortools</a></li><li class="navelem"><a class="el" href="dir_1defc00030ff81d309105e053121082f.html">math_opt</a></li><li class="navelem"><a class="el" href="dir_dd5645fbbabcdccb47d1d6db92f0f35b.html">cpp</a></li><li class="navelem"><a class="el" href="math__opt_2cpp_2model_8cc.html">model.cc</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>
</html>