Files
ortools-clone/docs/cpp_linear/model__exporter_8h_source.html
Laurent Perron 5615fe9c61 regenerate docs
2022-01-17 21:42:14 +01:00

156 lines
18 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"/>-->
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.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="banner-container">
<div id="banner">
<span id="sfml">Google OR-Tools 9.2</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.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('model__exporter_8h_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">model_exporter.h</div></div>
</div><!--header-->
<div class="contents">
<a href="model__exporter_8h.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">#ifndef OR_TOOLS_LINEAR_SOLVER_MODEL_EXPORTER_H_</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#define OR_TOOLS_LINEAR_SOLVER_MODEL_EXPORTER_H_</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include &quot;absl/status/statusor.h&quot;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &quot;absl/strings/str_format.h&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include &quot;ortools/base/hash.h&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include &quot;ortools/base/macros.h&quot;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><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 id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceoperations__research.html">operations_research</a> {</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="structoperations__research_1_1_m_p_model_export_options.html"> 29</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structoperations__research_1_1_m_p_model_export_options.html">MPModelExportOptions</a> {</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="structoperations__research_1_1_m_p_model_export_options.html#a0e49e54db6b37b0568d9a67964bc5460"> 30</a></span> <a class="code hl_function" href="structoperations__research_1_1_m_p_model_export_options.html#a0e49e54db6b37b0568d9a67964bc5460">MPModelExportOptions</a>() {}</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="structoperations__research_1_1_m_p_model_export_options.html#a838f4806313e963115cf7e9a8f7ab7e7"> 33</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="structoperations__research_1_1_m_p_model_export_options.html#a838f4806313e963115cf7e9a8f7ab7e7">obfuscate</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="structoperations__research_1_1_m_p_model_export_options.html#ae5002134fe40f95dc42499fc3ae35713"> 35</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="structoperations__research_1_1_m_p_model_export_options.html#ae5002134fe40f95dc42499fc3ae35713">log_invalid_names</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="structoperations__research_1_1_m_p_model_export_options.html#a8a260d7f9ff6c91b693a44090190c929"> 41</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="structoperations__research_1_1_m_p_model_export_options.html#a8a260d7f9ff6c91b693a44090190c929">show_unused_variables</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="structoperations__research_1_1_m_p_model_export_options.html#ad0a36f27591304ab29f40ca64bf24224"> 47</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="structoperations__research_1_1_m_p_model_export_options.html#ad0a36f27591304ab29f40ca64bf24224">max_line_length</a> = 10000;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span>};</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="namespaceoperations__research.html#a2e14c987281f826f0737c14f5abc00b7"> 71</a></span>absl::StatusOr&lt;std::string&gt; <a class="code hl_function" href="namespaceoperations__research.html#a2e14c987281f826f0737c14f5abc00b7">ExportModelAsLpFormat</a>(</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1_m_p_model_proto.html">MPModelProto</a>&amp; model,</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keyword">const</span> <a class="code hl_struct" href="structoperations__research_1_1_m_p_model_export_options.html">MPModelExportOptions</a>&amp; options = <a class="code hl_struct" href="structoperations__research_1_1_m_p_model_export_options.html">MPModelExportOptions</a>());</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="namespaceoperations__research.html#a2c2e3f703497d288ee03330752d3a4c3"> 100</a></span>absl::StatusOr&lt;std::string&gt; <a class="code hl_function" href="namespaceoperations__research.html#a2c2e3f703497d288ee03330752d3a4c3">ExportModelAsMpsFormat</a>(</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1_m_p_model_proto.html">MPModelProto</a>&amp; model,</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keyword">const</span> <a class="code hl_struct" href="structoperations__research_1_1_m_p_model_export_options.html">MPModelExportOptions</a>&amp; options = <a class="code hl_struct" href="structoperations__research_1_1_m_p_model_export_options.html">MPModelExportOptions</a>());</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span>} <span class="comment">// namespace operations_research</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> </div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="preprocessor">#endif </span><span class="comment">// OR_TOOLS_LINEAR_SOLVER_MODEL_EXPORTER_H_</span></div>
<div class="ttc" id="aclassoperations__research_1_1_m_p_model_proto_html"><div class="ttname"><a href="classoperations__research_1_1_m_p_model_proto.html">operations_research::MPModelProto</a></div><div class="ttdef"><b>Definition:</b> <a href="linear__solver_8pb_8h_source.html#l02800">linear_solver.pb.h:2801</a></div></div>
<div class="ttc" id="alinear__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="anamespaceoperations__research_html"><div class="ttname"><a href="namespaceoperations__research.html">operations_research</a></div><div class="ttdef"><b>Definition:</b> <a href="linear__expr_8h_source.html#l00084">linear_expr.h:84</a></div></div>
<div class="ttc" id="anamespaceoperations__research_html_a2c2e3f703497d288ee03330752d3a4c3"><div class="ttname"><a href="namespaceoperations__research.html#a2c2e3f703497d288ee03330752d3a4c3">operations_research::ExportModelAsMpsFormat</a></div><div class="ttdeci">absl::StatusOr&lt; std::string &gt; ExportModelAsMpsFormat(const MPModelProto &amp;model, const MPModelExportOptions &amp;options=MPModelExportOptions())</div><div class="ttdoc">Outputs the current model (variables, constraints, objective) as a string encoded in MPS file format,...</div></div>
<div class="ttc" id="anamespaceoperations__research_html_a2e14c987281f826f0737c14f5abc00b7"><div class="ttname"><a href="namespaceoperations__research.html#a2e14c987281f826f0737c14f5abc00b7">operations_research::ExportModelAsLpFormat</a></div><div class="ttdeci">absl::StatusOr&lt; std::string &gt; ExportModelAsLpFormat(const MPModelProto &amp;model, const MPModelExportOptions &amp;options=MPModelExportOptions())</div><div class="ttdoc">Outputs the current model (variables, constraints, objective) as a string encoded in the so-called &quot;C...</div></div>
<div class="ttc" id="astructoperations__research_1_1_m_p_model_export_options_html"><div class="ttname"><a href="structoperations__research_1_1_m_p_model_export_options.html">operations_research::MPModelExportOptions</a></div><div class="ttdoc">Export options.</div><div class="ttdef"><b>Definition:</b> <a href="model__exporter_8h_source.html#l00029">model_exporter.h:29</a></div></div>
<div class="ttc" id="astructoperations__research_1_1_m_p_model_export_options_html_a0e49e54db6b37b0568d9a67964bc5460"><div class="ttname"><a href="structoperations__research_1_1_m_p_model_export_options.html#a0e49e54db6b37b0568d9a67964bc5460">operations_research::MPModelExportOptions::MPModelExportOptions</a></div><div class="ttdeci">MPModelExportOptions()</div><div class="ttdef"><b>Definition:</b> <a href="model__exporter_8h_source.html#l00030">model_exporter.h:30</a></div></div>
<div class="ttc" id="astructoperations__research_1_1_m_p_model_export_options_html_a838f4806313e963115cf7e9a8f7ab7e7"><div class="ttname"><a href="structoperations__research_1_1_m_p_model_export_options.html#a838f4806313e963115cf7e9a8f7ab7e7">operations_research::MPModelExportOptions::obfuscate</a></div><div class="ttdeci">bool obfuscate</div><div class="ttdoc">Obfuscates variable and constraint names.</div><div class="ttdef"><b>Definition:</b> <a href="model__exporter_8h_source.html#l00033">model_exporter.h:33</a></div></div>
<div class="ttc" id="astructoperations__research_1_1_m_p_model_export_options_html_a8a260d7f9ff6c91b693a44090190c929"><div class="ttname"><a href="structoperations__research_1_1_m_p_model_export_options.html#a8a260d7f9ff6c91b693a44090190c929">operations_research::MPModelExportOptions::show_unused_variables</a></div><div class="ttdeci">bool show_unused_variables</div><div class="ttdoc">For .lp files only.</div><div class="ttdef"><b>Definition:</b> <a href="model__exporter_8h_source.html#l00041">model_exporter.h:41</a></div></div>
<div class="ttc" id="astructoperations__research_1_1_m_p_model_export_options_html_ad0a36f27591304ab29f40ca64bf24224"><div class="ttname"><a href="structoperations__research_1_1_m_p_model_export_options.html#ad0a36f27591304ab29f40ca64bf24224">operations_research::MPModelExportOptions::max_line_length</a></div><div class="ttdeci">int max_line_length</div><div class="ttdoc">For .lp files only.</div><div class="ttdef"><b>Definition:</b> <a href="model__exporter_8h_source.html#l00047">model_exporter.h:47</a></div></div>
<div class="ttc" id="astructoperations__research_1_1_m_p_model_export_options_html_ae5002134fe40f95dc42499fc3ae35713"><div class="ttname"><a href="structoperations__research_1_1_m_p_model_export_options.html#ae5002134fe40f95dc42499fc3ae35713">operations_research::MPModelExportOptions::log_invalid_names</a></div><div class="ttdeci">bool log_invalid_names</div><div class="ttdoc">Whether to log invalid variable and constraint names.</div><div class="ttdef"><b>Definition:</b> <a href="model__exporter_8h_source.html#l00035">model_exporter.h:35</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
</div>
</div>
<div id="footer-container">
<div id="footer">
</div>
</div>
</body>
</html>