source: trunk/Docs/intro.xml @ 113

Last change on this file since 113 was 113, checked in by rlh, 15 years ago

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2  <chapter id="intro">
3  <title>
4    Introduction
5  </title>
6  <section>
7  <title>
8  Welcome to CBC
9  </title>
10  <para>
11  The COIN
12    <footnote>
13        <para>
14        The complete name is "COIN-OR", but for simplicity (and in keeping with the directory and function names) we will simply use "COIN".
15        </para>
16      </footnote>
17Branch and Cut solver (CBC) is an open-source mixed-integer program (MIP) solver written  in C++.<!-- some intro here to MIP or to open-soure --> CBC is intendend to be used primarily as a callable library to create customized branch-and-cut solvers. A basic, stand-alone <!-- do link **** link linkend="cbcexe"--> executable version is also available.
18 </para>
19 </section>
20
21  <section>
22  <title>
23  Prerequisites
24  </title>
25  <para>
26  The primary users of CBC are expected to be developers implementing customized branch-and-cut algorithms in C++ using CBC as a library. Consequently, this document assumes a working knowledge of
27  <ulink url="http://www.cplusplus.com/doc/tutorial/">C++</ulink>, including basic
28  object-oriented programming terminology, and familiarity with the fundamental concepts of
29  <ulink url="http://carbon.cudenver.edu/~hgreenbe/courseware/LPshort/intro.html">
30  linear programming</ulink> and
31  <ulink url="http://carbon.cudenver.edu/~hgreenbe/courseware/MIP/intro.html">
32  mixed integer programming</ulink>. <!-- any better mip links? -->
33  </para>
34
35  <para>
36<!-- dependencies -->
37CBC relies on many other parts of the COIN repository. CBC relies the COIN Open Solver Inteface (OSI) to communicate with the LP solver. CBC needs an LP solver and any LP solver with an OSI interface can be used with CBC. The LP solver expected to be used most commonly is COIN's native linear program solver, CLP. For cut generators, CBC relies on the COIN Cut Generation Library (CGL). Any cut generator written to CGL standards can be used with CBC. Some of the cut generators in CGL rely on other parts of COIN, e.g., CGL's Gomory cut generator rely on the factorization functionality of CoinFactorization. This document assumes basic familiarity with OSI and CGL.
38</para>
39<para>
40Technically speaking, CBC acesses the solver (and sometime the model and data it contains) through an OSISolverInterface. For the sake of simplicity, we will refer to the <classname>OsiSolverInterface</classname> as "the solver" in this document, rather than "the standard appplication programming interface to the solver". We hope any confusion caused by bluring this distinction will be mitigated by the shorter sentences. 
41 <!-- need a link to OSI and CGL documentation. Shoot, need OSI and CGL documentation! -->
42 </para>
43 </section>
44
45<section>
46<title>
47Overview
48</title>
49  <para>
50  Before examining CBC in more detail, we tersely describe the basic branch-and-cut algorithm (which should really be called branch-and-cut-and-bound) and show the major C++ class(es) in CBC related to each step. The CBC classes, labeled (A) through (F), are described in Table 1.1.
51 </para>
52
53  <para>
54Step 1. (Bound) Say we are given a MIP model to minimize where some variables must take on integer values (e.g., 0, 1, or 2). Relax the integrality requirement (e.g., consider each "integer" variable to be continuous with a lower bound of 0.0 and an upper bound of 2.0). Solve the resulting linear model with an LP solver to obtain a lower bound on the MIP's objective function value.  If the optimal LP solution has integer values for the MIP's integer variables, we are finished. Stop.   
55 </para>
56 <para> 
57Step 2. (Branch) Otherwise, choose one non-integral variable (e.g., with value 1.3) (A)(B) and branch.
58Create two nodes, one a linear model with the branching variable having an upper bound of 1.0, and the other a linear model withe branching variable having a lower bound of 2.0. Add the two nodes to the search tree.
59 </para>
60 <para>
61While (search tree is not empty) {
62</para>
63<para> 
64   Step 3. (Choose Node) Pick a node off the tree (C)(D)
65</para>
66<para>
67   Step 4. (Re-optimize LP) Create an LP relaxation and solve.
68</para>
69<para>
70   Step 5. (Bound) Interregate optimal LP solution.
71           If we can't prune the node by  the following,
72                  (i)  LP is infeasible, prune the node.
73                  (ii) Else, the optimal LP solution value exceeds the current upper bound, prune the node. 
74                  (ii) Else, the optimal LP solution does not exceed the current upper bound and is feasible to the MIP.                       Update the upper bound, and the best known MIP solution, and  prune the node by optimality.           then branch.
75</para>
76<para>
77   Step 6. (Branch) Choose one non-integral variable to *branch* on (A)(B).
78           Create two nodes and add them to the search tree.
79</para>
80<para>
81}
82 </para>
83 <para>     
84This is the outline of a branch-and-bound algorithm. If in optimizing the linear programs, we use cuts to tighten the LP relaxations (E)(F), then we have a branch-and-cut algorithm. (Note: if cuts are just used in step 1, the method is called a cut-and-branch algorithm.)
85 
86  <!-- rlh: this explaination is for people who already know b&c -->
87  </para>
88    <table frame="none">
89  <title>Associated classes</title>
90    <tgroup cols="3">
91    <thead>
92    <row>
93    <entry>
94    Note
95    </entry>
96    <entry>
97    Class name
98    </entry>
99    <entry>
100    Description
101    </entry>
102    </row>
103    </thead>
104    <tbody>
105    <row>
106      <entry align="left" valign="top">
107      (A)
108      </entry>
109      <entry align="left" valign="top">
110      <classname>CbcBranch...</classname>
111      </entry>
112      <entry align="left" valign="top">
113      These classes define the nature of MIP's discontinuity.  The simplest discontinuity
114      is a variable which must take an integral value. Other types of discontinuities
115      will be described later (e.g., lotsizing variables).
116      <!--rlh: why "...."? Currently 4: CbcBranchActual.cpp, CbcBranchBase.cpp CbcBranchCut.cpp, CbcBranchLotsizes.cpp--> 
117      </entry>
118    </row>
119    <row>
120      <entry align="left" valign="top">
121      (B)
122      </entry>
123      <entry align="left" valign="top">
124      <classname>CbcNode</classname>
125      </entry>
126      <entry align="left" valign="top">
127      This class decides which variable/entity to branch on next.
128      Even advanced users will probably only interact with this class by setting
129      <classname>CbcModel</classname> parameters ( e.g., priorities).
130      </entry>
131    </row>
132    <row>
133      <entry align="left" valign="top">
134      (C)
135      </entry>
136      <entry align="left" valign="top">
137      <classname>CbcTree</classname>
138      </entry>
139      <entry align="left" valign="top">
140      All unsolved models can be thought of as being nodes on a tree where each
141      node (model) can branch two or more times.  The user should not need to be
142      concerned with this class.
143      </entry>
144    </row>
145    <row>
146      <entry align="left" valign="top">
147      (D)
148      </entry>
149      <entry align="left" valign="top">
150      <classname>CbcCompare...</classname>
151      </entry>
152      <entry align="left" valign="top">
153      These classes are used in determine which of the unexplored nodes in the tree to consider next. These
154      classes are very small simple classes that can be tailored to suit the problem.
155      <!--rlh: Classes? Currently only 1: CbcCompateActual.cpp-->
156      </entry>
157    </row>
158    <row>
159      <entry align="left" valign="top">
160      (E)
161      </entry>
162      <entry align="left" valign="top">
163      <classname>CglCutGenerators</classname>
164      </entry>
165      <entry align="left" valign="top">
166      Any cut generator from CGL can be used in CBC. The cut generators are passed to CBC with parameters
167      which modify when each generator will be tried. All cut generators should be tried to
168      determine which are effective. Few users will write their own cut generators.
169      </entry>
170    </row>
171    <row>
172      <entry align="left" valign="top">
173      (F)
174      </entry>
175      <entry align="left" valign="top">
176      <classname>CbcHeuristics</classname>
177      </entry>
178      <entry align="left" valign="top">
179      Heuristics are very important for obtaining valid solutions quickly.  Some
180      heuristics are available, but this is an area where it is useful and interesting to
181      write specialized ones.
182      </entry>
183    </row>
184    </tbody>
185  </tgroup>
186  </table>
187<para>
188  There are a number of resources available to help new CBC users get started.
189  This document is designed to be used in conjunction with the files in the
190  Samples subdirectory of the main CBC directory (<filename>COIN/Cbc/Samples</filename>).
191  The Samples illustrate how to use CBC and may also serve as useful starting points
192  for user projects.  In the event that either this document or the available
193  <link linkend="doxygen">Doxygen content</link> conflicts with the observed
194  behavior of the source code, the comments in the header files, found in
195  <filename>COIN/Cbc/include</filename>, are the ultimate reference.
196  </para>
197  </section>
198
199
200
201  </chapter>
Note: See TracBrowser for help on using the repository browser.