Files
ortools-clone/docs/java/TspCities_8java_source.html

94 lines
40 KiB
HTML
Raw Normal View History

2019-06-13 02:45:44 +02:00
<!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: TspCities.java 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="doxygen.css" rel="stylesheet" type="text/css" />
<link href="ortools.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="projectalign" style="padding-left: 0.5em;">
<div id="projectname">OR-Tools
&#160;<span id="projectnumber">7.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- 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="pages.html"><span>Related&#160;Pages</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>
</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_afbb39f66221aac28bbdefd1dca2b2b0.html">constraint_solver</a></li><li class="navelem"><a class="el" href="dir_973c70e94397cf6217a966850971a49d.html">samples</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">TspCities.java</div> </div>
</div><!--header-->
<div class="contents">
<a href="TspCities_8java.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="comment">// [START import]</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="keyword">import</span> <a class="code" href="namespacecom.html">com</a>.<a class="code" href="namespacecom_1_1google.html">google</a>.<a class="code" href="namespacecom_1_1google_1_1ortools.html">ortools</a>.<a class="code" href="namespacecom_1_1google_1_1ortools_1_1constraintsolver.html">constraintsolver</a>.<a class="code" href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1Assignment.html">Assignment</a>;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="keyword">import</span> <a class="code" href="namespacecom.html">com</a>.<a class="code" href="namespacecom_1_1google.html">google</a>.<a class="code" href="namespacecom_1_1google_1_1ortools.html">ortools</a>.<a class="code" href="namespacecom_1_1google_1_1ortools_1_1constraintsolver.html">constraintsolver</a>.<a class="code" href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1FirstSolutionStrategy.html">FirstSolutionStrategy</a>;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="keyword">import</span> <a class="code" href="namespacecom.html">com</a>.<a class="code" href="namespacecom_1_1google.html">google</a>.<a class="code" href="namespacecom_1_1google_1_1ortools.html">ortools</a>.<a class="code" href="namespacecom_1_1google_1_1ortools_1_1constraintsolver.html">constraintsolver</a>.<a class="code" href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingIndexManager.html">RoutingIndexManager</a>;</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="keyword">import</span> <a c
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1main_html_a9be7b282760643b582e20e78424ed5ac"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1main.html#a9be7b282760643b582e20e78424ed5ac">com.google.ortools.constraintsolver.main.defaultRoutingSearchParameters</a></div><div class="ttdeci">static com.google.ortools.constraintsolver.RoutingSearchParameters defaultRoutingSearchParameters()</div><div class="ttdef"><b>Definition:</b> <a href="constraintsolver_2main_8java_source.html#l00065">constraintsolver/main.java:65</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel_html_a36b69016b7610939d29db553d03e9e8a"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel.html#a36b69016b7610939d29db553d03e9e8a">com.google.ortools.constraintsolver.RoutingModel.registerTransitCallback</a></div><div class="ttdeci">int registerTransitCallback(LongBinaryOperator callback)</div><div class="ttdef"><b>Definition:</b> <a href="RoutingModel_8java_source.html#l00069">RoutingModel.java:69</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1Assignment_html_af7e45781478c648cfd0d277b4588fd8a"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1Assignment.html#af7e45781478c648cfd0d277b4588fd8a">com.google.ortools.constraintsolver.Assignment.objectiveValue</a></div><div class="ttdeci">long objectiveValue()</div><div class="ttdef"><b>Definition:</b> <a href="Assignment_8java_source.html#l00115">Assignment.java:115</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingIndexManager_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingIndexManager.html">com.google.ortools.constraintsolver.RoutingIndexManager</a></div><div class="ttdef"><b>Definition:</b> <a href="RoutingIndexManager_8java_source.html#l00011">RoutingIndexManager.java:11</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingSearchParameters_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingSearchParameters.html">com.google.ortools.constraintsolver.RoutingSearchParameters</a></div><div class="ttdef"><b>Definition:</b> <a href="RoutingSearchParameters_8java_source.html#l00017">RoutingSearchParameters.java:17</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1FirstSolutionStrategy_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1FirstSolutionStrategy.html">com.google.ortools.constraintsolver.FirstSolutionStrategy</a></div><div class="ttdef"><b>Definition:</b> <a href="FirstSolutionStrategy_8java_source.html#l00013">FirstSolutionStrategy.java:13</a></div></div>
<div class="ttc" id="classTspCities_html_a68edbcc11b319bd4161f625e0019166d"><div class="ttname"><a href="classTspCities.html#a68edbcc11b319bd4161f625e0019166d">TspCities.main</a></div><div class="ttdeci">static void main(String[] args)</div><div class="ttdef"><b>Definition:</b> <a href="TspCities_8java_source.html#l00079">TspCities.java:79</a></div></div>
<div class="ttc" id="namespacecom_html"><div class="ttname"><a href="namespacecom.html">com</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel_html_a446b08044360add5ac70e79c1f88d30a"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel.html#a446b08044360add5ac70e79c1f88d30a">com.google.ortools.constraintsolver.RoutingModel.start</a></div><div class="ttdeci">long start(int vehicle)</div><div class="ttdef"><b>Definition:</b> <a href="RoutingModel_8java_source.html#l00416">RoutingModel.java:416</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel_html_a7e304edf03b566a7c4dd0f620451f300"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel.html#a7e304edf03b566a7c4dd0f620451f300">com.google.ortools.constraintsolver.RoutingModel.getArcCostForVehicle</a></div><div class="ttdeci">long getArcCostForVehicle(long from_index, long to_index, long vehicle)</div><div class="ttdef"><b>Definition:</b> <a href="RoutingModel_8java_source.html#l00477">RoutingModel.java:477</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingSearchParameters_1_1Builder_html_a47e2da700a8d33b55478dc6e8ef124cd"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingSearchParameters_1_1Builder.html#a47e2da700a8d33b55478dc6e8ef124cd">com.google.ortools.constraintsolver.RoutingSearchParameters.Builder.build</a></div><div class="ttdeci">.lang.Override com.google.ortools.constraintsolver.RoutingSearchParameters build()</div><div class="ttdef"><b>Definition:</b> <a href="RoutingSearchParameters_8java_source.html#l06625">RoutingSearchParameters.java:6625</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1main_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1main.html">com.google.ortools.constraintsolver.main</a></div><div class="ttdef"><b>Definition:</b> <a href="constraintsolver_2main_8java_source.html#l00011">constraintsolver/main.java:11</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel.html">com.google.ortools.constraintsolver.RoutingModel</a></div><div class="ttdef"><b>Definition:</b> <a href="RoutingModel_8java_source.html#l00018">RoutingModel.java:18</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingSearchParameters_1_1Builder_html_a4045393900d1f980ebeaf7ae0be29366"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingSearchParameters_1_1Builder.html#a4045393900d1f980ebeaf7ae0be29366">com.google.ortools.constraintsolver.RoutingSearchParameters.Builder.setFirstSolutionStrategy</a></div><div class="ttdeci">Builder setFirstSolutionStrategy(com.google.ortools.constraintsolver.FirstSolutionStrategy.Value value)</div><div class="ttdef"><b>Definition:</b> <a href="RoutingSearchParameters_8java_source.html#l06863">RoutingSearchParameters.java:6863</a></div></div>
<div class="ttc" id="classTspCities_html"><div class="ttname"><a href="classTspCities.html">TspCities</a></div><div class="ttdoc">Minimal TSP using distance matrix.</div><div class="ttdef"><b>Definition:</b> <a href="TspCities_8java_source.html#l00027">TspCities.java:27</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel_html_a9e892269c5cda0c4a4e082029df3d60b"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel.html#a9e892269c5cda0c4a4e082029df3d60b">com.google.ortools.constraintsolver.RoutingModel.solveWithParameters</a></div><div class="ttdeci">Assignment solveWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)</div><div class="ttdef"><b>Definition:</b> <a href="RoutingModel_8java_source.html#l00321">RoutingModel.java:321</a></div></div>
<div class="ttc" id="namespacecom_1_1google_1_1ortools_html"><div class="ttname"><a href="namespacecom_1_1google_1_1ortools.html">com.google.ortools</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel_html_aaf34bb53f6a3640565d6656fc41786f5"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel.html#aaf34bb53f6a3640565d6656fc41786f5">com.google.ortools.constraintsolver.RoutingModel.end</a></div><div class="ttdeci">long end(int vehicle)</div><div class="ttdef"><b>Definition:</b> <a href="RoutingModel_8java_source.html#l00420">RoutingModel.java:420</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel_html_a06868c9f11737065bfb37cb9d37579e7"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel.html#a06868c9f11737065bfb37cb9d37579e7">com.google.ortools.constraintsolver.RoutingModel.isEnd</a></div><div class="ttdeci">boolean isEnd(long index)</div><div class="ttdef"><b>Definition:</b> <a href="RoutingModel_8java_source.html#l00428">RoutingModel.java:428</a></div></div>
<div class="ttc" id="namespacecom_1_1google_1_1ortools_1_1constraintsolver_html"><div class="ttname"><a href="namespacecom_1_1google_1_1ortools_1_1constraintsolver.html">com.google.ortools.constraintsolver</a></div><div class="ttdef"><b>Definition:</b> <a href="Assignment_8java_source.html#l00009">Assignment.java:9</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1Assignment_html_a889aac7c3b3286a2342d7cebcad17dd8"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1Assignment.html#a889aac7c3b3286a2342d7cebcad17dd8">com.google.ortools.constraintsolver.Assignment.value</a></div><div class="ttdeci">long value(IntVar var)</div><div class="ttdef"><b>Definition:</b> <a href="Assignment_8java_source.html#l00161">Assignment.java:161</a></div></div>
<div class="ttc" id="enumcom_1_1google_1_1ortools_1_1constraintsolver_1_1FirstSolutionStrategy_1_1Value_html_a36bae5ade0433aa2bdfd57daf1374a3c"><div class="ttname"><a href="enumcom_1_1google_1_1ortools_1_1constraintsolver_1_1FirstSolutionStrategy_1_1Value.html#a36bae5ade0433aa2bdfd57daf1374a3c">com.google.ortools.constraintsolver.FirstSolutionStrategy.Value.PATH_CHEAPEST_ARC</a></div><div class="ttdeci">PATH_CHEAPEST_ARC</div><div class="ttdef"><b>Definition:</b> <a href="FirstSolutionStrategy_8java_source.html#l00112">FirstSolutionStrategy.java:112</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel_html_a378cc028968a8e960a8a34b5d5d80956"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel.html#a378cc028968a8e960a8a34b5d5d80956">com.google.ortools.constraintsolver.RoutingModel.setArcCostEvaluatorOfAllVehicles</a></div><div class="ttdeci">void setArcCostEvaluatorOfAllVehicles(int evaluator_index)</div><div class="ttdef"><b>Definition:</b> <a href="RoutingModel_8java_source.html#l00235">RoutingModel.java:235</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1Assignment_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1Assignment.html">com.google.ortools.constraintsolver.Assignment</a></div><div class="ttdef"><b>Definition:</b> <a href="Assignment_8java_source.html#l00011">Assignment.java:11</a></div></div>
<div class="ttc" id="namespacecom_1_1google_html"><div class="ttname"><a href="namespacecom_1_1google.html">com.google</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel_html_aeee491a70bc08d4814a80fd207091d05"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingModel.html#aeee491a70bc08d4814a80fd207091d05">com.google.ortools.constraintsolver.RoutingModel.nextVar</a></div><div class="ttdeci">IntVar nextVar(long index)</div><div class="ttdef"><b>Definition:</b> <a href="RoutingModel_8java_source.html#l00452">RoutingModel.java:452</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingIndexManager_html_af943d115205ced5b3495a722330c709b"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingIndexManager.html#af943d115205ced5b3495a722330c709b">com.google.ortools.constraintsolver.RoutingIndexManager.indexToNode</a></div><div class="ttdeci">int indexToNode(long index)</div><div class="ttdef"><b>Definition:</b> <a href="RoutingIndexManager_8java_source.html#l00066">RoutingIndexManager.java:66</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingSearchParameters_html_a02f100cb6b7dba5d3f67c71d126ec945"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1constraintsolver_1_1RoutingSearchParameters.html#a02f100cb6b7dba5d3f67c71d126ec945">com.google.ortools.constraintsolver.RoutingSearchParameters.toBuilder</a></div><div class="ttdeci">.lang.Override Builder toBuilder()</div><div class="ttdef"><b>Definition:</b> <a href="RoutingSearchParameters_8java_source.html#l06493">RoutingSearchParameters.java:6493</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>