Files
ortools-clone/docs/cpp/objective_8cc_source.html
2021-12-14 13:41:01 +01:00

205 lines
32 KiB
HTML

<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OR-Tools: objective.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.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('objective_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">objective.cc</div></div>
</div><!--header-->
<div class="contents">
<a href="objective_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="objective_8h.html">ortools/math_opt/cpp/objective.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 &quot;<a class="code" href="base_2logging_8h.html">ortools/base/logging.h</a>&quot;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &quot;absl/container/flat_hash_map.h&quot;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &quot;<a class="code" href="indexed__model_8h.html">ortools/math_opt/core/indexed_model.h</a>&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include &quot;<a class="code" href="key__types_8h.html">ortools/math_opt/cpp/key_types.h</a>&quot;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include &quot;<a class="code" href="variable__and__expressions_8h.html">ortools/math_opt/cpp/variable_and_expressions.h</a>&quot;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceoperations__research.html">operations_research</a> {</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="keyword">namespace </span>math_opt {</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_objective.html#acc68eef3a91ae90848899010d323cac1"> 25</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_objective.html#acc68eef3a91ae90848899010d323cac1">Objective::Maximize</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)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_objective.html#ae2f68f2b209c8aa964861d8b6b0dca84">SetObjective</a>(objective, <span class="keyword">true</span>);</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>}</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_objective.html#ade205f7a6c4c48bdee219542ad7da50e"> 29</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_objective.html#ade205f7a6c4c48bdee219542ad7da50e">Objective::Minimize</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)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_objective.html#ae2f68f2b209c8aa964861d8b6b0dca84">SetObjective</a>(objective, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span>}</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_objective.html#ae2f68f2b209c8aa964861d8b6b0dca84"> 33</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_objective.html#ae2f68f2b209c8aa964861d8b6b0dca84">Objective::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="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordtype">bool</span> is_maximize)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="comment">// LinearExpression that have no terms have a null model().</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordflow">if</span> (!objective.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#ab68933b3045472cd31611b2bdb907da7">raw_terms</a>().empty()) {</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <a class="code hl_define" href="base_2logging_8h.html#a7c0ce053b28d53aa4eaf3eb7fb71663b">CHECK_EQ</a>(objective.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#a64203ba9d12b2e9827e18cf8e8c30ab2">model</a>(), model_)</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> &lt;&lt; <a class="code hl_variable" href="namespaceoperations__research_1_1math__opt_1_1internal.html#a7ab03efcaffe1b5f4ba2b1b5d336f792">internal::kObjectsFromOtherIndexedModel</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> model_-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#ad97af219ab4d62c806c052848a69dab3">clear_objective</a>();</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> model_-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#aafbe56ff1eada47dff1b4626d455498f">set_is_maximize</a>(<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_objective.html#aab068699099bdffd5c834f440cdc7e51">is_maximize</a>);</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> model_-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_indexed_model.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="l00043" name="l00043"></a><span class="lineno"> 43</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="l00044" name="l00044"></a><span class="lineno"> 44</span> model_-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_indexed_model.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="l00045" name="l00045"></a><span class="lineno"> 45</span> }</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"> 47</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_objective.html#a23ea373c17369c65a4338ab5fa2102dc"> 48</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_objective.html#a23ea373c17369c65a4338ab5fa2102dc">Objective::Add</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)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="comment">// LinearExpression that have no terms have a null model().</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">if</span> (!objective_terms.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#ab68933b3045472cd31611b2bdb907da7">raw_terms</a>().empty()) {</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <a class="code hl_define" href="base_2logging_8h.html#a7c0ce053b28d53aa4eaf3eb7fb71663b">CHECK_EQ</a>(objective_terms.<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#a64203ba9d12b2e9827e18cf8e8c30ab2">model</a>(), model_)</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> &lt;&lt; <a class="code hl_variable" href="namespaceoperations__research_1_1math__opt_1_1internal.html#a7ab03efcaffe1b5f4ba2b1b5d336f792">internal::kObjectsFromOtherIndexedModel</a>;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> }</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> model_-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_indexed_model.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="l00055" name="l00055"></a><span class="lineno"> 55</span> model_-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#a6f3611559b9d19eb580c5768c963bd99">objective_offset</a>());</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</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="l00057" name="l00057"></a><span class="lineno"> 57</span> model_-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#a41e65f404be4194aa05001eeccb35e25">set_linear_objective_coefficient</a>(</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</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> + model_-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#a2c5977ec712e2c0a2b3eae8f35758eec">linear_objective_coefficient</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>));</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> }</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> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_objective.html#a9d1cc18f4ffcdf9ad00c1e61af4eebe0"> 62</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_objective.html#a9d1cc18f4ffcdf9ad00c1e61af4eebe0">Objective::AsLinearExpression</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_linear_expression.html">LinearExpression</a> result = model_-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#a6f3611559b9d19eb580c5768c963bd99">objective_offset</a>();</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</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>] : model_-&gt;<a class="code hl_function" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#af52714c03a37c64cbb23fd5e75633585">linear_objective</a>()) {</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> result += <a class="code hl_class" href="classoperations__research_1_1math__opt_1_1_variable.html">Variable</a>(model_, v) * <a class="code hl_variable" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> }</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span>}</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span>} <span class="comment">// namespace math_opt</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</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_a7c0ce053b28d53aa4eaf3eb7fb71663b"><div class="ttname"><a href="base_2logging_8h.html#a7c0ce053b28d53aa4eaf3eb7fb71663b">CHECK_EQ</a></div><div class="ttdeci">#define CHECK_EQ(val1, val2)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00699">base/logging.h:699</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_indexed_model_html_a2c5977ec712e2c0a2b3eae8f35758eec"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_indexed_model.html#a2c5977ec712e2c0a2b3eae8f35758eec">operations_research::math_opt::IndexedModel::linear_objective_coefficient</a></div><div class="ttdeci">double linear_objective_coefficient(VariableId variable) const</div><div class="ttdef"><b>Definition:</b> <a href="indexed__model_8h_source.html#l00891">indexed_model.h:891</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_indexed_model_html_a41e65f404be4194aa05001eeccb35e25"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_indexed_model.html#a41e65f404be4194aa05001eeccb35e25">operations_research::math_opt::IndexedModel::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="indexed__model_8h_source.html#l00918">indexed_model.h:918</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_indexed_model_html_a6f3611559b9d19eb580c5768c963bd99"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_indexed_model.html#a6f3611559b9d19eb580c5768c963bd99">operations_research::math_opt::IndexedModel::objective_offset</a></div><div class="ttdeci">double objective_offset() const</div><div class="ttdef"><b>Definition:</b> <a href="indexed__model_8h_source.html#l00889">indexed_model.h:889</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_indexed_model_html_aafbe56ff1eada47dff1b4626d455498f"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_indexed_model.html#aafbe56ff1eada47dff1b4626d455498f">operations_research::math_opt::IndexedModel::set_is_maximize</a></div><div class="ttdeci">void set_is_maximize(bool is_maximize)</div><div class="ttdef"><b>Definition:</b> <a href="indexed__model_8h_source.html#l00900">indexed_model.h:900</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_indexed_model_html_ad97af219ab4d62c806c052848a69dab3"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_indexed_model.html#ad97af219ab4d62c806c052848a69dab3">operations_research::math_opt::IndexedModel::clear_objective</a></div><div class="ttdeci">void clear_objective()</div><div class="ttdef"><b>Definition:</b> <a href="indexed__model_8h_source.html#l00940">indexed_model.h:940</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_indexed_model_html_af52714c03a37c64cbb23fd5e75633585"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_indexed_model.html#af52714c03a37c64cbb23fd5e75633585">operations_research::math_opt::IndexedModel::linear_objective</a></div><div class="ttdeci">const absl::flat_hash_map&lt; VariableId, double &gt; &amp; linear_objective() const</div><div class="ttdef"><b>Definition:</b> <a href="indexed__model_8h_source.html#l00947">indexed_model.h:947</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_indexed_model_html_afe1e374f83d18136957c73fcaf399ba7"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_indexed_model.html#afe1e374f83d18136957c73fcaf399ba7">operations_research::math_opt::IndexedModel::set_objective_offset</a></div><div class="ttdeci">void set_objective_offset(double value)</div><div class="ttdef"><b>Definition:</b> <a href="indexed__model_8h_source.html#l00911">indexed_model.h:911</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#l00180">variable_and_expressions.h:180</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_linear_expression_html_a64203ba9d12b2e9827e18cf8e8c30ab2"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_linear_expression.html#a64203ba9d12b2e9827e18cf8e8c30ab2">operations_research::math_opt::LinearExpression::model</a></div><div class="ttdeci">IndexedModel * model() const</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l00965">variable_and_expressions.h:965</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#l00963">variable_and_expressions.h:963</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#l00967">variable_and_expressions.h:967</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_objective_html_a23ea373c17369c65a4338ab5fa2102dc"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_objective.html#a23ea373c17369c65a4338ab5fa2102dc">operations_research::math_opt::Objective::Add</a></div><div class="ttdeci">void Add(const LinearExpression &amp;objective_terms) const</div><div class="ttdef"><b>Definition:</b> <a href="objective_8cc_source.html#l00048">objective.cc:48</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_objective_html_a9d1cc18f4ffcdf9ad00c1e61af4eebe0"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_objective.html#a9d1cc18f4ffcdf9ad00c1e61af4eebe0">operations_research::math_opt::Objective::AsLinearExpression</a></div><div class="ttdeci">LinearExpression AsLinearExpression() const</div><div class="ttdef"><b>Definition:</b> <a href="objective_8cc_source.html#l00062">objective.cc:62</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_objective_html_aab068699099bdffd5c834f440cdc7e51"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_objective.html#aab068699099bdffd5c834f440cdc7e51">operations_research::math_opt::Objective::is_maximize</a></div><div class="ttdeci">bool is_maximize() const</div><div class="ttdef"><b>Definition:</b> <a href="objective_8h_source.html#l00098">objective.h:98</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_objective_html_acc68eef3a91ae90848899010d323cac1"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_objective.html#acc68eef3a91ae90848899010d323cac1">operations_research::math_opt::Objective::Maximize</a></div><div class="ttdeci">void Maximize(const LinearExpression &amp;objective) const</div><div class="ttdef"><b>Definition:</b> <a href="objective_8cc_source.html#l00025">objective.cc:25</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_objective_html_ade205f7a6c4c48bdee219542ad7da50e"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_objective.html#ade205f7a6c4c48bdee219542ad7da50e">operations_research::math_opt::Objective::Minimize</a></div><div class="ttdeci">void Minimize(const LinearExpression &amp;objective) const</div><div class="ttdef"><b>Definition:</b> <a href="objective_8cc_source.html#l00029">objective.cc:29</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1math__opt_1_1_objective_html_ae2f68f2b209c8aa964861d8b6b0dca84"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_objective.html#ae2f68f2b209c8aa964861d8b6b0dca84">operations_research::math_opt::Objective::SetObjective</a></div><div class="ttdeci">void SetObjective(const LinearExpression &amp;objective, bool is_maximize) const</div><div class="ttdef"><b>Definition:</b> <a href="objective_8cc_source.html#l00033">objective.cc:33</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#l00101">variable_and_expressions.h:101</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="aindexed__model_8h_html"><div class="ttname"><a href="indexed__model_8h.html">indexed_model.h</a></div></div>
<div class="ttc" id="akey__types_8h_html"><div class="ttname"><a href="key__types_8h.html">key_types.h</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1math__opt_1_1internal_html_a7ab03efcaffe1b5f4ba2b1b5d336f792"><div class="ttname"><a href="namespaceoperations__research_1_1math__opt_1_1internal.html#a7ab03efcaffe1b5f4ba2b1b5d336f792">operations_research::math_opt::internal::kObjectsFromOtherIndexedModel</a></div><div class="ttdeci">constexpr absl::string_view kObjectsFromOtherIndexedModel</div><div class="ttdef"><b>Definition:</b> <a href="key__types_8h_source.html#l00056">key_types.h:56</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="aobjective_8h_html"><div class="ttname"><a href="objective_8h.html">objective.h</a></div></div>
<div class="ttc" id="avariable__and__expressions_8h_html"><div class="ttname"><a href="variable__and__expressions_8h.html">variable_and_expressions.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_a7cc1eeded8f693d0da6c729bc88c45a.html">ortools</a></li><li class="navelem"><a class="el" href="dir_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="objective_8cc.html">objective.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.2 </li>
</ul>
</div>
</body>
</html>