diff --git a/documentation/changes_list.txt b/documentation/changes_list.txt index 2957908d09..4bf1b07b5f 100644 --- a/documentation/changes_list.txt +++ b/documentation/changes_list.txt @@ -1,4 +1,14 @@ +v.0.1.17: (2012-10-31 14:42:16) +------------------------------- +* Minor enhancements to the manual: + - Minor corrections. + - half of 1.3. + - 1.4 added. +* Documentation hub: + - +/- buttons to show/hide
. + + v.0.1.16: (2012-10-18 15:57:17) ------------------------------- * Minor enhancements to the manual: diff --git a/documentation/documentation_hub.html b/documentation/documentation_hub.html index 6e9d424837..b5dfc217ad 100644 --- a/documentation/documentation_hub.html +++ b/documentation/documentation_hub.html @@ -6,6 +6,25 @@ + +
@@ -73,11 +92,14 @@ Thank you very much.

What's new?


Here is a little summary:

-
v.0.1.16: (2012-10-18 15:57:17)
+
v.0.1.17: (2012-10-31 14:42:16)
 -------------------------------
 * Minor enhancements to the manual:
   - Minor corrections.
-  - overview of chapter 1 added.
+  - half of 1.3.
+  - 1.4 added.
+* Documentation hub:
+  - +/- buttons to show/hide 
.
@@ -100,16 +122,19 @@ We also recommend to use the epub version as it is currently the best available

Progress at a glance:

The following percentages show you the completion status of the manual. Note that what we publish online might be not up to date. -
Manual
+
Manual
+ + + +
Documentation generation
+ +

The tutorial examples

@@ -503,14 +534,15 @@ files in some languages as the features implemented just don't have an equivalen
Code:

Everything: tutorial_all_examples.zip

-

Jump to: C++   |   Python   |   Java   |   C#.

+

Jump to:

+

+ +

diff --git a/documentation/static/documentation_hub.css b/documentation/static/documentation_hub.css index a2bc6fc407..94fbefa9cf 100644 --- a/documentation/static/documentation_hub.css +++ b/documentation/static/documentation_hub.css @@ -144,3 +144,6 @@ dd.examples_list { background-color: #C0EF4A; /*#A8D141;*/ background-image: url('earth.png'); } + +.hidden { display: none; } +.unhidden { display: block; } diff --git a/documentation/static/icon_hide.gif b/documentation/static/icon_hide.gif new file mode 100644 index 0000000000..d6bf8e2001 Binary files /dev/null and b/documentation/static/icon_hide.gif differ diff --git a/documentation/static/icon_show.gif b/documentation/static/icon_show.gif new file mode 100644 index 0000000000..7a040f24d2 Binary files /dev/null and b/documentation/static/icon_show.gif differ diff --git a/documentation/user_manual/_images/glasses-nerdy.png b/documentation/user_manual/_images/glasses-nerdy.png new file mode 100644 index 0000000000..a23e7289b6 Binary files /dev/null and b/documentation/user_manual/_images/glasses-nerdy.png differ diff --git a/documentation/user_manual/_images/math/6cf7ad4dffbf76c56644d092bb4db00e81f8006e.png b/documentation/user_manual/_images/math/6cf7ad4dffbf76c56644d092bb4db00e81f8006e.png new file mode 100644 index 0000000000..fdc242cf71 Binary files /dev/null and b/documentation/user_manual/_images/math/6cf7ad4dffbf76c56644d092bb4db00e81f8006e.png differ diff --git a/documentation/user_manual/_images/math/da4336404a17d014c52e78a9510286c0cfc1382e.png b/documentation/user_manual/_images/math/da4336404a17d014c52e78a9510286c0cfc1382e.png new file mode 100644 index 0000000000..0be57ddadc Binary files /dev/null and b/documentation/user_manual/_images/math/da4336404a17d014c52e78a9510286c0cfc1382e.png differ diff --git a/documentation/user_manual/manual/TSP.html b/documentation/user_manual/manual/TSP.html index 888a862f72..ef300f6b1a 100644 --- a/documentation/user_manual/manual/TSP.html +++ b/documentation/user_manual/manual/TSP.html @@ -97,6 +97,14 @@ the Travelling Salesman Problem (TSP)traveling. +

We use the excellent C++[4] ePiX library +to visualize TSP solutions in TSPLIB format and TSPTW solutions in López-Ibáñez-Blum and da Silva-Urrutia formats.

+ + + + + +
[4]The ePiX library uses the \text{\TeX/\LaTeX} engine to create beautiful graphics.

Overview:

We start this chapter by presenting in broad terms the different categories of Routing Problems and describe the Routing Library (RL) in a nutshell. Next, we introduce the Travelling Salesman Problem (TSP) and the TSPLIB instances. @@ -113,14 +121,6 @@ solve the TSP with Time Windows.

Files:

You can find the code in the directory documentation/tutorials/C++/chap9.

-

We use the excellent C++[4] ePiX library -to visualize TSP solutions in TSPLIB format and TSPTW solutions in López-Ibáñez-Blum and da Silva-Urrutia formats.

- - - - - -
[4]The ePiX library uses the \text{\TeX/\LaTeX} engine to create beautiful graphics.

The files inside this directory are:

+
+

1.3.2. Problems, instances and solutions

+
-

1.3.2. Two important ideas of the complexity theory for the hurried reader

+

1.3.3. Two important ideas of the complexity theory for the hurried reader

If you prefer not to read the next section, we have summarized its main ideas:

  • problems are divided in two categories[3]: easy @@ -161,7 +164,7 @@ don’t cover all problems. - @@ -183,7 +186,7 @@ it is indeed an exact solution in general.
    [4]This book was written in 1979 and so misses the last developments of the complexity theory +
    [4]This book was written in 1979 and so misses the last developments of the complexity theory but it clearly explains the NP-Completeness theory and provides a long list of NP-Complete problems.
-

1.3.3. Complexity theory in a few lines

+

1.3.4. Complexity theory in a few lines

Some problems such as the Travelling Salesman Problem (see the chapter Travelling Salesman Problems with constraints: the TSP with time windows) are hard to solve[7]: no one could ever come up @@ -208,10 +211,10 @@ very interesting and ... not easy to understand. We try the tour the forceare important and actually without them, you can not construct a complexity theory.

-

1.3.3.1. Intractability

+

1.3.4.1. Intractability

One of the main difficulties complexity experts faced in the ‘70s was to come up with a theoretical definition of the complexity -of problems not algorithms. Indeed, it is relatively easy[8] to define a complexity measure of +of problems not algorithms. Indeed, it is relatively easy[8] to define a complexity measure of algorithms but how would you define the complexity of a problem? If you have an efficient algorithm to solve a problem, you could say that the problem belongs to the set of easy problems but what about difficult problems? @@ -232,20 +235,20 @@ an instance B (because if you know an efficient algorithm to solve problem A, you can solve problem B as efficiently) and we write B \leqslant_{\text{T}} A and say that problem B reduces efficiently to problem A -or that \tau is an efficient reduction[9]. +or that \tau is an efficient reduction[9]. The search for an efficient algorithm is replaced by the search for an efficient reduction between instances of two problems to prove complexity.

-
[8]Well, to a certain degree. You need to know what instances you consider, how these are +
[8]Well, to a certain degree. You need to know what instances you consider, how these are encoded, what type of machines you use and so on.
-
[9]The \text{T} in \leqslant_{\text{T}} is in honor of Alan Turing. Different types of +
[9]The \text{T} in \leqslant_{\text{T}} is in honor of Alan Turing. Different types of efficient reductions exist.
@@ -266,11 +269,11 @@ correspond. This also means that we consider an algorithm efficient if it is polynomially time-bounded (otherwise the efficiency of the reduction would be useless).

The class of problems that can be efficiently solved is called P, i.e. the class of problems that can be solved by -a polynomial-time bounded algorithm[10][11].

+a polynomial-time bounded algorithm[10][11].

- - @@ -295,7 +298,7 @@ given solution is indeed the solution of the problem. One such problem is the [12]. P \subset NP because if you can +in polynomial time, are said to be in the class NP[12]. P \subset NP because if you can find a solution in polynomial time, you can also verify this solution in polynomial time (just construct it). Whether we have equality or not between these two sets is one of the major unsolved theoretical questions in Operations Research (see the box @@ -303,7 +306,7 @@ between these two sets is one of the major unsolved theoretical questions in Ope
[10]For technical reasons, we don’t compare problems but languages and only consider +
[10]For technical reasons, we don’t compare problems but languages and only consider decision problems, i.e. problems that have a yes/no answer. The Subset Sum Problem is such a problem. Given a finite set of integers, is there a non-empty subset whose sum is zero? The answer is yes or no. By extension, we say an optimization problem is in P, if its equivalent decision problem is in P. For instance, @@ -284,7 +287,7 @@ is in
[11]This discussion is really about theoretical difficulties of problems. Some problems that +
[11]This discussion is really about theoretical difficulties of problems. Some problems that are theoretically easy (such as solving a Linear System or a Linear Program) are difficult in practice and conversely, some problems that are theoretically difficult, such as the Knapsack Problem are routinely solved on big instances.
- +
[12]The abbreviation NP refers to non-deterministic polynomial time, not to non-polynomial.
[12]The abbreviation NP refers to non-deterministic polynomial time, not to non-polynomial.

Not all problems in \text{NP} seem to be of equal complexity. Some problems, such as the HPP are as hard as any problem @@ -321,7 +324,7 @@ and Z such that all problems A_i in \text{NP} are reducible to Z, i.e. A_i \leqslant_{\text{T}} Z, then to prove that all problems A_i in \text{NP} reduce to a problem X, you just need to prove that Z reduces to X. Indeed, if -Z \leqslant_{\text{T}} X then A_i \leqslant_{\text{T}} Z \leqslant_{\text{T}} X[13].

+Z \leqslant_{\text{T}} X then A_i \leqslant_{\text{T}} Z \leqslant_{\text{T}} X[13].

The funny fact is that if X is in \text{NP}, then X \leqslant_{\text{T}} Z also. If you can solve one problem in \text{NP-Complete} efficiently, you can solve all the problems in \text{NP} efficiently!

@@ -329,11 +332,8 @@ in Several researchers (like for example Cook and Levin in the early ‘70s, see Wikipedia on the Cook-Levin Theorem), were able to prove that -all problems in \text{NP} are reducible in polynomial time to the Boolean satisfiability problem (SAT). -The SAT problem is the problem of determining if the variables of a given Boolean formula can be assigned -(TRUE or FALSE) -in such a way as to make the formula evaluate to TRUE. -Proving that the SAT problem is \text{NP-Complete} is a major achievement in the complexity +all problems in \text{NP} are reducible in polynomial time to the Boolean satisfiability problem (SAT).

+

Proving that the SAT problem is \text{NP-Complete} is a major achievement in the complexity theory (the proof is highly technical).

@@ -341,19 +341,19 @@ theory (the proof is highly technical).

-
[13]If you want to prove that a problem Y is \text{NP-Hard} (see below), +
[13]If you want to prove that a problem Y is \text{NP-Hard} (see below), take a problem that is \text{NP-Complete}, like the HPP, and reduce it to your problem. This might sound easy but it is not!

Finally, if a problem is as hard as an \text{NP-Complete} problem, it is called an \text{NP-Hard} problem. Optimization problems, whose decision version belong to \text{NP-Complete}, fall into this category.

-

The next figure summarizes the relations between the complexity classes[14] we have seen as most of the experts believe they stand, i.e. \text{P} \neq \text{NP}.

+

The next figure summarizes the relations between the complexity classes[14] we have seen as most of the experts believe they stand, i.e. \text{P} \neq \text{NP}.

../../_images/complexity_classes.png - +
[14]Be aware that there are many more complexity classes.
[14]Be aware that there are many more complexity classes.
@@ -370,7 +370,7 @@ about the -Outcome[15] +Outcome[15] % (2002) % (2012) @@ -391,12 +391,12 @@ about the [16]!

+yes or no answer[16]!


- - - @@ -428,22 +428,22 @@ involved 100 researchers while the second one involved 152 researchers. - +
[Gasarch2002]
    +
[Gasarch2002]
    1. Gasarch. The P=?NP poll, SIGACT News 33 (2), pp 34–47, 2002.
    @@ -408,7 +408,7 @@ about the
[Gasarch2012]
    +
[Gasarch2012]
    1. Gasarch. The second P =?NP poll, SIGACT News 43(2), pp 53-77, 2012.
    @@ -420,7 +420,7 @@ about the
[15]We agglomerated all other answers into a category No idea although the poll +
[15]We agglomerated all other answers into a category No idea although the poll allowed people to fully express themselves (some answered “I don’t care” for instance). The first poll (2002) involved 100 researchers while the second one involved 152 researchers.
[16]See Undecidable problem on Wikipedia.
[16]See Undecidable problem on Wikipedia.

If you are interested in this fascinating subject, we recommend that you read the classical book Computers and Intractability: A Guide to the Theory of NP-Completeness from M. R. Garey and D. S. Johnson (see -[Garey1979][4]).

+[Garey1979][4]).

-
[Garey1979]Garey, M. R. and Johnson D. S. Computers and Intractability: A Guide to the Theory of NP-Completeness, +
[Garey1979]Garey, M. R. and Johnson D. S. Computers and Intractability: A Guide to the Theory of NP-Completeness, 1979, W. H. Freeman & Co, New York, NY, USA, pp 338.
-

1.3.3.2. The practical aspect of intractability

+

1.3.4.2. The practical aspect of intractability

If you try to solve a problem that is proven to be \text{NP-Hard}, you know that it is probably an intractable problem (if P \neq NP). At least, you know that no one could ever come with an efficient algorithm to solve it and that it is unlikely to happen soon. Thus, you can not solve big instances of your @@ -452,27 +452,27 @@ problem. What can you do?

your instances are too big to be solved exactly, even with parallel and/or decomposition algorithms, then there is only one thing to do: approximate your problem and/or the solutions.

You could simplify your problem and/or be satisfied with an approximation, i.e. a solution that is not exact nor optimal. -One way to do this in CP is to relax the model by softening some constraints[17]. In a nutshell, +One way to do this in CP is to relax the model by softening some constraints[17]. In a nutshell, you soften a constraint by allowing this constraint to be violated. In a approximate solution where the constraint is violated, you penalize the objective function by a certain amount corresponding to the violation. The bigger the violation, the bigger the penalty. The idea is to find a solution that doesn’t violate too much the soft constraints in -the hope that such approximate solution isn’t that different from an exact or optimal solution[18].

+the hope that such approximate solution isn’t that different from an exact or optimal solution[18].

- +
[17]For MIP practitioners, this is equivalent to Lagrangian Relaxation.
[17]For MIP practitioners, this is equivalent to Lagrangian Relaxation.
-
[18]In the case of optimization, a solution that isn’t that different means a +
[18]In the case of optimization, a solution that isn’t that different means a solution that has a good objective value, preferably close to the optimum.
-

1.3.3.3. Approximation complexity

+

1.3.4.3. Approximation complexity

[TO BE DONE]

@@ -562,11 +562,12 @@ Search:
diff --git a/documentation/user_manual/manual/tsp/model_behind_scene.html b/documentation/user_manual/manual/tsp/model_behind_scene.html index 3de0025457..260a622012 100644 --- a/documentation/user_manual/manual/tsp/model_behind_scene.html +++ b/documentation/user_manual/manual/tsp/model_behind_scene.html @@ -29,7 +29,7 @@ - +