Changeset 170 for trunk


Ignore:
Timestamp:
Oct 3, 2005 5:13:28 PM (15 years ago)
Author:
forrest
Message:

for solve

Location:
trunk/Test
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Test/CbcMain.cpp

    r166 r170  
    708708    bool defaultSettings=true;
    709709
    710     std::string directory ="./";
     710    const char dirsep =  CoinFindDirSeparator();
     711    std::string directory = (dirsep == '/' ? "./" : ".\\");
    711712    std::string field;
    712713/*
     
    12801281                fileName = "-";
    12811282              } else {
    1282                 if (field[0]=='/'||field[0]=='~')
     1283                bool absolutePath;
     1284                if (dirsep=='/') {
     1285                  // non Windows (or cygwin)
     1286                  absolutePath=(field[0]=='/');
     1287                } else {
     1288                  //Windows (non cycgwin)
     1289                  absolutePath=(field[0]=='\\');
     1290                  // but allow for :
     1291                  if (strchr(field.c_str(),':'))
     1292                    absolutePath=true;
     1293                }
     1294                if (absolutePath) {
    12831295                  fileName = field;
    1284                 else
     1296                } else if (field[0]=='~') {
     1297                  char * environ = getenv("HOME");
     1298                  if (environ) {
     1299                    std::string home(environ);
     1300                    field=field.erase(0,1);
     1301                    fileName = home+field;
     1302                  } else {
     1303                    fileName=field;
     1304                  }
     1305                } else {
    12851306                  fileName = directory+field;
     1307                }
    12861308                FILE *fp=fopen(fileName.c_str(),"r");
    12871309                if (fp) {
  • trunk/Test/CbcOrClpParam.cpp

    r169 r170  
    2323#include <readline/history.h>
    2424#endif
    25 
     25#ifdef COIN_OSI_HAS_CLP
     26// from CoinSolve
     27static char coin_prompt[]="Coin:";
     28#else
     29static char coin_prompt[]="Clp:";
     30#endif
    2631//#############################################################################
    2732// Constructors / Destructor / Assignment
     
    429434      model->setInfeasibilityCost(value);
    430435      break;
     436#ifndef COIN_USE_CBC
    431437    case TIMELIMIT:
    432438      model->setMaximumSeconds(value);
    433439      break;
     440#endif
    434441    case OBJSCALE:
    435442      model->setObjectiveScale(value);
     
    463470    value=model->infeasibilityCost();
    464471    break;
     472#ifndef COIN_USE_CBC
    465473  case TIMELIMIT:
    466474    value=model->maximumSeconds();
    467475    break;
     476#endif
    468477  case OBJSCALE:
    469478    value=model->objectiveScale();
     
    637646      model.setDblParam(CbcModel::CbcAllowableGap,value);
    638647      break;
    639     case TIMELIMIT:
    640     { oldValue = model.getDblParam(CbcModel::CbcMaximumSeconds) ;
     648    case CUTOFF:
     649      oldValue=model.getCutoff();
     650      model.setCutoff(value);
     651      break;
     652    case TIMELIMIT_BAB:
     653      oldValue = model.getDblParam(CbcModel::CbcMaximumSeconds) ;
    641654      model.setDblParam(CbcModel::CbcMaximumSeconds,value) ;
    642       break ; }
     655      break ;
    643656    case DUALTOLERANCE:
    644657    case PRIMALTOLERANCE:
     
    670683    value=model.getDblParam(CbcModel::CbcAllowableGap);
    671684    break;
    672   case TIMELIMIT:
    673   { value = model.getDblParam(CbcModel::CbcMaximumSeconds) ;
    674     break ; }
     685  case CUTOFF:
     686    value=model.getCutoff();
     687    break;
     688  case TIMELIMIT_BAB:
     689    value = model.getDblParam(CbcModel::CbcMaximumSeconds) ;
     690    break ;
    675691  case DUALTOLERANCE:
    676692  case PRIMALTOLERANCE:
     
    749765}
    750766#endif
     767// Sets current parameter option using string
     768void
     769CbcOrClpParam::setCurrentOption ( const std::string value )
     770{
     771  int action = parameterOption(value);
     772  if (action>=0)
     773    currentKeyWord_=action;
     774}
    751775void
    752776CbcOrClpParam::setIntValue ( int value )
     
    790814    if (CbcOrClpReadCommand==stdin) {
    791815      // Get a line from the user.
    792       where = readline ("Clp:");
     816      where = readline (coin_prompt);
    793817     
    794818      // If the line has any text in it, save it on the history.
     
    804828#else
    805829    if (CbcOrClpReadCommand==stdin) {
    806       fprintf(stdout,"Clp:");
     830      fprintf(stdout,coin_prompt);
    807831      fflush(stdout);
    808832    }
     
    972996best less than this",
    973997              0.0,1.0e20,ALLOWABLEGAP);
    974   parameters[numberParameters-1].setLonghelp
    975     (
    976      "TODO"
     998  parameters[numberParameters-1].setDoubleValue(0.0);
     999  parameters[numberParameters-1].setLonghelp
     1000    (
     1001     "If the gap between best solution and best possible solution is less than this \
     1002then the search will be terminated"
    9771003     );
    9781004#endif
     
    10781104  parameters[numberParameters-1].setLonghelp
    10791105    (
    1080      "TODO"
     1106     "This switches on clique cuts (either at roor or in entire tree)"
    10811107     );
    10821108  parameters[numberParameters++]=
     
    10871113  parameters[numberParameters-1].setLonghelp
    10881114    (
    1089      "TODO"
     1115     "This orders the variables in order of their absolute costs - with largest cost ones being branched on first"
    10901116     );
    10911117#endif
     
    11291155every so often.  The original method was every so many node but it may be more logical \
    11301156to do it whenever depth in tree is a multiple of K.  This option does that and defaults \
    1131 to 5."
     1157to -1 (off)."
    11321158     );
    1133   parameters[numberParameters-1].setIntValue(5);
     1159  parameters[numberParameters-1].setIntValue(-1);
     1160  parameters[numberParameters++]=
     1161    CbcOrClpParam("cuto!ff","All solutions must be better than this",
     1162                  -1.0e60,1.0e60,CUTOFF);
     1163  parameters[numberParameters-1].setDoubleValue(1.0e50);
     1164  parameters[numberParameters-1].setLonghelp
     1165    (
     1166     "All solutions must be better than this value (in a minimization sense)."
     1167     );
    11341168#endif
    11351169  parameters[numberParameters++]=
     
    12631297  parameters[numberParameters-1].setLonghelp
    12641298    (
    1265      "TODO"
     1299     "If this is set integer variables with reduced costs greater than this will be fixed \
     1300before branch and bound - use with extreme caution!"
    12661301     );
    12671302    parameters[numberParameters++]=
     
    12721307  parameters[numberParameters-1].setLonghelp
    12731308    (
    1274      "TODO"
     1309     "This switches on flow cover cuts (either at roor or in entire tree)"
    12751310     );
    12761311#endif
     
    12851320best less than this fraction of larger of two",
    12861321                  0.0,1.0e20,GAPRATIO);
    1287   parameters[numberParameters-1].setLonghelp
    1288     (
    1289      "TODO"
     1322  parameters[numberParameters-1].setDoubleValue(0.0);
     1323  parameters[numberParameters-1].setLonghelp
     1324    (
     1325     "If the gap between best solution and best possible solution is less than this fraction \
     1326of the objective value at the root node then the search will terminate"
    12901327     );
    12911328  parameters[numberParameters++]=
     
    13331370  parameters[numberParameters-1].setLonghelp
    13341371    (
    1335      "TODO"
     1372     "Whenever a solution is found the bound on solutions is set to solution (in a minimization\
     1373sense) plus this.  Becareful if you set this negative"
    13361374     );
    13371375  parameters[numberParameters++]=
     
    13411379  parameters[numberParameters-1].setLonghelp
    13421380    (
    1343      "TODO"
     1381     "A crude way of deciding which node to explore next.  Satisfying each integer infeasibility is \
     1382expected to cost this much."
    13441383     );
    13451384  parameters[numberParameters++]=
     
    13481387  parameters[numberParameters-1].setLonghelp
    13491388    (
    1350      "TODO"
     1389     "This just solves the problem to continuous - without adding any cuts"
    13511390     );
    13521391  parameters[numberParameters++]=
     
    13561395  parameters[numberParameters-1].setLonghelp
    13571396    (
    1358      "TODO"
     1397     "The short help says it all"
    13591398     );
    13601399#endif
     
    13811420  parameters[numberParameters-1].setLonghelp
    13821421    (
    1383      "TODO"
     1422     "This switches on knapsack cuts (either at roor or in entire tree)"
    13841423     );
    13851424#endif
     
    14321471  parameters[numberParameters++]=
    14331472    CbcOrClpParam("maxN!odes","Maximum number of nodes to do",
    1434                   1,999999,MAXNODES);
    1435   parameters[numberParameters-1].setLonghelp
    1436     (
    1437      "TODO"
     1473                  1,99999999,MAXNODES);
     1474  parameters[numberParameters-1].setLonghelp
     1475    (
     1476     "This is a repeatable way to limit search.  Normally using time is easier \
     1477but then the results may not be repeatable."
    14381478     );
    14391479#endif
     
    14551495  parameters[numberParameters-1].setLonghelp
    14561496    (
    1457      "TODO"
     1497     "This switches on mixed integer rounding cuts (either at roor or in entire tree)"
    14581498     );
    14591499#endif
     
    16111651  parameters[numberParameters++]=
    16121652    CbcOrClpParam("preprocess","Whether to use integer preprocessing",
    1613                   "on",PREPROCESS);
    1614   parameters[numberParameters-1].append("off");
    1615   parameters[numberParameters-1].setLonghelp
    1616     (
    1617      "TODO"
     1653                  "off",PREPROCESS);
     1654  parameters[numberParameters-1].append("on");
     1655  parameters[numberParameters-1].setLonghelp
     1656    (
     1657     "This tries to reduce size of model in a similar way to presolve and \
     1658it also tries to strengthen the model - needs more work but can be useful."
    16181659     );
    16191660#endif
     
    16841725  parameters[numberParameters-1].setLonghelp
    16851726    (
    1686      "TODO"
     1727     "This switches on probing cuts (either at roor or in entire tree)"
    16871728     );
    16881729#endif
     
    17071748  parameters[numberParameters-1].setLonghelp
    17081749    (
    1709      "TODO"
     1750     "This switches on reduce and split  cuts (either at roor or in entire tree)"
    17101751     );
    17111752#endif
     
    17441785  parameters[numberParameters-1].setLonghelp
    17451786    (
    1746      "TODO"
     1787     "This switches on a simple (but effective) rounding heuristic at each node of tree."
    17471788     );
    17481789#endif
     
    17711812     );
    17721813  parameters[numberParameters-1].setCurrentOption(3); // say auto
    1773 #ifndef COIN_USE_CBC
    17741814  parameters[numberParameters++]=
    17751815    CbcOrClpParam("sec!onds","maximum seconds",
     
    17801820  In this program it is really only useful for testing but the library function\n\
    17811821      \tsetMaximumSeconds(value)\n can be useful."
    1782      );
     1822     );
     1823#ifdef COIN_USE_CBC
     1824  parameters[numberParameters++]=
     1825    CbcOrClpParam("sec!onds","maximum seconds",
     1826                  -1.0,1.0e12,TIMELIMIT_BAB);
     1827  parameters[numberParameters-1].setLonghelp
     1828    (
     1829     "After this many seconds coin solver will act as if maximum nodes had been reached."
     1830     );
    17831831#endif
    17841832#ifdef COIN_USE_CLP
     
    18601908  parameters[numberParameters-1].setLonghelp
    18611909    (
    1862      "TODO"
     1910     "In order to decide which variable to branch on, the code will choose up to this number \
     1911of unsatisfied variables to do mini up and down branches on.  Then the most effective one is chosen. \
     1912If a variable is branched on many times then the previous average up and down costs may be used - \
     1913see number before trust."
    18631914     );
    18641915#endif
     
    18791930activity at continuous solution",
    18801931                  1.0,1.0e20,TIGHTENFACTOR,false);
    1881   parameters[numberParameters++] =
    1882     CbcOrClpParam("time!Limit","Set a time limit for solving this problem",
    1883                   -1.0,(double)(60*60*24*365*10),TIMELIMIT) ;
    1884   parameters[numberParameters-1].setLonghelp
    1885     (
    1886      "TODO"
     1932  parameters[numberParameters-1].setLonghelp
     1933    (
     1934     "This sleazy trick can help on some problems."
    18871935     );
    18881936#endif
     
    18981946  parameters[numberParameters-1].setLonghelp
    18991947    (
    1900      "TODO"
     1948     "Using strong branching computes pseudo-costs.  After this many time sfor a variable we just \
     1949trust the pseudo costs and do not do any more strong branching."
    19011950     );
    19021951#endif
     
    19091958  parameters[numberParameters-1].setLonghelp
    19101959    (
    1911      "TODO"
     1960     "This switches on two phase mixed integer rounding  cuts (either at roor or in entire tree)"
    19121961     );
    19131962#endif
  • trunk/Test/CoinSolve.cpp

    r169 r170  
    112112    OsiClpSolverInterface solver1;
    113113    CbcModel model(solver1);
     114    model.setNumberBeforeTrust(5);
    114115    OsiSolverInterface * solver = model.solver();
    115116    OsiClpSolverInterface * clpSolver = dynamic_cast< OsiClpSolverInterface*> (solver);
     
    134135    int preProcess=1;
    135136    bool preSolveFile=false;
    136 // Set up likely cut generators and defaults
    137 
    138     CglGomory gomoryGen;
    139     // try larger limit
    140     gomoryGen.setLimit(300);
    141     // set default action (0=off,1=on,2=root)
    142     int gomoryAction=1;
    143 
    144     CglProbing probingGen;
    145     probingGen.setUsingObjective(true);
    146     probingGen.setMaxPass(3);
    147     probingGen.setMaxPassRoot(3);
    148     // Number of unsatisfied variables to look at
    149     probingGen.setMaxProbe(10);
    150     probingGen.setMaxProbeRoot(50);
    151     // How far to follow the consequences
    152     probingGen.setMaxLook(10);
    153     probingGen.setMaxLookRoot(50);
    154     // Only look at rows with fewer than this number of elements
    155     probingGen.setMaxElements(200);
    156     probingGen.setRowCuts(3);
    157     // set default action (0=off,1=on,2=root)
    158     int probingAction=1;
    159 
    160     CglKnapsackCover knapsackGen;
    161     // set default action (0=off,1=on,2=root)
    162     int knapsackAction=1;
    163 
    164     CglRedSplit redsplitGen;
    165     redsplitGen.setLimit(100);
    166     // set default action (0=off,1=on,2=root)
    167     int redsplitAction=1;
    168 
    169     CglClique cliqueGen;
    170     cliqueGen.setStarCliqueReport(false);
    171     cliqueGen.setRowCliqueReport(false);
    172     // set default action (0=off,1=on,2=root)
    173     int cliqueAction=1;
    174 
    175     CglMixedIntegerRounding mixedGen;
    176     // set default action (0=off,1=on,2=root)
    177     int mixedAction=1;
    178 
    179     CglFlowCover flowGen;
    180     // set default action (0=off,1=on,2=root)
    181     int flowAction=1;
    182 
    183     CglTwomir twomirGen;
    184     // set default action (0=off,1=on,2=root)
    185     int twomirAction=0;
    186 
    187     bool useRounding=true;
    188137   
    189138    double djFix=1.0e100;
     
    192141    lpSolver->setPerturbation(50);
    193142    lpSolver->messageHandler()->setPrefix(false);
    194     std::string directory ="./";
     143    const char dirsep =  CoinFindDirSeparator();
     144    std::string directory = (dirsep == '/' ? "./" : ".\\");
     145    std::string defaultDirectory = directory;
    195146    std::string importFile ="";
    196147    std::string exportFile ="default.mps";
     
    226177    parameters[whichParam(RESTORE,numberParameters,parameters)].setStringValue(restoreFile);
    227178    parameters[whichParam(SAVE,numberParameters,parameters)].setStringValue(saveFile);
    228     parameters[whichParam(TIMELIMIT,numberParameters,parameters)].setDoubleValue(lpSolver->maximumSeconds());
     179    parameters[whichParam(TIMELIMIT,numberParameters,parameters)].setDoubleValue(1.0e8);
     180    parameters[whichParam(TIMELIMIT_BAB,numberParameters,parameters)].setDoubleValue(1.0e8);
    229181    parameters[whichParam(SOLUTION,numberParameters,parameters)].setStringValue(solutionFile);
    230182    parameters[whichParam(SPRINT,numberParameters,parameters)].setIntValue(doSprint);
     183    model.setNumberBeforeTrust(5);
     184    parameters[whichParam(NUMBERBEFORE,numberParameters,parameters)].setIntValue(5);
     185    parameters[whichParam(MAXNODES,numberParameters,parameters)].setIntValue(model.getMaximumNodes());
     186    parameters[whichParam(STRONGBRANCHING,numberParameters,parameters)].setIntValue(model.numberStrong());
     187    parameters[whichParam(INFEASIBILITYWEIGHT,numberParameters,parameters)].setDoubleValue(model.getDblParam(CbcModel::CbcInfeasibilityWeight));
     188    parameters[whichParam(INTEGERTOLERANCE,numberParameters,parameters)].setDoubleValue(model.getDblParam(CbcModel::CbcIntegerTolerance));
     189    parameters[whichParam(INCREMENT,numberParameters,parameters)].setDoubleValue(model.getDblParam(CbcModel::CbcCutoffIncrement));
     190    // Set up likely cut generators and defaults
     191    parameters[whichParam(PREPROCESS,numberParameters,parameters)].setCurrentOption("on");
     192
     193    CglGomory gomoryGen;
     194    // try larger limit
     195    gomoryGen.setLimit(300);
     196    // set default action (0=off,1=on,2=root)
     197    int gomoryAction=1;
     198    parameters[whichParam(GOMORYCUTS,numberParameters,parameters)].setCurrentOption("on");
     199
     200    CglProbing probingGen;
     201    probingGen.setUsingObjective(true);
     202    probingGen.setMaxPass(3);
     203    probingGen.setMaxPassRoot(3);
     204    // Number of unsatisfied variables to look at
     205    probingGen.setMaxProbe(10);
     206    probingGen.setMaxProbeRoot(50);
     207    // How far to follow the consequences
     208    probingGen.setMaxLook(10);
     209    probingGen.setMaxLookRoot(50);
     210    // Only look at rows with fewer than this number of elements
     211    probingGen.setMaxElements(200);
     212    probingGen.setRowCuts(3);
     213    // set default action (0=off,1=on,2=root)
     214    int probingAction=1;
     215    parameters[whichParam(PROBINGCUTS,numberParameters,parameters)].setCurrentOption("on");
     216
     217    CglKnapsackCover knapsackGen;
     218    // set default action (0=off,1=on,2=root)
     219    int knapsackAction=1;
     220    parameters[whichParam(KNAPSACKCUTS,numberParameters,parameters)].setCurrentOption("on");
     221
     222    CglRedSplit redsplitGen;
     223    redsplitGen.setLimit(100);
     224    // set default action (0=off,1=on,2=root)
     225    // Off as seems to give some bad cuts
     226    int redsplitAction=0;
     227    parameters[whichParam(REDSPLITCUTS,numberParameters,parameters)].setCurrentOption("off");
     228
     229    CglClique cliqueGen;
     230    cliqueGen.setStarCliqueReport(false);
     231    cliqueGen.setRowCliqueReport(false);
     232    // set default action (0=off,1=on,2=root)
     233    int cliqueAction=1;
     234    parameters[whichParam(CLIQUECUTS,numberParameters,parameters)].setCurrentOption("on");
     235
     236    CglMixedIntegerRounding mixedGen;
     237    // set default action (0=off,1=on,2=root)
     238    int mixedAction=1;
     239    parameters[whichParam(MIXEDCUTS,numberParameters,parameters)].setCurrentOption("on");
     240
     241    CglFlowCover flowGen;
     242    // set default action (0=off,1=on,2=root)
     243    int flowAction=1;
     244    parameters[whichParam(FLOWCUTS,numberParameters,parameters)].setCurrentOption("on");
     245
     246    CglTwomir twomirGen;
     247    // set default action (0=off,1=on,2=root)
     248    int twomirAction=0;
     249
     250    bool useRounding=true;
     251    parameters[whichParam(ROUNDING,numberParameters,parameters)].setCurrentOption("on");
    231252   
    232253    // total number of commands read
     
    263284          // let's give the sucker a hint
    264285          std::cout
    265             <<"Clp takes input from arguments ( - switches to stdin)"
     286            <<"CoinSolver takes input from arguments ( - switches to stdin)"
    266287            <<std::endl
    267288            <<"Enter ? for list of commands or help"<<std::endl;
     
    887908                model.initialSolve();
    888909              }
     910              //std::string problemName ;
     911              //model.solver()->getStrParam(OsiProbName,problemName) ;
     912              //model.solver()->activateRowCutDebugger(problemName.c_str()) ;
    889913              CbcRounding heuristic1(model);
    890914              if (useRounding)
     
    926950              int numberGenerators = model.numberCutGenerators();
    927951              int iGenerator;
     952              int cutDepth=
     953                parameters[whichParam(CUTDEPTH,numberParameters,parameters)].intValue();
    928954              for (iGenerator=0;iGenerator<numberGenerators;iGenerator++) {
    929955                CbcCutGenerator * generator = model.cutGenerator(iGenerator);
    930956                generator->setTiming(true);
     957                if (cutDepth>=0)
     958                  generator->setWhatDepth(cutDepth) ;
    931959              }
    932960              // Could tune more
     
    943971             
    944972              // Do more strong branching if small
    945               if (model.getNumCols()<5000)
    946                 model.setNumberStrong(20);
     973              //if (model.getNumCols()<5000)
     974              //model.setNumberStrong(20);
    947975              // Switch off strong branching if wanted
    948976              //if (model.getNumCols()>10*model.getNumRows())
     
    10131041                fileName = "-";
    10141042              } else {
    1015                 if (field[0]=='/'||field[0]=='\\') {
     1043                bool absolutePath;
     1044                if (dirsep=='/') {
     1045                  // non Windows (or cygwin)
     1046                  absolutePath=(field[0]=='/');
     1047                } else {
     1048                  //Windows (non cycgwin)
     1049                  absolutePath=(field[0]=='\\');
     1050                  // but allow for :
     1051                  if (strchr(field.c_str(),':'))
     1052                    absolutePath=true;
     1053                }
     1054                if (absolutePath) {
    10161055                  fileName = field;
    10171056                } else if (field[0]=='~') {
     
    15041543            break;
    15051544          case NETLIB_DUAL:
     1545          case NETLIB_EITHER:
    15061546          case NETLIB_BARRIER:
    15071547          case NETLIB_PRIMAL:
     1548          case NETLIB_TUNE:
    15081549            {
    15091550              // create fields for unitTest
     
    15121553              fields[0]="fake main from unitTest";
    15131554              fields[1]="-netlib";
    1514               if (directory!="./") {
     1555              if (directory!=defaultDirectory) {
    15151556                fields[2]="-netlibDir";
    15161557                fields[3]=directory.c_str();
     
    15191560              int algorithm;
    15201561              if (type==NETLIB_DUAL) {
    1521                 std::cerr<<"Doing netlib with dual agorithm"<<std::endl;
     1562                std::cerr<<"Doing netlib with dual algorithm"<<std::endl;
    15221563                algorithm =0;
    15231564              } else if (type==NETLIB_BARRIER) {
    1524                 std::cerr<<"Doing netlib with barrier agorithm"<<std::endl;
     1565                std::cerr<<"Doing netlib with barrier algorithm"<<std::endl;
    15251566                algorithm =2;
     1567              } else if (type==NETLIB_EITHER) {
     1568                std::cerr<<"Doing netlib with dual or primal algorithm"<<std::endl;
     1569                algorithm =3;
     1570              } else if (type==NETLIB_TUNE) {
     1571                std::cerr<<"Doing netlib with best algorithm!"<<std::endl;
     1572                algorithm =5;
     1573                // uncomment next to get active tuning
     1574                // algorithm=6;
    15261575              } else {
    15271576                std::cerr<<"Doing netlib with primal agorithm"<<std::endl;
    15281577                algorithm=1;
    15291578              }
     1579              int specialOptions = lpSolver->specialOptions();
     1580              lpSolver->setSpecialOptions(0);
    15301581              mainTest(nFields,fields,algorithm,*lpSolver,
    1531                        (preSolve!=0),doIdiot);
     1582                       (preSolve!=0),specialOptions);
    15321583            }
    15331584            break;
     
    15381589              int nFields=1;
    15391590              fields[0]="fake main from unitTest";
    1540               if (directory!="./") {
     1591              if (directory!=defaultDirectory) {
    15411592                fields[1]="-mpsDir";
    15421593                fields[2]=directory.c_str();
  • trunk/Test/Makefile.solve

    r169 r170  
    2626IncDir := ${CbcIncDir} ${CglIncDir}
    2727IncDir += ${OsiClpIncDir} ${ClpIncDir}
    28 #IncDir += ${OsiDylpIncDir} ${DylpIncDir}
    2928IncDir += ${OsiIncDir} ${CoinIncDir}
    3029IncDir += ${bzlibIncDir} ${zlibIncDir} $(lapackIncDir)
    31 IncDir += ./include
     30IncDir := ${ClpIncDir} ${CoinIncDir} ${bzlibIncDir} ${zlibIncDir} $(lapackIncDir)
     31LibDir := ${ClpLibDir} ${CoinLibDir} ${bzlibLibDir} ${zlibLibDir} $(lapackLibDir) $(GlpkLibDir)
     32ifeq ($(VolDefine),COIN_HAS_VOL)
     33LibName := ${ClpLibName} ${CoinLibName} ${bzlibLibName} ${zlibLibName} $(lapackLibName) $(readlineLibName) $(GlpkLibName) $(VolLibName)
     34else
     35LibName := ${ClpLibName} ${CoinLibName} ${bzlibLibName} ${zlibLibName} $(lapackLibName) $(readlineLibName)
     36endif
     37Define := ${ClpDefine} ${CoinDefine} ${bzlibDefine} ${zlibDefine} $(lapackLibDefine) $(readlineDefine) $(VolDefine)
    3238
    33 LibDir := ${CbcLibDir} ${CglLibDir}
    34 LibDir += ${OsiClpLibDir} ${ClpLibDir}
    35 #LibDir += ${OsiDylpLibDir} ${DylpLibDir}
    36 LibDir += ${OsiLibDir} ${CoinLibDir}
    37 LibDir += ${bzlibLibDir} ${zlibLibDir} $(lapackLibDir)
     39LibDir += ${CbcLibDir} ${CglLibDir}
     40LibDir += ${OsiLibDir}
    3841
    39 LibName := $(OsiCbcLibName) ${CbcLibName} ${CglLibName}
    40 LibName += ${OsiClpLibName} ${ClpLibName}
     42LibName += $(OsiCbcLibName) ${CbcLibName} ${CglLibName} $(OsiClpLibName)
    4143ifeq ($(VolDefine),COIN_HAS_VOL)
    4244LibName += $(VolLibName)
    4345endif
    44 #LibName += ${OsiDylpLibName} ${DylpLibName}
    45 LibName += ${OsiLibName} ${CoinLibName}
    46 LibName += ${bzlibLibName} ${zlibLibName} $(lapackLibName) $(readlineLibName)
     46LibName += ${OsiLibName}
    4747
    48 Define := ${CbcDefine} ${CglDefine}
    49 Define += ${OsiClpDefine} ${ClpDefine}
    50 #Define += ${OsiDylpDefine} ${DylpDefine}
    51 Define += ${OsiDefine} ${CoinDefine}
    52 Define += ${bzlibDefine} ${zlibDefine} $(lapackDefine)
    53 
    54 # Unless overridden, cbc will select clp as the default solver.
    55 # CBC_DEFAULT_SOLVER is the hook to change the default when you're building the
    56 # code with multiple solvers. For example, to add dylp but leave clp as the
    57 # default, uncomment only the line to define COIN_USE_DYLP. To use both clp and
    58 # dylp, with dylp the default, also uncomment the line which defines
    59 # CBC_DEFAULT_SOLVER.  cbc chooses clp as the default because it's listed first
    60 # in the conditional compilation block at the head of CbcMain.cpp::main().  If
    61 # you build the code without clp, the first defined solver becomes the
    62 # default.
     48Define += ${CbcDefine} ${CglDefine}
     49Define += ${OsiClpDefine}
     50Define += ${OsiDefine}
     51IncDir += ./include
    6352
    6453#use clp
    6554CXXFLAGS += $(addprefix -D,COIN_USE_CLP)
    66 
    67 #use dylp
    68 #CXXFLAGS += $(addprefix -D,COIN_USE_DYLP)
    69 #CXXFLAGS += $(addprefix -D,CBC_DEFAULT_SOLVER=\"dylp\")
    7055
    7156#tell parameter handling to allow for CbcModel and OsiSolverInterface
  • trunk/Test/include/CbcOrClpParam.hpp

    r169 r170  
    4242  { GENERALQUERY = -100,FULLGENERALQUERY,
    4343   
    44     PRIMALTOLERANCE = 1, DUALTOLERANCE,CUTOFF,TIMELIMIT,
     44    PRIMALTOLERANCE = 1, DUALTOLERANCE, TIMELIMIT,
    4545    DUALBOUND, PRIMALWEIGHT,  OBJSCALE, RHSSCALE,
    4646   
    47     INFEASIBILITYWEIGHT = 51, INTEGERTOLERANCE,INCREMENT,ALLOWABLEGAP,
     47    INFEASIBILITYWEIGHT = 51, CUTOFF, INTEGERTOLERANCE,INCREMENT,ALLOWABLEGAP,
     48    TIMELIMIT_BAB,
    4849   
    4950    DJFIX = 81, GAPRATIO,TIGHTENFACTOR,
     
    163164  inline void setCurrentOption ( int value )
    164165  { currentKeyWord_=value; };
     166  /// Sets current parameter option using string
     167  void setCurrentOption (const std::string value );
    165168  /// Sets int value
    166169  void setIntValue ( int value );
Note: See TracChangeset for help on using the changeset viewer.