432 lines
13 KiB
HTML
432 lines
13 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<link rel="logo icon" href="static/logo.ico" type="image/x-icon">
|
|
|
|
<title>Welcome to the or-tools main documentation hub!</title>
|
|
|
|
<link rel="stylesheet" href="static/documentation_hub.css">
|
|
|
|
<script type="text/javascript">
|
|
function unhide(divID, buttonId) {
|
|
var item = document.getElementById(divID);
|
|
var item_button = document.getElementById(buttonId);
|
|
if (item) {
|
|
|
|
if (item.className=='hidden') {
|
|
item.className= 'unhidden';
|
|
item_button.src = "static/icon_hide.gif";
|
|
} else {
|
|
item.className= 'hidden';
|
|
item_button.src = "static/icon_show.gif";
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
</head>
|
|
<body>
|
|
<div id="wrap">
|
|
<div class="rightmenu">
|
|
<div class="description">
|
|
Open source <strong>operations research tools</strong> developed at <em><a href="http://www.google.com">Google</a></em>.
|
|
</div>
|
|
<div class="toolbar">
|
|
<a href="https://github.com/google/or-tools/">Project</a>
|
|
|
|
|
<a href="https://plus.google.com/u/0/108010024297451468877/posts">Google+ Or-Tools</a>
|
|
|
|
|
<a href="http://or-tools.blogspot.com">Blog</a>
|
|
|
|
|
<a href="http://groups.google.com/group/or-tools-discuss">Mailing list</a>
|
|
|
|
|
<a href="https://drive.google.com/folderview?id=0B2yUSpEp04BNdEU4QW5US1hvTzg&usp=sharing">Download</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<a href="https://github.com/google/or-tools/"><img src="static/or2doodle.gif" width="25%"width alt="or-tools doodle" /></a>
|
|
|
|
<hr>
|
|
|
|
<h1>Welcome to the <a href="https://github.com/google/or-tools/">or-tools library</a> main documentation hub</h1>
|
|
|
|
<div class="topic">We are in the process of rewriting the documentation in a more general setting.</br>
|
|
Have a look at <a href="https://developers.google.com/optimization/">Google Optimization</a>.
|
|
</div>
|
|
|
|
<p>We are working hard to provide useful documentation. The documentation is distributed in several documents:</p>
|
|
<ul>
|
|
<li>the <strong><a href="https://github.com/google/or-tools/wiki/AGettingStarted">Getting started</a></strong> page: explains how to download and install the library.</li>
|
|
<li>the <strong><a href="#user_manual">user's manual</a></strong>: a user's guide that explains the <em>Constraint Programming</em> part of the library.</li>
|
|
<li>the <strong><a href="#tutorial_examples">tutorial examples</a></strong>: all the complete examples presented in the user's manual.</li>
|
|
<li>the <strong><a href="reference_manual/or-tools/index.html">reference manual</a></strong>: the documentation generated by <a href="http://www.doxygen.org/">doxygen</a>.</li>
|
|
<li>the <strong><a href="faq/index.html">F.A.Q.</a></strong>: frequently asked questions.</li>
|
|
|
|
</ul>
|
|
|
|
<p>You can find more details about these documents in the foreword of the manual.</p>
|
|
<p>For suggestions, remarks, corrections about the <b>documentation</b>, please contact
|
|
<script type="text/javascript">
|
|
n = 'ortools.doc';
|
|
d = 'gmail.com';
|
|
document.write('<a href="ma');
|
|
document.write('ilto:' + n + '@');
|
|
document.write(d + '">');
|
|
document.write(n + '@');
|
|
document.write(d + '</a>.');
|
|
</script>
|
|
<noscript>ortools.doc(at)gmail.com</noscript>
|
|
Thank you very much.
|
|
</p>
|
|
|
|
<p>The or-tools documentation is covered by the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.</p>
|
|
<hr>
|
|
|
|
<h2 id="user_manual">The User's Manual</h2>
|
|
<hr>
|
|
|
|
<p>This is work in progress. Pages will be modified, moved or even removed!</p>
|
|
|
|
<p>The epub version is still experimental. We strongly recommend <a href="http://calibre-ebook.com/">calibre (ebook-viewer)</a> whenever possible to view the epub version.
|
|
With this version, you should be able to convert the manual to the right format for your preferred hand-held device. For instance, to transform the epub version
|
|
into a mobi version:
|
|
<div class="code_line">
|
|
ebook-convert user_manual.v.x.y.z.epub user_manual.v.x.y.z.mobi
|
|
</div>
|
|
</br>
|
|
We also recommend to use the epub version as it is currently the best available ebook format.
|
|
</p>
|
|
|
|
<h4>The manual</h4>
|
|
|
|
<ul>
|
|
<li><a href="user_manual/index.html">Online version</a></li>
|
|
<li class="manual_download"><a href="https://drive.google.com/folderview?id=0B2yUSpEp04BNUTgwNVRkU0lXcUE&usp=sharing">Manuals in pdf and epub versions</a></li>
|
|
</ul>
|
|
|
|
<h4 id="progress">Progress at a glance:</h4>
|
|
|
|
The following percentages show you the completion status of the manual. Note that what we publish online might be not up to date.
|
|
|
|
<h5 id="manual_progress">Manual <a href="javascript:unhide('manual_progress_block', 'manual_progress_button')"><img id="manual_progress_button" src="static/icon_show.gif" alt="" /></a></h5>
|
|
|
|
<div id="manual_progress_block" class="hidden">
|
|
|
|
<table width="100%">
|
|
<tr>
|
|
<td width="25%">Foreword</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_green" style="width:100%;">
|
|
<span>100%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<th>Part I: Basics</th>
|
|
<tr>
|
|
<td width="25%">Chap1: Introduction </td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_green" style="width:98%;">
|
|
<span>98%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap2: First steps with or-tools</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_green" style="width:100%;">
|
|
<span>100%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap3: Using objectives</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_green" style="width:100%;">
|
|
<span>100%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap4: Reification</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_red" style="width:0%;">
|
|
<span>0%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<th>Part II: Customization</th>
|
|
<tr>
|
|
<td>Chap5: Search primitives</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_green" style="width:100%;">
|
|
<span>100%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap6: Local Search operators</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_green" style="width:100%;">
|
|
<span>100%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap7: Meta-heuristics</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_green" style="width:100%;">
|
|
<span>100%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap8: Custom constraints</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_red" style="width:31%;">
|
|
<span>31%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<th>Part III: Routing</th>
|
|
<tr>
|
|
<td>Chap9: TSP with constraints</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_green" style="width:85%;">
|
|
<span>85%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap10: VRP with constraints</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_green" style="width:90%;">
|
|
<span>90%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<th>Part IV: Technicalities</th>
|
|
<tr>
|
|
<td>Chap11: Utilities</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_red" style="width:56%;">
|
|
<span>56%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap12: Modeling tricks</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_red" style="width:3%;">
|
|
<span>3%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap13: Under the hood</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_red" style="width:11%;">
|
|
<span>11%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<th>Appendices</th>
|
|
<tr>
|
|
<td>Bibliography</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_red" style="width:17%;">
|
|
<span>17%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Index</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_red" style="width:5%;">
|
|
<span>5%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<hr>
|
|
<h2 id="tutorial_examples">The tutorial examples</h2>
|
|
<hr>
|
|
<p>You can download all the code at once or pick the code corresonding to your favorite language. You'll find the code <a href="https://drive.google.com/folderview?id=0B2yUSpEp04BNUTgwNVRkU0lXcUE&usp=sharing">here</a>. All files are encoded in UTF-8 and we use LF (Unix) newlines. The code is cross-platform though.</p>
|
|
<p>The code is not well documented inside the source files as we explain it in great details in the <a href="#user_manual">user's manual</a>. Some files only exist
|
|
in some languages since some features do not have equivalents in all languages (for instance, the Google gflags library is missing in Java and C#).</p>
|
|
|
|
<p>Don't be surprised if the code in the manual is slightly different from the code in the tutorials. In the manual, we focus on the essential while the tutorials might
|
|
be more functional.
|
|
</p>
|
|
|
|
<h4>Code</h4>
|
|
|
|
<p>Content as of September 4, 2014:</p>
|
|
|
|
<p>
|
|
<ul>
|
|
<li><strong>C++:</strong> chapters 2, 3, 6 and almost all of chapter 10.</li>
|
|
<li><strong>Python:</strong> chapter 2.</li>
|
|
<li><strong>Java:</strong> chapter 2.</li>
|
|
<li><strong>C#:</strong> chapter 2.</li>
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
|
|
<h4>Coding styles</h4>
|
|
|
|
<h5>Coding styles we follow:</h5>
|
|
<p>
|
|
<dl>
|
|
<dt>C++</dt><dd><a href="http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml">Google C++ Style Guide</a></dd>
|
|
<dt>Python</dt><dd><a href="http://google-styleguide.googlecode.com/svn/trunk/pyguide.html">Google Python Style Guide</a></dd>
|
|
</dl>
|
|
</p>
|
|
<h5>Coding styles we try to follow:</h5>
|
|
<p>
|
|
<dl>
|
|
<dt>Java</dt><dd><a href="https://sites.google.com/a/android.com/opensource/submit-patches/code-style-guide">Android Code Style Rules</a></dd>
|
|
<dt>C#</dt><dd><a href="http://code.google.com/p/google-api-dotnet-client/wiki/CodingStandards">google-api-dotnet-client Coding standards</a></dd>
|
|
</dl>
|
|
</p>
|
|
|
|
<hr>
|
|
<h4 id="tutorial_C++">C++ tutorials</h4>
|
|
<p>
|
|
We've filled most of the code with <code>VLOG(x)</code>s which allow to follow in real time what the programs do. <code>x</code> varies between <code>1</code>
|
|
and <code>4</code>. The higher the value of <code>x</code>, the more detailed informations on screen. You can trigger these logs with the <code>log_level</code>
|
|
gflag:</p>
|
|
|
|
<div class="code_line">./my_wonderful_program -log_level=2</div>
|
|
|
|
<p>Makefiles are provided. We favor the use of dynamic libraries. See <a href="http://or-tools.googlecode.com/svn/trunk/documentation/user_manual/manual/first_steps/getting_started.html">Getting started</a> on how to run the tutorial examples. For more information about our makefiles, see <a href="https://github.com/google/or-tools/wiki/AGettingStarted#Compiling_libraries_and_running_examples" >Compiling libraries and running the examples</a>.</p>
|
|
|
|
|
|
|
|
<p>Last but not least, you might wonder why we don't use (or rather minimize the use of) <code>streams</code> in our examples. This is an internal requirement.</p>
|
|
|
|
|
|
<p>You can download all files at once <a href="https://drive.google.com/folderview?id=0B2yUSpEp04BNUTgwNVRkU0lXcUE&usp=sharing">here</a>.</p>
|
|
|
|
<h4>Files</h4>
|
|
|
|
<p>
|
|
<table style="width:100%">
|
|
<tr>
|
|
<td>Chap2:</td>
|
|
<td>First steps with or-tools: Cryptarithmetic Puzzles</td>
|
|
<td><a href="tutorials/cplusplus/chap2">chap2</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap3:</td>
|
|
<td>Using objectives in constraint programming: the Golomb Ruler Problem</td>
|
|
<td><a href="tutorials/cplusplus/chap3">chap3</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap4:</td>
|
|
<td>Reification</td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap5:</td>
|
|
<td>Defining search primitives: the n-Queens Problem</td>
|
|
<td><a href="tutorials/cplusplus/chap5">chap5</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap6:</td>
|
|
<td>Local search: the Job-Shop Problem</td>
|
|
<td><a href="tutorials/cplusplus/chap6">chap6</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap7:</td>
|
|
<td>Meta-heuristics: several previous problems</td>
|
|
<td><a href="tutorials/cplusplus/chap7">chap7</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap8:</td>
|
|
<td>Custom constraints: the alldifferent_except_0 constraint</td>
|
|
<td><a href="xxx">NOT YET</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap9:</td>
|
|
<td>Travelling Salesman Problems with constraints: the TSP with time windows</td>
|
|
<td><a href="xxx">NOT YET</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap10:</td>
|
|
<td>Vehicule Routing Problems with constraints: the capacitated vehicle routing problem</td>
|
|
<td><a href="tutorials/cplusplus/chap10">chap10: NOT TESTED</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Common:</td>
|
|
<td>Common files</td>
|
|
<td><a href="tutorials/cplusplus/common">common: NOT TESTED</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Routing common:</td>
|
|
<td>Routing common files</td>
|
|
<td><a href="tutorials/cplusplus/routing_common">routing_common: NOT TESTED</a></td>
|
|
</tr>
|
|
</table>
|
|
</p>
|
|
|
|
<hr>
|
|
<h4 id="tutorial_Python">Python tutorials</h4>
|
|
|
|
|
|
<h4 id="tutorial_Java">Java tutorials</h4>
|
|
|
|
|
|
<h4 id="tutorial_Csharp">C# tutorials</h4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<hr>
|
|
<div class="footer">© Copyright 2012-2015, Google</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|