<br><font size=2 face="sans-serif">William,</font>
<br>
<br><font size=2 face="sans-serif">Thank you for your comments.</font>
<br>
<br><font size=2 face="sans-serif">Looking for floats in Cbc, Clp, CoinUtils
and some of Cgl &nbsp;I could only find a float defined in ClpSimplex.?pp.
&nbsp;The use there seems safe but I will change in trunk. &nbsp;The FLT_MAX
in CbcfathomDynamicProgramming.cpp is DBL_MAX in trunk (I will change to
COIN_DBL_MAX as that is preferred). &nbsp;Where else did you find floats?</font>
<br>
<br><font size=2 face="sans-serif">As for the matter of many constants,
&nbsp;I plead guilty. &nbsp;I have a tendency to pluck a number from the
air depending on the direction of the wind. &nbsp;Of more concern is that
probably tolerances are not rigorously used e.g. value &lt; tolerance is
not the negation of value &gt; tolerance. &nbsp;However it would probably
take a month or two to clean up the code for this and for double constants
and it would not be very amusing.</font>
<br>
<br><font size=2 face="sans-serif">Anyone willing to volunteer? &nbsp;Somehow
I doubt it.</font>
<br>
<br><font size=2 face="sans-serif">John Forrest</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;William H. Patton&quot;
&lt;pattonwh@comcast.net&gt;</b> </font>
<br><font size=1 face="sans-serif">Sent by: coin-lpsolver-bounces@list.coin-or.org</font>
<p><font size=1 face="sans-serif">10/14/2007 01:51 PM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
pattonwh@comcast.net</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">&lt;coin-lpsolver@list.coin-or.org&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[Coin-lpsolver] Clp and cbc consttants
in code.</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>I am new to cbc. I have just compiled CBC in VS8<br>
Cbc-1.1.0-win32-msvc8.<br>
<br>
I am surprised to see the warnings about implicit conversion of<br>
double to float in Cbc-1.1.0-win32-msvc8. &nbsp;It is clear that floats<br>
are intentionally used. Is the memory used so large as to need<br>
this? If so, I think it would be safer to use a CBC private type<br>
so the assignment overload can pass thru protective code to deal<br>
carefully with the too large exponents. &nbsp;I think particularly<br>
about the 1.0e+100 apparent infinity of clp constants.<br>
CbcBranchActual.cpp(2141): double bestEstimate = 1.0e100;<br>
CbcBranchActual.cpp(2139): double bestCriterion=-1.0e50;<br>
CbcFathomDynamicProgramming.cpp(262):<br>
CoinFillN(cost_,size_,FLT_MAX);<br>
My compiler definitions show range limits as<br>
#define DBL_MAX &nbsp; &nbsp; &nbsp; &nbsp; 1.7976931348623158e+308 /*
max value */<br>
#define FLT_MAX &nbsp; &nbsp; &nbsp; &nbsp; 3.402823466e+38F &nbsp; &nbsp;
&nbsp; &nbsp;/* max value */<br>
<br>
The other source maintenance concern I have is the presence of<br>
many constants in the code. &nbsp;Attached is a list of the nearly 400<br>
instances of doubles that I could find with an easy regex search..<br>
I think good practice calls for these to deserve names so they can<br>
be consistently used. &nbsp;They could be #defined but better for an<br>
API oriented extensible framework, they should have API get and<br>
set access functions<br>
for user tinkering. I think there are about 30 distinct values in<br>
the 400 lines.<br>
<br>
You may have a better search that can find the rest of the not 0<br>
or 1 manifest constants in the code. &nbsp;I see .5, .005. 0.5 swept<br>
along in the attached search<br>
CbcNode.cpp(2402): double upPenalty =<br>
CoinMin(upCost[i],1.0e110)*(1.0-value);<br>
CbcNode.cpp(2403): double downPenalty =<br>
CoinMin(downCost[i],1.0e110)*value;<br>
CbcNode.cpp(2443): sort[iBestGot]=-1.0e120;<br>
CbcBranchCut.cpp(540): if (djTolerance_&lt;1.0e10) {<br>
CbcCompareActual.cpp(278): if (treeSize_*size&gt;5.0e7)<br>
CbcHeuristic.cpp(719): distance = floor(distance+1.05e-8);<br>
assert (lower[iColumn]&gt;-1.0e20);<br>
<br>
I am impressed by the branch and cut performance on the test<br>
problem that brought me to the site. I think the Feasibility Pump<br>
is really quite a neat feature.<br>
<br>
William<br>
<br>
_______________________________________________<br>
Coin-lpsolver mailing list<br>
Coin-lpsolver@list.coin-or.org<br>
http://list.coin-or.org/mailman/listinfo/coin-lpsolver<br>
</font></tt>
<br>