Files
ortools-clone/docs/dotnet/LinearProgrammingExample_8cs_source.html

64 lines
18 KiB
HTML
Raw Normal View History

<!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">
2019-06-29 18:18:08 +02:00
<span id="sfml">OR-Tools 7.2</span>
</div>
</div>
2019-06-29 18:18:08 +02:00
<link rel="icon" href="https://developers.google.com/optimization/images/orLogo.png">
<div id="content">
<!-- Generated by Doxygen 1.8.15 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_a7cc1eeded8f693d0da6c729bc88c45a.html">ortools</a></li><li class="navelem"><a class="el" href="dir_4d3a5a688e4550f3d7725aaa5ab9c27b.html">linear_solver</a></li><li class="navelem"><a class="el" href="dir_c058b655dd87a06086a3d01984927bc3.html">samples</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">LinearProgrammingExample.cs</div> </div>
</div><!--header-->
<div class="contents">
2019-07-04 15:11:35 +02:00
<a href="LinearProgrammingExample_8cs.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-2018 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">// [START program]</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="keyword">using</span> System;</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="keyword">using</span> <a class="code" href="namespaceGoogle.html">Google</a>.<a class="code" href="namespaceGoogle_1_1OrTools.html">OrTools</a>.<a class="code" href="namespaceGoogle_1_1OrTools_1_1LinearSolver.html">LinearSolver</a>;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="classLinearProgrammingExample.html"> 18</a></span>&#160;<span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="classLinearProgrammingExample.html">LinearProgrammingExample</a></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;{</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; <span class="keyword">static</span> <span class="keywordtype">void</span> Main()</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="comment">// [START solver]</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; MPSolver solver = <span class="keyword">new</span> MPSolver(<span class="stringliteral">&quot;LinearProgrammingExample&quot;</span>, <span class="stringliteral">&quot;GLOP_LINEAR_PROGRAMMING&quot;</span>);</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; <span class="comment">// [END solver]</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#1
<div class="ttc" id="classGoogle_1_1OrTools_1_1LinearSolver_1_1Objective_html"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1LinearSolver_1_1Objective.html">Google.OrTools.LinearSolver.Objective</a></div><div class="ttdef"><b>Definition:</b> <a href="Objective_8cs_source.html#l00013">Objective.cs:13</a></div></div>
<div class="ttc" id="namespaceGoogle_html"><div class="ttname"><a href="namespaceGoogle.html">Google</a></div><div class="ttdef"><b>Definition:</b> <a href="KInt64Vector_8cs_source.html#l00011">KInt64Vector.cs:11</a></div></div>
2019-06-29 18:18:08 +02:00
<div class="ttc" id="classGoogle_1_1OrTools_1_1LinearSolver_1_1Objective_html_ac0e5174226f63b800fcb8cf83f91eb15"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1LinearSolver_1_1Objective.html#ac0e5174226f63b800fcb8cf83f91eb15">Google.OrTools.LinearSolver.Objective.SetMaximization</a></div><div class="ttdeci">void SetMaximization()</div><div class="ttdef"><b>Definition:</b> <a href="Objective_8cs_source.html#l00077">Objective.cs:77</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1LinearSolver_1_1Constraint_html_abc86ee32159313d45e26911e2fb68fae"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1LinearSolver_1_1Constraint.html#abc86ee32159313d45e26911e2fb68fae">Google.OrTools.LinearSolver.Constraint.SetCoefficient</a></div><div class="ttdeci">void SetCoefficient(Variable var, double coeff)</div><div class="ttdef"><b>Definition:</b> <a href="linear__solver_2Constraint_8cs_source.html#l00052">linear_solver/Constraint.cs:52</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1LinearSolver_1_1Objective_html_af264af89c525b45f02b32ccbe361e267"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1LinearSolver_1_1Objective.html#af264af89c525b45f02b32ccbe361e267">Google.OrTools.LinearSolver.Objective.SetCoefficient</a></div><div class="ttdeci">void SetCoefficient(Variable var, double coeff)</div><div class="ttdef"><b>Definition:</b> <a href="Objective_8cs_source.html#l00051">Objective.cs:51</a></div></div>
<div class="ttc" id="namespaceGoogle_1_1OrTools_html"><div class="ttname"><a href="namespaceGoogle_1_1OrTools.html">Google.OrTools</a></div><div class="ttdef"><b>Definition:</b> <a href="KInt64Vector_8cs_source.html#l00011">KInt64Vector.cs:11</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1LinearSolver_1_1Constraint_html"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1LinearSolver_1_1Constraint.html">Google.OrTools.LinearSolver.Constraint</a></div><div class="ttdef"><b>Definition:</b> <a href="linear__solver_2Constraint_8cs_source.html#l00013">linear_solver/Constraint.cs:13</a></div></div>
2019-06-29 18:18:08 +02:00
<div class="ttc" id="classGoogle_1_1OrTools_1_1LinearSolver_1_1Variable_html_a15b69d5d488159324cce8fb1272d75fa"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1LinearSolver_1_1Variable.html#a15b69d5d488159324cce8fb1272d75fa">Google.OrTools.LinearSolver.Variable.SolutionValue</a></div><div class="ttdeci">double SolutionValue()</div><div class="ttdef"><b>Definition:</b> <a href="Variable_8cs_source.html#l00056">Variable.cs:56</a></div></div>
<div class="ttc" id="namespaceGoogle_1_1OrTools_1_1LinearSolver_html"><div class="ttname"><a href="namespaceGoogle_1_1OrTools_1_1LinearSolver.html">Google.OrTools.LinearSolver</a></div><div class="ttdef"><b>Definition:</b> <a href="linear__solver_2Constraint_8cs_source.html#l00011">linear_solver/Constraint.cs:11</a></div></div>
2019-07-04 15:11:35 +02:00
<div class="ttc" id="classLinearProgrammingExample_html"><div class="ttname"><a href="classLinearProgrammingExample.html">LinearProgrammingExample</a></div><div class="ttdef"><b>Definition:</b> <a href="LinearProgrammingExample_8cs_source.html#l00018">LinearProgrammingExample.cs:18</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div>
<div id="footer-container">
<div id="footer">
</div>
</div>
</body>
</html>