Changeset 317


Ignore:
Timestamp:
Nov 11, 2009 2:36:14 PM (10 years ago)
Author:
bjarni
Message:

Fixes option parameter calls and add MipFracGap? option from 1.4 to trunk

Location:
trunk/CoinMP/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CoinMP/src/CoinMP.cpp

    r316 r317  
    13681368        if (CoinGetOptionChanged(hProb, COIN_INT_PERTURBATION))         pCoin->clp->setPerturbation(CoinGetIntOption(hProb, COIN_INT_PERTURBATION));
    13691369
     1370        if (CoinGetOptionChanged(hProb, COIN_REAL_MAXSECONDS))          pCoin->clp->setMaximumSeconds(CoinGetIntOption(hProb, COIN_REAL_MAXSECONDS));
    13701371        if (CoinGetOptionChanged(hProb, COIN_INT_MAXITER))                      pCoin->clp->setMaximumIterations(CoinGetIntOption(hProb, COIN_INT_MAXITER));
    13711372
    1372         if (CoinGetOptionChanged(hProb, COIN_REAL_PRIMALOBJLIM))        pCoin->clp->setPrimalObjectiveLimit(CoinGetIntOption(hProb, COIN_REAL_PRIMALOBJLIM));
    1373         if (CoinGetOptionChanged(hProb, COIN_REAL_DUALOBJLIM))          pCoin->clp->setDualObjectiveLimit(CoinGetIntOption(hProb, COIN_REAL_DUALOBJLIM));
    1374         if (CoinGetOptionChanged(hProb, COIN_REAL_PRIMALOBJTOL))        pCoin->clp->setPrimalTolerance(CoinGetIntOption(hProb, COIN_REAL_PRIMALOBJTOL));
    1375         if (CoinGetOptionChanged(hProb, COIN_REAL_DUALOBJTOL))          pCoin->clp->setDualTolerance(CoinGetIntOption(hProb, COIN_REAL_DUALOBJTOL));
     1373        if (CoinGetOptionChanged(hProb, COIN_REAL_PRIMALOBJLIM))        pCoin->clp->setPrimalObjectiveLimit(CoinGetRealOption(hProb, COIN_REAL_PRIMALOBJLIM));
     1374        if (CoinGetOptionChanged(hProb, COIN_REAL_DUALOBJLIM))          pCoin->clp->setDualObjectiveLimit(CoinGetRealOption(hProb, COIN_REAL_DUALOBJLIM));
     1375        if (CoinGetOptionChanged(hProb, COIN_REAL_PRIMALOBJTOL))        pCoin->clp->setPrimalTolerance(CoinGetRealOption(hProb, COIN_REAL_PRIMALOBJTOL));
     1376        if (CoinGetOptionChanged(hProb, COIN_REAL_DUALOBJTOL))          pCoin->clp->setDualTolerance(CoinGetRealOption(hProb, COIN_REAL_DUALOBJTOL));
    13761377
    13771378        if (CoinGetOptionChanged(hProb, COIN_INT_PRIMALPIVOTALG)) {
     
    13871388        if (CoinGetOptionChanged(hProb, COIN_INT_CRASHIND)) {
    13881389                if (CoinGetIntOption(hProb, COIN_INT_CRASHIND)) {
    1389                         pCoin->clp->crash(CoinGetIntOption(hProb, COIN_REAL_CRASHGAP),
     1390                        pCoin->clp->crash(CoinGetRealOption(hProb, COIN_REAL_CRASHGAP),
    13901391                                                                CoinGetIntOption(hProb, COIN_INT_CRASHPIVOT));
    13911392                }
     
    14441445        if (CoinGetOptionChanged(hProb, COIN_REAL_MIPCUTOFF))           pCoin->cbc->setDblParam(CbcModel::CbcCutoffIncrement,CoinGetRealOption(hProb, COIN_REAL_MIPCUTOFF));
    14451446        if (CoinGetOptionChanged(hProb, COIN_REAL_MIPABSGAP))           pCoin->cbc->setAllowableGap(CoinGetRealOption(hProb, COIN_REAL_MIPABSGAP));
     1447        if (CoinGetOptionChanged(hProb, COIN_REAL_MIPFRACGAP))          pCoin->cbc->setAllowableFractionGap(CoinGetRealOption(hProb, COIN_REAL_MIPFRACGAP));
    14461448        return 1;
    14471449}
     
    15591561#ifdef NEW_STYLE_CBCMAIN
    15601562                if (CoinGetIntOption(hProb, COIN_INT_MIPUSECBCMAIN)) {
    1561                         //coinSetClpOptions(hProb);
    1562                         //coinSetCbcOptions(hProb);
     1563                        if (!pCoin->CbcMain0Already) {
     1564                                CbcMain0(*pCoin->cbc);
     1565                                pCoin->CbcMain0Already = 1;
     1566                        }
     1567                        coinSetClpOptions(hProb);
     1568                        coinSetCbcOptions(hProb);
    15631569                        //coinSetCglOptions(hProb);  BK: CbcMain1 should be calling the Cgl's automatically
    15641570                        CbcOrClpRead_mode = 1;  // BK: Fix bug in CbcMain1, CbcOrClpRead_mode not initialized  (CpcSolver.cpp, stable 2.2)
     
    18621868
    18631869
    1864 #define OPTIONCOUNT    67
     1870#define OPTIONCOUNT    68
    18651871
    18661872
     
    19121918          "MipCutoffIncrement",     "MipCutIncr",   GRP_MIPTOL,      1e-5,     1e-5,    0.0,     1.0,  OPT_REAL,   0,   COIN_REAL_MIPCUTOFF,
    19131919          "MipAllowableGap",        "MipAbsGap",    GRP_MIPTOL,     1e-10,    1e-10,    0.0, MAXREAL,  OPT_REAL,   0,   COIN_REAL_MIPABSGAP,
     1920          "MipFractionalGap",       "MipFracGap",   GRP_MIPTOL,     1e-10,    1e-10,    0.0,     1.0,  OPT_REAL,   0,   COIN_REAL_MIPFRACGAP,
    19141921
    19151922          /* Probing */
  • trunk/CoinMP/src/CoinMP.h

    r290 r317  
    421421#define COIN_REAL_MIPCUTOFF        32
    422422#define COIN_REAL_MIPABSGAP        33
     423#define COIN_REAL_MIPFRACGAP       34
    423424
    424425#define COIN_INT_MIPCUT_PROBING          110
Note: See TracChangeset for help on using the changeset viewer.