<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    What is the difference between QSECTION&nbsp;&nbsp; in your log for
    share2b.mps<br>
    and QUADOBJ&nbsp; needed by -barrier?<br>
    <br>
    Also, Quadratic objectives need more attention to scaling and
    RELATIVE tolerances.<br>
    <a class="moz-txt-link-freetext"
      href="http://en.wikipedia.org/wiki/Relative_change_and_difference">http://en.wikipedia.org/wiki/Relative_change_and_difference</a><br>
    with some kind of tempering near&nbsp; 0 of the expected objective.<br>
    I lean toward a relative denominator of &nbsp;&nbsp; ( 1 + abs(x) + abs(y) )<br>
    The sum abs for big values&nbsp; away from 0 and the 1 so that relative
    becomes absolute difference when the objective gets close to 0.<br>
    <br>
    In the -barrier case&nbsp; i think it goes here:<br>
    earching for: sloppyOptimal&nbsp;&nbsp; it seems to be locally detected<br>
    ClpPredictorCorrector.cpp(212): bool sloppyOptimal = false;<br>
    ClpPredictorCorrector.cpp(275): if (!sloppyOptimal) {<br>
    ClpPredictorCorrector.cpp(361): if (sloppyOptimal) {<br>
    ClpPredictorCorrector.cpp(403): if ((gapO &lt; 1.0e-6 || (gapO &lt;
    1.0e-4 &amp;&amp; complementarityGap_ &lt; 0.1)) &amp;&amp;
    !sloppyOptimal) {<br>
    ClpPredictorCorrector.cpp(404): sloppyOptimal <b>= true;</b><br>
    ClpPredictorCorrector.cpp(417): if (saveIteration &gt;= 0 &amp;&amp;
    sloppyOptimal) {<br>
    <br>
    So if you keep your current scale for the problem you need to tweek
    the block <b>around line 403</b>&nbsp;&nbsp; perhaps the bold block needs
    tweaking by ratio of gap to objective<br>
    &nbsp; say the bold gap0/(primalObjective_ * objScale -
    dblParam_[ClpObjOffset])&nbsp;&nbsp;&nbsp;&nbsp; and same for <b>complementarityGap_</b><br>
    <font size="1"><b>18 Primal -1.3318263e+09 Dual -1.3318263e+09
        Complementarity 40.006314 - 134 fixed, rank 3924&nbsp;&nbsp; </b></font><br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ((gapO &lt; 1.0e-6 ||<b> (gapO &lt; 1.0e-4 &amp;&amp;
      complementarityGap_ &lt; 0.1)) &amp;&amp; !sloppyOptimal)</b> {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sloppyOptimal = true;<br>
    <br>
    &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
    from the log in message V of 11/27/2012 10:50 AM, Stephanie Jakus
    wrote:<br>
    <div><font>I'm using the Clp executable with the barrier method, and
        running into problems where the complementarity value gets small
        and then diverges. I'm wondering if there is an option to change
        the convergence tolerance value for the complementarity when
        using the barrier method. (I see the options for tolerance on
        primal and dual feasibility... but are those enough?)</font></div>
    &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;<br>
    <br>
    I would want to quit around here at iter 18 or 22. The relative
    Complementary is 40/ 10^9&nbsp; which is 8 digits of precision.<br>
    Pretty good when you should expect only 5 to 6 digits after a bunch
    of&nbsp; double precision scalar products on the <font size="1">911766
      elements in sparse Cholesky,<font size="1">.</font></font><font
      size="1">
      <p>16 Primal -1.3318262e+09 Dual -1.3318287e+09 Complementarity
        2519.259 - 76 fixed, rank 3924</p>
      <p>17 Primal -1.3318263e+09 Dual -1.3318263e+09 Complementarity
        40.523345 - 134 fixed, rank 3924</p>
      <p><b>18 Primal -1.3318263e+09 Dual -1.3318263e+09 Complementarity
          40.006314 - 134 fixed, rank 3924</b></p>
      <p>19 Primal -1.3318263e+09 Dual -1.3318264e+09 Complementarity
        39.542777 - 134 fixed, rank 3924</p>
      <p>20 Primal -1.3318263e+09 Dual -1.3318265e+09 Complementarity
        39.128027 - 134 fixed, rank 3924</p>
      <p>21 Primal -1.3318263e+09 Dual -1.3318266e+09 Complementarity
        38.757635 - 134 fixed, rank 3924</p>
      <p><b>22 Primal -1.3318263e+09 Dual -1.3318263e+09 Complementarity
          0.87384878 - 134 fixed, rank 3924</b></p>
      <p>23 Primal -1.3318263e+09 Dual -1.331649e+09 Complementarity
        0.0061784205 - 134 fixed, rank 3924</p>
      <p>24 Primal -1.3318263e+09 Dual -1.3047041e+09 Complementarity
        4.0066434e-05 - 134 fixed, rank 39</p>
    </font><br>
    <br>
    <br>
    <br>
    <br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
    your log<br>
    <br>
    <pre wrap="">Coin0001I At line 1 NAME          SHARE2B
Coin0001I At line 2 ROWS
Coin0001I At line 100 COLUMNS
Coin0001I At line 482 RHS
Coin0001I At line 495 ENDATA
Coin0002I Problem SHARE2B has 96 rows, 79 columns and 694 elements
Coin0001I At line 496 NAME          SHARE2B
<b>Coin0001I At line 497 QSECTION</b>
Coin0001I At line 526 ENDATA</pre>
    My log <br>
    <pre>H:\lpsolve-55\glpk445bin&gt;clp2
Coin LP version 1.14.4, build Nov 10 2011
Clp takes input from arguments ( - switches to stdin)
Enter ? for list of commands or help
Clp:barrier?
barr(ier) : Solve using primal dual predictor corrector algorithm
Clp:barrier??
barr(ier) : Solve using primal dual predictor corrector algorithm
This command solves the current model using the  primal dual predictor
corrector algorithm.  You may want to link in an alternative ordering
and factorization.  It will also solve models with quadratic objectives.
Clp:IMPORT share2qp.mps
At line 1 NAME          SHARE2B
At line 2 ROWS
At line 100 COLUMNS
At line 482 RHS
<big><big><b>At line 495 QUADOBJ</b></big></big>
Problem SHARE2B has 96 rows, 79 columns and 694 elements
At line 524 ENDATA
Model was imported from .\share2qp.mps in 0.002 seconds
Clp:barrier
2928 elements in sparse Cholesky, flop count 89374
0 Primal 1880441 Dual -1.6693328e+008 Complementarity 1.9590728e+008 - 0 
fixed,
rank 271
1 Primal 30581.248 Dual -10443941 Complementarity 26978058 - 0 fixed, 
rank 271
2 Primal 1572.4622 Dual -3087057.1 Complementarity 6108433.1 - 0 fixed, 
rank 271

3 Primal 310.8557 Dual -1459155.3 Complementarity 2507164.8 - 0 fixed, 
rank 271
4 Primal 509.42803 Dual -501381.13 Complementarity 606063.42 - 0 fixed, 
rank 271

5 Primal 967.29319 Dual -105866.26 Complementarity 115919.99 - 0 fixed, 
rank 271

6 Primal 837.84361 Dual -52400.522 Complementarity 57435.819 - 0 fixed, 
rank 271

7 Primal 102.95273 Dual -4147.861 Complementarity 4353.3398 - 0 fixed, 
rank 271
8 Primal -311.19033 Dual -855.93051 Complementarity 551.31766 - 0 fixed, 
rank 27
1
9 Primal -349.04464 Dual -618.45146 Complementarity 275.98936 - 0 fixed, 
rank 27
1
10 Primal -377.72515 Dual -436.0772 Complementarity 59.71886 - 0 fixed, 
rank 271

11 Primal -393.65235 Dual -415.96868 Complementarity 22.998293 - 0 
fixed, rank 2
71
12 Primal -398.79134 Dual -403.89314 Complementarity 5.2467322 - 0 
fixed, rank 2
71
13 Primal -400.18831 Dual -401.99952 Complementarity 1.8687018 - 0 
fixed, rank 2
71
14 Primal -400.83016 Dual -401.04844 Complementarity 0.22457764 - 0 
fixed, rank
271
15 Primal -400.90225 Dual -400.9482 Complementarity 0.045949787 - 13 
fixed, rank
 271
16 Primal -400.9224 Dual -400.92272 Complementarity 0.00031159724 - 13 
fixed, ra
nk 271
17 Primal -400.92254 Dual -400.92254 Complementarity 2.5038999e-006 - 13 
fixed,
rank 271
18 Primal -400.92254 Dual -400.92254 Complementarity 1.7307463e-008 - 50 
fixed,
rank 271
19 Primal -400.92254 Dual -400.92254 Complementarity 1.5460613e-008 - 53 
fixed,
rank 271
Exiting - using solution from iteration 17
At end primal/dual infeasibilities 0/0.078454371, complementarity gap 
1.4091511e
-007, objective -400.92254
Optimal objective -400.9225413 - 19 iterations time 0.102
Clp:
Clp:solu $

optimal
Objective value      -400.92254
      0 010101        0.80133581         1.9143424e-008
      1 010102          1.798893         8.5572461e-009
      6 010107         5.8333333         2.6351614e-009
</pre>
    . . .<br>
    <br>
    William<br>
    <br>
    <div class="moz-cite-prefix">On 3/20/2013 9:46 AM, John Forrest
      wrote:<br>
    </div>
    <blockquote cite="mid:5149CBC1.3030609@fastercoin.com" type="cite">Alex,
      <br>
      <br>
      I modified an example and attach it and solution log.&nbsp; I ran it as
      <br>
      <br>
      &nbsp;testQP2 ../../../Data/Sample/share2qp.mps
      <br>
      <br>
      that should show you how to load a model and a quadratic function.
      With current code constraints are linear.
      <br>
      <br>
      John Forrest
      <br>
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Clp mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Clp@list.coin-or.org">Clp@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/clp">http://list.coin-or.org/mailman/listinfo/clp</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>