Changeset 443


Ignore:
Timestamp:
Sep 16, 2004 8:26:36 AM (15 years ago)
Author:
ddelanu
Message:

Improved and edited -- checking in for backup purposes

Location:
trunk/Docs
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Docs/basicmodelclasses.xml

    r416 r443  
    44  Basic Model Classes
    55  </title>
    6   <section>
     6  <section id="hierarchy">
    77  <title>
    88  Hierarchy
     
    5252  <classname>ClpSimplexDual</classname> and
    5353  <classname>ClpSimplexPrimal</classname>), but they have no member data and
    54   very rarely need be visible to user.  So, for example, after instantiating an
     54  very rarely need be visible to the user.  So, for example, after instantiating an
    5555  object <userinput>model</userinput> of type <classname>ClpSimplex</classname>,
    5656  the user would use <userinput>model.dual()</userinput> to invoke dual algorithm.
    5757  </para>
    5858  </section>
    59   <section>
     59  <section id="firstexample">
    6060  <title>
    6161  First Example
     
    9898  </para>
    9999  </section>
    100   <section>
     100  <section id="gettingsolution">
    101101  <title>
    102102  Getting at the Solution
     
    220220  &quot;num&quot; and &quot;column&quot; over &quot;col&quot;.  This may be a
    221221  reaction to when one of the authors was young and 5 or 6 letters was the
    222   maximum in FORTRAN for any name or to early days with Osl when seven characters
     222  maximum in FORTRAN for any name or to early days with OSL when seven characters
    223223  were allowed but the first three had to be &quot;EKK&quot;! 
    224224  </para>
     
    270270  </para>
    271271  </section>
    272   <section>
     272  <section id="buildandmodify">
    273273  <title>
    274274  Building and Modifying a Model
     
    283283  is 0 or 1 to say integer and we can drop existing information by
    284284  <function>deleteIntegerInformation()</function>.  There are various ways of
    285   changing the size of a model.  The simplest is
     285  changing the size of a model.  The simplest is by the use of the method
    286286  <function>resize(newNumberRows,newNumberColumns)</function> - this will either
    287   truncate model or add default rows or columns - a default row has lower bound
    288   of -infinity and upper bound of +infinity, while a default column has zero cost,
    289   zero lower bound and an upper bound of +infinity.
     287  truncate the model or add &quot;default&quot; rows or columns - a default row
     288  has lower bound of -infinity and upper bound of +infinity, while a default
     289  column has zero cost, zero lower bound and an upper bound of +infinity.
    290290  </para>
    291291  <para>
    292292  Normally we would use <function>deleteRows</function>,
    293293  <function>addRows</function>, <function>deleteColumns</function> and
    294   <function>addColumns</function>, where the add ones will also add in the
    295   elements.  A potentially very useful way of modifying a model is strictly a
     294  <function>addColumns</function>, where the <function>add</function> methods
     295  will also add in the elements.  A potentially very useful way of modifying a model is strictly a
    296296  constructor.  Given a large model and a list of rows and a list of columns it
    297297  constructs the model as a subset of the large model.  It is possible to change
     
    303303  </para>
    304304  </section>
    305   <section>
     305  <section id="tolerances">
    306306  <title>Tolerances</title>
    307307  <para>
     
    321321  </para>
    322322  </section>
    323   <section>
     323  <section id="setsandgets">
    324324  <title>Some Useful Set and Get Methods</title>
    325325  <table frame="none">
     
    433433  </table>
    434434  </section>
    435   <section>
     435  <section id="simplexspecific">
    436436  <title>
    437437  Simplex-specific Methods
     
    618618  </para>
    619619  </section>
    620   <section>
     620  <section id="statusarray">
    621621  <title>Status Array</title>
    622622  <para>
  • trunk/Docs/clpexe.xml

    r417 r443  
    44  The CLP Executable
    55  </title>
     6  <section>
     7  <title>Quick Start</title>
    68  <para>
    79  The result of <userinput>make unitTest</userinput> (executed in
    810  <filename>COIN/Clp</filename>) is an executable
    911  <filename>clp</filename> as well as the CLP and COIN libraries.
    10   This can be used to do various unit tests, but can also be used as a standalone
    11   solver.  As it only has a very simple solution file format the user may wish to
    12   modify that part of <filename>COIN/Clp/Test/ClpMain.cpp</filename> and even
    13   offer the modifications as contribution to CLP.
     12  The executable can be used to perform various unit tests, but can also be used
     13  as a standalone solver.  As the executable has a very simple solution file format,
     14  the user may wish to modify <filename>COIN/Clp/Test/ClpMain.cpp</filename>,
     15  which contains the source of the executable (modifications could even be
     16  offered as a contribution to CLP).
    1417  </para>
    1518  <para>
    1619  The <filename>clp</filename> executable operates in command line mode or
    17   prompted mode.  Entering <userinput>clp</userinput> will bring being &quot;prompt
    18   mode&quot;, while <userinput>clp &lt;filename&gt;</userinput> will import an MPS file
    19   from filename and solve it using the dual simplex method and exit.  Again
    20   <userinput>clp &lt;filename&gt; -primalsimplex</userinput> will import a file
    21   and solve using the primal simplex method.  A dash
    22   (&quot;<userinput>-</userinput>&quot;) by itself changes to prompt mode.  In
    23   command line mode &quot;<userinput>-</userinput>&quot; is needed (apart from
    24   first parameter which is taken as file name).  So the following are equivalent
    25   and maximize a problem using dual and write a solution to file
     20  prompted mode.  Entering <userinput>clp</userinput> will invoke the prompted
     21  mode, while <userinput>clp &lt;filename&gt;</userinput> will import a problem
     22  in MPS format from <filename>filename</filename>, solve it using the dual
     23  simplex method and exit. The command
     24  <userinput>clp &lt;filename&gt; -primalsimplex</userinput> instructs the
     25  executable tp import a file and solve using the primal simplex method.  An
     26  additional solitary dash (&quot;<userinput>-</userinput>&quot;) starts the
     27  prompt mode once the execution of the initial command has been completed.  The
     28  &quot;<userinput>-</userinput>&quot; is necessary as part of the command;
     29  invoking prompt mode as a separate command will result in the loss of problem
     30  information related to the initial command.  So, the following sequences of commands
     31  are equivalent in the sense that both maximize a problem using the dual
     32  simplex method and write a solution to file:
    2633  <filename>solfile</filename>:
    2734  <blockquote>
    2835    <literallayout>
    29     <prompt>$</prompt> <userinput>clp <replaceable>filename</replaceable> -maximize -dualsimplex -solution solfile</userinput>
     36    <prompt>$</prompt> <userinput><command>clp</command> <replaceable>filename</replaceable> -maximize -dualsimplex -solution solfile</userinput>
    3037    </literallayout>
    3138  </blockquote>
    3239  <blockquote>
    3340    <literallayout>
    34     <prompt>$</prompt> <userinput>clp <replaceable>filename</replaceable> -maximize -</userinput>
    35     <prompt>Clp:</prompt><userinput>duals</userinput>
    36     <prompt>Clp:</prompt><userinput>solution solfile</userinput>
    37     <prompt>Clp:</prompt><userinput>quit</userinput>
     41    <prompt>$</prompt> <userinput><command>clp</command> <replaceable>filename</replaceable> -maximize -</userinput>
     42    <prompt>Clp:</prompt><userinput><command>duals</command></userinput>
     43    <prompt>Clp:</prompt><userinput><command>solution</command> solfile</userinput>
     44    <prompt>Clp:</prompt><userinput><command>quit</command></userinput>
    3845    </literallayout>
    3946  </blockquote>
    4047  </para>
    4148  <para>
    42   The executable has some command-completion functionality as well as some inline
     49  The executable is at a very early stage of development.  Comments and
     50  suggestions would be appreciated.
     51  </para>
     52  </section>
     53  <section>
     54  <title>
     55  Online Help and Basic Usage
     56  </title>
     57  <para>
     58  The executable has some command-completion functionality as well as some online
    4359  help.  Below is a table with some examples which summarize these capabilities.
    4460  </para>
     
    97113  <para>
    98114  In addition, matching a name without a ? will either execute the command or give
    99   the value of the corresponding parameter.  So,
    100   <command>primalweight</command> will give the current value of  the
    101   primalWeight parameter while <command>primalw 1.0e7</command> will change
    102   it to 1.0e7.
    103   </para>
    104   <para>
    105   The executable is at a very early stage and comments will graciously
    106   welcomed.
    107   </para>
     115  the value of the corresponding parameter as follows:
     116  <userinput><command>primalw</command></userinput> will give the current value of  the
     117  <parameter>primalWeight</parameter> parameter while
     118  <userinput><command>primalw 1.0e7</command></userinput> will change it to
     119  <literal>1.0e7</literal>.
     120  </para>
     121  </section>
     122  <section>
     123  <title>A Sample Session</title>
     124  <para>
     125  Below is a sample CLP executable prompt-mode session.  A small problem is
     126  loaded and solved under various conditions with the primal and dual
     127  simplex methods.  Note the use of the <command>allslack</command> command; it
     128  sets the basis to all slacks and resets the solution.
     129  </para>
     130  <para>
     131    <screen>
     132    <prompt>$</prompt><command>clp</command>
     133    Coin LP version 0.99.9, build Sep 14 2004
     134    Clp takes input from arguments ( - switches to stdin)
     135    Enter ? for list of commands or help
     136    <prompt>Clp:</prompt><userinput><command>import</command><filename>../Mps/Sample/p0033.mps</filename></userinput>
     137    At line 15 NAME          P0033
     138    At line 16 ROWS
     139    At line 34 COLUMNS
     140    At line 109 RHS
     141    At line 118 BOUNDS
     142    At line 152 ENDATA
     143    Problem P0033 has 16 rows, 33 columns and 98 elements
     144    Model was imported from ./../Mps/Sample/p0033.mps in 0 seconds
     145    <prompt>Clp:</prompt><userinput><command>primals</command></userinput>
     146    Presolve 15 (-1) rows, 32 (-1) columns and 97 (-1) elements
     147    0  Obj 0 Primal inf 27.2175 (10) Dual inf 6.42094e+11 (32)
     148    32  Obj 2520.57
     149    Optimal - objective value 2520.57
     150    After Postsolve, objective 2520.57, infeasibilities - dual 0 (0), primal 0 (0)
     151    Optimal objective 2520.571739 - 32 iterations time 0.012, Presolve 0.01
     152    <prompt>Clp:</prompt><userinput><command>max</command></userinput>
     153    <prompt>Clp:</prompt><userinput><command>primals</command></userinput>
     154    Presolve 11 (-5) rows, 25 (-8) columns and 84 (-14) elements
     155    0  Obj 4807.92 Dual inf 1700.71 (15)
     156    End of values pass after 2 iterations
     157    2  Obj 4921.7 Dual inf 580.637 (5)
     158    9  Obj 5299.7
     159    Optimal - objective value 5299.7
     160    After Postsolve, objective 5299.7, infeasibilities - dual 643.608 (9), primal 27.0826 (10)
     161    Presolved model was optimal, full model needs cleaning up
     162    0  Obj 5299.7
     163    0  Obj 5299.7
     164    Optimal - objective value 5299.7
     165    Optimal objective 5299.698868 - 9 iterations time 0.022, Presolve 0.02
     166    <prompt>Clp:</prompt><userinput><command>allslack</command></userinput>
     167    <prompt>Clp:</prompt><userinput><command>duals</command></userinput>
     168    Presolve 11 (-5) rows, 25 (-8) columns and 84 (-14) elements
     169    0  Obj 2752 Primal inf 24.4867 (6) Dual inf 4280.55 (25)
     170    8  Obj 5299.7
     171    Optimal - objective value 5299.7
     172    After Postsolve, objective 5299.7, infeasibilities - dual 704.58 (8), primal 27.0792 (10)
     173    Presolved model was optimal, full model needs cleaning up
     174    0  Obj 5299.7
     175    0  Obj 5299.7
     176    Optimal - objective value 5299.7
     177    Optimal objective 5299.698868 - 8 iterations time 0.032, Presolve 0.01
     178    <prompt>Clp:</prompt><userinput><command>min</command></userinput>
     179    <prompt>Clp:</prompt><userinput><command>duals</command></userinput>
     180    Presolve 15 (-1) rows, 32 (-1) columns and 97 (-1) elements
     181    0  Obj 5299.7 Dual inf 4632.26 (28)
     182    16  Obj 2520.57
     183    Optimal - objective value 2520.57
     184    After Postsolve, objective 2520.57, infeasibilities - dual 2052.5 (13), primal 27.1143 (10)
     185    Presolved model was optimal, full model needs cleaning up
     186    0  Obj 2520.57
     187    0  Obj 2520.57
     188    Optimal - objective value 2520.57
     189    Optimal objective 2520.571739 - 16 iterations time 0.012, Presolve 0.01
     190    <prompt>Clp:</prompt><userinput><command>allslack</command></userinput>
     191    <prompt>Clp:</prompt><userinput><command>presolve off</command></userinput>
     192    <prompt>Clp:</prompt><userinput><command>primals</command></userinput>
     193    0  Obj 0 Primal inf 27.2175 (10) Dual inf 6.39167e+11 (32)
     194    32  Obj 2520.57
     195    Optimal - objective value 2520.57
     196    Optimal objective 2520.571739 - 32 iterations time 0.002
     197    <prompt>Clp:</prompt><userinput><command>allslack</command></userinput>
     198    <prompt>Clp:</prompt><userinput><command>maxIt</command> 10</userinput>
     199    maxIterations was changed from 99999999 to 10
     200    <prompt>Clp:</prompt><userinput><command>primals</command></userinput>
     201    0  Obj 0 Primal inf 27.2175 (10) Dual inf 6.39167e+11 (32)
     202    Stopped - objective value 4.24664e+10
     203    Stopped objective 4.246637759e+10 - 10 iterations time 0.002
     204    <prompt>Clp:</prompt><userinput><command>quit</command></userinput>
     205    </screen>
     206  </para> 
     207  </section>
    108208</chapter>
  • trunk/Docs/clpuserguide.xml

    r418 r443  
    1414  <!ENTITY doxygen SYSTEM "doxygen.xml">
    1515  <!ENTITY revhist SYSTEM "revhist.xml">
     16
     17  <!ENTITY cvsweb "http://www-124.ibm.com/developerworks/opensource/cvs/coin/">
     18  <!ENTITY clpsamplesdir "COIN/Clp/Samples/">
    1619]>
    1720<book id="clpuserguide" lang="en">
  • trunk/Docs/intro.xml

    r419 r443  
    33  <title>
    44    Introduction
     5  </title>
     6  <section>
     7  <title>
     8  Welcome to CLP!
    59  </title>
    610  <para>
     
    1822  <filename>COIN/Clp/include</filename>) are the ultimate reference.
    1923  </para>
     24  </section>
     25  <section>
     26  <title>
     27  Prerequisites
     28  </title>
     29  <para>
     30  CLP is written in C++, so it is expected that a user of CLP will be writing
     31  C++ programs which use CLP.  Thus a working knowledge of
     32  <ulink url="http://www.cplusplus.com/doc/tutorial/">C++</ulink>, including basic
     33  object-oriented programming terminology is assumed in this document.  In
     34  addition, the user should be familiar with the fundamental concepts of
     35  <ulink url="http://carbon.cudenver.edu/~hgreenbe/courseware/LPshort/intro.html">
     36  Linear Programming</ulink>.
     37  </para>
     38  </section>
    2039  </chapter>
  • trunk/Docs/moresamples.xml

    r412 r443  
    44More Samples
    55</title>
     6<section>
     7<title>CLP's Samples Directory</title>
    68<para>
    7 CLP includes a number of <filename>.cpp</filename> sample files.  They can be
    8 found in the <filename>COIN/Clp/Samples</filename> directory.  Below is a table
    9 listing some of the sample files with a short description for each.
     9The CLP dsitribution includes a number of <filename>.cpp</filename> sample files.
     10Users are encouraged to use them as starting points for their own CLP projects.
     11The files can be found in the <filename>COIN/Clp/Samples</filename> directory.
     12For the latest information on compiling and running these samples, please see
     13the file <filename>COIN/Clp/Samples/INSTALL</filename>.  Below is a list of
     14some of the most useful sample files with a short description for each file.
    1015</para>
    1116<table frame="none">
     
    2530      <row>
    2631        <entry align="left" valign="top">
    27         <filename>minimum.cpp</filename>
     32        <ulink url="&cvsweb;&clpsamplesdir;minimum.cpp"><filename>minimum.cpp</filename></ulink>
    2833        </entry>
    2934        <entry align="left" valign="top">
    30         This is a CLP &lt;Hello, world&gt; program.  It reads an MPS file, and
    31         solves the problem.
     35        This is a CLP &quot;Hello, world&quot; program.  It reads an MPS file,
     36        and solves the problem.
    3237        </entry>
    3338      </row>
    3439      <row>
    3540        <entry align="left" valign="top">
    36         <filename>defaults.cpp</filename>
     41        <ulink url="&cvsweb;&clpsamplesdir;defaults.cpp"><filename>defaults.cpp</filename></ulink>
    3742        </entry>
    3843        <entry align="left" valign="top">
    39         This is one of the simpler drivers.  It sets tolerances to defaults and
    40         is a useful place to find simple use of &quot;sets&quot; and
    41         &quot;gets&quot;.  It also prints out a full MPS-like solutions.
     44        This is one of the simpler driver programs available.  It sets
     45        tolerances to defaults and is a good place to find straightforward uses
     46        of &quot;set&quot; and  &quot;get&quot; methods.  It also prints out full
     47        MPS-like solutions.
    4248        </entry>
    4349      </row>
    4450      <row>
    4551        <entry align="left" valign="top">
    46         <filename>driver.cpp</filename>
     52        <ulink url="&cvsweb;&clpsamplesdir;driver.cpp"><filename>driver.cpp</filename></ulink>
    4753        </entry>
    4854        <entry align="left" valign="top">
    49         This is designed to be the file that people modify to get a useful
    50         driver.  It does presolve.
     55        This is designed to be a file that a user could modify to get a useful
     56        driver program for his or her project.  In particular, it demonstrates
     57        the use of CLP's  presolve functionality.
    5158        </entry>
    5259      </row>
    5360      <row>
    5461        <entry align="left" valign="top">
    55         <filename>piece.cpp</filename>
     62        <ulink url="&cvsweb;&clpsamplesdir;piece.cpp"><filename>piece.cpp</filename></ulink>
    5663        </entry>
    5764        <entry align="left" valign="top">
     
    6471      <row>
    6572        <entry align="left" valign="top">
    66         <filename>network.cpp</filename>
     73        <ulink url="&cvsweb;&clpsamplesdir;network.cpp"><filename>network.cpp</filename></ulink>
    6774        </entry>
    6875        <entry align="left" valign="top">
     
    7380      <row>
    7481        <entry align="left" valign="top">
    75         <filename>decompose.cpp</filename>
     82        <ulink url="&cvsweb;&clpsamplesdir;decompose.cpp"><filename>decompose.cpp</filename></ulink>
    7683        </entry>
    7784        <entry align="left" valign="top">
     
    8289      <row>
    8390        <entry align="left" valign="top">
    84         <filename>sprint.cpp</filename>
     91        <ulink url="&cvsweb;&clpsamplesdir;sprint.cpp"><filename>sprint.cpp</filename></ulink>
    8592        </entry>
    8693        <entry align="left" valign="top">
     
    94101      <row>
    95102        <entry align="left" valign="top">
    96         <filename>sprint2.cpp</filename>
     103        <ulink url="&cvsweb;&clpsamplesdir;sprint2.cpp"><filename>sprint2.cpp</filename></ulink>
    97104        </entry>
    98105        <entry align="left" valign="top">
     
    107114  </tgroup>
    108115</table>
     116</section>
     117<section>
     118<title>Common CLP Tasks in the Samples</title>
     119<para>
     120Below is a listing of a number of common CLP tasks, such as loading a problem
     121from an MPS file, matched with a list of each Sample file which illustrates the
     122performance of a given task.
     123</para>
     124<table frame="none">
     125  <title>Contents of the Samples directory</title>
     126  <tgroup cols="3">
     127    <thead>
     128      <row>
     129        <entry align="left" valign="bottom">
     130        CLP Task&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     131        </entry>
     132        <entry>
     133        Method(s)
     134        </entry>
     135        <entry align="left" valign="bottom">
     136        Sample(s)
     137        </entry>
     138      </row>
     139    </thead>
     140    <tbody>
     141      <row>
     142        <entry>
     143        Read problem from MPS file
     144        </entry>
     145        <entry>
     146        readMps
     147        </entry>
     148        <entry>
     149       
     150        </entry>
     151      </row>
     152      <row>
     153        <entry>
     154       
     155        </entry>
     156        <entry>
     157       
     158        </entry>
     159        <entry>
     160       
     161        </entry>
     162      </row>
     163    </tbody>
     164  </tgroup>
     165</table>
     166
     167</section>
    109168</chapter>
Note: See TracChangeset for help on using the changeset viewer.