Files
ortools-clone/docs/cpp_linear/classoperations__research_1_1LinearRange.html
2020-08-03 12:19:07 +02:00

240 lines
14 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OR-Tools</title>
<meta http-equiv="Content-Type" content="text/html;"/>
<meta charset="utf-8"/>
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
<link rel="stylesheet" type="text/css" href="ortools.css" title="default" media="screen,print" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
</head>
<body>
<div id="banner-container">
<div id="banner">
<span id="sfml">Google OR-Tools 7.8</span>
</div>
</div>
<div id="content" style="width: 100%; overflow: hidden;">
<div style="margin-left: 15px; margin-top: 5px; float: left; color: #145A32;">
<h2>C++ Reference</h2>
<ul>
<li><a href="../cpp_algorithms/annotated.html">Algorithms</a></li>
<li><a href="../cpp_sat/annotated.html">CP-SAT</a></li>
<li><a href="../cpp_graph/annotated.html">Graph</a></li>
<li><a href="../cpp_routing/annotated.html">Routing</a></li>
<li><a href="../cpp_linear/annotated.html">Linear solver</a></li>
</ul>
</div>
<div id="content">
<div align="center">
<h1 style="color: #145A32;">C++ Reference: Linear solver</h1>
</div>
<!-- Generated by Doxygen 1.8.18 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceoperations__research.html">operations_research</a></li><li class="navelem"><a class="el" href="classoperations__research_1_1LinearRange.html">LinearRange</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classoperations__research_1_1LinearRange-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">LinearRange</div> </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An expression of the form: </p>
<div class="fragment"><div class="line"><a class="code" href="classoperations__research_1_1LinearRange.html#a9748ce3280b2d4c16a2cd38a480b9c7c">lower_bound</a> &lt;= sum_{i in S} a_i*x_i &lt;= <a class="code" href="classoperations__research_1_1LinearRange.html#a5158072d27a176fc38524893183d6527">upper_bound</a>. </div>
</div><!-- fragment --><p> The sum is represented as a <a class="el" href="classoperations__research_1_1LinearExpr.html" title="LinearExpr models a quantity that is linear in the decision variables (MPVariable) of an optimization...">LinearExpr</a> with offset 0.</p>
<p>Must be added to model with </p><div class="fragment"><div class="line">MPSolver::AddRowConstraint(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1LinearRange.html#a32ea297f2577df1857c480c965f0b6b7">LinearRange</a>&amp; range,</div>
<div class="line"> <span class="keyword">const</span> std::string&amp; name);</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="linear__expr_8h_source.html#l00192">192</a> of file <a class="el" href="linear__expr_8h_source.html">linear_expr.h</a>.</p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a32ea297f2577df1857c480c965f0b6b7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1LinearRange.html#a32ea297f2577df1857c480c965f0b6b7">LinearRange</a> ()</td></tr>
<tr class="separator:a32ea297f2577df1857c480c965f0b6b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac594ef42ae702537dd3fcd7dee8742a2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1LinearRange.html#ac594ef42ae702537dd3fcd7dee8742a2">LinearRange</a> (double <a class="el" href="classoperations__research_1_1LinearRange.html#a9748ce3280b2d4c16a2cd38a480b9c7c">lower_bound</a>, const <a class="el" href="classoperations__research_1_1LinearExpr.html">LinearExpr</a> &amp;<a class="el" href="classoperations__research_1_1LinearRange.html#ac94f6b1a6cc64b35da3b2a250e0c606d">linear_expr</a>, double <a class="el" href="classoperations__research_1_1LinearRange.html#a5158072d27a176fc38524893183d6527">upper_bound</a>)</td></tr>
<tr class="memdesc:ac594ef42ae702537dd3fcd7dee8742a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">The bounds of the linear range are updated so that they include the offset from "linear_expr", i.e., we form the range: <a href="classoperations__research_1_1LinearRange.html#ac594ef42ae702537dd3fcd7dee8742a2">More...</a><br /></td></tr>
<tr class="separator:ac594ef42ae702537dd3fcd7dee8742a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9748ce3280b2d4c16a2cd38a480b9c7c"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1LinearRange.html#a9748ce3280b2d4c16a2cd38a480b9c7c">lower_bound</a> () const</td></tr>
<tr class="separator:a9748ce3280b2d4c16a2cd38a480b9c7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac94f6b1a6cc64b35da3b2a250e0c606d"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classoperations__research_1_1LinearExpr.html">LinearExpr</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1LinearRange.html#ac94f6b1a6cc64b35da3b2a250e0c606d">linear_expr</a> () const</td></tr>
<tr class="separator:ac94f6b1a6cc64b35da3b2a250e0c606d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5158072d27a176fc38524893183d6527"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1LinearRange.html#a5158072d27a176fc38524893183d6527">upper_bound</a> () const</td></tr>
<tr class="separator:a5158072d27a176fc38524893183d6527"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a32ea297f2577df1857c480c965f0b6b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32ea297f2577df1857c480c965f0b6b7">&#9670;&nbsp;</a></span>LinearRange() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classoperations__research_1_1LinearRange.html">LinearRange</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="linear__expr_8h_source.html#l00194">194</a> of file <a class="el" href="linear__expr_8h_source.html">linear_expr.h</a>.</p>
</div>
</div>
<a id="ac594ef42ae702537dd3fcd7dee8742a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac594ef42ae702537dd3fcd7dee8742a2">&#9670;&nbsp;</a></span>LinearRange() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classoperations__research_1_1LinearRange.html">LinearRange</a> </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>lower_bound</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classoperations__research_1_1LinearExpr.html">LinearExpr</a> &amp;&#160;</td>
<td class="paramname"><em>linear_expr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>upper_bound</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The bounds of the linear range are updated so that they include the offset from "linear_expr", i.e., we form the range: </p>
<div class="fragment"><div class="line"><a class="code" href="classoperations__research_1_1LinearRange.html#a9748ce3280b2d4c16a2cd38a480b9c7c">lower_bound</a> - offset &lt;= <a class="code" href="classoperations__research_1_1LinearRange.html#ac94f6b1a6cc64b35da3b2a250e0c606d">linear_expr</a> - offset &lt;= <a class="code" href="classoperations__research_1_1LinearRange.html#a5158072d27a176fc38524893183d6527">upper_bound</a> - offset.</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ac94f6b1a6cc64b35da3b2a250e0c606d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac94f6b1a6cc64b35da3b2a250e0c606d">&#9670;&nbsp;</a></span>linear_expr()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classoperations__research_1_1LinearExpr.html">LinearExpr</a>&amp; linear_expr </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="linear__expr_8h_source.html#l00206">206</a> of file <a class="el" href="linear__expr_8h_source.html">linear_expr.h</a>.</p>
</div>
</div>
<a id="a9748ce3280b2d4c16a2cd38a480b9c7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9748ce3280b2d4c16a2cd38a480b9c7c">&#9670;&nbsp;</a></span>lower_bound()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double lower_bound </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="linear__expr_8h_source.html#l00205">205</a> of file <a class="el" href="linear__expr_8h_source.html">linear_expr.h</a>.</p>
</div>
</div>
<a id="a5158072d27a176fc38524893183d6527"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5158072d27a176fc38524893183d6527">&#9670;&nbsp;</a></span>upper_bound()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double upper_bound </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="linear__expr_8h_source.html#l00207">207</a> of file <a class="el" href="linear__expr_8h_source.html">linear_expr.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="linear__expr_8h_source.html">linear_expr.h</a></li>
</ul>
</div><!-- contents -->
<div class="ttc" id="aclassoperations__research_1_1LinearRange_html_a9748ce3280b2d4c16a2cd38a480b9c7c"><div class="ttname"><a href="classoperations__research_1_1LinearRange.html#a9748ce3280b2d4c16a2cd38a480b9c7c">operations_research::LinearRange::lower_bound</a></div><div class="ttdeci">double lower_bound() const</div><div class="ttdef"><b>Definition:</b> <a href="linear__expr_8h_source.html#l00205">linear_expr.h:205</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1LinearRange_html_a32ea297f2577df1857c480c965f0b6b7"><div class="ttname"><a href="classoperations__research_1_1LinearRange.html#a32ea297f2577df1857c480c965f0b6b7">operations_research::LinearRange::LinearRange</a></div><div class="ttdeci">LinearRange()</div><div class="ttdef"><b>Definition:</b> <a href="linear__expr_8h_source.html#l00194">linear_expr.h:194</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1LinearRange_html_a5158072d27a176fc38524893183d6527"><div class="ttname"><a href="classoperations__research_1_1LinearRange.html#a5158072d27a176fc38524893183d6527">operations_research::LinearRange::upper_bound</a></div><div class="ttdeci">double upper_bound() const</div><div class="ttdef"><b>Definition:</b> <a href="linear__expr_8h_source.html#l00207">linear_expr.h:207</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1LinearRange_html_ac94f6b1a6cc64b35da3b2a250e0c606d"><div class="ttname"><a href="classoperations__research_1_1LinearRange.html#ac94f6b1a6cc64b35da3b2a250e0c606d">operations_research::LinearRange::linear_expr</a></div><div class="ttdeci">const LinearExpr &amp; linear_expr() const</div><div class="ttdef"><b>Definition:</b> <a href="linear__expr_8h_source.html#l00206">linear_expr.h:206</a></div></div>
</div>
</div>
<div id="footer-container">
<div id="footer">
</div>
</div>
</body>
</html>