423 lines
13 KiB
HTML
423 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="http://code.google.com/p/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>
|
|
|
|
|
<a href="#new">What's new?</a>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<a href="http://code.google.com/p/or-tools/"><img src="static/or2doodle.gif" width="25%"width alt="or-tools doodle" /></a>
|
|
|
|
<hr>
|
|
|
|
<h1>Welcome to the <a href="https://code.google.com/p/or-tools/">or-tools library</a> main documentation hub</h1>
|
|
|
|
<p>We are working hard to provide useful documentation. The documentation is distributed in several documents:</p>
|
|
<ul>
|
|
<li>the <strong><a href="http://code.google.com/p/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>What's new?</h2>
|
|
<hr>
|
|
<p id="new">Here is a little summary:</p>
|
|
<pre id="verbatim">v.0.2.13: (2014-10-30 00:01:40)
|
|
-------------------------------
|
|
* chapter 1: all pages are now accessible.
|
|
</pre>
|
|
<p>This is the <a href="changes_list.txt">list of changes</a>.</p>
|
|
<h5>Legend:</h5>
|
|
<p>
|
|
<ul>
|
|
<li><strong>added:</strong> written for the first time;</li>
|
|
<li><strong>rewritten:</strong> substantial changes;</li>
|
|
<li><strong>enhanced:</strong> minor changes;</li>
|
|
<li><strong>updated:</strong> code did change...;</li>
|
|
<li><strong>reviewed:</strong> reread with a critical eye for the maths and the working of the library!</li>
|
|
<li><strong>corrected:</strong> passed through the mill...;</li>
|
|
<li><strong>published:</strong> you can read it!;</li>
|
|
<li><strong>removed:</strong> for the better!</li>
|
|
</ul>
|
|
</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><font color="red">As of September 4, 2014, the manual is <b>NOT</b> up to date with the new API. The tutorial code however <b>IS</b> up to date!</font></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:93%;">
|
|
<span>93%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap3: Using objectives</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_green" style="width:85%;">
|
|
<span>85%</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:79%;">
|
|
<span>79%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap6: Local Search operators</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_green" style="width:95%;">
|
|
<span>95%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap7: Meta-heuristics</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_red" style="width:5%;">
|
|
<span>5%</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Chap8: Custom constraints</td>
|
|
<td>
|
|
<div class="progress_background">
|
|
<div class="progress_foreground_red" style="width:1%;">
|
|
<span>1%</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:31%;">
|
|
<span>31%</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>
|
|
|
|
<h4 id="tutorial_C++">C++ tutorials</h4>
|
|
<p>
|
|
We've filled 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>We'll find a similar mechanism for the other languages soon.</p>
|
|
|
|
<p>Makefiles are (finally) provided. We favor the use of dynamic libraries.
|
|
See <a href="http://code.google.com/p/or-tools/wiki/AGettingStarted#Compiling_libraries_and_running_examples" >Compiling libraries and running the examples</a> on how
|
|
to use these makefiles.</p>
|
|
|
|
<h6>In short:</h6>
|
|
|
|
<ol>
|
|
<li>You have to redefine the <code>OR_TOOLS_TOP</code> variable with the root directory of the or-tools libary:
|
|
<div class="code_line">OR_TOOLS_TOP=/home/username/or-tools-read-only</div>
|
|
You can also overwrite this variable when invoking make:
|
|
<div class="code_line">make OR_TOOLS_TOP=/home/username/or-tools-read-only</div>
|
|
</li>
|
|
|
|
<li>If you want to play with the routing examples, the <code>TUTORIAL</code> variable must point to the C++ tutorial directory. By default, it is defined as:
|
|
<div class="code_line">TUTORIAL=($OR_TOOLS_TOP)/documentation/tutorials/cplusplus</div>
|
|
If you deploy the tutorial examples somewhere else, update this variable accordingly.
|
|
</li>
|
|
|
|
<li>If you want to compile all examples:
|
|
<div class="code_line">make all</div>
|
|
</li>
|
|
<li>If you want to compile a specific example:
|
|
<ul>
|
|
<li>Windows:
|
|
<div class="code_line" > make my_example.exe</div>
|
|
</li>
|
|
<li>MacOS and Unix:
|
|
<div class="code_line">make my_example</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li>To delete all generated files:
|
|
<div class="code_line">make local_clean</div>
|
|
<font color="red">Don't use</font>
|
|
<div class="code_line">make clean</div>
|
|
<font color="red">as you will erase the generated files for the whole library!</font>
|
|
</li>
|
|
</ol>
|
|
|
|
<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>
|
|
|
|
<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-2014, Google</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|