Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
tutorial:optimization [2014/01/03 15:45] – external edit 127.0.0.1 | tutorial:optimization [2017/07/29 18:23] – added files as paths oroehrig | ||
---|---|---|---|
Line 18: | Line 18: | ||
This tutorial is targeted towards the optimization community, since, surprisingly, | This tutorial is targeted towards the optimization community, since, surprisingly, | ||
+ | You can find files of the example LPs in the folder '' | ||
===== Input: lp2poly ===== | ===== Input: lp2poly ===== | ||
Line 35: | Line 36: | ||
</ | </ | ||
- | Thus, the file describes a 0/1-cube in three dimensions. It should be easy to adapt this format to other cases (If for example '' | + | Thus, the file describes a 0/1-cube in three dimensions. It should be easy to adapt this format to other cases (If for example '' |
- | + | ||
- | Now assume that this example is contained in file '' | + | |
< | < | ||
- | polytope > $f=lp2poly(' | + | polytope > $f=lp2poly(' |
</ | </ | ||
The polytope '' | The polytope '' | ||
Line 76: | Line 75: | ||
1 0 1 1 | 1 0 1 1 | ||
</ | </ | ||
- | This vertex corresponds to setting '' | + | This vertex corresponds to setting '' |
< | < | ||
polytope > print $p-> | polytope > print $p-> | ||
Line 108: | Line 107: | ||
=== Bounded Polyhedra === | === Bounded Polyhedra === | ||
- | Let us illustrate the approach via the example of the //stable set problem//: Here one is given an (undirected) Graph G = (V,E) with node set V and edges E. The goal is to find a largest subset of node V' such that any two nodes in V' are not connected by an edge. | + | Let us illustrate the approach via the example of the //stable set problem//: Here one is given an (undirected) Graph G = (V,E) with node set V and edges E. The goal is to find a largest subset of nodes V' such that any two nodes in V' are not connected by an edge. |
For our example consider the 5-cycle, i.e., the graph C< | For our example consider the 5-cycle, i.e., the graph C< | ||
Line 134: | Line 133: | ||
We assume that the above information is contained in the file '' | We assume that the above information is contained in the file '' | ||
< | < | ||
- | polytope > $f=lp2poly(' | + | polytope > $f=lp2poly(' |
polytope > $p = new Polytope< | polytope > $p = new Polytope< | ||
</ | </ | ||
Line 198: | Line 197: | ||
We now assume that the example is contained in the file '' | We now assume that the example is contained in the file '' | ||
< | < | ||
- | polytope > $f = lp2poly(' | + | polytope > $f = lp2poly(' |
polytope > $pin = new Polytope< | polytope > $pin = new Polytope< | ||
</ | </ | ||
Line 292: | Line 291: | ||
In this example there are two integral variables '' | In this example there are two integral variables '' | ||
< | < | ||
- | polytope > $m=lp2poly(' | + | polytope > $m=lp2poly(' |
polytope > $p = new Polytope< | polytope > $p = new Polytope< | ||
</ | </ | ||
Line 335: | Line 334: | ||
In the second example, we reuse the file '' | In the second example, we reuse the file '' | ||
< | < | ||
- | polytope > $f=lp2poly(' | + | polytope > $f=lp2poly(' |
polytope > $p = new Polytope< | polytope > $p = new Polytope< | ||
</ | </ | ||
Line 379: | Line 378: | ||
Let us test whether the inequality system of this example is TDI. Thus, we first load the data as usual: | Let us test whether the inequality system of this example is TDI. Thus, we first load the data as usual: | ||
< | < | ||
- | polytope > $f = lp2poly(' | + | polytope > $f = lp2poly(' |
polytope > $p = new Polytope< | polytope > $p = new Polytope< | ||
</ | </ | ||
Line 443: | Line 442: | ||
As before we read in the file using '' | As before we read in the file using '' | ||
< | < | ||
- | polytope > $f = lp2poly(' | + | polytope > $f = lp2poly(' |
polytope > $p = new Polytope< | polytope > $p = new Polytope< | ||
</ | </ |