Changeset 113


Ignore:
Timestamp:
May 2, 2005 9:18:08 AM (14 years ago)
Author:
rlh
Message:

* empty log message *

Location:
trunk/Docs
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Docs/authors.xml

    r87 r113  
    1717  <author>
    1818    <firstname>
    19     David
    20     </firstname>
    21     <surname>
    22     de la Nuez
    23     </surname>
    24     <email>dmd57 at columbia dot edu</email>
    25     <affiliation>
    26       <orgname>
    27       Columbia University &amp; IBM Research
    28       </orgname>
    29     </affiliation>
    30   </author>
    31   <author>
    32     <firstname>
    3319    Robin
    3420    </firstname>
  • trunk/Docs/cbcmodelclass.xml

    r87 r113  
    99  </title>
    1010  <para>
    11   The class that controls Coin Branch and Cut is CbcModel.  This is where most
    12   of the parameter setting is done.  CbcModel uses other classes some of
    13   which are virtual and may have multiple instances.  More details on the more
    14   useful classes will be given later.
    15   The absolute minimum number of actions for CbcModel is:
    16   <function>CbcModel(OsiSolverInterface &amp; linearSolver)</function> as constructor,
    17   and <function>branchAndBound()</function> for solving the problem.
     11  The class that controls CBC is <classname>CbcModel</classname>.  This class is where most
     12  of the parameter setting is done. The absolute minimum number of actions for <classname>CbcModel</classname> is two:
     13
     14    <itemizedlist>
     15    <listitem>
     16    <simpara>
     17    <function>CbcModel(OsiSolverInterface &amp; linearSolver)</function> as constructor, and
     18    </simpara>
     19    </listitem>
     20    <listitem>
     21    <simpara>
     22    <function>branchAndBound()</function> for solving the problem.   
     23    </simpara>
     24    </listitem>
     25    </itemizedlist>
    1826  </para>
     27
     28<para>
     29<classname>CbcModel</classname> uses other classes, some of which are virtual and may have multiple instances. Details on the more useful classes used by <classname>CbcModel</classname> will be given later. <!-- where? --> The two tables below list the classes within <classname>CbcModel</classname> that are of most interest and of least interest.
     30</para>
    1931    <table frame="none">
    20   <title>Classes used by CbcModel - Most useful</title>
     32  <title>Classes Used by CbcModel - Most Useful</title>
    2133    <tgroup cols="3">
    2234    <thead>
     
    3648    <row>
    3749      <entry align="left" valign="top">
    38       CbcCompareBase
    39       </entry>
    40       <entry align="left" valign="top">
    41       Controls choice of next node on tree
    42       </entry>
    43       <entry align="left" valign="top">
    44       Default is CbcCompareDefault, others in CbcCompareActual.hpp include
    45       CbcCompareDepth and CbcCompareObjective.  Very easy for user to
    46       experiment.
    47       </entry>
    48     </row>
    49     <row>
    50       <entry align="left" valign="top">
    51       CbcCutGenerator
    52       </entry>
    53       <entry align="left" valign="top">
    54       Is a CglCutGenerator with data to decide when to use.
    55       </entry>
    56       <entry align="left" valign="top">
    57       Need to know how to add generator to CbcModel.
    58       Not much need to know about details of class.
    59       </entry>
    60     </row>
    61     <row>
    62       <entry align="left" valign="top">
    63       CbcHeuristic
    64       </entry>
    65       <entry align="left" valign="top">
    66       Heuristic to try and get valid solutions
    67       </entry>
    68       <entry align="left" valign="top">
    69       User can get a lot of value out of coding this.  There can be
    70       as many as you like.
    71       </entry>
    72     </row>
    73     <row>
    74       <entry align="left" valign="top">
    75       CbcObject
    76       </entry>
    77       <entry align="left" valign="top">
    78       Definition of what it means for a variable to be satisfied.
    79       </entry>
    80       <entry align="left" valign="top">
    81       Virtual - instances include simple integer, simple integer with pseudocosts,
    82       SOS (type 1 and 2) and lotsizing. (found in CbcBranch..hpp).  An object has to
    83       have a method of generating a branching object which defines an up and down
    84       branch.
    85       </entry>
    86     </row>
    87     <row>
    88       <entry align="left" valign="top">
    89       OsiSolverInterface
    90       </entry>
    91       <entry align="left" valign="top">
    92       Defines the solver being used and the LP model.  Is normally
    93       passed across to CbcModel before branch and cut.
    94       </entry>
    95       <entry align="left" valign="top">
    96       Virtual class - the user would instantiate a particular solver e.g.
    97       OsiClpSolverInterface or OsiXprSolverInterface.
     50      <classname>CbcCompareBase</classname>
     51      </entry>
     52      <entry align="left" valign="top">
     53      Controls which node on tree is selected
     54      </entry>
     55      <entry align="left" valign="top">
     56      The default is <classname>CbcCompareDefault</classname>. Other comparison classes in <filename>CbcCompareActual.hpp</filename> include
     57      <classname>CbcCompareDepth</classname> and <classname>CbcCompareObjective</classname>. It is very easy for user to
     58      experiment with different comparisons.
     59      </entry>
     60    </row>
     61    <row>
     62      <entry align="left" valign="top">
     63      <classname>CbcCutGenerator</classname>
     64      </entry>
     65      <entry align="left" valign="top">
     66      A wrapper for <classname>CglCutGenerator</classname> with additional data to control when the cut generator is used.
     67      </entry>
     68      <entry align="left" valign="top">
     69      Other than knowing how to add a cut generator to <classname>CbcModel</classname>, there is not much the average user needs to know about this class. <!-- what's the default? -->
     70      </entry>
     71    </row>
     72    <row>
     73      <entry align="left" valign="top">
     74      <classname>CbcHeuristic</classname>
     75      </entry>
     76      <entry align="left" valign="top">
     77      Heuristic that attempts to generate valid solutions
     78      </entry>
     79      <entry align="left" valign="top">
     80      Users can get a lot of value out of coding specialized heuristics.  There can be
     81      as many different heuristics as you like. <!-- What's the default? -->
     82      </entry>
     83    </row>
     84    <row>
     85      <entry align="left" valign="top">
     86      <classname>CbcObject</classname>
     87      </entry>
     88      <entry align="left" valign="top">
     89      Defines what it means for a variable to be satisfied.
     90      </entry>
     91      <entry align="left" valign="top">
     92      Virtual class. The branching model used in CBC is based on the idea of an "object". An object has (i) feasible region, (ii) can be evaluated for infeaibility, (iii) can be branched on, e.g., a method of generating a branching object, which defines an up branch and a down branch and (iv) allows comparsion of the effect of branching. Instances include simple integer, simple integer with pseudocosts, SOS (type 1 and 2), and lotsizing (see CbcBranch....hpp).
     93      </entry>
     94    </row>
     95    <row>
     96      <entry align="left" valign="top">
     97      <classname>OsiSolverInterface</classname>
     98      </entry>
     99      <entry align="left" valign="top">
     100      Defines the LP solver being used and the LP model. Normally
     101      a pointer to the desired <classname>OsiSolverInteface</classname> is passed to <classname>CbcModel</classname> before branch and cut.
     102      </entry>
     103      <entry align="left" valign="top">
     104      Virtual class. The user instantiates the solver interface of their choice, e.g.,
     105      <classname>OsiClpSolverInterface</classname>.
    98106      </entry>
    99107    </row>
     
    101109  </tgroup>
    102110  </table>
     111
     112There is not much in these classes the average user needs to know about.
    103113    <table frame="none">
    104   <title>Classes used by CbcModel - Least useful</title>
     114  <title>Classes Used by CbcModel - Least Useful</title>
    105115    <tgroup cols="3">
    106116    <thead>
     
    120130    <row>
    121131      <entry align="left" valign="top">
    122       CbcBranchDecision
    123       </entry>
    124       <entry align="left" valign="top">
    125       Part of code for choosing which variable to branch on.  Most of
    126       work is done by definitions in CbcObject
    127       </entry>
    128       <entry align="left" valign="top">
    129       Defaults to CbcBranchDefaultDecision
    130       Not much need to know about.
    131       </entry>
    132     </row>
    133     <row>
    134       <entry align="left" valign="top">
    135       CbcCountRowCut
    136       </entry>
    137       <entry align="left" valign="top">
    138       Interface to OsiRowCut but counts use so can gracefully vanish.
    139       </entry>
    140       <entry align="left" valign="top">
    141       See OsiRowCut for extra information.
    142       Not much need to know about.
    143       </entry>
    144     </row>
    145     <row>
    146       <entry align="left" valign="top">
    147       CbcNode
    148       </entry>
    149       <entry align="left" valign="top">
    150       Controls choice of variable/entity to branch on
    151       </entry>
    152       <entry align="left" valign="top">
    153       Controlled via CbcModel parameters.
    154       Not much need to know about.
    155       </entry>
    156     </row>
    157     <row>
    158       <entry align="left" valign="top">
    159       CbcNodeInfo
    160       </entry>
    161       <entry align="left" valign="top">
    162       Contains data for bounds, basis etc for one node of tree
    163       </entry>
    164       <entry align="left" valign="top">
    165       Not much need to know about (header in CbcNode.hpp).
    166       </entry>
    167     </row>
    168     <row>
    169       <entry align="left" valign="top">
    170       CbcTree
    171       </entry>
    172       <entry align="left" valign="top">
    173       How tree is stored
    174       </entry>
    175       <entry align="left" valign="top">
    176       Can be changed but unlikely.
    177       Not much need to know about.
    178       </entry>
    179     </row>
    180     <row>
    181       <entry align="left" valign="top">
    182       CoinMessageHandler
     132      <classname>CbcBranchDecision</classname>
     133      </entry>
     134      <entry align="left" valign="top">
     135      Used in choosing which variable to branch on, however, most of
     136      the work is done by the definitions in <classname>CbcObject</classname>.
     137      </entry>
     138      <entry align="left" valign="top">
     139      Defaults to <classname>CbcBranchDefaultDecision</classname>.
     140      </entry>
     141    </row>
     142    <row>
     143      <entry align="left" valign="top">
     144      <classname>CbcCountRowCut</classname>
     145      </entry>
     146      <entry align="left" valign="top">
     147      Interface to <classname>OsiRowCut</classname>. It counts the usage so cuts can gracefully vanish.
     148      </entry>
     149      <entry align="left" valign="top">
     150      See <classname>OsiRowCut</classname> for more details. <!-- Default? -->
     151      </entry>
     152    </row>
     153    <row>
     154      <entry align="left" valign="top">
     155      <classname>CbcNode</classname>
     156      </entry>
     157      <entry align="left" valign="top">
     158      Controls which variable/entity is selected to be branch on.
     159      </entry>
     160      <entry align="left" valign="top">
     161      Controlled via <classname>CbcModel</classname> parameters.  <!-- Default? -->
     162      </entry>
     163    </row>
     164    <row>
     165      <entry align="left" valign="top">
     166      <classname>CbcNodeInfo</classname>
     167      </entry>
     168      <entry align="left" valign="top">
     169      Contains data on bounds, basis, etc. for one node of the search tree.
     170      </entry>
     171      <entry align="left" valign="top">
     172      Header is located in <filename>CbcNode.hpp</filename>. <!-- Defaults? -->
     173      </entry>
     174    </row>
     175    <row>
     176      <entry align="left" valign="top">
     177      <classname>CbcTree</classname>
     178      </entry>
     179      <entry align="left" valign="top">
     180      Defines how the search tree is stored.
     181      </entry>
     182      <entry align="left" valign="top">
     183      This class can be changed but it is not likely to be modified.<!-- Defaults? -->
     184      </entry>
     185    </row>
     186    <row>
     187      <entry align="left" valign="top">
     188      <classname>CoinMessageHandler</classname>
    183189      </entry>
    184190      <entry align="left" valign="top">
     
    186192      </entry>
    187193      <entry align="left" valign="top">
    188       User can inherit from to specialize message handling. 
    189       Not much need to know about.
    190       </entry>
    191     </row>
    192     <row>
    193       <entry align="left" valign="top">
    194       CoinWarmStartBasis
    195       </entry>
    196       <entry align="left" valign="top">
    197       Representation of a basis to be used by solver
    198       </entry>
    199       <entry align="left" valign="top">
    200       Not much need to know about.
     194      The user can inherit from <classname>CoinMessageHandler</classname> to specialize message handling. 
     195      <!-- Defaults? -->
     196      </entry>
     197    </row>
     198    <row>
     199      <entry align="left" valign="top">
     200      <classname>CoinWarmStartBasis</classname>
     201      </entry>
     202      <entry align="left" valign="top">
     203      Basis representation to be used by solver
     204      </entry>
     205      <entry align="left" valign="top">
     206      <!-- Defaults? -->
    201207      </entry>
    202208    </row>
     
    205211  </table>
    206212  </section>
     213
    207214  <section id="firstexample">
    208215  <title>
     
    210217  </title>
    211218  <para>
    212   Below is our first CBC sample program.  It is short enough to present in full
    213   (this code can be found in the CBC Samples directory, see
    214   <xref linkend="moreexamples"/>).  Most of the remaining examples in this Guide
     219  Below is our first CBC sample program.  It is short enough to present in full.
     220  This code can be found in the CBC Samples directory, see
     221  <xref linkend="moreexamples"/>.  Most of the remaining examples in this Guide
    215222  will take the form of small code fragments.
    216223  </para>
     
    224231#include "CbcModel.hpp"
    225232
    226 // Using as solver
     233// Using CLP as the solver
    227234#include "OsiClpSolverInterface.hpp"
    228235
     
    230237{
    231238  OsiClpSolverInterface solver1;
    232   // Read in example model
     239
     240  // Read in example model in MPS file format
    233241  // and assert that it is a clean model
    234242  int numMpsReadErrors = solver1.readMps("../../Mps/Sample/p0033.mps","");
    235243  assert(numMpsReadErrors==0);
    236244
    237   // Pass data and solver to CbcModel
     245  // Pass the solver (with the problem data) to CbcModel
    238246  CbcModel model(solver1);
    239247
    240248  // Do complete search
    241249  model.branchAndBound();
    242   /* Print solution.  CbcModel clones solver so we
    243      need to get current copy */
     250
     251  /* Print the solution.  CbcModel clones solver so we
     252     need to get current copy from the CbcModel */
    244253  int numberColumns = model.solver()->getNumCols();
    245254   
     
    250259    if (fabs(value)>1.0e-7&&model.solver()->isInteger(iColumn))
    251260      printf("%d has value %g\n",iColumn,value);
    252   }
     261   }
    253262  return 0;
    254263}   
     
    256265  </programlisting>
    257266  </example>
     267  <!-- Clone comment  needs more explaination. What info is safe? When do you need to do a refresh?? -->
     268  <!-- printf vs cout  -->
     269
    258270  <para>
    259   This sample program creates a  <classname>OsiClpSolverInterface</classname> solver,
    260   reads an MPS file, and if there are no errors, passes it to <classname>CbcModel</classname>
    261   which solves it
    262   using the Branch and Bound algorithm.  The part of the program which solves the program
    263   is very small but before that the linear solver had to be created with data and
    264   after that the results were printed out.  So the user can see that often knowledge
    265   of the <classname>OsiSolverInterface</classname> methods will be necessary.
    266   In this case CbcModel has the identical methods so we could have used those but not
    267   always.  For instance the program produces a lot of output so one might add
    268   <![CDATA[ 
    269   model.solver()->setHintParam(OsiDoReducePrint,true,OsiHintTry);
    270   ]]>   
     271  This sample program creates a <classname>OsiClpSolverInterface</classname> solver interface,
     272  and reads an MPS file. If there are no errors, the program passes the solver to <classname>CbcModel</classname>
     273  which solves it  using the branch-and-bound algorithm.  The part of the program which solves the problem
     274  is very small (one line!) but before that one line, the LP solver had to be created and populated with data and
     275  after that one line the results were printed out.
     276 </para>
     277
     278<para>
     279  This example illustrates the dependency of CBC on 
     280  the <classname>OsiSolverInterface</classname> methods.
     281  All the OSI methods used in <filename>minimum.cpp</filename> have identical methods in <classname>CbcModel</classname>. <!-- why? -->
     282  But there are many methods in OSI which are not present in CBC. For example, suppose the program produces a lot of out  put so one might add
     283</para>
     284<programlisting>
     285  model.solver()->setHintParam(OsiDoReducePrint,true,OsiHintTry);
     286</programlisting>
     287<para>
     288  <!-- model.solver() returns an OSISolverInterface? -->
    271289  to reduce the amount. That improves things a lot but we still get one message per node
    272290  so we could add
    273   <![CDATA[ 
    274     model.setLogLevel(1);
    275   ]]>   
     291</para>
     292  <programlisting>
     293   model.setLogLevel(1);
     294  </programlisting>
     295<para>
    276296  The following section gives many of the ways of getting information from the
    277297  model or underlying solver.
     
    280300  <section id="gettingsolution">
    281301  <title>
    282   Getting at the Solution (CbcModel methods)
     302  Getting at the Solution (<classname>CbcModel</classname> methods)
    283303  </title>
    284304  <para>
    285   The OSI way to check for optimality is to call model.isProvenOptimal().  Also
     305  The OSI way to check for optimality is to call <function>model.isProvenOptimal()</function>.  Also
    286306  available are <function>isProvenInfeasible()</function>,
    287307  <function>isSolutionLimitReached()</function>,
     
    295315  Similarly, we can pick up the solution values.  The OSI methods pick up
    296316  the current solution.  This will match the best solution found so far if
    297   called after branchAndBound and if a solution was found.
     317  called after <function>branchAndBound()</function> and if a solution was found.
    298318  </para>
    299319  <table frame="none">
    300320  <title>
    301   Methods for getting solution information from OSI solver
     321  Methods for getting solution information from OSI
    302322  </title>
    303323  <tgroup cols="2">
     
    324344      </entry>
    325345      <entry align="left" valign="top">
    326       Outside CBC will be best solution unless none found.  Safer to use
    327       CbcModel::bestSolution()
     346      Outside <classname>CbcModel</classname> will be best solution unless none found.  Safer to use <classname>CbcModel</classname> version,
     347      <function>CbcModel::bestSolution()</function>
    328348      </entry>
    329349    </row>
     
    336356      </entry>
    337357      <entry align="left" valign="top">
    338       CbcModel:: version available and identical
     358      Identical <classname>CbcModel</classname> version available, <function>CbcModel::getRowPrice()</function>.
    339359      </entry>
    340360    </row>
     
    347367      </entry>
    348368      <entry align="left" valign="top">
    349       CbcModel:: version available and identical
     369      Identical <classname>CbcModel</classname> version available, <function>CbcModel::getRowActivity()</function>.
    350370      </entry>
    351371    </row>
     
    357377      <function>const double * getReducedCost()</function>
    358378      </entry>
    359       CbcModel:: version available and identical
    360       <entry align="left" valign="top">
     379     <entry align="left" valign="top">
     380      Identical <classname>CbcModel</classname> version available, <function>CbcModel::gtReducedCost()</function>.
    361381      </entry>
    362382    </row>
     
    369389      </entry>
    370390      <entry align="left" valign="top">
    371       CbcModel:: version available and identical
    372       (but note that number of rows may change due to cuts)
     391      Identical <classname>CbcModel</classname> version available, <function>CbcModel::getNumRows()</function>, but note that the number of rows may change due to cuts.
    373392      </entry>
    374393    </row>
     
    381400      </entry>
    382401      <entry align="left" valign="top">
    383       CbcModel:: version available and identical
     402      Identical <classname>CbcModel</classname> version available, <function>CbcModel::getNumCols()</function>.
    384403      </entry>
    385404    </row>
     
    388407  </table>
    389408  <para>
    390   The remainder of this chapter will show  more of the basic CBC tasks a user
     409  The remainder of this chapter will show more of the basic CBC tasks a user
    391410  might wish to perform.
    392411  </para>
    393412  </section>
    394   <function>double&nbsp;getIntegerTolerance()</function> and
    395   <function>setIntegerTolerance(double)</function>.  An integer variable
    396   is deemed to be at an integral value if it is no further than this tolerance
    397   away.
     413
    398414  <section id="setsandgets">
    399   <title>Some Useful Set and Get Methods</title>
     415  <title>Useful Set and Get Methods</title>
    400416  <table frame="none">
    401   <title>Some Useful Set and Get Methods</title>
     417  <title>Useful Set and Get Methods</title>
    402418    <tgroup cols="2">
    403419    <thead>
     
    414430    <row>
    415431      <entry align="left" valign="top">
    416       <function>setMaximumNodes(int value)</function><sbr/>
    417       <function>int&nbsp;maximumNodes()</function><sbr/>
    418       <function>setMaximumSeconds(double value)</function><sbr/>
    419       <function>double&nbsp;maximumSeconds()</function>
    420       <function>setMaximumSolutions(double value)</function><sbr/>
    421       <function>double&nbsp;maximumSolutions()</function>
     432      <function>bool&nbsp;setMaximumNodes(int value)</function><sbr/>
     433      <function>int&nbsp;getMaximumNodes() const</function><sbr/>
     434      <function>bool&nbsp;setMaximumSeconds(double value)</function><sbr/>
     435
     436      <function>double&nbsp;getMaximumSeconds()</function><sbr/>
     437      <function>bool&nbsp;setMaximumSolutions(double value)</function><sbr/>
     438      <function>double&nbsp;getMaximumSolutions() const</function>
    422439      </entry>
    423440      <entry align="left" valign="top">
     
    428445    <row>
    429446      <entry align="left" valign="top">
    430       <function>setIntegerTolerance(double)</function><sbr/>
    431       <function>double&nbsp;getIntegerTolerance()</function>
     447      <function>bool&nbsp;setIntegerTolerance(double value) const</function><sbr/>
     448      <function>double&nbsp;getIntegerTolerance() const</function>
    432449      </entry>
    433450      <entry align="left" valign="top">
     
    439456    <row>
    440457      <entry align="left" valign="top">
    441       <function>setAllowableGap(double)</function><sbr/>
    442       <function>double&nbsp;getAllowableGap()</function><sbr/>
    443       <function>setAllowablePercentageGap(double)</function><sbr/>
    444       <function>double&nbsp;getAllowablePercentageGap()</function><sbr/>
    445       <function>setAllowableFractionGap(double)</function><sbr/>
    446       <function>double&nbsp;getAllowableFractionGap()</function><sbr/>
    447       </entry>
    448       <entry align="left" valign="top">
    449       CbcModel returns if the gap between the best known solution and the best
     458      <function>bool&nbsp;setAllowableGap(double value)</function><sbr/>
     459      <function>double&nbsp;getAllowableGap() const</function><sbr/>
     460      <function>bool&nbsp;setAllowablePercentageGap(double value)</function><sbr/>
     461      <function>double&nbsp;getAllowablePercentageGap() const</function><sbr/>
     462      <function>bool&nbsp;setAllowableFractionGap(double value)</function><sbr/>
     463      <function>double&nbsp;getAllowableFractionGap() const</function><sbr/>
     464      </entry>
     465      <entry align="left" valign="top">
     466      <classname>CbcModel</classname> returns if the gap between the best known solution and the best
    450467      possible solution is less than this (or as a percentage or fraction).
    451468      </entry>
     
    453470    <row>
    454471      <entry align="left" valign="top">
    455       <function>setNumberStrong(double) </function><sbr/>
    456       <function>int&nbsp;numberStrong() </function>
     472      <function>void&nbsp;setNumberStrong(double value) </function><sbr/>
     473      <function>int&nbsp;numberStrong() const </function>
    457474      </entry>
    458475      <entry align="left" valign="top">
     
    463480    <row>
    464481      <entry align="left" valign="top">
    465       <function>setPrintFrequency(int) </function><sbr/>
    466       <function>int&nbsp;printFrequency()</function>
     482      <function>void&nbsp;setPrintFrequency(int value) </function><sbr/>
     483      <function>int&nbsp;printFrequency() const</function>
    467484      </entry>
    468485      <entry align="left" valign="top">
     
    473490    <row>
    474491      <entry align="left" valign="top">
    475       <function>int&nbsp;getNodeCount() </function>
     492      <function>int&nbsp;getNodeCount() const</function>
    476493      </entry>
    477494      <entry align="left" valign="top">
     
    481498    <row>
    482499      <entry align="left" valign="top">
    483       <function>int&nbsp;numberRowsAtContinuous()</function>
     500      <function>int&nbsp;numberRowsAtContinuous() const</function>
    484501      </entry>
    485502      <entry align="left" valign="top">
     
    489506    <row>
    490507      <entry align="left" valign="top">
    491       <function>int &nbsp;numberIntegers()</function><sbr/>
    492       <function>const int&nbsp;*&nbsp;integerVariable()</function>
     508      <function>int &nbsp;numberIntegers() const</function><sbr/>
     509      <function>const int&nbsp;*&nbsp;integerVariable() const</function>
    493510      </entry>
    494511      <entry align="left" valign="top">
     
    498515    <row>
    499516      <entry align="left" valign="top">
    500       <function>bool &nbsp;isBinary(int)</function><sbr/>
    501       <function>bool &nbsp;isContinuous(int)</function><sbr/>
    502       <function>const bool&nbsp;isInteger(int)</function>
    503       </entry>
    504       <entry align="left" valign="top">
    505       Returns information on a variable.  You can use Osi methods
    506       to set these attributes (before handing to CbcModel)
    507       </entry>
    508     </row>
    509     <row>
    510       <entry align="left" valign="top">
    511       <function>double&nbsp;getObjValue()</function>
    512       </entry>
    513       <entry align="left" valign="top">
    514       This method returns the best objective value.so far
    515       </entry>
    516     </row>
    517     <row>
    518       <entry align="left" valign="top">
    519       <function>double&nbsp;getCurrentObjValue()</function>
     517      <function>bool&nbsp;isBinary(int colIndex) const</function><sbr/>
     518      <function>bool&nbsp;isContinuous(int colIndex) const</function><sbr/>
     519      <function>bool&nbsp;isInteger(int colIndex) const</function>
     520      </entry>
     521      <entry align="left" valign="top">
     522      Returns information on a variable.  You can use OSI methods
     523      to set these attributes (before handing to <classname>CbcModel</classname>)
     524      </entry>
     525    </row>
     526    <row>
     527      <entry align="left" valign="top">
     528      <function>double&nbsp;getObjValue() const</function>
     529      </entry>
     530      <entry align="left" valign="top">
     531      This method returns the best objective value so far.
     532      </entry>
     533    </row>
     534    <row>
     535      <entry align="left" valign="top">
     536      <function>double&nbsp;getCurrentObjValue() const</function>
    520537      </entry>
    521538      <entry align="left" valign="top">
     
    525542    <row>
    526543      <entry align="left" valign="top">
    527       <function>const&nbsp;double&nbsp;*&nbsp;getObjCoefficients()</function><sbr/>
    528       <function>double&nbsp;*&nbsp;objective()</function>
    529       </entry>
    530       <entry align="left" valign="top">
    531       These methods return the objective coefficients.
    532       </entry>
    533     </row>
    534     <row>
    535       <entry align="left" valign="top">
    536       <function>const&nbsp;double&nbsp;*&nbsp;getRowLower()</function><sbr/>
    537       <function>double&nbsp;*&nbsp;rowLower()</function><sbr/>
    538       <function>const&nbsp;double&nbsp;*&nbsp;getRowUpper()</function><sbr/>
    539       <function>double&nbsp;*&nbsp;rowUpper()</function><sbr/>
    540       <function>const&nbsp;double&nbsp;*&nbsp;getColLower()</function><sbr/>
    541       <function>double&nbsp;*&nbsp;columnLower()</function><sbr/>
    542       <function>const&nbsp;double&nbsp;*&nbsp;getColUpper()</function><sbr/>
    543       <function>double&nbsp;*&nbsp;columnUpper()</function>
     544      <function>const&nbsp;double&nbsp;*&nbsp;getObjCoefficients() const</function><sbr/>
     545    <!--  <function>double&nbsp;*&nbsp;objective()</function> where? -->
     546      </entry>
     547      <entry align="left" valign="top">
     548      This method return the objective coefficients.
     549      </entry>
     550    </row>
     551    <row>
     552      <entry align="left" valign="top">
     553      <function>const&nbsp;double&nbsp;*&nbsp;getRowLower() const</function><sbr/>
     554    <!--  <function>double&nbsp;*&nbsp;rowLower()</function><sbr/> where? -->
     555      <function>const&nbsp;double&nbsp;*&nbsp;getRowUpper() const</function><sbr/>
     556   <!--  <function>double&nbsp;*&nbsp;rowUpper()</function><sbr/> where? -->
     557      <function>const&nbsp;double&nbsp;*&nbsp;getColLower() const</function><sbr/>
     558   <!--  <function>double&nbsp;*&nbsp;columnLower()</function><sbr/> where? -->
     559      <function>const&nbsp;double&nbsp;*&nbsp;getColUpper() const</function><sbr/>
     560    <!--  <function>double&nbsp;*&nbsp;columnUpper()</function> where? -->
    544561      </entry>
    545562      <entry align="left" valign="top">
     
    549566    <row>
    550567      <entry align="left" valign="top">
    551       <function>const CoinPackMatrix * getMatrixByRow()</function>
     568      <function>const&nbsp;CoinPackMatrix&nbsp;*&nbsp;getMatrixByRow() const</function>
    552569      </entry>
    553570      <entry align="left" valign="top">
     
    558575    <row>
    559576      <entry align="left" valign="top">
    560       <function>const CoinPackMatrix * getMatrixByCol()</function>
     577      <function>const CoinPackMatrix * getMatrixByCol() const</function>
    561578      </entry>
    562579      <entry align="left" valign="top">
     
    567584    <row>
    568585      <entry align="left" valign="top">
    569       <function>CoinBigIndex&nbsp;getNumElements()</function>
    570       <footnote>
    571         <para>
    572         <type>CoinBigIndex</type> is a <function>typedef</function> which in
    573         most cases is the same as <type>int</type>.
    574         </para>
    575       </footnote>
     586      <function>int&nbsp;getNumElements() const</function>
     587<!--  <function>CoinBigIndex&nbsp;getNumElements() const</function> what? -->
     588<!--     <footnote> -->
     589<!--      <para> -->
     590<!--    <type>CoinBigIndex</type> is a <function>typedef</function> which in -->
     591<!--    most cases is the same as <type>int</type>. -->
     592<!--    </para> -->
     593<!--    </footnote> -->
    576594      </entry>
    577595      <entry align="left" valign="top">
     
    582600      <entry align="left" valign="top">
    583601      <function>void setObjSense(double&nbsp;value)</function><sbr/>
    584       <function>double objSense()</function>
     602      <function>double getObjSense() const</function>
    585603      </entry>
    586604      <entry align="left" valign="top">
     
    595613  <section id="majormethods">
    596614  <title>
    597   Methods which have a major impact on solution process
     615  Methods which have a Major Impact on Solution Process
    598616  </title>
    599617  <para>
    600   These are important methods which will impact search e.g. adding a cut
     618  These are important methods which will impact search e.g, adding a cut
    601619  generator.  The description here may not give all parameters if they are exotic.
    602   You will also find more on some of them under the description
    603   of that class:
     620  More details can be found under the class description column in Table Major Methods.
    604621  </para>
    605622  <table frame="none">
    606   <title>Major methods</title>
     623  <title>Major Methods</title>
    607624    <tgroup cols="2">
    608625    <thead>
     
    624641      <entry align="left" valign="top">
    625642      Normally this is a list of priorities (1 being highest) and the other
    626       ifNotSimpleIntegers being false which set priorities for all integer
     643      <parameter>ifNotSimpleIntegers</parameter> being false which set priorities for all integer
    627644      variables.  If two variables are unsatisfied and one has a higher priority
    628645      then it is always preferred whatever its value.  This can be very powerful
    629       but also see PseudoCosts in CbcObject discussion.
     646      but also see PseudoCosts in <classname>CbcObject</classname> discussion.
    630647      </entry>
    631648    </row>
     
    635652      </entry>
    636653      <entry align="left" valign="top">
    637       This is used to add a cut generator to CbcModel.  Any cut generator in Cgl
    638       can be used.  If howOften >0 then the cut generator will be called at root
    639       node and every howOften nodes (There is an option to override and do at
    640       depth 0,k,2k..).  If -1 then the code sees how effective it was at root
    641       node and sets howOften dynamically.  If -99 then just does at root node.
    642       There is also a redundant -100 setting which switches off which can be useful
    643       for testing.  For usage see sample2.cpp in the CBC Samples
    644       directory<xref linkend="moreexamples"/> which uses the most common
    645       cut generators.
     654      This is used to add a cut generator to <classname>CbcModel</classname>.  Any cut generator in CGL can be used. If <parameter>howOften</parameter> &gt; 0 then <parameter>name</parameter> will be called at root node and again every <parameter>howOften</parameter> nodes. There is an option to override and to call <parameter>name</parameter> depth 0,k,2k, etc.  If <parameter>howOften</parameter> = -1 then the code determines how effective <parameter>name</parameter>is at root node and dynamically sets <parameter>howOften</parameter>. If <parameter>howOften</parameter> = -99 then <parameter>name></parameter> is just used at root node.
     655      There is also a redundant <parameter>howOften</parameter> = -100 setting which switches <parameter>name</parameter> off. This parameter setting is useful for testing.  For usage see <filename>sample2.cpp</filename> in the <filename>COIN/Cbc/Samples</filename> directory <xref linkend="moreexamples"/> which uses the most common cut generators.
    646656      </entry>
    647657    </row>
     
    651661      </entry>
    652662      <entry align="left" valign="top">
    653       This adds one heuristic to CbcModel.See the section on CbcHeuristic to obtain
     663      This adds one heuristic to <classname>CbcModel</classname>.See the section on <classname>CbcHeuristic</classname> to obtain
    654664      a list of available heuristics and a guide as to building new ones.
    655665      </entry>
     
    660670      </entry>
    661671      <entry align="left" valign="top">
    662       This adds members of the base class CbcObject to CbcModel.  See the section
    663       on CbcObject for detailed nformation.  The objects are cloned by code so
    664       user should delete after <function>addObjects</function>.  There are two
     672      This adds members of the base class <classname>CbcObject</classname> to <classname>CbcModel</classname>.  See the section
     673      on <classname>CbcObject</classname> for detailed nformation.  The <parameter>objects</parameter> are cloned by the code so the
     674      user should delete them after the call to <function>addObjects</function>.  There are two
    665675      main cases.  The first is when the originally created objects are left and
    666676      new ones added (maybe with a higher priority);  this might be used when
     
    668678      to be added, which while not necessary will give extra power in branching.
    669679      The second case is when the old ones are being deleted. 
    670       For usage see sos.cpp in the CBC Samples
    671       directory<xref linkend="moreexamples"/>.
     680      For usage see <filename>sos.cpp</filename> in the <filename>COIN/Cbc/Samples</filename> directory <xref linkend="moreexamples"/>.
    672681      </entry>
    673682    </row>
     
    677686      </entry>
    678687      <entry align="left" valign="top">
    679       This is not really part of Cbc and can be used by other mixed integer
     688      This is not really part of CBC and can be used by other mixed integer
    680689      solvers but it can be a useful tool.  It tries to fix variables and
    681690      strengthen coefficients and also do a normal presolve.  Owing to the
    682691      odd nature of integer programming it may not always reduce the time
    683692      taken but is definitely worth trying.  For an example of using
    684       preProcess and postProcess see sample2.cpp in the CBC Samples
    685       directory<xref linkend="moreexamples"/>.
     693      <function>CglPreProcess()</function> (and <function>CglPostProcess()</function>) see <filename>sample2.cpp</filename> in the CBC Samples
     694      directory <xref linkend="moreexamples"/>.
    686695      </entry>
    687696    </row>
     
    691700      </entry>
    692701      <entry align="left" valign="top">
    693        This is used to use a non-default node comparison function
    694        to see which is the next node on tree to explore.  This
    695        can make a large difference and specialized ones are easy to program.
    696        See the section on CbcCompare.
     702       This is used to invoke a non-default node comparisons
     703       in determining the next node on tree to explore. The order a tree is explored
     704       can make a large difference in runtime. Specialized comparisons are easy to implement.
     705       See the section on <classname>CbcCompare</classname>.
    697706      </entry>
    698707    </row>
  • trunk/Docs/faqcontent.xml

    r87 r113  
    88  <answer>
    99  <para>
    10   (JF 04/01/05) The <ulink url="http://www.coin-or.org/">COIN-OR</ulink> Branch and Cut code
     10  The <ulink url="http://www.coin-or.org/">COIN-OR</ulink> Branch and Cut code
    1111  is designed to be a high quality mixed integer code provided under the terms of the
    1212  <ulink url="http://opensource.org/licenses/cpl.php">Common Public License</ulink>.
    1313  CBC is written in C++, and is primarily intended to be used as a callable
    1414  library (though a rudimentary stand-alone executable exists).
    15   The first documented release was .90.0  The current release is version .90.0.
     15  The first documented release was .90.0  The current release is version .90.0. (JF 04/01/05)
    1616  </para>
    1717  </answer>
     
    2525  <answer>
    2626  <para>
    27   (JF 04/01/05) CBC allows the use of any Cgl cuts and the use of heuristics and
    28    specialized branching methods.
     27  CBC allows the use of any CGL cuts and the use of heuristics and
     28   specialized branching methods. (JF 04/01/05)
    2929  </para>
    3030  </answer>
     
    3838  <answer>
    3939  <para>
    40   (JF 04/01/05) Please see the
     40  Please see the
    4141  <ulink url="http://www.coin-or.org/faqs.html">COIN-OR FAQ</ulink>
    4242  for details on how to
     
    4444  and
    4545  <ulink url="http://www.coin-or.org/faqs.html#BuildCode">install</ulink>
    46   COIN-OR modules.
     46  COIN-OR modules. (JF 04/01/05)
    4747  </para>
    4848  </answer>
     
    5656  <answer>
    5757  <para>
    58   (JF 04/01/05) CBC has been tested on many problems,
    59   but more testing and improvement is needed before it can get to version 1.0.
     58  CBC has been tested on many problems,
     59  but more testing and improvement is needed before it can get to version 1.0. (JF 04/01/05)
    6060  </para>
    6161  </answer>
     
    6969  <answer>
    7070  <para>
    71   (JF 04/01/05) If you can see this you have the best there is:-)
     71  If you can see this you have the best there is:-)
    7272  Also available is a list of
    7373  <ulink url="http://www.coin-or.org/Doxygen/Cbc/">CBC class descriptions</ulink> generated
    74   by <ulink url="http://www.doxygen.org">Doxygen</ulink>.
     74  by <ulink url="http://www.doxygen.org">Doxygen</ulink>. (JF 04/01/05)
    7575  </para>
    7676  </answer>
     
    8484  <answer>
    8585  <para>
    86    (JF 04/01/05) No. However its design is much more flexible so advanced users
    87    will be able to tailor CBC to their needs.
     86   No. However its design is much more flexible so advanced users
     87   will be able to tailor CBC to their needs. (JF 04/01/05)
    8888  </para>
    8989  </answer>
     
    9797  <answer>
    9898  <para>
    99   (JF 04/01/05) It is expected that version 1.0 will be released in time for the 2005
    100   <ulink url="http://www.informs.org">INFORMS</ulink>
     99  It is expected that version 1.0 will be released in time for the 2005
     100  <ulink url="http://www.informs.org">INFORMS</ulink> annual meeting. (JF 04/01/05)
    101101  </para>
    102102  </answer>
     
    110110  <answer>
    111111  <para>
    112   (JF 04/01/05) People from all around the world are already helping.  There are
    113   probably ten people who are do not always post to discussions but are constantly
     112  People from all around the world are already helping.  There are
     113  probably ten people who do not always post to the discussion mail list but are constantly
    114114  "improving" the code by demanding performance or bug fixes or enhancements.  And there
    115   are others posting questions to discussion groups.
     115  are others posting questions to discussion groups. (JF 04/01/05)
    116116  </para>
     117  <para>
     118  A good start is to join the CLP
     119  <ulink url="http://www.coin-or.org/mail.html">mailing lists</ulink> where CBC is discussed.  Some
     120  other possibilities include:
     121  </para>
     122  <itemizedlist>
     123  <listitem>
     124  <para>
     125  Comment on the design
     126  </para>
     127  </listitem>
     128  <listitem>
     129  <para>
     130  Give feedback on the documentation and FAQs.
     131  </para>
     132  </listitem>
     133  <listitem>
     134  <para>
     135  Break the code, or better yet -- mend it.
     136  </para>
     137  </listitem>
     138 <listitem>
     139  <para>
     140  Tackle any of the "to-dos" listed in the Doxyen documentation and contribute back to COIN-OR.
     141  </para>
     142  </listitem>
     143    </itemizedlist>
    117144  </answer>
    118145</qandaentry>
  • trunk/Docs/intro.xml

    r87 r113  
    99  </title>
    1010  <para>
    11   COIN Branch and Cut or CBC is an open-source mixed integer solver written
    12   in C++.  It is primarily meant to be used as a callable library, but a
    13   basic, stand-alone do link **** link linkend="cbcexe"executable version is also
    14   available.  This Branch and Cut solver relies on many other parts of the COIN
    15   repository.  So it relies on Cgl for cut generators and any cut generator written to
    16   CGL standards may be used in CBC.  Again some of these cut generators e.g. Gomory cuts
    17   rely on the factorization functionality of CoinFactorization.  CBC needs a linear solver
    18   and uses the Osi (Open Solver Interface) interface to access the linaer solver so
    19   many solvers may be used.  However the most common use is expected to be when
    20   using COIN's native linear Solver - CLP.
     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? -->
    2133  </para>
    22   <para>
    23   Before examining CBC in more detail it may be helpful to give a very brief description
    24   of Branch and Cut (which should really be called Branch and Cut and Bound).  If some
    25   variables in the model must take on integer values e.g. 0,1 or 2 then the integrality
    26   requirement is relaxed and a lower bound of 0.0 and an upper bound of 2.0 put on the
    27   variable(s). This linear model can be solved using a solver.  If all "integer"
    28   variables take integer values then we are finished;  if not we choose one non-integral
    29   variable e.g. with value 1.3 (A) (B) and create two linear models - one with the variable
    30   having an upper bound of 1.0 and the other with a lower bound of 2.0.  We then put
    31   these two models on our tree of models and solve one of them.  We repeat the process
    32   taking one model off our tree (C) (D) and repeating the process.  As every time we
    33   branch we tighten the problem so the objective value can not improve.  So if we
    34   obtain a valid solution we can use that as a bound to prune the tree.  If we
    35   try and make the linear models more integral by using Cuts then it is termed
    36   Branch and Cut (E) (F).
     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 -->
    3787  </para>
    3888    <table frame="none">
     
    58108      </entry>
    59109      <entry align="left" valign="top">
    60       CbcBranch...
    61       </entry>
    62       <entry align="left" valign="top">
    63       These classes define what is the nature of discontinuity.  The simplest
    64       are variables which must take an integral value but there others
    65       which will be described later e.g. lotsizing variables. 
     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-->
    66117      </entry>
    67118    </row>
     
    71122      </entry>
    72123      <entry align="left" valign="top">
    73       CbcNode
    74       </entry>
    75       <entry align="left" valign="top">
    76       This is the class that decides which variable/entity to branch on next.
    77       Even advanced users will probably only interact with this by setting
    78       CbcModel parameters e.g. priorities.
     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).
    79130      </entry>
    80131    </row>
     
    84135      </entry>
    85136      <entry align="left" valign="top">
    86       CbcTree
    87       </entry>
    88       <entry align="left" valign="top">
    89       All unsolved models can be thought of as being on a tree where each
    90       model can branch two or more times.  The user should not need to be
     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
    91142      concerned with this class.
    92143      </entry>
     
    97148      </entry>
    98149      <entry align="left" valign="top">
    99       CbcCompare...
    100       </entry>
    101       <entry align="left" valign="top">
    102       All unsolved models are in a tree but which leaf do we choose.  These
    103       classes are very small simple ones which can be tailored to suit the problem.
     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-->
    104156      </entry>
    105157    </row>
     
    109161      </entry>
    110162      <entry align="left" valign="top">
    111       CglCutGenerators
    112       </entry>
    113       <entry align="left" valign="top">
    114       Any cut generator from Cgl can be given to the model to be used with parameters
    115       which modify when each generator will be tried.  Few people will write their
    116       own cut generators but all should see which are effective.
     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.
    117169      </entry>
    118170    </row>
     
    122174      </entry>
    123175      <entry align="left" valign="top">
    124       CbcHeuristics
     176      <classname>CbcHeuristics</classname>
    125177      </entry>
    126178      <entry align="left" valign="top">
    127179      Heuristics are very important for obtaining valid solutions quickly.  Some
    128       are available but this is an area where it is useful and interesting to
     180      heuristics are available, but this is an area where it is useful and interesting to
    129181      write specialized ones.
    130182      </entry>
     
    144196  </para>
    145197  </section>
    146   <section>
    147   <title>
    148   Prerequisites
    149   </title>
    150   <para>
    151   CBC is written in C++, so it is expected that users of CBC will be writing
    152   C++ programs which use CBC as a library.  Thus a working knowledge of
    153   <ulink url="http://www.cplusplus.com/doc/tutorial/">C++</ulink>, including basic
    154   object-oriented programming terminology is assumed in this document.  In
    155   addition, the user should be familiar with the fundamental concepts of
    156   <ulink url="http://carbon.cudenver.edu/~hgreenbe/courseware/LPshort/intro.html">
    157   Linear Programming</ulink> and
    158   <ulink url="http://carbon.cudenver.edu/~hgreenbe/courseware/MIP/intro.html">
    159   Mixed Integer Programming (may need better linke)</ulink> .
    160   </para>
    161   </section>
     198
     199
     200
    162201  </chapter>
  • trunk/Docs/messages.xml

    r87 r113  
    55  </title>
    66  <para>
    7   Some of the more common messages and codes passed by CLP are listed in the
    8   tables below.  This is list is not meant to exhaustive.  The notation is as
    9   for printf from &quot;C&quot;:
     7  Messages and codes passed by CBC are listed in the
     8  tables below.  For a complete list, see <filename>COIN/Cbc/CbcMessages.cpp</filename>. The notation used is the same as for the <function>printf</function> in the C programming language.
    109  </para>
    1110  <itemizedlist>
     
    3029  <table frame="none" align="left">
    3130  <title>
    32   COIN Messages passed at or above logging level 1
     31  CBC Messages Passed At or Above Logging Level 0
    3332  </title>
    3433  <tgroup cols="4" colsep="1" rowsep="1">
     
    5554    <row>
    5655      <entry align="left">
    57       1
    58       </entry>
    59       <entry align="center">
    60       MPSREAD
    61       </entry>
    62       <entry>
    63       </entry>
    64       <entry align="left">
    65       <computeroutput>At line %d %s</computeroutput>
    66       </entry>
    67     </row>
    68     <row>
    69       <entry namest="c1" nameend="c3">
    70       </entry>
    71       <entry align="left">
    72       <simpara>
    73       This just prints out NAME line, ROW line, etc
    74       </simpara>
    75       </entry>
    76     </row>
    77     <row>
    78       <entry align="left">
    79       2
    80       </entry>
    81       <entry align="center">
    82       MPSREAD
    83       </entry>
    84       <entry>
    85       </entry>
    86       <entry align="left">
    87       <computeroutput>Problem %s has %d rows, %d columns and %d elements
    88       </computeroutput>
    89       </entry>
    90     </row>
    91     <row>
    92       <entry namest="c1" nameend="c3">
    93       </entry>
    94       <entry align="left">
    95       <simpara>
    96       This gives statistics after reading an MPS file
    97       </simpara>
    98       </entry>
    99     </row>
    100     <row>
    101       <entry align="left">
    102       8
    103       </entry>
    104       <entry align="center">
    105       MPSREAD
    106       </entry>
    107       <entry>
    108       </entry>
    109       <entry align="left">
    110       <computeroutput>%s read with %d errors
    111       </computeroutput>
    112       </entry>
    113     </row>
    114     <row>
    115       <entry namest="c1" nameend="c3">
    116       </entry>
    117       <entry align="left">
    118       <simpara>
    119       This gives error statistics for file
    120       </simpara>
    121       </entry>
    122     </row>
    123     <row>
    124       <entry align="left">
    125       505
    126       </entry>
    127       <entry align="center">
    128       PRESOLVE
    129       </entry>
    130       <entry>
    131       </entry>
    132       <entry align="left">
    133       <computeroutput>
    134       Presolved poblem not optimal, resolve after postsolve
    135       </computeroutput>
    136       </entry>
    137     </row>
    138     <row>
    139       <entry namest="c1" nameend="c3">
    140       </entry>
    141       <entry align="left">
    142       <simpara>
    143       This could be because it was not feasible or because of maximum
    144       iterations.  If this message occurs then consider using primal clean up
    145       </simpara>
    146       </entry>
    147     </row>
    148     <row>
    149       <entry align="left">
    150       506
    151       </entry>
    152       <entry align="center">
    153       PRESOLVE
    154       </entry>
    155       <entry>
    156       </entry>
    157       <entry align="left">
    158       <computeroutput>
    159       Presolve %d (%d) rows, %d (%d) columns and %d (%d) elements
    160       </computeroutput>
    161       </entry>
    162     </row>
    163     <row>
    164       <entry namest="c1" nameend="c3">
    165       </entry>
    166       <entry align="left">
    167       <simpara>
    168       The first number is the number after presolve and the number
    169       in parentheses is amount of reduction
    170       </simpara>
    171       </entry>
    172     </row>
    173     <row>
    174       <entry align="left">
    175       510
    176       </entry>
    177       <entry align="center">
    178       PRESOLVE
    179       </entry>
    180       <entry>
    181       </entry>
    182       <entry align="left">
    183       <computeroutput>
    184       Presolve is modifying %d integer bounds and re-presolving
    185       </computeroutput>
    186       </entry>
    187     </row>
    188     <row>
    189       <entry namest="c1" nameend="c3">
    190       </entry>
    191       <entry align="left">
    192       <simpara>
    193       If presolve determines at the end that an integer variable have its bounds
    194       changed then it will repeat the entrire presolve
    195       </simpara>
    196       </entry>
    197     </row>
    198     <row>
    199       <entry align="left">
    200       511
    201       </entry>
    202       <entry align="center">
    203       PRESOLVE
    204       </entry>
    205       <entry>
    206       </entry>
    207       <entry align="left">
    208       <computeroutput>
    209       After Postsolve, objective %g, infeasibilities - dual %g (%d),
    210       primal %g (%d)
    211       </computeroutput>
    212       </entry>
    213     </row>
    214     <row>
    215       <entry namest="c1" nameend="c3">
    216       </entry>
    217       <entry align="left">
    218       <simpara>
    219       This gives the state after postsolve - this gives the objective value
    220       and the sum of dual and primal infeasibilities with the number of
    221       infeasibilities in parentheses.  Hopefully these should be zero
    222       </simpara>
    223       </entry>
    224     </row>
    225     <row>
    226       <entry align="left">
    227       512
    228       </entry>
    229       <entry align="center">
    230       PRESOLVE
    231       </entry>
    232       <entry>
    233       </entry>
    234       <entry align="left">
    235       <computeroutput>
    236       Presolved model was optimal, full model needs cleaning up
    237       </computeroutput>
    238       </entry>
    239     </row>
    240     <row>
    241       <entry namest="c1" nameend="c3">
    242       </entry>
    243       <entry align="left">
    244       <simpara>
    245       If the numbers in previous message (511) were large then maybe we need to
    246       know, if small then that's life
     56      3007
     57      </entry>
     58      <entry align="center">
     59      CBC_NOINT
     60      </entry>
     61      <entry>
     62      </entry>
     63      <entry align="left">
     64      <computeroutput>No integer variables - nothing to do</computeroutput>
     65      </entry>
     66    </row>
     67    <row>
     68      <entry namest="c1" nameend="c3">
     69      </entry>
     70      <entry align="left">
     71      <simpara>
     72      JJHF
    24773      </simpara>
    24874      </entry>
     
    25278  </table>
    25379
     80
     81
    25482  <table frame="none" align="left">
    25583  <title>
    256   CLP Messages passed at or above logging level 1
     84  CBC Messages Passed At or Above Logging Level 1
    25785  </title>
    25886  <tgroup cols="4" colsep="1" rowsep="1">
     
    278106  <tbody>
    279107    <row>
    280     <row>
    281       <entry align="left">
    282       0
    283       </entry>
    284       <entry align="center">
    285       SIMPLEX
    286       </entry>
    287       <entry>
    288       </entry>
    289       <entry align="left">
    290       <computeroutput>
    291       Optimal - objective value %g
    292       </computeroutput>
    293       </entry>
    294     </row>
    295     <row>
    296       <entry namest="c1" nameend="c3">
    297       </entry>
    298       <entry align="left">
    299       <simpara>
    300       The only message you want to see
    301       </simpara>
    302       </entry>
    303     </row>
    304108      <entry align="left">
    305109      1
    306110      </entry>
    307111      <entry align="center">
    308       SIMPLEX
    309       </entry>
    310       <entry>
    311       </entry>
    312       <entry align="left">
    313       <computeroutput>
    314       Primal infeasible - objective value %g
    315       </computeroutput>
    316       </entry>
    317     </row>
    318     <row>
    319       <entry namest="c1" nameend="c3">
    320       </entry>
    321       <entry align="left">
    322       <simpara>
    323       You may need to look at previous messages or use methods.  Such as
    324       sumPrimalInfeasibilities() to find cause
    325       </simpara>
    326       </entry>
    327     </row>
    328     <row>
    329       <entry align="left">
    330       2
    331       </entry>
    332       <entry align="center">
    333       SIMPLEX
    334       </entry>
    335       <entry>
    336       </entry>
    337       <entry align="left">
    338       <computeroutput>
    339       Dual infeasible - objective value %g
    340       </computeroutput>
    341       </entry>
    342     </row>
    343     <row>
    344       <entry namest="c1" nameend="c3">
    345       </entry>
    346       <entry align="left">
    347       <simpara>
    348       You may need to look at previous messages or use methods.  Such as
    349       sumDualInfeasibilities() to find cause
     112      CBC_END
     113      </entry>
     114      <entry>
     115      </entry>
     116      <entry align="left">
     117      <computeroutput>Search completed - best objective %g, took %d iterations and %d nodes
     118      </computeroutput>
     119      </entry>
     120    </row>
     121    <row>
     122      <entry namest="c1" nameend="c3">
     123      </entry>
     124      <entry align="left">
     125      <simpara>
     126      JJHF
    350127      </simpara>
    351128      </entry>
     
    356133      </entry>
    357134      <entry align="center">
    358       SIMPLEX
    359       </entry>
    360       <entry>
    361       </entry>
    362       <entry align="left">
    363       <computeroutput>
    364       Stopped - objective value %g
    365       </computeroutput>
    366       </entry>
    367     </row>
    368     <row>
    369       <entry namest="c1" nameend="c3">
    370       </entry>
    371       <entry align="left">
    372       <simpara>
    373       The algorithm stopped as requested by the user.
     135      CBC_MAXNODES
     136      </entry>
     137      <entry>
     138      </entry>
     139      <entry align="left">
     140      <computeroutput>Exiting on maximum nodes
     141      </computeroutput>
     142      </entry>
     143    </row>
     144    <row>
     145      <entry namest="c1" nameend="c3">
     146      </entry>
     147      <entry align="left">
     148      <simpara>
     149      JJHF
    374150      </simpara>
    375151      </entry>
     
    380156      </entry>
    381157      <entry align="center">
    382       SIMPLEX
    383       </entry>
    384       <entry>
    385       </entry>
    386       <entry align="left">
    387       <computeroutput>
    388       Stopped due to errors - objective value %g
    389       </computeroutput>
    390       </entry>
    391     </row>
    392     <row>
    393       <entry namest="c1" nameend="c3">
    394       </entry>
    395       <entry align="left">
    396       <simpara>
    397       Switch on log level 2 to see information on size of elements etc.  If they
    398       look reasonable then maybe we need to know.
     158      CBC_SOLUTION
     159      </entry>
     160      <entry>
     161      </entry>
     162      <entry align="left">
     163      <computeroutput>
     164      Integer solution of %g found after %d iterations and %d nodes
     165      </computeroutput>
     166      </entry>
     167    </row>
     168    <row>
     169      <entry namest="c1" nameend="c3">
     170      </entry>
     171      <entry align="left">
     172      <simpara>
     173      JJHF
    399174      </simpara>
    400175      </entry>
     
    405180      </entry>
    406181      <entry align="center">
    407       SIMPLEX
    408       </entry>
    409       <entry>
    410       </entry>
    411       <entry align="left">
    412       <computeroutput>
    413       %d Obj %g Primal inf %g (%d) Dual inf %g (%d)
    414       </computeroutput>
    415       </entry>
    416     </row>
    417     <row>
    418       <entry namest="c1" nameend="c3">
    419       </entry>
    420       <entry align="left">
    421       <simpara>
    422       At each re-factorization this gives the number of iterations and the value
    423       of the objective function.  If there are primal infeasibilities then the
    424       sum and number are given and similarly for dual infeasibilities.
    425       (This is a simplified form of message.)
    426       </simpara>
    427       </entry>
    428     </row>
     182      CBC_END
     183      </entry>
     184      <entry>
     185      </entry>
     186      <entry align="left">
     187      <computeroutput>
     188      Partial search - best objective %g (best possible %g), took %d iterations and %d nodes
     189      </computeroutput>
     190      </entry>
     191    </row>
     192    <row>
     193      <entry namest="c1" nameend="c3">
     194      </entry>
     195      <entry align="left">
     196      <simpara>
     197      JJHF
     198      </simpara>
     199      </entry>
     200    </row>
     201    <row>
     202      <entry align="left">
     203      6
     204      </entry>
     205      <entry align="center">
     206      CBC_INFEAS
     207      </entry>
     208      <entry>
     209      </entry>
     210      <entry align="left">
     211      <computeroutput>
     212      The LP relaxation is infeasible or too expensive
     213      </computeroutput>
     214      </entry>
     215    </row>
     216    <row>
     217      <entry namest="c1" nameend="c3">
     218      </entry>
     219      <entry align="left">
     220      <simpara>
     221      JJHF
     222      </simpara>
     223      </entry>
     224    </row>
     225    <row>
     226      <entry align="left">
     227      9
     228      </entry>
     229      <entry align="center">
     230      CBC_INTEGERINCREMENT
     231      </entry>
     232      <entry>
     233      </entry>
     234      <entry align="left">
     235      <computeroutput>
     236      Objective coefficients multiple of %g
     237      </computeroutput>
     238      </entry>
     239    </row>
     240    <row>
     241      <entry namest="c1" nameend="c3">
     242      </entry>
     243      <entry align="left">
     244      <simpara>
     245      JJHF
     246      </simpara>
     247      </entry>
     248    </row>
     249    <row>
     250      <entry align="left">
     251      10
     252      </entry>
     253      <entry align="center">
     254      CBC_STATUS
     255      </entry>
     256      <entry>
     257      </entry>
     258      <entry align="left">
     259      <computeroutput>
     260      After %d nodes, %d on tree, %g best solution, best possible %g
     261      </computeroutput>
     262      </entry>
     263    </row>
     264    <row>
     265      <entry namest="c1" nameend="c3">
     266      </entry>
     267      <entry align="left">
     268      <simpara>
     269      JJHF
     270      </simpara>
     271      </entry>
     272    </row>    <row>
     273      <entry align="left">
     274      11
     275      </entry>
     276      <entry align="center">
     277      CBC_GAP
     278      </entry>
     279      <entry>
     280      </entry>
     281      <entry align="left">
     282      <computeroutput>
     283      Exiting as integer gap of %g less than %g or %g%%
     284      </computeroutput>
     285      </entry>
     286    </row>
     287    <row>
     288      <entry namest="c1" nameend="c3">
     289      </entry>
     290      <entry align="left">
     291      <simpara>
     292      JJHF
     293      </simpara>
     294      </entry>
     295    </row>   
     296     <row>
     297      <entry align="left">
     298      12
     299      </entry>
     300      <entry align="center">
     301      CBC_ROUNDING
     302      </entry>
     303      <entry>
     304      </entry>
     305      <entry align="left">
     306      <computeroutput>
     307      Integer solution of %g found by heuristic after %d iterations and %d nodes
     308      </computeroutput>
     309      </entry>
     310    </row>
     311    <row>
     312      <entry namest="c1" nameend="c3">
     313      </entry>
     314      <entry align="left">
     315      <simpara>
     316      JJHF
     317      </simpara>
     318      </entry>
     319    </row>    <row>
     320      <entry align="left">
     321      13
     322      </entry>
     323      <entry align="center">
     324      CBC_ROOT
     325      </entry>
     326      <entry>
     327      </entry>
     328      <entry align="left">
     329      <computeroutput>
     330      At root node, %d cuts changed objective from %g to %g in %d passes
     331      </computeroutput>
     332      </entry>
     333    </row>
     334    <row>
     335      <entry namest="c1" nameend="c3">
     336      </entry>
     337      <entry align="left">
     338      <simpara>
     339      JJHF
     340      </simpara>
     341      </entry>
     342    </row>   
    429343    <row>
    430344      <entry align="left">
     
    432346      </entry>
    433347      <entry align="center">
    434       SIMPLEX
    435       </entry>
    436       <entry>
    437       </entry>
    438       <entry align="left">
    439       <computeroutput>
    440       Perturbing problem by %g % of %g
    441       </computeroutput>
    442       </entry>
    443     </row>
    444     <row>
    445       <entry namest="c1" nameend="c3">
    446       </entry>
    447       <entry align="left">
    448       <simpara>
    449       There is more to this message but if the user sees this then s/he has
    450       chosen to perturb the problem or the algorithm has decided to do so.
    451       If the numbers look too large the user may wish to think again.
    452       </simpara>
    453       </entry>
    454     </row>
     348      CBC_GENERATOR
     349      </entry>
     350      <entry>
     351      </entry>
     352      <entry align="left">
     353      <computeroutput>
     354      Cut generator %d (%s) - %d row cuts (%d active), %d column cuts %? in %g seconds - new frequency is %d
     355      </computeroutput>
     356      </entry>
     357    </row>
     358    <row>
     359      <entry namest="c1" nameend="c3">
     360      </entry>
     361      <entry align="left">
     362      <simpara>
     363      JJHF
     364      </simpara>
     365      </entry>
     366    </row>   
     367    <row>
     368      <entry align="left">
     369      16
     370      </entry>
     371      <entry align="center">
     372      CBC_STRONGSOL
     373      </entry>
     374      <entry>
     375      </entry>
     376      <entry align="left">
     377      <computeroutput>
     378      Integer solution of %g found by strong branching after %d iterations and %d nodes
     379      </computeroutput>
     380      </entry>
     381    </row>
     382    <row>
     383      <entry namest="c1" nameend="c3">
     384      </entry>
     385      <entry align="left">
     386      <simpara>
     387      JJHF
     388      </simpara>
     389      </entry>
     390    </row>   
     391    <row>
     392      <entry align="left">
     393      17
     394      </entry>
     395      <entry align="center">
     396      CBC_INFEAS
     397      </entry>
     398      <entry>
     399      </entry>
     400      <entry align="left">
     401      <computeroutput>
     402      %d solved, %d variables fixed, %d tightened
     403      </computeroutput>
     404      </entry>
     405    </row>
     406    <row>
     407      <entry namest="c1" nameend="c3">
     408      </entry>
     409      <entry align="left">
     410      <simpara>
     411      JJHF
     412      </simpara>
     413      </entry>
     414    </row>   
     415    <row>
     416      <entry align="left">
     417      18
     418      </entry>
     419      <entry align="center">
     420      CBC_VUB_END
     421      </entry>
     422      <entry>
     423      </entry>
     424      <entry align="left">
     425      <computeroutput>
     426      After tightenVubs, %d variables fixed, %d tightened
     427      </computeroutput>
     428      </entry>
     429    </row>
     430    <row>
     431      <entry namest="c1" nameend="c3">
     432      </entry>
     433      <entry align="left">
     434      <simpara>
     435      JJHF
     436      </simpara>
     437      </entry>
     438    </row>   
    455439    <row>
    456440      <entry align="left">
     
    458442      </entry>
    459443      <entry align="center">
    460       SIMPLEX
    461       </entry>
    462       <entry>
    463       </entry>
    464       <entry align="left">
    465       <computeroutput>
    466       %d variables/rows fixed as scaled bounds too close
    467       </computeroutput>
    468       </entry>
    469     </row>
    470     <row>
    471       <entry namest="c1" nameend="c3">
    472       </entry>
    473       <entry align="left">
    474       <simpara>
    475       If this occurs look carefully at your input data
    476       </simpara>
    477       </entry>
    478     </row>
     444      CBC_MAXSOLS
     445      </entry>
     446      <entry>
     447      </entry>
     448      <entry align="left">
     449      <computeroutput>
     450      Exiting on maximum solutions
     451      </computeroutput>
     452      </entry>
     453    </row>
     454    <row>
     455      <entry namest="c1" nameend="c3">
     456      </entry>
     457      <entry align="left">
     458      <simpara>
     459      JJHF
     460      </simpara>
     461      </entry>
     462    </row>
     463   <row>
     464      <entry align="left">
     465      20
     466      </entry>
     467      <entry align="center">
     468      CBC_MAXTIME
     469      </entry>
     470      <entry>
     471      </entry>
     472      <entry align="left">
     473      <computeroutput>
     474      Exiting on maximum time
     475      </computeroutput>
     476      </entry>
     477    </row>
     478    <row>
     479      <entry namest="c1" nameend="c3">
     480      </entry>
     481      <entry align="left">
     482      <simpara>
     483      JJHF
     484      </simpara>
     485      </entry>
     486    </row>
     487    <row>
     488      <entry align="left">
     489      23
     490      </entry>
     491      <entry align="center">
     492      CBC_CUTOFF_WARNING
     493      </entry>
     494      <entry>
     495      </entry>
     496      <entry align="left">
     497      <computeroutput>
     498      Cutoff set to %g - equivalent to best solution of %g
     499      </computeroutput>
     500      </entry>
     501    </row>
     502    <row>
     503      <entry namest="c1" nameend="c3">
     504      </entry>
     505      <entry align="left">
     506      <simpara>
     507      JJHF
     508      </simpara>
     509      </entry>
     510    </row>   
    479511    <row>
    480512      <entry align="left">
     
    482514      </entry>
    483515      <entry align="center">
    484       SIMPLEX
    485       </entry>
    486       <entry>
    487       </entry>
    488       <entry align="left">
    489       <computeroutput>
    490       Matrix will be packed to eliminate small elements
    491       </computeroutput>
    492       </entry>
    493     </row>
    494     <row>
    495       <entry namest="c1" nameend="c3">
    496       </entry>
    497       <entry align="left">
    498       <simpara>
    499       If this occurs the user should look carefully at data.
    500       </simpara>
    501       </entry>
    502     </row>
    503     <row>
     516      CBC_TREE_SOL
     517      </entry>
     518      <entry>
     519      </entry>
     520      <entry align="left">
     521      <computeroutput>
     522      Integer solution of %g found by subtree after %d iterations and %d nodes
     523      </computeroutput>
     524      </entry>
     525    </row>
     526    <row>
     527      <entry namest="c1" nameend="c3">
     528      </entry>
     529      <entry align="left">
     530      <simpara>
     531      JJHF
     532      </simpara>
     533      </entry>
     534    </row>   
     535     <row>
    504536      <entry align="left">
    505537      26
    506538      </entry>
    507539      <entry align="center">
    508       SIMPLEX
    509       </entry>
    510       <entry>
    511       </entry>
    512       <entry align="left">
    513       <computeroutput>
    514       Matrix will be packed to eliminate %d duplicate elements
    515       </computeroutput>
    516       </entry>
    517     </row>
    518     <row>
    519       <entry namest="c1" nameend="c3">
    520       </entry>
    521       <entry align="left">
    522       <simpara>
    523       If this occurs the user should look carefully at data.
    524       </simpara>
    525       </entry>
    526     </row>
    527     <row>
    528       <entry align="left">
    529       28
    530       </entry>
    531       <entry align="center">
    532       SIMPLEX
    533       </entry>
    534       <entry>
    535       </entry>
    536       <entry align="left">
    537       <computeroutput>
    538       Crash put %d variables in basis, %d dual infeasibilities
    539       </computeroutput>
    540       </entry>
    541     </row>
    542     <row>
    543       <entry namest="c1" nameend="c3">
    544       </entry>
    545       <entry align="left">
    546       <simpara>
    547      
    548       </simpara>
    549       </entry>
    550     </row>
    551     <row>
    552       <entry align="left">
    553       29
    554       </entry>
    555       <entry align="center">
    556       SIMPLEX
    557       </entry>
    558       <entry>
    559       </entry>
    560       <entry align="left">
    561       <computeroutput>
    562       End of values pass after %d iterations
    563       </computeroutput>
    564       </entry>
    565     </row>
    566     <row>
    567       <entry namest="c1" nameend="c3">
    568       </entry>
    569       <entry align="left">
    570       <simpara>
    571       ??? If primal(1) or dual(1) the a sweep through model is made and this
    572       signals end of pass.
    573       </simpara>
    574       </entry>
    575     </row>
    576 
     540      CBC_PRIORITY
     541      </entry>
     542      <entry>
     543      </entry>
     544      <entry align="left">
     545      <computeroutput>
     546      Setting priorities for objects %d to %d inclusive (out of %d)
     547      </computeroutput>
     548      </entry>
     549    </row>
     550    <row>
     551      <entry namest="c1" nameend="c3">
     552      </entry>
     553      <entry align="left">
     554      <simpara>
     555      JJHF
     556      </simpara>
     557      </entry>
     558    </row>   
     559    <row>
     560      <entry align="left">
     561      3008
     562      </entry>
     563      <entry align="center">
     564      CBC_WARNING_STRONG
     565      </entry>
     566      <entry>
     567      </entry>
     568      <entry align="left">
     569      <computeroutput>
     570      Strong branching is fixing too many variables, too expensively!
     571      </computeroutput>
     572      </entry>
     573    </row>
     574    <row>
     575      <entry namest="c1" nameend="c3">
     576      </entry>
     577      <entry align="left">
     578      <simpara>
     579      JJHF
     580      </simpara>
     581      </entry>
     582    </row>
    577583  </tbody>
    578584  </tgroup>
     
    581587  <table frame="none" align="left">
    582588  <title>
    583   COIN Messages passed at or above logging level 0
     589  CLP Messages Passed At or Above Logging Level 2
    584590  </title>
    585591  <tgroup cols="4" colsep="1" rowsep="1">
     
    605611  <tbody>
    606612    <row>
    607       <entry align="left">
    608       3001
    609       </entry>
    610       <entry align="center">
    611       MPSREAD
    612       </entry>
    613       <entry>
    614       </entry>
    615       <entry align="left">
    616       <computeroutput>
    617       Illegal value for %s of %g
    618       </computeroutput>
    619       </entry>
    620     </row>
    621     <row>
    622       <entry namest="c1" nameend="c3">
    623       </entry>
    624       <entry align="left">
    625       <simpara>
    626       String will be &quot;infinity&quot; if setInfinity passed bad value,
    627       or &quot;default integer bound&quot; if setDefaultBound passed bad value.
    628       </simpara>
    629       </entry>
    630     </row>
    631     <row>
    632       <entry align="left">
    633       3002
    634       </entry>
    635       <entry align="center">
    636       MPSREAD
    637       </entry>
    638       <entry>
    639       </entry>
    640       <entry align="left">
    641       <computeroutput>
    642       Bad image at line %d &lt; %s &gt;
    643       </computeroutput>
    644       </entry>
    645     </row>
    646     <row>
    647       <entry namest="c1" nameend="c3">
    648       </entry>
    649       <entry align="left">
    650       <simpara>
    651       This gives line number and the offending line
    652       </simpara>
    653       </entry>
    654     </row>
    655     <row>
    656       <entry align="left">
    657       3003
    658       </entry>
    659       <entry align="center">
    660       MPSREAD
    661       </entry>
    662       <entry>
    663       </entry>
    664       <entry align="left">
    665       <computeroutput>
    666       Duplicate objective at line %d &lt; %s &gt;
    667       </computeroutput>
    668       </entry>
    669     </row>
    670     <row>
    671       <entry namest="c1" nameend="c3">
    672       </entry>
    673       <entry align="left">
    674       <simpara>
    675       An objective row appears twice in one column
    676       </simpara>
    677       </entry>
    678     </row>
    679     <row>
    680       <entry align="left">
    681       3004
    682       </entry>
    683       <entry align="center">
    684       MPSREAD
    685       </entry>
    686       <entry>
    687       </entry>
    688       <entry align="left">
    689       <computeroutput>
    690       Duplicate row %s at line %d %s
    691       </computeroutput>
    692       </entry>
    693     </row>
    694     <row>
    695       <entry namest="c1" nameend="c3">
    696       </entry>
    697       <entry align="left">
    698       <simpara>
    699       The named row appears twice in one column.
    700       </simpara>
    701       </entry>
    702     </row>
    703     <row>
    704       <entry align="left">
    705       3005
    706       </entry>
    707       <entry align="center">
    708       MPSREAD
    709       </entry>
    710       <entry>
    711       </entry>
    712       <entry align="left">
    713       <computeroutput>
    714       No match for row %s at line %d &lt; %s &gt;
    715       </computeroutput>
    716       </entry>
    717     </row>
    718     <row>
    719       <entry namest="c1" nameend="c3">
    720       </entry>
    721       <entry align="left">
    722       <simpara>
    723       The named row did not appear in ROWS section.
    724       </simpara>
    725       </entry>
    726     </row>
    727     <row>
    728       <entry align="left">
    729       3006
    730       </entry>
    731       <entry align="center">
    732       MPSREAD
    733       </entry>
    734       <entry>
    735       </entry>
    736       <entry align="left">
    737       <computeroutput>
    738       No match for column at line %d &lt; %s &gt;
    739       </computeroutput>
    740       </entry>
    741     </row>
    742     <row>
    743       <entry namest="c1" nameend="c3">
    744       </entry>
    745       <entry align="left">
    746       <simpara>
    747       The named column (in BOUNDS section) did not appear in COLUMNS section.
    748       </simpara>
    749       </entry>
    750     </row>
    751     <row>
    752       <entry align="left">
    753       6001
    754       </entry>
    755       <entry align="center">
    756       MPSREAD
    757       </entry>
    758       <entry>
    759       </entry>
    760       <entry align="left">
    761       <computeroutput>
    762       Unable to open mps input file %s
    763       </computeroutput>
    764       </entry>
    765     </row>
    766     <row>
    767       <entry namest="c1" nameend="c3">
    768       </entry>
    769       <entry align="left">
    770       <simpara>
    771      
    772       </simpara>
    773       </entry>
    774     </row>
    775     <row>
    776       <entry align="left">
    777       6002
    778       </entry>
    779       <entry align="center">
    780       MPSREAD
    781       </entry>
    782       <entry>
    783       </entry>
    784       <entry align="left">
    785       <computeroutput>
    786       Unknown image %s at line %d of file %s
    787       </computeroutput>
    788       </entry>
    789     </row>
    790     <row>
    791       <entry namest="c1" nameend="c3">
    792       </entry>
    793       <entry align="left">
    794       <simpara>
    795       The Mps reader could not make sense of the image file specified.
    796       </simpara>
    797       </entry>
    798     </row>
    799     <row>
    800       <entry align="left">
    801       6003
    802       </entry>
    803       <entry align="center">
    804       MPSREAD
    805       </entry>
    806       <entry>
    807       </entry>
    808       <entry align="left">
    809       <computeroutput>
    810       Consider the possibility of a compressed file which zlib is unable to read.
    811       </computeroutput>
    812       </entry>
    813     </row>
    814     <row>
    815       <entry namest="c1" nameend="c3">
    816       </entry>
    817       <entry align="left">
    818       <simpara>
    819       Some .gz files can not be read by zlib.  Using gunzip and then gzip
    820       normally cures problem.
    821       </simpara>
    822       </entry>
    823     </row>
    824     <row>
    825       <entry align="left">
    826       6004
    827       </entry>
    828       <entry align="center">
    829       MPSREAD
    830       </entry>
    831       <entry>
    832       </entry>
    833       <entry align="left">
    834       <computeroutput>
    835       EOF on file %s
    836       </computeroutput>
    837       </entry>
    838     </row>
    839     <row>
    840       <entry namest="c1" nameend="c3">
    841       </entry>
    842       <entry align="left">
    843       <simpara>
    844       The Mps reader did not find expected section marker.     
    845       </simpara>
    846       </entry>
    847     </row>
    848     <row>
    849       <entry align="left">
    850       6005
    851       </entry>
    852       <entry align="center">
    853       MPSREAD
    854       </entry>
    855       <entry>
    856       </entry>
    857       <entry align="left">
    858       <computeroutput>
    859       Returning as too many errors
    860       </computeroutput>
    861       </entry>
    862     </row>
    863     <row>
    864       <entry namest="c1" nameend="c3">
    865       </entry>
    866       <entry align="left">
    867       <simpara>
    868       The reader has put out 100 messages and is giving up.
    869       </simpara>
    870       </entry>
    871     </row>
    872     <row>
    873       <entry align="left">
    874       507
    875       </entry>
    876       <entry align="center">
    877       PRESOLVE
    878       </entry>
    879       <entry>
    880       </entry>
    881       <entry align="left">
    882       <computeroutput>
    883       Presolve determined that the problem is infeasible with tolerance of %g
    884       </computeroutput>
    885       </entry>
    886     </row>
    887     <row>
    888       <entry namest="c1" nameend="c3">
    889       </entry>
    890       <entry align="left">
    891       <simpara>
    892       If you want you can try with a larger tolerance
    893       </simpara>
    894       </entry>
    895     </row>
    896     <row>
    897       <entry align="left">
    898       508
    899       </entry>
    900       <entry align="center">
    901       PRESOLVE
    902       </entry>
    903       <entry>
    904       </entry>
    905       <entry align="left">
    906       <computeroutput>
    907       Presolve thinks problem is unbounded
    908       </computeroutput>
    909       </entry>
    910     </row>
    911     <row>
    912       <entry namest="c1" nameend="c3">
    913       </entry>
    914       <entry align="left">
    915       <simpara>
    916       Perhaps the user should maximize if initially minimizing or vice versa.
    917       </simpara>
    918       </entry>
    919     </row>
    920     <row>
    921       <entry align="left">
    922       509
    923       </entry>
    924       <entry align="center">
    925       PRESOLVE
    926       </entry>
    927       <entry>
    928       </entry>
    929       <entry align="left">
    930       <computeroutput>
    931       Presolve thinks problem is infeasible AND unbounded???
    932       </computeroutput>
    933       </entry>
    934     </row>
    935     <row>
    936       <entry namest="c1" nameend="c3">
    937       </entry>
    938       <entry align="left">
    939       <simpara>
    940       If you get this message we want to know
     613    <row>
     614      <entry align="left">
     615      8
     616      </entry>
     617      <entry align="center">
     618      CBC_SOLINDIVIDUAL
     619      </entry>
     620      <entry>
     621      </entry>
     622      <entry align="left">
     623      <computeroutput>
     624      %d has value %g
     625      </computeroutput>
     626      </entry>
     627    </row>
     628    <row>
     629      <entry namest="c1" nameend="c3">
     630      </entry>
     631      <entry align="left">
     632      <simpara>
     633      JJHF
     634      </simpara>
     635      </entry>
     636    </row>
     637      <entry align="left">
     638      15
     639      </entry>
     640      <entry align="center">
     641      CBC_BRANCH
     642      </entry>
     643      <entry>
     644      </entry>
     645      <entry align="left">
     646      <computeroutput>
     647      Node %d Obj %g Unsat %d depth %d
     648      </computeroutput>
     649      </entry>
     650    </row>
     651    <row>
     652      <entry namest="c1" nameend="c3">
     653      </entry>
     654      <entry align="left">
     655      <simpara>
     656      JJHF
     657      </simpara>
     658      </entry>
     659    </row>
     660    <row>
     661      <entry align="left">
     662      21
     663      </entry>
     664      <entry align="center">
     665      CBC_NOTFEAS1
     666      </entry>
     667      <entry>
     668      </entry>
     669      <entry align="left">
     670      <computeroutput>
     671      On closer inspection node is infeasible
     672      </computeroutput>
     673      </entry>
     674    </row>
     675    <row>
     676      <entry namest="c1" nameend="c3">
     677      </entry>
     678      <entry align="left">
     679      <simpara>
     680      JJHF
     681      </simpara>
     682      </entry>
     683    </row>
     684    <row>
     685      <entry align="left">
     686      22
     687      </entry>
     688      <entry align="center">
     689      CBC_NOTFEAS2
     690      </entry>
     691      <entry>
     692      </entry>
     693      <entry align="left">
     694      <computeroutput>
     695      On closer inspection objective value of %g above cutoff of %g
     696      </computeroutput>
     697      </entry>
     698    </row>
     699    <row>
     700      <entry namest="c1" nameend="c3">
     701      </entry>
     702      <entry align="left">
     703      <simpara>
     704      JJHF
     705      </simpara>
     706      </entry>
     707    </row>
     708    <row>
     709      <entry align="left">
     710      23
     711      </entry>
     712      <entry align="center">
     713      CBC_NOTFEAS3
     714      </entry>
     715      <entry>
     716      </entry>
     717      <entry align="left">
     718      <computeroutput>
     719      Allowing solution, even though largest row infeasibility is %g
     720      </computeroutput>
     721      </entry>
     722    </row>
     723    <row>
     724      <entry namest="c1" nameend="c3">
     725      </entry>
     726      <entry align="left">
     727      <simpara>
     728      JJHF
    941729      </simpara>
    942730      </entry>
     
    948736  <table frame="none" align="left">
    949737  <title>
    950   CLP Messages passed at or above logging level 0
     738  CBC Messages Passed At or Above Logging Level 3
    951739  </title>
    952740  <tgroup cols="4" colsep="1" rowsep="1">
     
    973761    <row>
    974762      <entry align="left">
    975       3002
    976       </entry>
    977       <entry align="center">
    978       SIMPLEX
    979       </entry>
    980       <entry>
    981       </entry>
    982       <entry align="left">
    983       <computeroutput>
    984       Not solving empty problem - %d rows, %d columns and %d elements
    985       </computeroutput>
    986       </entry>
    987     </row>
    988     <row>
    989       <entry namest="c1" nameend="c3">
    990       </entry>
    991       <entry align="left">
    992       <simpara>
    993       Test problem size before solving.
    994       </simpara>
    995       </entry>
    996     </row>
    997     <row>
    998       <entry align="left">
    999       6002
    1000       </entry>
    1001       <entry align="center">
    1002       SIMPLEX
    1003       </entry>
    1004       <entry>
    1005       </entry>
    1006       <entry align="left">
    1007       <computeroutput>
    1008       %d bad bound pairs or bad objectives were found
    1009       </computeroutput>
    1010       </entry>
    1011     </row>
    1012     <row>
    1013       <entry namest="c1" nameend="c3">
    1014       </entry>
    1015       <entry align="left">
    1016       <simpara>
    1017       Either the value in the objective was too large or a lower bound was
    1018       greater than an upper bound.
    1019       </simpara>
    1020       </entry>
    1021     </row>
    1022     <row>
    1023       <entry align="left">
    1024       6003
    1025       </entry>
    1026       <entry align="center">
    1027       SIMPLEX
    1028       </entry>
    1029       <entry>
    1030       </entry>
    1031       <entry align="left">
    1032       <computeroutput>
    1033       Matrix has %d large values, first at column %d, row %d is %g
    1034       </computeroutput>
    1035       </entry>
    1036     </row>
    1037     <row>
    1038       <entry namest="c1" nameend="c3">
    1039       </entry>
    1040       <entry align="left">
    1041       <simpara>
    1042       Some of the values in matrix are ridiculous.
    1043       </simpara>
    1044       </entry>
    1045     </row>
    1046     <row>
    1047       <entry align="left">
    1048       6004
    1049       </entry>
    1050       <entry align="center">
    1051       SIMPLEX
    1052       </entry>
    1053       <entry>
    1054       </entry>
    1055       <entry align="left">
    1056       <computeroutput>
    1057       Can't get out of loop ...
    1058       </computeroutput>
    1059       </entry>
    1060     </row>
    1061     <row>
    1062       <entry namest="c1" nameend="c3">
    1063       </entry>
    1064       <entry align="left">
    1065       <simpara>
    1066      
    1067       </simpara>
    1068       </entry>
    1069     </row>
    1070   </tbody>
     763      7
     764      </entry>
     765      <entry align="center">
     766      CBC_STRONG
     767      </entry>
     768      <entry>
     769      </entry>
     770      <entry align="left">
     771      <computeroutput>
     772      Strong branching on %d (%d), down %g (%d) up %g (%d) value %g
     773      </computeroutput>
     774      </entry>
     775    </row>
     776    <row>
     777      <entry namest="c1" nameend="c3">
     778      </entry>
     779      <entry align="left">
     780      <simpara>
     781      JJHF
     782      </simpara>
     783      </entry>
     784    </row>
     785    <row>
     786      <entry align="left">
     787      25
     788      </entry>
     789      <entry align="center">
     790      CBC_INTERATE_STRONG
     791      </entry>
     792      <entry>
     793      </entry>
     794      <entry align="left">
     795      <computeroutput>
     796      %d cleanup iterations before strong branching
     797      </computeroutput>
     798      </entry>
     799    </row>
     800    <row>
     801      <entry namest="c1" nameend="c3">
     802      </entry>
     803      <entry align="left">
     804      <simpara>
     805      JJHF
     806      </simpara>
     807      </entry>
     808    </row>
     809   </tbody>
    1071810  </tgroup>
    1072811  </table>
    1073   <para>
    1074   There are also messages available at log level 2 (the most likely useful relate
    1075   to scaling), and will be addressed in a future version of this User Guide.
    1076   </para>
    1077812</chapter>
  • trunk/Docs/moresamples.xml

    r87 r113  
    1212For the latest information on compiling and running these samples, please see
    1313the file <filename>&cbcsamplesdir;INSTALL</filename>.  Most of them can be built
    14 by <programlisting>make DRIVER=name</programlisting> which produces an executable testit.  Below is a list of
     14by <programlisting>make DRIVER=name</programlisting> which produces an executable <filename>testit</filename>.  Below is a list of
    1515some of the most useful sample files with a short description for each file.
    1616</para>
     
    3535        <entry align="left" valign="top">
    3636        This is a CBC &quot;Hello, world&quot; program.  It reads a problem
    37         from an MPS file, and solves the problem.
     37        in MPS file format, and solves the problem.
    3838        </entry>
    3939      </row>
     
    7474        </entry>
    7575        <entry align="left" valign="top">
    76         This sample, shows the use of advanced branching and a use of priorities.
     76        This sample shows the use of advanced branching and a use of priorities.
    7777        It uses <function>CbcCompareUser.cpp</function>
    7878        with corresponding <function>*.hpp</function> files.
  • trunk/Docs/otherclasses.xml

    r87 r113  
    22  <chapter id="otherclasses">
    33  <title>
    4   Other Classes and examples
     4  Other Classes and Examples
    55  </title>
    66  <section id="comparison">
    7   <title>CbcCompare - Comparison methods</title>
    8   <para>
    9   Although the unexplored nodes of the search are organized in a tree, the
    10   order of solution is not predetermined and can be influenced by the user.
    11   Cbc provides a abstract base class CbcCompareBase
    12   and then instances of each.  It is relatively simple for an advanced user to
    13   create new instances and an explanation of an example will be given later.
     7  <title>CbcCompare - Comparison Methods</title>
     8  <para>
     9  The order in which the nodes of the tree are explored is not predetermined and can be influenced by the user.
     10  CBC provides a abstract base class <classname>CbcCompareBase</classname>
     11  and several instances which are described in Table Compare Classes Provided.
    1412  </para>
    1513    <table frame="none">
    16   <title>Compare Classes provided</title>
     14  <title>Compare Classes Provided</title>
    1715    <tgroup cols="2">
    1816    <thead>
     
    2927    <row>
    3028      <entry align="left" valign="top">
    31       CbcCompareDepth
     29      <classname>CbcCompareDepth</classname>
    3230      </entry>
    3331      <entry align="left" valign="top">
     
    3836    <row>
    3937      <entry align="left" valign="top">
    40       CbcCompareObjective
     38      <classname>CbcCompareObjective</classname>
    4139      </entry>
    4240      <entry align="left" valign="top">
     
    4947    <row>
    5048      <entry align="left" valign="top">
    51       CbcCompareDefault
     49      <classname>CbcCompareDefault</classname>
    5250      </entry>
    5351      <entry align="left" valign="top">
     
    5755      solutions found then it will go breadth first (i.e. on objective) unless
    5856      the tree is very large when it will revert to depth first.  Probably
    59       CbcCompareUser described below is better.
    60       </entry>
    61     </row>
    62     <row>
    63       <entry align="left" valign="top">
    64       CbcCompareEstimate
     57      <classname>CbcCompareUser</classname> described below is better.
     58      </entry>
     59    </row>
     60    <row>
     61      <entry align="left" valign="top">
     62      <classname>CbcCompareEstimate</classname>
    6563      </entry>
    6664      <entry align="left" valign="top">
     
    7371  </table>
    7472  <para>
    75   This describes how to build a new comparison class and the reasoning
    76   behind it. This is <filename>CbcCompareUser.hpp</filename> and
    77    <filename>CbcCompareUser.cpp</filename>
    78   (this code can be found in the CBC Samples directory, see
    79   <xref linkend="moreexamples"/>).
    80   The key CbcCompare method is test which returns true if node y is better
    81   than node x.  In this method the user can easily use
     73  It is relatively simple for an advanced user to create new compare class instances.  This describes how to build a new comparison class and the reasoning behind it. This is <filename>CbcCompareUser.hpp</filename> and <filename>CbcCompareUser.cpp</filename> (this code can be found in the CBC Samples directory, see
     74  <xref linkend="moreexamples"/>).  The key <classname>CbcCompare</classname> method is <function>bool test(CbcNode* x, CbcNode* y))</function> which returns true if node <parameter>y</parameter> is better than node <parameter>x</parameter>. In this method the user can easily use the following information available from <classname>CbcModel</classname>.
    8275  <table frame="none">
    83   <title>Information available from CbcModel</title>
     76  <title>Information Available from <classname>CbcNode</classname></title>
    8477    <tgroup cols="2">
    8578    <tbody>
    8679    <row>
    8780      <entry align="left" valign="top">
    88       objectiveValue()
     81      <function>double objectiveValue() const</function>
    8982      </entry>
    9083      <entry align="left" valign="top">
     
    9487    <row>
    9588      <entry align="left" valign="top">
    96       numberUnsatisfied()
     89      <function>int numberUnsatisfied() const</function>
    9790      </entry>
    9891      <entry align="left" valign="top">
    9992      Number of unsatisfied integers (assuming branching
    100       object is an integer - otherwise might be number of unsatsified sets)
    101       </entry>
    102     </row>
    103     <row>
    104       <entry align="left" valign="top">
    105       depth()
    106       </entry>
    107       <entry align="left" valign="top">
    108        depth in tree of node
    109       </entry>
    110     </row>
    111     <row>
    112       <entry align="left" valign="top">
    113       guessedObjectiveValue()
    114       </entry>
    115       if user was setting this (e.g. if using pseudo costs)
    116       <entry align="left" valign="top">
    117       </entry>
    118     </row>
    119     <row>
    120       <entry align="left" valign="top">
    121       way()   
    122       </entry>
    123       <entry align="left" valign="top">
    124        which way would be next from this node
    125        (for more advanced use)
    126       </entry>
    127     </row>
    128     <row>
    129       <entry align="left" valign="top">
    130       variable()
    131       </entry>
    132       <entry align="left" valign="top">
    133        which "variable" would be branched on.
    134        (for more advanced use)
     93      object is an integer - otherwise might be number of unsatsified sets).
     94      </entry>
     95    </row>
     96    <row>
     97      <entry align="left" valign="top">
     98      <function>int depth() const</function>
     99      </entry>
     100      <entry align="left" valign="top">
     101       Depth of the node in the search tree.
     102      </entry>
     103    </row>
     104    <row>
     105      <entry align="left" valign="top">
     106      <function>double guessedObjectiveValue() const</function>
     107      </entry>
     108     <entry align="left" valign="top">
     109     If user was setting this (e.g., if using pseudo costs).
     110      </entry>
     111    </row>
     112    <row>
     113      <entry align="left" valign="top">
     114      <function>int way() const</function>
     115      </entry>
     116      <entry align="left" valign="top">
     117       The way which branching would next occur from this node
     118       (for more advanced use).
     119      </entry>
     120    </row>
     121    <row>
     122      <entry align="left" valign="top">
     123      <function>int variable() const</function>
     124      </entry>
     125      <entry align="left" valign="top">
     126       The branching "variable" (associated with the <classname>CbcBranchingObject</classname> -- for more advanced use).
    135127      </entry>
    136128    </row>
     
    138130  </tgroup>
    139131  </table>
    140   </para>
    141 <para>
    142   There is no information on the state of the tree.  If you wanted you could
    143   keep a pointer to the CbcModel but the way it is meant to work is that
    144   newSolution is called whenever a solution is found and every1000Nodes is
    145   called every 1000 nodes.  When these are called the user can modify the
    146   behavior of test.  Because the model is passed in the user can also do other things
    147   such as changing the maximum time of Branch and Cut once a solution has been found.
     132</para>
    148133
    149 So in CbcCompareUser in Samples
    150 the four items of data are:
    151 1) The number of solutions found so far
    152 2) The size of the tree (number of active nodes)
     134<para>
     135  There is no information on the state of the tree. If you wanted you could
     136  keep a pointer to the <classname>CbcModel</classname> but the way it is meant to work is that
     137  <function>newSolution()</function> is called whenever a solution is found and <function>every1000Nodes()</function> is called every 1000 nodes.  When these are called the user can modify the
     138  behavior of <function>test()</function>.  Because <classname>CbcNode</classname> has a pointer to the model, the user can also do other things such as changing the maximum time of CBC once a solution has been found (e.g., <function>CbcModel::setMaximumSeconds(double value)</function>). In <filename>CbcCompareUser.cpp</filename> in <filename>COIN/Cbc/Samples</filename> four items of data are used.
     139</para>
     140<itemizedlist>
     141  <listitem>
     142  <para>
     1431) The number of solutions found so far
     144  </para>
     145  </listitem>
     146  <listitem>
     147  <para>
     1482) The size of the tree (defined to be the number of active nodes)
     149  </para>
     150  </listitem>
     151  <listitem>
     152  <para>
    1531533) A weight which is initialized to -1.0
     154  </para>
     155  </listitem>
     156  <listitem>
     157  <para>
    1541584) A saved value of weight (for when we set weight back to -1.0 for special reason)
    155 
    156 The full code for test is:
     159  </para>
     160  </listitem>
     161</itemizedlist>
     162<para>
     163The full code for <function>CbcCompareUser::test()</function> is given below.
    157164</para>
    158165  <example>
     
    183190  </example>
    184191<para>
    185 So initially as weight is &lt; 0.0 we are biased towards depth first.  In
    186 fact it prefers y is y has fewer unsatisfied variables - if there is a tie
    187 then it prefers the one with greater depth in tree.
     192Initially, <varname>weight</varname>_ is &lt; 0.0 and we are biased towards depth first.  In
     193fact, the method prefers <parameter>y</parameter> if <parameter>y</parameter> has fewer unsatisfied variables. In the case of a tie, the method prefers the node with the greater depth in tree.
    188194
    189 Once we get a solution newSolution is called.  If it was a solution
    190 achieved by branching we work out how much it cost per unsatisfied integer
    191 variable to go from continuous solution to integer solution.  We then set
    192 the weight to aim at a slightly better solution.  From then on test
    193 returns true if it looks as if y will lead to a better solution than x.
    194 This is done by newSolution
     195Once we get a solution <function>newSolution()</function> is called.  If it was a solution
     196achieved by branching, <!-- how do can you determine that? --> we work out how much it cost per unsatisfied integer
     197variable to go from continuous solution to integer solution.  We then set the weight to aim at a slightly better solution.  From then on the method <function>test()</function> returns true if it looks as if <parameter>y</parameter> will lead to a better solution than <parameter>x</parameter>. This is done by <function>newSolution()</function>.
    195198</para>
    196199  <example>
     
    222225<para>
    223226
    224 But as the search goes on this may be modified.
    225 
    226 If we have done a lot of nodes or got a lot of solutions then weight is
    227 set to 0.0 so we are doing breadth first search.  This can lead to an
    228 enormous tree so if the tree size is >10000 then we go may go back to one biased
    229 towards depth first.  This is done by every1000Nodes.
     227But as the search goes on this <!-- what? is "this"? --> may be modified. If a lot of nodes or got a lot of solutions have been genereated, then <varname>weight_</varname> is set to 0.0 so we are doing breadth-first search.  Breadth-first search can lead to an enormous tree. If the tree size is exceeds 10000, then we may desire to go back to a search biased towards depth first. Changing the behaviour done by the method <function>every1000Nodes</function>.
    230228  </para>
    231229  <example>
     
    259257  </section>
    260258  <section id="heuristics">
    261   <title>CbcHeuristic - heuristic methods</title>
    262   <para>
    263   For practical use it is very useful to be able to get a good solution reasonably fast.
     259  <title>CbcHeuristic - Heuristic Methods</title>
     260  <para>
     261  In practice, it is very useful to get a good solution reasonably fast.
    264262  A good bound will greatly reduce the run time and good solutions can satisfy the user
    265   on very large problems where a complete search is impossible.  Heuristics are obviously
    266   problem dependant although some have more general use.  I hope to increase the number.
    267   At present there is only one in Cbc itself although there are others in the Samples
    268   directory.  The heuristic is trying to obtain a solution to the original
    269   problem so it need only consider original rows and does not have to use the
     263  on very large problems where a complete search is impossible.  Obviously, heuristics are
     264  problem dependent although some have more general use.
     265  At present there is only one in CBC itself. Hopefully, the number of heuristics will grow.
     266  Other hueristics are in the <filename>COIN/Cbc/Samples</filename>
     267  directory.  A heuristic tries to obtain a solution to the original
     268  problem so it only needs to consider the original rows and does not have to use the
    270269  current bounds.
    271270  One to use a greedy heuristic designed for use in the miplib problem
    272   fast0507 will be developed later in this section.
    273   Cbc provides a abstract base class CbcHeuristic and a rounding heuristic in Cbc.
     271  fast0507 will be developed later in this section. <!-- huh? -->
     272  CBC provides an abstract base class <classname>CbcHeuristic</classname> and a rounding heuristic in CBC.
    274273  </para>
    275274  <para>
    276275  This describes how to build a greedy heuristic for a set covering problem.
    277276   A more general version is in <filename>CbcHeuristicGreedy.hpp</filename> and
    278    <filename>CbcHeuristicGreedy.cpp</filename>
    279   (this code can be found in the CBC Samples directory, see
    280   <xref linkend="moreexamples"/>).
     277   <filename>CbcHeuristicGreedy.cpp</filename> which can be found in the <filename>COIN/Cbc/Samples</filename> directory, see <xref linkend="moreexamples"/>.
    281278
    282279  The heuristic we will code will leave all variables which are at one at this node of the
  • trunk/Docs/revhist.xml

    r87 r113  
    44<revhistory>
    55<revision>
     6  <revnumber>0.2</revnumber>
     7  <date>May 2, 2005</date>
     8  <authorinitials>RLH</authorinitials>
     9  <revremark>Book chapter for CBC Tutorial at INFORMS annual meeting 2005. Added CBC Messages. Changed the font type to distinguish functions/variables/classnames/code from text.</revremark>
     10</revision>
     11<revision>
    612  <revnumber>0.1</revnumber>
    7   <date>April 1 2005</date>
     13  <date>April 1, 2005</date>
    814  <authorinitials>JF</authorinitials>
    9   <revremark>First draft</revremark>
     15  <revremark>First draft.</revremark>
    1016</revision>
    1117</revhistory>
Note: See TracChangeset for help on using the changeset viewer.