Ignore:
Timestamp:
Oct 17, 2004 6:45:07 PM (16 years ago)
Author:
ddelanu
Message:

Update for INFORMS server, not necessarily release version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Docs/basicmodelclasses.xml

    r443 r479  
    99  </title>
    1010  <para>
    11   The basic model class hierarchy is simple.  The top three levels of the
     11  The basic CLP model class hierarchy is simple.  The top three levels of the
    1212  hierarchy are depicted in the figure below. The first two levels  (i.e.
    1313  <classname>ClpModel</classname>, <classname>ClpSimplex</classname>,
    14   <classname>ClpInterior</classname>) contain all the problem data which defines
    15   a model (aka, a problem instance). The third level is less model and more
    16   algorithmic.  There is a fourth level (for models with more general
    17   objectives than linear ones), but it is beyond the current scope of this
    18   document. 
     14  <classname>ClpInterior</classname>) contain all the problem data which define
     15  a model (that is, a problem instance). The third level contains most of the
     16  algorithmic aspects of CLP.  There is a fourth level (for models with more general
     17  objectives than linear ones), but a description of it is beyond the current scope
     18  of this document.
    1919  </para>
    2020  <mediaobject>
     
    3030    </imageobject>
    3131  </mediaobject>
    32   <para>
    33   The class <classname>ClpModel</classname> contains all problem data.
     32  <!-- Not appropriate here and not entirely correct as worded!
     33  <para>
     34  The class <classname>ClpModel</classname> contains most of the  problem data.
    3435  There may be a few pieces of data which could be elsewhere but which are
    3536  permanent and so they are here.  The main example of this is a status array:
     
    4546  <classname>ClpModel</classname> class.
    4647  </para>
    47   <para>
    48   From the point of view of most Simplex users, the
    49   <classname>ClpModel</classname> and <classname>ClpSimplex</classname>
    50   classes are all one needs to know about.  There are algorithm-specific classes
    51   which inherit from <classname>ClpSimplex</classname> (e.g.
    52   <classname>ClpSimplexDual</classname> and
    53   <classname>ClpSimplexPrimal</classname>), but they have no member data and
    54   very rarely need be visible to the user.  So, for example, after instantiating an
    55   object <userinput>model</userinput> of type <classname>ClpSimplex</classname>,
    56   the user would use <userinput>model.dual()</userinput> to invoke dual algorithm.
     48  -->
     49  <para>
     50  Most Simplex users need only concern themselves with the classes
     51  <classname>ClpModel</classname> and <classname>ClpSimplex</classname>.  There
     52  are algorithm-specific classes which inherit from
     53  <classname>ClpSimplex</classname> (e.g. <classname>ClpSimplexDual</classname>
     54  and <classname>ClpSimplexPrimal</classname>), but they have no member data and
     55  rarely need be visible to the user.  These  classes are cast at algorithm
     56  time.  So, for example, after instantiating an object
     57  <userinput>model</userinput> of type <classname>ClpSimplex</classname>,
     58  a user only need call <userinput>model.dual()</userinput> to invoke the dual
     59  simplex method.
    5760  </para>
    5861  </section>
     
    6265  </title>
    6366  <para>
    64   Below is our first CLP example code.  It is short enough to present in full.
    65   Most of the remaining examples in this Guide will take the form of small code
    66   fragments.
     67  Below is our first CLP sample program.  It is short enough to present in full
     68  (this code can be found in the CLP Samples directory, see
     69  <xref linkend="moreexamples"/>).  Most of the remaining examples in this Guide
     70  will take the form of small code fragments.
    6771  </para>
    6872  <example>
     
    9195  </example>
    9296  <para>
    93   This sample program creates a default <classname>ClpSimplex</classname> model,
     97  This sample program creates a <classname>ClpSimplex</classname> model,
    9498  reads an MPS file, and if there are no errors, solves it using the primal
    95   algorithm.  Simple, but not terribly useful: there is no way to inspect the
    96   results of the solve.  There are two main kinds of results: a status saying
    97   what happened to the model, and arrays filled with the solution values.
     99  algorithm.  The program is easy to follow, but it is not terribly useful:
     100  it does not attempt to inspect the results of the solve.  There are two main
     101  kinds of results: a &quot;status&quot; describing what happened to the model
     102  during the solve, and arrays filled with solution values.  Both will be
     103  addressed in this chapter.
    98104  </para>
    99105  </section>
     
    117123  <function>isIterationLimitReached()</function> or the feared
    118124  <function>isAbandoned()</function>.  Should one prefer the OSL way of doing
    119   things, model.status() returns as it would in OSL-land, so 0 means optimal,
     125  things, model.status() returns as it would in OSL, so 0 means optimal,
    120126  1 means  primal infeasible etc.
    121127  </para>
    122128  <para>
    123   Similarly, to pick up the solution values, we can inhabit the virtuous OSI-land
    124   or the not-quite-so-virtuous CLP-land.  By this it is meant that there are
    125   const and non-const forms of arrays.  It is easier to deal with the non-const
    126   versions, so most of the later elaborate algorithms use them.
    127   </para>
    128 
     129  Similarly, to pick up the solution values, one could inhabit the virtuous
     130  world of OSI, or the not-quite-so-virtuous world of OSL and &quot;pure&quot;
     131  CLP.  By this it is meant that const and non-const forms of arrays are used,
     132  respectively.  It is easier to deal with the non-const versions, so most of
     133  the elaborate algorithms in CLP and its
     134  <link linkend="moresamples">Samples</link> use them.
     135  </para>
    129136  <table frame="none">
    130137  <title>
     
    141148      </entry>
    142149      <entry>
    143       CLP style (less virtuous)
     150      CLP-style (less virtuous)
    144151      </entry>
    145152    </row>
     
    221228  reaction to when one of the authors was young and 5 or 6 letters was the
    222229  maximum in FORTRAN for any name or to early days with OSL when seven characters
    223   were allowed but the first three had to be &quot;EKK&quot;! 
    224   </para>
    225   <para>
    226   Using the above-listed functions, our initial example might be continued as follows:
     230  were allowed but the first three had to be &quot;ekk&quot;! 
     231  </para>
     232  <para>
     233  Using the above-listed functions, our
     234  <link linkend="firstexample">initial example</link> might be continued as follows:
    227235  </para>
    228236  <example>
     
    258266  dual solutions.  How to additionally print row and column names is
    259267  illustrated in the <filename>defaults.cpp</filename> file in the
    260   &quot;Samples&quot; directory (the &quot;Samples&quot; are properly addressed
     268  &quot;Samples&quot; directory (the Samples are properly addressed
    261269  in <xref linkend="moreexamples" />).  This sample is also useful as it
    262270  explicitly performs default actions (e.g. it sets the primal feasiblility
     
    264272  </para>
    265273  <para>
    266   The remainder of this chapter will show some more of the basic tasks a user
    267   might want to perform.  Apart from presolve we will only be looking at actions
     274  The remainder of this chapter will show  more of the basic CLP tasks a user
     275  might wish to perform.  Apart from presolve we will only be looking at actions
    268276  which can be performed when including the single header file
    269277  <filename>COIN/Clp/include/ClpSimplex.hpp</filename>.
Note: See TracChangeset for help on using the changeset viewer.