[Clp] Correction to CoinMP.cpp

Rod Frowd rod at frowd.net
Mon Feb 18 00:33:26 EST 2008


Hi:

I found that the CoinMP.dll did not work when built from source, though 
the downloaded binary dll did.

Upon looking  at the source code I found the problem below, some of the 
real tolerance were being set to zero as the CoinGetIntOption was being 
called instead of the CoinGetRealOption? The built from source dll works 
after this change.

Index: CoinMP.cpp
===================================================================
--- CoinMP.cpp    (revision 53)
+++ CoinMP.cpp    (working copy)
@@ -646,10 +646,10 @@
 
     pCoin->clp->setMaximumIterations(CoinGetIntOption(hProb, 
COIN_INT_MAXITER));
 
-    pCoin->clp->setPrimalObjectiveLimit(CoinGetIntOption(hProb, 
COIN_REAL_PRIMALOBJLIM));
-    pCoin->clp->setDualObjectiveLimit(CoinGetIntOption(hProb, 
COIN_REAL_DUALOBJLIM));
-    pCoin->clp->setPrimalTolerance(CoinGetIntOption(hProb, 
COIN_REAL_PRIMALOBJTOL));
-    pCoin->clp->setDualTolerance(CoinGetIntOption(hProb, 
COIN_REAL_DUALOBJTOL));
+    pCoin->clp->setPrimalObjectiveLimit(CoinGetRealOption(hProb, 
COIN_REAL_PRIMALOBJLIM));
+    pCoin->clp->setDualObjectiveLimit(CoinGetRealOption(hProb, 
COIN_REAL_DUALOBJLIM));
+    pCoin->clp->setPrimalTolerance(CoinGetRealOption(hProb, 
COIN_REAL_PRIMALOBJTOL));
+    pCoin->clp->setDualTolerance(CoinGetRealOption(hProb, 
COIN_REAL_DUALOBJTOL));
 
     /* check if it has been changed, leave alone otherwise */
    ClpPrimalColumnSteepest primalSteepest(CoinGetIntOption(hProb, 
COIN_INT_PRIMALPIVOTALG));
@@ -659,7 +659,7 @@
    pCoin->clp->setDualRowPivotAlgorithm(dualSteepest);
 
     if (CoinGetIntOption(hProb, COIN_INT_CRASHIND)) {
-        pCoin->clp->crash(CoinGetIntOption(hProb, COIN_REAL_CRASHGAP),
+        pCoin->clp->crash(CoinGetRealOption(hProb, COIN_REAL_CRASHGAP),
                                 CoinGetIntOption(hProb, 
COIN_INT_CRASHPIVOT));
     }
     switch (CoinGetIntOption(hProb,COIN_INT_SOLVEMETHOD)) {

Do you want me to check this in? 

Rod Frowd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rod.vcf
Type: text/x-vcard
Size: 302 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20080218/59f6c8c4/attachment.vcf>


More information about the Clp mailing list