Files
ortools-clone/docs/cpp/objective_8cc_source.html

205 lines
32 KiB
HTML
Raw Normal View History

2021-04-27 23:00:03 +02:00
<!-- 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.1"/>
<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.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('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 name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// Copyright 2010-2021 Google LLC</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">// You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment">// limitations under the License.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="objective_8h.html">ortools/math_opt/cpp/objective.h</a>&quot;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<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 name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#include &quot;absl/container/flat_hash_map.h&quot;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<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 name="l00019"></a><span class="lineno"> 19</span>&#160;<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 name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="indexed__model_8h.html">ortools/math_opt/indexed_model.h</a>&quot;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceoperations__research.html">operations_research</a> {</div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="keyword">namespace </span>math_opt {</div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_objective.html#acc68eef3a91ae90848899010d323cac1"> 25</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1math__opt_1_1_objective.html#acc68eef3a91ae90848899010d323cac1">Objective::Maximize</a>(<span class="keyword">const</span> <a class="code" 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 name="l00026"></a><span class="lineno"> 26</span>&#160; <a class="code" href="classoperations__research_1_1math__opt_1_1_objective.html#ae2f68f2b209c8aa964861d8b6b0dca84">SetObjective</a>(objective, <span class="keyword">true</span>);</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;}</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_objective.html#ade205f7a6c4c48bdee219542ad7da50e"> 29</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1math__opt_1_1_objective.html#ade205f7a6c4c48bdee219542ad7da50e">Objective::Minimize</a>(<span class="keyword">const</span> <a class="code" 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 name="l00030"></a><span class="lineno"> 30</span>&#160; <a class="code" href="classoperations__research_1_1math__opt_1_1_objective.html#ae2f68f2b209c8aa964861d8b6b0dca84">SetObjective</a>(objective, <span class="keyword">false</span>);</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;}</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_objective.html#ae2f68f2b209c8aa964861d8b6b0dca84"> 33</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1math__opt_1_1_objective.html#ae2f68f2b209c8aa964861d8b6b0dca84">Objective::SetObjective</a>(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1math__opt_1_1_linear_expression.html">LinearExpression</a>&amp; objective,</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keywordtype">bool</span> is_maximize)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="comment">// LinearExpression that have no terms have a null model().</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="keywordflow">if</span> (!objective.<a class="code" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#ab68933b3045472cd31611b2bdb907da7">raw_terms</a>().empty()) {</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <a class="code" href="base_2logging_8h.html#a7c0ce053b28d53aa4eaf3eb7fb71663b">CHECK_EQ</a>(objective.<a class="code" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#a64203ba9d12b2e9827e18cf8e8c30ab2">model</a>(), model_)</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; &lt;&lt; <a class="code" href="namespaceoperations__research_1_1math__opt_1_1internal.html#a7ab03efcaffe1b5f4ba2b1b5d336f792">internal::kObjectsFromOtherIndexedModel</a>;</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; }</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; model_-&gt;<a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#ad97af219ab4d62c806c052848a69dab3">clear_objective</a>();</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; model_-&gt;<a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#aafbe56ff1eada47dff1b4626d455498f">set_is_maximize</a>(<a class="code" href="classoperations__research_1_1math__opt_1_1_objective.html#aab068699099bdffd5c834f440cdc7e51">is_maximize</a>);</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; model_-&gt;<a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#afe1e374f83d18136957c73fcaf399ba7">set_objective_offset</a>(objective.<a class="code" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#a96ffc785b7b2135c7980c985883ffdd3">offset</a>());</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> [<a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <a class="code" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>] : objective.<a class="code" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#ab68933b3045472cd31611b2bdb907da7">raw_terms</a>()) {</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; model_-&gt;<a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#a41e65f404be4194aa05001eeccb35e25">set_linear_objective_coefficient</a>(<a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <a class="code" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>);</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; }</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;}</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; </div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_objective.html#a23ea373c17369c65a4338ab5fa2102dc"> 48</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1math__opt_1_1_objective.html#a23ea373c17369c65a4338ab5fa2102dc">Objective::Add</a>(<span class="keyword">const</span> <a class="code" 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 name="l00049"></a><span class="lineno"> 49</span>&#160; <span class="comment">// LinearExpression that have no terms have a null model().</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keywordflow">if</span> (!objective_terms.<a class="code" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#ab68933b3045472cd31611b2bdb907da7">raw_terms</a>().empty()) {</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <a class="code" href="base_2logging_8h.html#a7c0ce053b28d53aa4eaf3eb7fb71663b">CHECK_EQ</a>(objective_terms.<a class="code" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#a64203ba9d12b2e9827e18cf8e8c30ab2">model</a>(), model_)</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; &lt;&lt; <a class="code" href="namespaceoperations__research_1_1math__opt_1_1internal.html#a7ab03efcaffe1b5f4ba2b1b5d336f792">internal::kObjectsFromOtherIndexedModel</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; }</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; model_-&gt;<a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#afe1e374f83d18136957c73fcaf399ba7">set_objective_offset</a>(objective_terms.<a class="code" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#a96ffc785b7b2135c7980c985883ffdd3">offset</a>() +</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; model_-&gt;<a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#a6f3611559b9d19eb580c5768c963bd99">objective_offset</a>());</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> [<a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <a class="code" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>] : objective_terms.<a class="code" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#ab68933b3045472cd31611b2bdb907da7">raw_terms</a>()) {</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; model_-&gt;<a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#a41e65f404be4194aa05001eeccb35e25">set_linear_objective_coefficient</a>(</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, <a class="code" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a> + model_-&gt;<a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#a2c5977ec712e2c0a2b3eae8f35758eec">linear_objective_coefficient</a>(<a class="code" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>));</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; }</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;}</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classoperations__research_1_1math__opt_1_1_objective.html#a9d1cc18f4ffcdf9ad00c1e61af4eebe0"> 62</a></span>&#160;<a class="code" href="classoperations__research_1_1math__opt_1_1_linear_expression.html">LinearExpression</a> <a class="code" href="classoperations__research_1_1math__opt_1_1_objective.html#a9d1cc18f4ffcdf9ad00c1e61af4eebe0">Objective::AsLinearExpression</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <a class="code" href="classoperations__research_1_1math__opt_1_1_linear_expression.html">LinearExpression</a> result = model_-&gt;<a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#a6f3611559b9d19eb580c5768c963bd99">objective_offset</a>();</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; [v, <a class="code" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>] : model_-&gt;<a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html#af52714c03a37c64cbb23fd5e75633585">linear_objective</a>()) {</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; result += <a class="code" href="classoperations__research_1_1math__opt_1_1_variable.html">Variable</a>(model_, v) * <a class="code" href="expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31">coef</a>;</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; }</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keywordflow">return</span> result;</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;}</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; </div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;} <span class="comment">// namespace math_opt</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;} <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#l00705">base/logging.h:705</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#l00758">indexed_model.h:758</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#l00785">indexed_model.h:785</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#l00756">indexed_model.h:756</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#l00767">indexed_model.h:767</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#l00807">indexed_model.h:807</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#l00814">indexed_model.h:814</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#l00778">indexed_model.h:778</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.1 </li>
</ul>
</div>
</body>
</html>