Ignore:
Timestamp:
May 10, 2005 11:50:47 AM (14 years ago)
Author:
rlh
Message:

typo fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • html/trunk/Cbc/ch04.html

    r557 r558  
    3030                                              double * betterSolution)</tt>.
    3131  The <tt class="function">solution()</tt> method returns 0 if no solution found, and returns 1 if a solution is found, in which case it fills in the objective value and primal solution.  The code in <tt class="filename">CbcHeuristicGreedy.cpp</tt> is a little more complicated than this following example. For instance, the code here assumes all variables are integer.  The important bit of data is a copy of the matrix (stored by column) before any cuts have been made.  The data used are bounds, objective and the matrix plus two work arrays.
    32   </p><div class="example"><a id="id3244936"/><p class="title"><b>Example 4.1. Data</b></p><pre class="programlisting">
     32  </p><div class="example"><a id="id2984053"/><p class="title"><b>Example 4.1. Data</b></p><pre class="programlisting">
    3333   
    3434  OsiSolverInterface * solver = model_-&gt;solver(); // Get solver from CbcModel
     
    5656  </pre></div><p>
    5757The <tt class="varname">newSolution</tt> is then initialized to the rounded down solution.
    58 </p><div class="example"><a id="id3244965"/><p class="title"><b>Example 4.2. Initialize <tt class="varname">newSolution</tt></b></p><pre class="programlisting">
     58</p><div class="example"><a id="id2984082"/><p class="title"><b>Example 4.2. Initialize <tt class="varname">newSolution</tt></b></p><pre class="programlisting">
    5959   
    6060  for (iColumn=0;iColumn&lt;numberColumns;iColumn++) {
     
    8383
    8484At this point some row activities are below their lower bound. To correct the infeasibility, the variable which is cheapest in reducing the sum of infeasibilities is found and updated, and the process repeats.  This is a finite process. (The implementation could be faster, but is kept simple for illustrative purposes.)
    85   </p><div class="example"><a id="id3245045"/><p class="title"><b>Example 4.3. Create Feasible <tt class="varname">newSolution</tt> from Initial <tt class="varname">newSolution</tt></b></p><pre class="programlisting">
     85  </p><div class="example"><a id="id2984162"/><p class="title"><b>Example 4.3. Create Feasible <tt class="varname">newSolution</tt> from Initial <tt class="varname">newSolution</tt></b></p><pre class="programlisting">
    8686   
    8787  while (true) {
     
    130130  </pre></div><p>
    131131A solution value of <tt class="varname">newSolution</tt> is compared to the best solution value. If <tt class="varname">newSolution</tt> is an improvement, its feasibility is validated. We expect <tt class="varname">newSolution</tt> to be feasible, and are trapping for unexpected numerical errors.
    132   </p><div class="example"><a id="id3245090"/><p class="title"><b>Example 4.4. Check Solution Quality of <tt class="varname">newSolution</tt></b></p><pre class="programlisting">
     132  </p><div class="example"><a id="id2984207"/><p class="title"><b>Example 4.4. Check Solution Quality of <tt class="varname">newSolution</tt></b></p><pre class="programlisting">
    133133   
    134134  returnCode=0; // 0 means no good solution
Note: See TracChangeset for help on using the changeset viewer.