<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">William,<br>
<br>
a) QSECTION was an alternative format. I used it as example used
it and it separates out the model loading actions.<br>
<br>
On accuracy, I will send you modified code for comments.<br>
<br>
I do not have any difficult quadratic problems. Can someone send
me a problem where it would help to modify exit criterion?<br>
<br>
John<br>
<br>
<br>
On 21/03/13 16:40, William H. Patton wrote:<br>
</div>
<blockquote cite="mid:514B3807.7010800@comcast.net" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
What is the difference between QSECTION in your log for
share2b.mps<br>
and QUADOBJ needed by -barrier?<br>
<br>
Also, Quadratic objectives need more attention to scaling and
RELATIVE tolerances.<br>
<a moz-do-not-send="true" 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 0 of the expected objective.<br>
I lean toward a relative denominator of ( 1 + abs(x) + abs(y) )<br>
The sum abs for big values 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 i think it goes here:<br>
earching for: sloppyOptimal 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 < 1.0e-6 || (gapO
< 1.0e-4 && complementarityGap_ < 0.1)) &&
!sloppyOptimal) {<br>
ClpPredictorCorrector.cpp(404): sloppyOptimal <b>= true;</b><br>
ClpPredictorCorrector.cpp(417): if (saveIteration >= 0
&& sloppyOptimal) {<br>
<br>
So if you keep your current scale for the problem you need to
tweek the block <b>around line 403</b> perhaps the bold block
needs tweaking by ratio of gap to objective<br>
say the bold gap0/(primalObjective_ * objScale -
dblParam_[ClpObjOffset]) 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 </b></font><br>
if ((gapO < 1.0e-6 ||<b> (gapO < 1.0e-4 &&
complementarityGap_ < 0.1)) && !sloppyOptimal)</b> {<br>
sloppyOptimal = true;<br>
<br>
>>>>>>>>>><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>
<<<<<<<<<<<br>
<br>
I would want to quit around here at iter 18 or 22. The relative
Complementary is 40/ 10^9 which is 8 digits of precision.<br>
Pretty good when you should expect only 5 to 6 digits after a
bunch of 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>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><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>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. I ran it
as <br>
<br>
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 moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Clp@list.coin-or.org">Clp@list.coin-or.org</a>
<a moz-do-not-send="true" 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>
</blockquote>
<br>
</body>
</html>