Files
ortools-clone/docs/cpp/lp__parser_8h_source.html
Laurent Perron a2ad6677e1 regenerate doc
2022-01-16 18:02:36 +01:00

124 lines
31 KiB
HTML

<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OR-Tools: lp_parser.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</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.8.15 -->
<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');
/* @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('lp__parser_8h_source.html','');});
/* @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">lp_parser.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="lp__parser_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#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="comment">// A simple parser of a linear program from string.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">// We accept a format produced by LinearProgram::Dump(), which is similar to</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment">// LP file used by lp_solve (see http://lpsolve.sourceforge.net/5.1/index.htm).</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">// Example:</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">// 1: min: 1 + x1 + 2 * x2;</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">// 2: 0 &lt;= x1 &lt;= 1;</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">// 3: x2 &gt;= 2;</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment">// 4: r1: 1 &lt;= x1 - x2 &lt;= 2;</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">// 5: 0 &lt;= x1 + x2 &lt;= inf;</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment">// 6: int x1, x3;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment">// 7: bin x2;</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment">// Line 1 is the objective, line 2 and 3 define variable bounds, line 4 is a</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment">// named constraint, line 5 is an unnamed constraint. Line 6 is the list of</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="comment">// integer variables. Line 7 is the list of binary variables. The lines can be</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="comment">// in any order, the line numbers do _not_ belong to the string being parsed.</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="comment">// Caveats:</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="comment">// 1. Plus sign and multiplication sign are optional. Thus, &quot;min: 1 x1 x2&quot; is</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="comment">// the same as &quot;min: 1*x1 + x2&quot;. All consecutive signs will be compacted into</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="comment">// one sign using mathematical rules (i.e., the parity of minus sign).</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="comment">// E.g., &quot;min: ++---+ - +x1&quot; is the same as &quot;min: x1&quot;.</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="comment">// 2. A constraint consists of two or three parts. A two part constraint has</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="comment">// a bound on the left (resp. right) side and variables on the right</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="comment">// (resp. left) side, with the two parts being separated by any of the</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="comment">// relation signs &quot;&lt;&quot;, &quot;&lt;=&quot;, &quot;=&quot;, &quot;&gt;=&quot;, &quot;&gt;&quot;.</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="comment">// 3. A three part constraint has the variables in the middle part, and two</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="comment">// bounds on the left and right side, with all three parts being separated by</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="comment">// any of &quot;&lt;&quot;, &quot;&lt;=&quot;, &quot;&gt;=&quot;, &quot;&gt;&quot;.</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="comment">// 4. &quot;&lt;&quot; means &quot;&lt;=&quot;, and &quot;&gt;&quot; means &quot;&gt;=&quot;.</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="comment">// 5. An unnamed constraint involving exactly one variable with coefficient</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="comment">// equal to 1, defines the variable bound(s). Otherwise, the constraint</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="comment">// defines a new constraint.</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="comment">// 6. If there is no bound defined for a variable, it will be assumed to be</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="comment">// unbounded (i.e., from -inf to +inf).</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="comment">// 7. A bound must be a number or &quot;inf&quot;. A coefficient must be finite and</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="comment">// cannot overflow. A number can be represented in a scientific notation,</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="comment">// e.g., +1.2E-2. Consequently,</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="comment">// &quot;min: 1e2&quot; means minimization of 100,</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;<span class="comment">// &quot;min: 1 e2&quot; means minimization of 1*e2, where e2 is a variable,</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="comment">// &quot;min: 1 + e2&quot; means minimization of 1 + e2, where e2 is a variable,</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="comment">// &quot;min: 1 1*e2&quot; means minimization of 1 + e2, where e2 is a variable.</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;<span class="comment">// &quot;min: 1 1e2&quot; is invalid as it would mean minimization of 1 + 100.</span></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="comment">// 8. In a constraint, in the part with variables, all elements must be</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="comment">// variables with optional coefficients and signs (i.e., no offset is</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;<span class="comment">// allowed).</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;<span class="comment">// 9. Variables in the objective, and in each of the constraint cannot repeat.</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="comment">// E.g., this is invalid: &quot;min: x + x&quot;.</span></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="comment">// 10. The offset in the objective must be specified at the beginning, i.e.,</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;<span class="comment">// after min: or max: and before any variables.</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;<span class="comment">// 11. The parsing will fail if due to bounding of a variable the lower bound</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;<span class="comment">// becomes strictly greater than the upper bound. E.g., these fail to</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;<span class="comment">// parse: &quot;min x; 1 &lt;= x &lt;= 0;&quot;, &quot;min x; 0 &lt;= x &lt;= 1; 2 &lt;= x &lt;= 3&quot;. On the</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;<span class="comment">// other hand the parser does _not_ attempt to &quot;round&quot; the bounds for integer</span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="comment">// variables. E.g., &quot;min x; 0.5 &lt;= x &lt;= 0.8; int x&quot; results in bounding the x</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="comment">// variable between 0.5 and 0.8, despite there is no integer value it can</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;<span class="comment">// take. Similarly, &quot;min x; bin x; x &lt;= 0.5&quot; results in bounding the x</span></div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="comment">// variable between 0.0 and 0.5, despite the only value it can take is 0.</span></div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;<span class="preprocessor">#ifndef OR_TOOLS_LP_DATA_LP_PARSER_H_</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;<span class="preprocessor">#define OR_TOOLS_LP_DATA_LP_PARSER_H_</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;<span class="preprocessor">#include &quot;absl/base/port.h&quot;</span></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;<span class="preprocessor">#include &quot;absl/status/statusor.h&quot;</span></div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="preprocessor">#include &quot;absl/strings/string_view.h&quot;</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="linear__solver_8pb_8h.html">ortools/linear_solver/linear_solver.pb.h</a>&quot;</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="lp__data_8h.html">ortools/lp_data/lp_data.h</a>&quot;</span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceoperations__research.html">operations_research</a> {</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;<span class="comment">// This calls ParseLp() under the hood. See below.</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;absl::StatusOr&lt;MPModelProto&gt; <a class="code" href="namespaceoperations__research.html#ac28b7c20a0d32b46e64fbca1555c345f">ModelProtoFromLpFormat</a>(absl::string_view <a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;<span class="keyword">namespace </span>glop {</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;<span class="comment">// Like ModelProtoFromLpFormat(), but outputs a glop::LinearProgram.</span></div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a662cdf0c2fb9c6e52c0c7af62d4810c0">ParseLp</a>(absl::string_view <a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>, LinearProgram* lp);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;<span class="comment">// Represents a constraint parsed from the LP file format (used by</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;<span class="comment">// LinearProgram::Dump()).</span></div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_parsed_constraint.html"> 98</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structoperations__research_1_1glop_1_1_parsed_constraint.html">ParsedConstraint</a> {</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="comment">// The name of the constraint. Empty if the constraint has no name.</span></div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_parsed_constraint.html#a9b45b3e13bd9167aab02e17e08916231"> 100</a></span>&#160; std::string <a class="code" href="structoperations__research_1_1glop_1_1_parsed_constraint.html#a9b45b3e13bd9167aab02e17e08916231">name</a>;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="comment">// Contains the names of the variables used in the constraint, in the order in</span></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="comment">// which they appear in the string representation.</span></div><div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_parsed_constraint.html#a8bafda2d3658c27232fea7c82613bdb0"> 103</a></span>&#160; std::vector&lt;std::string&gt; <a class="code" href="structoperations__research_1_1glop_1_1_parsed_constraint.html#a8bafda2d3658c27232fea7c82613bdb0">variable_names</a>;</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="comment">// Contains the coefficients of the variables used in the constraint. Note</span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="comment">// that variable_names and coefficients are parallel arrays, i.e.</span></div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="comment">// coefficients[i] is the coefficient for variable_names[i].</span></div><div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_parsed_constraint.html#aba57fa111cf5dbb244a282416ad3e695"> 107</a></span>&#160; std::vector&lt;Fractional&gt; <a class="code" href="structoperations__research_1_1glop_1_1_parsed_constraint.html#aba57fa111cf5dbb244a282416ad3e695">coefficients</a>;</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="comment">// The lower bound of the constraint. Set to -infinity when the constraint has</span></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="comment">// no lower bound.</span></div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_parsed_constraint.html#a43a86e62cda1914f2e5a9dbeb4b6d075"> 110</a></span>&#160; <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code" href="structoperations__research_1_1glop_1_1_parsed_constraint.html#a43a86e62cda1914f2e5a9dbeb4b6d075">lower_bound</a>;</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="comment">// The upper bound of the constraint. Set to +infinity when the constraint has</span></div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="comment">// no upper bound.</span></div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_parsed_constraint.html#a69fffe9340f37bc1ff072b03faab932d"> 113</a></span>&#160; <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code" href="structoperations__research_1_1glop_1_1_parsed_constraint.html#a69fffe9340f37bc1ff072b03faab932d">upper_bound</a>;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;};</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;<span class="comment">// Parses a constraint in the format used by LinearProgram::Dump(). Returns an</span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;<span class="comment">// InvalidArgumentError with an appropriate error message when the parsing</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;<span class="comment">// fails.</span></div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;absl::StatusOr&lt;ParsedConstraint&gt; <a class="code" href="namespaceoperations__research_1_1glop.html#a3f17d86383ca85cb8b7aa70b3309865e">ParseConstraint</a>(absl::string_view constraint);</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;} <span class="comment">// namespace glop</span></div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;} <span class="comment">// namespace operations_research</span></div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;<span class="preprocessor">#endif // OR_TOOLS_LP_DATA_LP_PARSER_H_</span></div><div class="ttc" id="namespaceoperations__research_1_1glop_html_a662cdf0c2fb9c6e52c0c7af62d4810c0"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#a662cdf0c2fb9c6e52c0c7af62d4810c0">operations_research::glop::ParseLp</a></div><div class="ttdeci">bool ParseLp(absl::string_view model, LinearProgram *lp)</div><div class="ttdef"><b>Definition:</b> <a href="lp__parser_8cc_source.html#l00443">lp_parser.cc:443</a></div></div>
<div class="ttc" id="namespaceoperations__research_1_1glop_html_a733947145e3e1631165b618b05c9ccb7"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">operations_research::glop::Fractional</a></div><div class="ttdeci">double Fractional</div><div class="ttdef"><b>Definition:</b> <a href="lp__types_8h_source.html#l00078">lp_types.h:78</a></div></div>
<div class="ttc" id="gurobi__interface_8cc_html_a0728f23c9a47655d38e0bf1a2f200bcf"><div class="ttname"><a href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a></div><div class="ttdeci">GRBmodel * model</div><div class="ttdef"><b>Definition:</b> <a href="gurobi__interface_8cc_source.html#l00274">gurobi_interface.cc:274</a></div></div>
<div class="ttc" id="structoperations__research_1_1glop_1_1_parsed_constraint_html_a9b45b3e13bd9167aab02e17e08916231"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_parsed_constraint.html#a9b45b3e13bd9167aab02e17e08916231">operations_research::glop::ParsedConstraint::name</a></div><div class="ttdeci">std::string name</div><div class="ttdef"><b>Definition:</b> <a href="lp__parser_8h_source.html#l00100">lp_parser.h:100</a></div></div>
<div class="ttc" id="structoperations__research_1_1glop_1_1_parsed_constraint_html"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_parsed_constraint.html">operations_research::glop::ParsedConstraint</a></div><div class="ttdef"><b>Definition:</b> <a href="lp__parser_8h_source.html#l00098">lp_parser.h:98</a></div></div>
<div class="ttc" id="structoperations__research_1_1glop_1_1_parsed_constraint_html_aba57fa111cf5dbb244a282416ad3e695"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_parsed_constraint.html#aba57fa111cf5dbb244a282416ad3e695">operations_research::glop::ParsedConstraint::coefficients</a></div><div class="ttdeci">std::vector&lt; Fractional &gt; coefficients</div><div class="ttdef"><b>Definition:</b> <a href="lp__parser_8h_source.html#l00107">lp_parser.h:107</a></div></div>
<div class="ttc" id="structoperations__research_1_1glop_1_1_parsed_constraint_html_a8bafda2d3658c27232fea7c82613bdb0"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_parsed_constraint.html#a8bafda2d3658c27232fea7c82613bdb0">operations_research::glop::ParsedConstraint::variable_names</a></div><div class="ttdeci">std::vector&lt; std::string &gt; variable_names</div><div class="ttdef"><b>Definition:</b> <a href="lp__parser_8h_source.html#l00103">lp_parser.h:103</a></div></div>
<div class="ttc" id="lp__data_8h_html"><div class="ttname"><a href="lp__data_8h.html">lp_data.h</a></div></div>
<div class="ttc" id="structoperations__research_1_1glop_1_1_parsed_constraint_html_a43a86e62cda1914f2e5a9dbeb4b6d075"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_parsed_constraint.html#a43a86e62cda1914f2e5a9dbeb4b6d075">operations_research::glop::ParsedConstraint::lower_bound</a></div><div class="ttdeci">Fractional lower_bound</div><div class="ttdef"><b>Definition:</b> <a href="lp__parser_8h_source.html#l00110">lp_parser.h:110</a></div></div>
<div class="ttc" id="namespaceoperations__research_html_ac28b7c20a0d32b46e64fbca1555c345f"><div class="ttname"><a href="namespaceoperations__research.html#ac28b7c20a0d32b46e64fbca1555c345f">operations_research::ModelProtoFromLpFormat</a></div><div class="ttdeci">absl::StatusOr&lt; MPModelProto &gt; ModelProtoFromLpFormat(absl::string_view model)</div><div class="ttdef"><b>Definition:</b> <a href="lp__parser_8cc_source.html#l00450">lp_parser.cc:450</a></div></div>
<div class="ttc" id="linear__solver_8pb_8h_html"><div class="ttname"><a href="linear__solver_8pb_8h.html">linear_solver.pb.h</a></div></div>
<div class="ttc" id="namespaceoperations__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="structoperations__research_1_1glop_1_1_parsed_constraint_html_a69fffe9340f37bc1ff072b03faab932d"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_parsed_constraint.html#a69fffe9340f37bc1ff072b03faab932d">operations_research::glop::ParsedConstraint::upper_bound</a></div><div class="ttdeci">Fractional upper_bound</div><div class="ttdef"><b>Definition:</b> <a href="lp__parser_8h_source.html#l00113">lp_parser.h:113</a></div></div>
<div class="ttc" id="namespaceoperations__research_1_1glop_html_a3f17d86383ca85cb8b7aa70b3309865e"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#a3f17d86383ca85cb8b7aa70b3309865e">operations_research::glop::ParseConstraint</a></div><div class="ttdeci">StatusOr&lt; ParsedConstraint &gt; ParseConstraint(absl::string_view constraint)</div><div class="ttdef"><b>Definition:</b> <a href="lp__parser_8cc_source.html#l00343">lp_parser.cc:343</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_903a7ff076ee7f01be86992fe717fc82.html">lp_data</a></li><li class="navelem"><a class="el" href="lp__parser_8h.html">lp_parser.h</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
</ul>
</div>
</body>
</html>