Ignore:
Timestamp:
Dec 6, 2009 4:21:35 PM (10 years ago)
Author:
bjarni
Message:

Renamed parameter constants in CbcParam?, CbcSolver?, and ClpAmplStuff? with same names as CbcOrClpParam? in CLP to make them more readable/search-able

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/Cbc/src/CbcParam.cpp

    r1286 r1373  
    2121//-------------------------------------------------------------------
    2222CbcParam::CbcParam ()
    23         : type_(INVALID),
     23        : type_(CBC_PARAM_NOTUSED_INVALID),
    2424        lowerDoubleValue_(0.0),
    2525        upperDoubleValue_(0.0),
     
    3232        shortHelp_(),
    3333        longHelp_(),
    34         action_(INVALID),
     34        action_(CBC_PARAM_NOTUSED_INVALID),
    3535        currentKeyWord_(-1)
    3636{
     
    285285        double oldValue;
    286286        switch (type_) {
    287         case DUALTOLERANCE:
     287        case CLP_PARAM_DBL_DUALTOLERANCE:
    288288            model->getDblParam(OsiDualTolerance, oldValue);
    289289            model->setDblParam(OsiDualTolerance, value);
    290290            break;
    291         case PRIMALTOLERANCE:
     291        case CLP_PARAM_DBL_PRIMALTOLERANCE:
    292292            model->getDblParam(OsiPrimalTolerance, oldValue);
    293293            model->setDblParam(OsiPrimalTolerance, value);
     
    320320    bool getDblParamRetValue;
    321321    switch (type_) {
    322     case DUALTOLERANCE:
     322    case CLP_PARAM_DBL_DUALTOLERANCE:
    323323        getDblParamRetValue = model->getDblParam(OsiDualTolerance, value);
    324324        assert(getDblParamRetValue);
    325325        break;
    326     case PRIMALTOLERANCE:
     326    case CLP_PARAM_DBL_PRIMALTOLERANCE:
    327327        getDblParamRetValue = model->getDblParam(OsiPrimalTolerance, value);
    328328        assert(getDblParamRetValue);
     
    344344        int oldValue;
    345345        switch (type_) {
    346         case LOGLEVEL:
     346        case CLP_PARAM_INT_LOGLEVEL:
    347347            oldValue = model->messageHandler()->logLevel();
    348348            model->messageHandler()->setLogLevel(value);
     
    362362    int value = 0;
    363363    switch (type_) {
    364     case LOGLEVEL:
     364    case CLP_PARAM_INT_LOGLEVEL:
    365365        //value=model->logLevel();
    366366        break;
     
    381381        double oldValue;
    382382        switch (type_) {
    383         case INFEASIBILITYWEIGHT:
     383        case CBC_PARAM_DBL_INFEASIBILITYWEIGHT:
    384384            oldValue = model.getDblParam(CbcModel::CbcInfeasibilityWeight);
    385385            model.setDblParam(CbcModel::CbcInfeasibilityWeight, value);
    386386            break;
    387         case INTEGERTOLERANCE:
     387        case CBC_PARAM_DBL_INTEGERTOLERANCE:
    388388            oldValue = model.getDblParam(CbcModel::CbcIntegerTolerance);
    389389            model.setDblParam(CbcModel::CbcIntegerTolerance, value);
    390390            break;
    391         case INCREMENT:
     391        case CBC_PARAM_DBL_INCREMENT:
    392392            oldValue = model.getDblParam(CbcModel::CbcCutoffIncrement);
    393393            model.setDblParam(CbcModel::CbcCutoffIncrement, value);
    394         case ALLOWABLEGAP:
     394        case CBC_PARAM_DBL_ALLOWABLEGAP:
    395395            oldValue = model.getDblParam(CbcModel::CbcAllowableGap);
    396396            model.setDblParam(CbcModel::CbcAllowableGap, value);
    397397            break;
    398         case TIMELIMIT: {
     398        case CLP_PARAM_DBL_TIMELIMIT: {
    399399            oldValue = model.getDblParam(CbcModel::CbcMaximumSeconds) ;
    400400            model.setDblParam(CbcModel::CbcMaximumSeconds, value) ;
    401401            break ;
    402402        }
    403         case DUALTOLERANCE:
    404         case PRIMALTOLERANCE:
     403        case CLP_PARAM_DBL_DUALTOLERANCE:
     404        case CLP_PARAM_DBL_PRIMALTOLERANCE:
    405405            setDoubleParameter(model.solver(), value);
    406406            return 0; // to avoid message
     
    419419    double value;
    420420    switch (type_) {
    421     case INFEASIBILITYWEIGHT:
     421    case CBC_PARAM_DBL_INFEASIBILITYWEIGHT:
    422422        value = model.getDblParam(CbcModel::CbcInfeasibilityWeight);
    423423        break;
    424     case INTEGERTOLERANCE:
     424    case CBC_PARAM_DBL_INTEGERTOLERANCE:
    425425        value = model.getDblParam(CbcModel::CbcIntegerTolerance);
    426426        break;
    427     case INCREMENT:
     427    case CBC_PARAM_DBL_INCREMENT:
    428428        value = model.getDblParam(CbcModel::CbcCutoffIncrement);
    429     case ALLOWABLEGAP:
     429    case CBC_PARAM_DBL_ALLOWABLEGAP:
    430430        value = model.getDblParam(CbcModel::CbcAllowableGap);
    431431        break;
    432     case TIMELIMIT: {
     432    case CLP_PARAM_DBL_TIMELIMIT: {
    433433        value = model.getDblParam(CbcModel::CbcMaximumSeconds) ;
    434434        break ;
    435435    }
    436     case DUALTOLERANCE:
    437     case PRIMALTOLERANCE:
     436    case CLP_PARAM_DBL_DUALTOLERANCE:
     437    case CLP_PARAM_DBL_PRIMALTOLERANCE:
    438438        value = doubleParameter(model.solver());
    439439        break;
     
    454454        int oldValue;
    455455        switch (type_) {
    456         case LOGLEVEL:
     456        case CLP_PARAM_INT_LOGLEVEL:
    457457            oldValue = model.messageHandler()->logLevel();
    458458            model.messageHandler()->setLogLevel(value);
    459459            break;
    460         case SOLVERLOGLEVEL:
     460        case CLP_PARAM_INT_SOLVERLOGLEVEL:
    461461            oldValue = model.solver()->messageHandler()->logLevel();
    462462            model.solver()->messageHandler()->setLogLevel(value);
    463463            break;
    464         case MAXNODES:
     464        case CBC_PARAM_INT_MAXNODES:
    465465            oldValue = model.getIntParam(CbcModel::CbcMaxNumNode);
    466466            model.setIntParam(CbcModel::CbcMaxNumNode, value);
    467467            break;
    468         case STRONGBRANCHING:
     468        case CBC_PARAM_INT_STRONGBRANCHING:
    469469            oldValue = model.numberStrong();
    470470            model.setNumberStrong(value);
     
    484484    int value;
    485485    switch (type_) {
    486     case LOGLEVEL:
     486    case CLP_PARAM_INT_LOGLEVEL:
    487487        value = model.messageHandler()->logLevel();
    488488        break;
    489     case SOLVERLOGLEVEL:
     489    case CLP_PARAM_INT_SOLVERLOGLEVEL:
    490490        value = model.solver()->messageHandler()->logLevel();
    491491        break;
    492     case MAXNODES:
     492    case CBC_PARAM_INT_MAXNODES:
    493493        value = model.getIntParam(CbcModel::CbcMaxNumNode);
    494494        break;
    495     case STRONGBRANCHING:
     495    case CBC_PARAM_INT_STRONGBRANCHING:
    496496        value = model.numberStrong();
    497497        break;
Note: See TracChangeset for help on using the changeset viewer.