Changeset 2371


Ignore:
Timestamp:
Nov 15, 2018 11:13:52 AM (6 months ago)
Author:
forrest
Message:

more flexibility for sos - also allow more string parameters

Location:
trunk/Clp/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/CbcOrClpParam.cpp

    r2358 r2371  
    37243724     );
    37253725     parameters[numberParameters++] =
    3726           CbcOrClpParam("sos!Options", "Whether to use SOS from AMPL",
     3726          CbcOrClpParam("sosO!ptions", "Whether to use SOS from AMPL",
    37273727                        "off", CBC_PARAM_STR_SOS);
    37283728     parameters[numberParameters-1].append("on");
     
    37323732          "Normally if AMPL says there are SOS variables they should be used, but sometime sthey should\
    37333733 be turned off - this does so."
     3734     );
     3735     // Due to James Howey
     3736     parameters[numberParameters++] =
     3737          CbcOrClpParam("sosP!rioritize", "How to deal with SOS priorities",
     3738                        "off", CBC_PARAM_STR_SOSPRIORITIZE);
     3739     parameters[numberParameters-1].append("high");
     3740     parameters[numberParameters-1].append("low");
     3741     parameters[numberParameters-1].append("orderhigh");
     3742     parameters[numberParameters-1].append("orderlow");
     3743     parameters[numberParameters-1].setLonghelp
     3744     (
     3745          "This sets priorities for SOS.  The first two just set priority \
     3746relative to integers.  Orderhigh gives first set highest priority and integers \
     3747a low priority.  Orderlow gives integers high priority then SOS in order."
    37343748     );
    37353749     parameters[numberParameters++] =
  • trunk/Clp/src/CbcOrClpParam.hpp

    r2353 r2371  
    175175     CLP_PARAM_STR_BUFFER_MODE,
    176176
    177      CBC_PARAM_STR_NODESTRATEGY = 251,
     177     CBC_PARAM_STR_NODESTRATEGY = 301,
    178178     CBC_PARAM_STR_BRANCHSTRATEGY,
    179179     CBC_PARAM_STR_CUTSSTRATEGY,
     
    225225     CBC_PARAM_STR_ORBITAL,
    226226     CBC_PARAM_STR_PREPROCNAMES,
    227 
    228      CLP_PARAM_ACTION_DIRECTORY = 301,
     227     CBC_PARAM_STR_SOSPRIORITIZE,
     228
     229     CLP_PARAM_ACTION_DIRECTORY = 401,
    229230     CLP_PARAM_ACTION_DIRSAMPLE,
    230231     CLP_PARAM_ACTION_DIRNETLIB,
     
    277278     CLP_PARAM_ACTION_RESTORESOL,
    278279
    279      CBC_PARAM_ACTION_BAB = 361,
     280     CBC_PARAM_ACTION_BAB = 501,
    280281     CBC_PARAM_ACTION_MIPLIB,
    281282     CBC_PARAM_ACTION_STRENGTHEN,
     
    286287     CLP_PARAM_ACTION_NEXTBESTSOLUTION,
    287288
    288      CBC_PARAM_NOTUSED_OSLSTUFF = 401,
     289     CBC_PARAM_NOTUSED_OSLSTUFF = 601,
    289290     CBC_PARAM_NOTUSED_CBCSTUFF,
    290291
  • trunk/Clp/src/ClpSolver.cpp

    r2290 r2371  
    515515                         if (verbose)
    516516                              maxAcross = 1;
    517                          int limits[] = {1, 101, 201, 301, 401};
     517                         int limits[] = {1, 101, 201, 401, 601};
    518518                         std::vector<std::string> types;
    519519                         types.push_back("Double parameters:");
     
    574574                         std::cout << "Full list of commands is:" << std::endl;
    575575                         int maxAcross = 5;
    576                          int limits[] = {1, 101, 201, 301, 401};
     576                         int limits[] = {1, 101, 201, 401, 601};
    577577                         std::vector<std::string> types;
    578578                         types.push_back("Double parameters:");
     
    647647                                        parameters[iParam].intValue() << std::endl;
    648648                         }
    649                     } else if (type < 301) {
     649                    } else if (type < 401) {
    650650                         // one of several strings
    651651                         std::string value = CoinReadGetString(argc, argv);
Note: See TracChangeset for help on using the changeset viewer.