<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Here is a 2007 note related to this. I do not know where to find it
in the archives any more. Willaim<br>
<br>
<font face="sans-serif" size="2">William,</font>
<br>
<br>
<font face="sans-serif" size="2">Thank you for your comments.</font>
<br>
<br>
<font face="sans-serif" size="2">Looking for floats in Cbc, Clp,
CoinUtils
and some of Cgl I could only find a float defined in
ClpSimplex.?pp.
The use there seems safe but I will change in trunk. The FLT_MAX
in CbcfathomDynamicProgramming.cpp is DBL_MAX in trunk (I will
change to
COIN_DBL_MAX as that is preferred). Where else did you find
floats?</font>
<br>
<br>
<font face="sans-serif" size="2">As for the matter of many
constants,
I plead guilty. I have a tendency to pluck a number from the
air depending on the direction of the wind. Of more concern is
that
probably tolerances are not rigorously used e.g. value <
tolerance is
not the negation of value > tolerance. 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 face="sans-serif" size="2">Anyone willing to volunteer?
Somehow
I doubt it.</font>
<br>
<br>
<font face="sans-serif" size="2">John Forrest</font>
<br>
<br>
<br>
<table width="100%">
<tbody>
<tr valign="top">
<td width="40%"><font face="sans-serif" size="1"><b>"William
H. Patton"
<a class="moz-txt-link-rfc2396E" href="mailto:pattonwh@comcast.net"><pattonwh@comcast.net></a></b> </font>
<br>
<font face="sans-serif" size="1">Sent by:
<a class="moz-txt-link-abbreviated" href="mailto:coin-lpsolver-bounces@list.coin-or.org">coin-lpsolver-bounces@list.coin-or.org</a></font>
<p><font face="sans-serif" size="1">10/14/2007 01:51 PM</font>
</p>
<table border="">
<tbody>
<tr valign="top">
<td bgcolor="white">
<div align="center"><font face="sans-serif" size="1">Please
respond to<br>
<a class="moz-txt-link-abbreviated" href="mailto:pattonwh@comcast.net">pattonwh@comcast.net</a></font></div>
</td>
</tr>
</tbody>
</table>
<br>
</td>
<td width="59%">
<table width="100%">
<tbody>
<tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">To</font></div>
</td>
<td><font face="sans-serif" size="1"><a class="moz-txt-link-rfc2396E" href="mailto:coin-lpsolver@list.coin-or.org"><coin-lpsolver@list.coin-or.org></a></font>
</td>
</tr>
<tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">cc</font></div>
</td>
<td>
<br>
</td>
</tr>
<tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">Subject</font></div>
</td>
<td><font face="sans-serif" size="1">[Coin-lpsolver]
Clp and cbc consttants
in code.</font></td>
</tr>
</tbody>
</table>
<br>
<table>
<tbody>
<tr valign="top">
<td>
<br>
</td>
<td><br>
</td>
</tr>
</tbody>
</table>
<br>
</td>
</tr>
</tbody>
</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. 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. 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 1.7976931348623158e+308 /*
max value */<br>
#define FLT_MAX 3.402823466e+38F
/* max value */<br>
<br>
The other source maintenance concern I have is the presence of<br>
many constants in the code. 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. 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. 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_<1.0e10) {<br>
CbcCompareActual.cpp(278): if (treeSize_*size>5.0e7)<br>
CbcHeuristic.cpp(719): distance = floor(distance+1.05e-8);<br>
assert (lower[iColumn]>-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>
<a class="moz-txt-link-abbreviated" href="mailto:Coin-lpsolver@list.coin-or.org">Coin-lpsolver@list.coin-or.org</a><br>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/coin-lpsolver">http://list.coin-or.org/mailman/listinfo/coin-lpsolver</a><br>
</font></tt>
<br>
<br>
<br>
<br>
<br>
On 11/14/2011 1:06 PM, Miles Lubin wrote:
<blockquote cite="mid:4EC166D2.2030100@gmail.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<style>body p { margin-bottom: 0cm; margin-top: 0pt; } </style> Hi
József,<br>
<br>
These values are usually initialized in constructors. You should
find these tolerances near the beginning of ClpSimplex.cpp. It
might be worthwhile to also search the source code for where they
are used in order to make sure that they have the meaning that you
think they have.<br>
<br>
Miles<br>
<br>
On 11/14/11 10:51 AM, József Smidla wrote:
<blockquote
cite="mid:CAKRq_GwZyJ3O92iu7at5WbsK0H5eZWD4Yk8TMk5=1MdWNkcQ_Q@mail.gmail.com"
type="cite">
<pre wrap="">Hello!
I would like to know, where can I found the values of different
tolerance levels, like optimality tolerance, feasibility tolerance,
etc. in Clp. I have found a header file which contains declaration of
this variables, but I need the concrete values.
József Smidla
_______________________________________________
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>
<p><br>
</p>
<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>
</body>
</html>