Changeset 2479


Ignore:
Timestamp:
Feb 7, 2019 2:50:37 PM (2 months ago)
Author:
unxusr
Message:

simplify handling of parameters and remove staticParameterData which made CbcMain0 and CbcMain1 not thread safe

Location:
trunk/Cbc/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcSolver.cpp

    r2476 r2479  
    346346  , numberCutGenerators_(0)
    347347  , startTime_(CoinCpuTime())
    348   , parameters_(NULL)
    349   , numberParameters_(0)
    350348  , doMiplib_(false)
    351349  , noPrinting_(false)
     
    365363  , numberCutGenerators_(0)
    366364  , startTime_(CoinCpuTime())
    367   , parameters_(NULL)
    368   , numberParameters_(0)
    369365  , doMiplib_(false)
    370366  , noPrinting_(false)
     
    385381  , numberCutGenerators_(0)
    386382  , startTime_(CoinCpuTime())
    387   , parameters_(NULL)
    388   , numberParameters_(0)
    389383  , doMiplib_(false)
    390384  , noPrinting_(false)
     
    408402  delete originalCoinModel_;
    409403  delete babModel_;
    410   delete[] parameters_;
    411404  delete callBack_;
    412405}
     
    419412  , numberUserFunctions_(rhs.numberUserFunctions_)
    420413  , startTime_(CoinCpuTime())
    421   , parameters_(NULL)
    422   , numberParameters_(rhs.numberParameters_)
    423414  , doMiplib_(rhs.doMiplib_)
    424415  , noPrinting_(rhs.noPrinting_)
    425416  , readMode_(rhs.readMode_)
    426417{
    427   fillParameters();
    428418  if (rhs.babModel_)
    429419    babModel_ = new CbcModel(*rhs.babModel_);
     
    432422  for (i = 0; i < numberUserFunctions_; i++)
    433423    userFunction_[i] = rhs.userFunction_[i]->clone();
    434   for (i = 0; i < numberParameters_; i++)
    435     parameters_[i] = rhs.parameters_[i];
     424  this->parameters_ = rhs.parameters_;
    436425  for (i = 0; i < numberCutGenerators_; i++)
    437426    cutGenerator_[i] = rhs.cutGenerator_[i]->clone();
     
    466455    numberUserFunctions_ = rhs.numberUserFunctions_;
    467456    startTime_ = rhs.startTime_;
    468     numberParameters_ = rhs.numberParameters_;
    469     for (i = 0; i < numberParameters_; i++)
    470       parameters_[i] = rhs.parameters_[i];
     457    this->parameters_ = rhs.parameters_;
    471458    for (i = 0; i < numberCutGenerators_; i++)
    472459      cutGenerator_[i] = rhs.cutGenerator_[i]->clone();
     
    498485int CbcSolver::intValue(CbcOrClpParameterType type) const
    499486{
    500   return parameters_[whichParam(type, numberParameters_, parameters_)].intValue();
     487  return parameters_[whichParam(type, parameters_)].intValue();
    501488}
    502489// Set int value
    503490void CbcSolver::setIntValue(CbcOrClpParameterType type, int value)
    504491{
    505   parameters_[whichParam(type, numberParameters_, parameters_)].setIntValue(value);
     492  parameters_[whichParam(type, parameters_)].setIntValue(value);
    506493}
    507494// Get double value
    508495double CbcSolver::doubleValue(CbcOrClpParameterType type) const
    509496{
    510   return parameters_[whichParam(type, numberParameters_, parameters_)].doubleValue();
     497  return parameters_[whichParam(type, parameters_)].doubleValue();
    511498}
    512499// Set double value
    513500void CbcSolver::setDoubleValue(CbcOrClpParameterType type, double value)
    514501{
    515   parameters_[whichParam(type, numberParameters_, parameters_)].setDoubleValue(value);
     502  parameters_[whichParam(type, parameters_)].setDoubleValue(value);
    516503}
    517504// User function (NULL if no match)
     
    530517void CbcSolver::fillParameters()
    531518{
    532   int maxParam = 200;
    533   CbcOrClpParam *parameters = new CbcOrClpParam[maxParam];
    534   numberParameters_ = 0;
    535   establishParams(numberParameters_, parameters);
    536   assert(numberParameters_ <= maxParam);
    537   parameters_ = new CbcOrClpParam[numberParameters_];
    538   int i;
    539   for (i = 0; i < numberParameters_; i++)
    540     parameters_[i] = parameters[i];
    541   delete[] parameters;
     519  establishParams(parameters_);
    542520  const char dirsep = CoinFindDirSeparator();
    543521  std::string directory;
     
    589567    createSolver = 1;
    590568  }
    591   parameters_[whichParam(CLP_PARAM_ACTION_BASISIN, numberParameters_, parameters_)].setStringValue(importBasisFile);
    592   parameters_[whichParam(CBC_PARAM_ACTION_PRIORITYIN, numberParameters_, parameters_)].setStringValue(importPriorityFile);
    593   parameters_[whichParam(CBC_PARAM_ACTION_MIPSTART, numberParameters_, parameters_)].setStringValue(mipStartFile);
    594   parameters_[whichParam(CLP_PARAM_ACTION_BASISOUT, numberParameters_, parameters_)].setStringValue(exportBasisFile);
    595   parameters_[whichParam(CLP_PARAM_ACTION_DEBUG, numberParameters_, parameters_)].setStringValue(debugFile);
    596   parameters_[whichParam(CLP_PARAM_ACTION_PRINTMASK, numberParameters_, parameters_)].setStringValue(printMask);
    597   parameters_[whichParam(CLP_PARAM_ACTION_DIRECTORY, numberParameters_, parameters_)].setStringValue(directory);
    598   parameters_[whichParam(CLP_PARAM_ACTION_DIRSAMPLE, numberParameters_, parameters_)].setStringValue(dirSample);
    599   parameters_[whichParam(CLP_PARAM_ACTION_DIRNETLIB, numberParameters_, parameters_)].setStringValue(dirNetlib);
    600   parameters_[whichParam(CBC_PARAM_ACTION_DIRMIPLIB, numberParameters_, parameters_)].setStringValue(dirMiplib);
    601   parameters_[whichParam(CLP_PARAM_DBL_DUALBOUND, numberParameters_, parameters_)].setDoubleValue(lpSolver->dualBound());
    602   parameters_[whichParam(CLP_PARAM_DBL_DUALTOLERANCE, numberParameters_, parameters_)].setDoubleValue(lpSolver->dualTolerance());
    603   parameters_[whichParam(CLP_PARAM_ACTION_EXPORT, numberParameters_, parameters_)].setStringValue(exportFile);
    604   parameters_[whichParam(CLP_PARAM_INT_IDIOT, numberParameters_, parameters_)].setIntValue(doIdiot);
    605   parameters_[whichParam(CLP_PARAM_ACTION_IMPORT, numberParameters_, parameters_)].setStringValue(importFile);
    606   parameters_[whichParam(CLP_PARAM_DBL_PRESOLVETOLERANCE, numberParameters_, parameters_)].setDoubleValue(1.0e-8);
    607   int iParam = whichParam(CLP_PARAM_INT_SOLVERLOGLEVEL, numberParameters_, parameters_);
     569  parameters_[whichParam(CLP_PARAM_ACTION_BASISIN, parameters_)].setStringValue(importBasisFile);
     570  parameters_[whichParam(CBC_PARAM_ACTION_PRIORITYIN, parameters_)].setStringValue(importPriorityFile);
     571  parameters_[whichParam(CBC_PARAM_ACTION_MIPSTART, parameters_)].setStringValue(mipStartFile);
     572  parameters_[whichParam(CLP_PARAM_ACTION_BASISOUT, parameters_)].setStringValue(exportBasisFile);
     573  parameters_[whichParam(CLP_PARAM_ACTION_DEBUG, parameters_)].setStringValue(debugFile);
     574  parameters_[whichParam(CLP_PARAM_ACTION_PRINTMASK, parameters_)].setStringValue(printMask);
     575  parameters_[whichParam(CLP_PARAM_ACTION_DIRECTORY, parameters_)].setStringValue(directory);
     576  parameters_[whichParam(CLP_PARAM_ACTION_DIRSAMPLE, parameters_)].setStringValue(dirSample);
     577  parameters_[whichParam(CLP_PARAM_ACTION_DIRNETLIB, parameters_)].setStringValue(dirNetlib);
     578  parameters_[whichParam(CBC_PARAM_ACTION_DIRMIPLIB, parameters_)].setStringValue(dirMiplib);
     579  parameters_[whichParam(CLP_PARAM_DBL_DUALBOUND, parameters_)].setDoubleValue(lpSolver->dualBound());
     580  parameters_[whichParam(CLP_PARAM_DBL_DUALTOLERANCE, parameters_)].setDoubleValue(lpSolver->dualTolerance());
     581  parameters_[whichParam(CLP_PARAM_ACTION_EXPORT, parameters_)].setStringValue(exportFile);
     582  parameters_[whichParam(CLP_PARAM_INT_IDIOT, parameters_)].setIntValue(doIdiot);
     583  parameters_[whichParam(CLP_PARAM_ACTION_IMPORT, parameters_)].setStringValue(importFile);
     584  parameters_[whichParam(CLP_PARAM_DBL_PRESOLVETOLERANCE, parameters_)].setDoubleValue(1.0e-8);
     585  int iParam = whichParam(CLP_PARAM_INT_SOLVERLOGLEVEL, parameters_);
    608586  int value = 1;
    609587  clpSolver->messageHandler()->setLogLevel(1);
    610588  lpSolver->setLogLevel(1);
    611589  parameters_[iParam].setIntValue(value);
    612   iParam = whichParam(CLP_PARAM_INT_LOGLEVEL, numberParameters_, parameters_);
     590  iParam = whichParam(CLP_PARAM_INT_LOGLEVEL, parameters_);
    613591  model_.messageHandler()->setLogLevel(value);
    614592  parameters_[iParam].setIntValue(value);
    615   parameters_[whichParam(CLP_PARAM_INT_MAXFACTOR, numberParameters_, parameters_)].setIntValue(lpSolver->factorizationFrequency());
    616   parameters_[whichParam(CLP_PARAM_INT_MAXITERATION, numberParameters_, parameters_)].setIntValue(lpSolver->maximumIterations());
    617   parameters_[whichParam(CLP_PARAM_INT_OUTPUTFORMAT, numberParameters_, parameters_)].setIntValue(outputFormat);
    618   parameters_[whichParam(CLP_PARAM_INT_PRESOLVEPASS, numberParameters_, parameters_)].setIntValue(preSolve);
    619   parameters_[whichParam(CLP_PARAM_INT_PERTVALUE, numberParameters_, parameters_)].setIntValue(lpSolver->perturbation());
    620   parameters_[whichParam(CLP_PARAM_DBL_PRIMALTOLERANCE, numberParameters_, parameters_)].setDoubleValue(lpSolver->primalTolerance());
    621   parameters_[whichParam(CLP_PARAM_DBL_PRIMALWEIGHT, numberParameters_, parameters_)].setDoubleValue(lpSolver->infeasibilityCost());
    622   parameters_[whichParam(CLP_PARAM_ACTION_RESTORE, numberParameters_, parameters_)].setStringValue(restoreFile);
    623   parameters_[whichParam(CLP_PARAM_ACTION_SAVE, numberParameters_, parameters_)].setStringValue(saveFile);
     593  parameters_[whichParam(CLP_PARAM_INT_MAXFACTOR, parameters_)].setIntValue(lpSolver->factorizationFrequency());
     594  parameters_[whichParam(CLP_PARAM_INT_MAXITERATION, parameters_)].setIntValue(lpSolver->maximumIterations());
     595  parameters_[whichParam(CLP_PARAM_INT_OUTPUTFORMAT, parameters_)].setIntValue(outputFormat);
     596  parameters_[whichParam(CLP_PARAM_INT_PRESOLVEPASS, parameters_)].setIntValue(preSolve);
     597  parameters_[whichParam(CLP_PARAM_INT_PERTVALUE, parameters_)].setIntValue(lpSolver->perturbation());
     598  parameters_[whichParam(CLP_PARAM_DBL_PRIMALTOLERANCE, parameters_)].setDoubleValue(lpSolver->primalTolerance());
     599  parameters_[whichParam(CLP_PARAM_DBL_PRIMALWEIGHT, parameters_)].setDoubleValue(lpSolver->infeasibilityCost());
     600  parameters_[whichParam(CLP_PARAM_ACTION_RESTORE, parameters_)].setStringValue(restoreFile);
     601  parameters_[whichParam(CLP_PARAM_ACTION_SAVE, parameters_)].setStringValue(saveFile);
    624602  //parameters_[whichParam(CLP_PARAM_DBL_TIMELIMIT,numberParameters_,parameters_)].setDoubleValue(1.0e8);
    625   parameters_[whichParam(CBC_PARAM_DBL_TIMELIMIT_BAB, numberParameters_, parameters_)].setDoubleValue(1.0e8);
    626   parameters_[whichParam(CLP_PARAM_ACTION_SOLUTION, numberParameters_, parameters_)].setStringValue(solutionFile);
    627   parameters_[whichParam(CLP_PARAM_ACTION_NEXTBESTSOLUTION, numberParameters_, parameters_)].setStringValue(solutionFile);
    628   parameters_[whichParam(CLP_PARAM_ACTION_SAVESOL, numberParameters_, parameters_)].setStringValue(solutionSaveFile);
    629   parameters_[whichParam(CLP_PARAM_INT_SPRINT, numberParameters_, parameters_)].setIntValue(doSprint);
    630   parameters_[whichParam(CLP_PARAM_INT_SUBSTITUTION, numberParameters_, parameters_)].setIntValue(substitution);
    631   parameters_[whichParam(CLP_PARAM_INT_DUALIZE, numberParameters_, parameters_)].setIntValue(dualize);
    632   parameters_[whichParam(CBC_PARAM_INT_NUMBERBEFORE, numberParameters_, parameters_)].setIntValue(model_.numberBeforeTrust());
    633   parameters_[whichParam(CBC_PARAM_INT_MAXNODES, numberParameters_, parameters_)].setIntValue(model_.getMaximumNodes());
    634   parameters_[whichParam(CBC_PARAM_INT_STRONGBRANCHING, numberParameters_, parameters_)].setIntValue(model_.numberStrong());
    635   parameters_[whichParam(CBC_PARAM_DBL_INFEASIBILITYWEIGHT, numberParameters_, parameters_)].setDoubleValue(model_.getDblParam(CbcModel::CbcInfeasibilityWeight));
    636   parameters_[whichParam(CBC_PARAM_DBL_INTEGERTOLERANCE, numberParameters_, parameters_)].setDoubleValue(model_.getDblParam(CbcModel::CbcIntegerTolerance));
    637   parameters_[whichParam(CBC_PARAM_DBL_INCREMENT, numberParameters_, parameters_)].setDoubleValue(model_.getDblParam(CbcModel::CbcCutoffIncrement));
    638   parameters_[whichParam(CBC_PARAM_INT_TESTOSI, numberParameters_, parameters_)].setIntValue(testOsiParameters);
    639   parameters_[whichParam(CBC_PARAM_INT_FPUMPTUNE, numberParameters_, parameters_)].setIntValue(1003);
     603  parameters_[whichParam(CBC_PARAM_DBL_TIMELIMIT_BAB, parameters_)].setDoubleValue(1.0e8);
     604  parameters_[whichParam(CLP_PARAM_ACTION_SOLUTION, parameters_)].setStringValue(solutionFile);
     605  parameters_[whichParam(CLP_PARAM_ACTION_NEXTBESTSOLUTION, parameters_)].setStringValue(solutionFile);
     606  parameters_[whichParam(CLP_PARAM_ACTION_SAVESOL, parameters_)].setStringValue(solutionSaveFile);
     607  parameters_[whichParam(CLP_PARAM_INT_SPRINT, parameters_)].setIntValue(doSprint);
     608  parameters_[whichParam(CLP_PARAM_INT_SUBSTITUTION, parameters_)].setIntValue(substitution);
     609  parameters_[whichParam(CLP_PARAM_INT_DUALIZE, parameters_)].setIntValue(dualize);
     610  parameters_[whichParam(CBC_PARAM_INT_NUMBERBEFORE, parameters_)].setIntValue(model_.numberBeforeTrust());
     611  parameters_[whichParam(CBC_PARAM_INT_MAXNODES, parameters_)].setIntValue(model_.getMaximumNodes());
     612  parameters_[whichParam(CBC_PARAM_INT_STRONGBRANCHING, parameters_)].setIntValue(model_.numberStrong());
     613  parameters_[whichParam(CBC_PARAM_DBL_INFEASIBILITYWEIGHT, parameters_)].setDoubleValue(model_.getDblParam(CbcModel::CbcInfeasibilityWeight));
     614  parameters_[whichParam(CBC_PARAM_DBL_INTEGERTOLERANCE, parameters_)].setDoubleValue(model_.getDblParam(CbcModel::CbcIntegerTolerance));
     615  parameters_[whichParam(CBC_PARAM_DBL_INCREMENT, parameters_)].setDoubleValue(model_.getDblParam(CbcModel::CbcCutoffIncrement));
     616  parameters_[whichParam(CBC_PARAM_INT_TESTOSI, parameters_)].setIntValue(testOsiParameters);
     617  parameters_[whichParam(CBC_PARAM_INT_FPUMPTUNE, parameters_)].setIntValue(1003);
    640618  initialPumpTune = 1003;
    641619#ifdef CBC_THREAD
    642   parameters_[whichParam(CBC_PARAM_INT_THREADS, numberParameters_, parameters_)].setIntValue(0);
     620  parameters_[whichParam(CBC_PARAM_INT_THREADS, parameters_)].setIntValue(0);
    643621#endif
    644622  // Set up likely cut generators and defaults
    645   parameters_[whichParam(CBC_PARAM_STR_PREPROCESS, numberParameters_, parameters_)].setCurrentOption("sos");
    646   parameters_[whichParam(CBC_PARAM_INT_MIPOPTIONS, numberParameters_, parameters_)].setIntValue(1057);
    647   parameters_[whichParam(CBC_PARAM_INT_CUTPASSINTREE, numberParameters_, parameters_)].setIntValue(1);
    648   parameters_[whichParam(CBC_PARAM_INT_MOREMIPOPTIONS, numberParameters_, parameters_)].setIntValue(-1);
    649   parameters_[whichParam(CBC_PARAM_INT_MAXHOTITS, numberParameters_, parameters_)].setIntValue(100);
    650   parameters_[whichParam(CBC_PARAM_STR_CUTSSTRATEGY, numberParameters_, parameters_)].setCurrentOption("on");
    651   parameters_[whichParam(CBC_PARAM_STR_HEURISTICSTRATEGY, numberParameters_, parameters_)].setCurrentOption("on");
    652   parameters_[whichParam(CBC_PARAM_STR_NODESTRATEGY, numberParameters_, parameters_)].setCurrentOption("fewest");
    653   parameters_[whichParam(CBC_PARAM_STR_GOMORYCUTS, numberParameters_, parameters_)].setCurrentOption("ifmove");
    654   parameters_[whichParam(CBC_PARAM_STR_PROBINGCUTS, numberParameters_, parameters_)].setCurrentOption("ifmove");
    655   parameters_[whichParam(CBC_PARAM_STR_KNAPSACKCUTS, numberParameters_, parameters_)].setCurrentOption("ifmove");
    656   parameters_[whichParam(CBC_PARAM_STR_ZEROHALFCUTS, numberParameters_, parameters_)].setCurrentOption("ifmove");
    657   parameters_[whichParam(CBC_PARAM_STR_REDSPLITCUTS, numberParameters_, parameters_)].setCurrentOption("off");
    658   parameters_[whichParam(CBC_PARAM_STR_REDSPLIT2CUTS, numberParameters_, parameters_)].setCurrentOption("off");
    659   parameters_[whichParam(CBC_PARAM_STR_GMICUTS, numberParameters_, parameters_)].setCurrentOption("off");
    660   parameters_[whichParam(CBC_PARAM_STR_CLIQUECUTS, numberParameters_, parameters_)].setCurrentOption("ifmove");
    661   parameters_[whichParam(CBC_PARAM_STR_MIXEDCUTS, numberParameters_, parameters_)].setCurrentOption("ifmove");
    662   parameters_[whichParam(CBC_PARAM_STR_FLOWCUTS, numberParameters_, parameters_)].setCurrentOption("ifmove");
    663   parameters_[whichParam(CBC_PARAM_STR_TWOMIRCUTS, numberParameters_, parameters_)].setCurrentOption("ifmove");
    664   parameters_[whichParam(CBC_PARAM_STR_LANDPCUTS, numberParameters_, parameters_)].setCurrentOption("off");
    665   parameters_[whichParam(CBC_PARAM_STR_RESIDCUTS, numberParameters_, parameters_)].setCurrentOption("off");
    666   parameters_[whichParam(CBC_PARAM_STR_ROUNDING, numberParameters_, parameters_)].setCurrentOption("on");
    667   parameters_[whichParam(CBC_PARAM_STR_FPUMP, numberParameters_, parameters_)].setCurrentOption("on");
    668   parameters_[whichParam(CBC_PARAM_STR_GREEDY, numberParameters_, parameters_)].setCurrentOption("on");
    669   parameters_[whichParam(CBC_PARAM_STR_COMBINE, numberParameters_, parameters_)].setCurrentOption("on");
    670   parameters_[whichParam(CBC_PARAM_STR_CROSSOVER2, numberParameters_, parameters_)].setCurrentOption("off");
    671   parameters_[whichParam(CBC_PARAM_STR_PIVOTANDCOMPLEMENT, numberParameters_, parameters_)].setCurrentOption("off");
    672   parameters_[whichParam(CBC_PARAM_STR_PIVOTANDFIX, numberParameters_, parameters_)].setCurrentOption("off");
    673   parameters_[whichParam(CBC_PARAM_STR_RANDROUND, numberParameters_, parameters_)].setCurrentOption("off");
    674   parameters_[whichParam(CBC_PARAM_STR_NAIVE, numberParameters_, parameters_)].setCurrentOption("off");
    675   parameters_[whichParam(CBC_PARAM_STR_RINS, numberParameters_, parameters_)].setCurrentOption("off");
    676   parameters_[whichParam(CBC_PARAM_STR_DINS, numberParameters_, parameters_)].setCurrentOption("off");
    677   parameters_[whichParam(CBC_PARAM_STR_RENS, numberParameters_, parameters_)].setCurrentOption("off");
    678   parameters_[whichParam(CBC_PARAM_STR_LOCALTREE, numberParameters_, parameters_)].setCurrentOption("off");
    679   parameters_[whichParam(CBC_PARAM_STR_COSTSTRATEGY, numberParameters_, parameters_)].setCurrentOption("off");
    680   parameters_[whichParam(CBC_PARAM_STR_PREPROCNAMES, numberParameters_, parameters_)].setCurrentOption("off");
     623  parameters_[whichParam(CBC_PARAM_STR_PREPROCESS, parameters_)].setCurrentOption("sos");
     624  parameters_[whichParam(CBC_PARAM_INT_MIPOPTIONS, parameters_)].setIntValue(1057);
     625  parameters_[whichParam(CBC_PARAM_INT_CUTPASSINTREE, parameters_)].setIntValue(1);
     626  parameters_[whichParam(CBC_PARAM_INT_MOREMIPOPTIONS, parameters_)].setIntValue(-1);
     627  parameters_[whichParam(CBC_PARAM_INT_MAXHOTITS, parameters_)].setIntValue(100);
     628  parameters_[whichParam(CBC_PARAM_STR_CUTSSTRATEGY, parameters_)].setCurrentOption("on");
     629  parameters_[whichParam(CBC_PARAM_STR_HEURISTICSTRATEGY, parameters_)].setCurrentOption("on");
     630  parameters_[whichParam(CBC_PARAM_STR_NODESTRATEGY, parameters_)].setCurrentOption("fewest");
     631  parameters_[whichParam(CBC_PARAM_STR_GOMORYCUTS, parameters_)].setCurrentOption("ifmove");
     632  parameters_[whichParam(CBC_PARAM_STR_PROBINGCUTS, parameters_)].setCurrentOption("ifmove");
     633  parameters_[whichParam(CBC_PARAM_STR_KNAPSACKCUTS, parameters_)].setCurrentOption("ifmove");
     634  parameters_[whichParam(CBC_PARAM_STR_ZEROHALFCUTS, parameters_)].setCurrentOption("ifmove");
     635  parameters_[whichParam(CBC_PARAM_STR_REDSPLITCUTS, parameters_)].setCurrentOption("off");
     636  parameters_[whichParam(CBC_PARAM_STR_REDSPLIT2CUTS, parameters_)].setCurrentOption("off");
     637  parameters_[whichParam(CBC_PARAM_STR_GMICUTS, parameters_)].setCurrentOption("off");
     638  parameters_[whichParam(CBC_PARAM_STR_CLIQUECUTS, parameters_)].setCurrentOption("ifmove");
     639  parameters_[whichParam(CBC_PARAM_STR_MIXEDCUTS, parameters_)].setCurrentOption("ifmove");
     640  parameters_[whichParam(CBC_PARAM_STR_FLOWCUTS, parameters_)].setCurrentOption("ifmove");
     641  parameters_[whichParam(CBC_PARAM_STR_TWOMIRCUTS, parameters_)].setCurrentOption("ifmove");
     642  parameters_[whichParam(CBC_PARAM_STR_LANDPCUTS, parameters_)].setCurrentOption("off");
     643  parameters_[whichParam(CBC_PARAM_STR_RESIDCUTS, parameters_)].setCurrentOption("off");
     644  parameters_[whichParam(CBC_PARAM_STR_ROUNDING, parameters_)].setCurrentOption("on");
     645  parameters_[whichParam(CBC_PARAM_STR_FPUMP, parameters_)].setCurrentOption("on");
     646  parameters_[whichParam(CBC_PARAM_STR_GREEDY, parameters_)].setCurrentOption("on");
     647  parameters_[whichParam(CBC_PARAM_STR_COMBINE, parameters_)].setCurrentOption("on");
     648  parameters_[whichParam(CBC_PARAM_STR_CROSSOVER2, parameters_)].setCurrentOption("off");
     649  parameters_[whichParam(CBC_PARAM_STR_PIVOTANDCOMPLEMENT, parameters_)].setCurrentOption("off");
     650  parameters_[whichParam(CBC_PARAM_STR_PIVOTANDFIX, parameters_)].setCurrentOption("off");
     651  parameters_[whichParam(CBC_PARAM_STR_RANDROUND, parameters_)].setCurrentOption("off");
     652  parameters_[whichParam(CBC_PARAM_STR_NAIVE, parameters_)].setCurrentOption("off");
     653  parameters_[whichParam(CBC_PARAM_STR_RINS, parameters_)].setCurrentOption("off");
     654  parameters_[whichParam(CBC_PARAM_STR_DINS, parameters_)].setCurrentOption("off");
     655  parameters_[whichParam(CBC_PARAM_STR_RENS, parameters_)].setCurrentOption("off");
     656  parameters_[whichParam(CBC_PARAM_STR_LOCALTREE, parameters_)].setCurrentOption("off");
     657  parameters_[whichParam(CBC_PARAM_STR_COSTSTRATEGY, parameters_)].setCurrentOption("off");
    681658  if (createSolver)
    682659    delete clpSolver;
     
    717694  lpSolver->messageHandler()->setPrefix(false);
    718695
    719   parameters_[whichParam(CLP_PARAM_DBL_DUALBOUND, numberParameters_, parameters_)].setDoubleValue(lpSolver->dualBound());
    720   parameters_[whichParam(CLP_PARAM_DBL_DUALTOLERANCE, numberParameters_, parameters_)].setDoubleValue(lpSolver->dualTolerance());
     696  parameters_[whichParam(CLP_PARAM_DBL_DUALBOUND, parameters_)].setDoubleValue(lpSolver->dualBound());
     697  parameters_[whichParam(CLP_PARAM_DBL_DUALTOLERANCE, parameters_)].setDoubleValue(lpSolver->dualTolerance());
    721698  /*
    722       Why are we doing this? We read the log level from parameters_, set it into
    723       the message handlers for cbc and the underlying solver. Then we read the
    724       log level back from the handlers and use it to set the values in
    725       parameters_!
    726     */
    727   int iParam = whichParam(CLP_PARAM_INT_SOLVERLOGLEVEL, numberParameters_, parameters_);
     699     Why are we doing this? We read the log level from parameters_, set it into
     700     the message handlers for cbc and the underlying solver. Then we read the
     701     log level back from the handlers and use it to set the values in
     702     parameters_!
     703     */
     704  int iParam = whichParam(CLP_PARAM_INT_SOLVERLOGLEVEL, parameters_);
    728705  int value = parameters_[iParam].intValue();
    729706  clpSolver->messageHandler()->setLogLevel(value);
    730707  lpSolver->setLogLevel(value);
    731   iParam = whichParam(CLP_PARAM_INT_LOGLEVEL, numberParameters_, parameters_);
     708  iParam = whichParam(CLP_PARAM_INT_LOGLEVEL, parameters_);
    732709  value = parameters_[iParam].intValue();
    733710  model_.messageHandler()->setLogLevel(value);
    734   parameters_[whichParam(CLP_PARAM_INT_LOGLEVEL, numberParameters_, parameters_)].setIntValue(model_.logLevel());
    735   parameters_[whichParam(CLP_PARAM_INT_SOLVERLOGLEVEL, numberParameters_, parameters_)].setIntValue(lpSolver->logLevel());
    736   parameters_[whichParam(CLP_PARAM_INT_MAXFACTOR, numberParameters_, parameters_)].setIntValue(lpSolver->factorizationFrequency());
    737   parameters_[whichParam(CLP_PARAM_INT_MAXITERATION, numberParameters_, parameters_)].setIntValue(lpSolver->maximumIterations());
    738   parameters_[whichParam(CLP_PARAM_INT_PERTVALUE, numberParameters_, parameters_)].setIntValue(lpSolver->perturbation());
    739   parameters_[whichParam(CLP_PARAM_DBL_PRIMALTOLERANCE, numberParameters_, parameters_)].setDoubleValue(lpSolver->primalTolerance());
    740   parameters_[whichParam(CLP_PARAM_DBL_PRIMALWEIGHT, numberParameters_, parameters_)].setDoubleValue(lpSolver->infeasibilityCost());
    741   parameters_[whichParam(CBC_PARAM_INT_NUMBERBEFORE, numberParameters_, parameters_)].setIntValue(model_.numberBeforeTrust());
    742   parameters_[whichParam(CBC_PARAM_INT_MAXNODES, numberParameters_, parameters_)].setIntValue(model_.getMaximumNodes());
    743   parameters_[whichParam(CBC_PARAM_INT_STRONGBRANCHING, numberParameters_, parameters_)].setIntValue(model_.numberStrong());
    744   parameters_[whichParam(CBC_PARAM_DBL_INFEASIBILITYWEIGHT, numberParameters_, parameters_)].setDoubleValue(model_.getDblParam(CbcModel::CbcInfeasibilityWeight));
    745   parameters_[whichParam(CBC_PARAM_DBL_INTEGERTOLERANCE, numberParameters_, parameters_)].setDoubleValue(model_.getDblParam(CbcModel::CbcIntegerTolerance));
    746   parameters_[whichParam(CBC_PARAM_DBL_INCREMENT, numberParameters_, parameters_)].setDoubleValue(model_.getDblParam(CbcModel::CbcCutoffIncrement));
     711  parameters_[whichParam(CLP_PARAM_INT_LOGLEVEL, parameters_)].setIntValue(model_.logLevel());
     712  parameters_[whichParam(CLP_PARAM_INT_SOLVERLOGLEVEL, parameters_)].setIntValue(lpSolver->logLevel());
     713  parameters_[whichParam(CLP_PARAM_INT_MAXFACTOR, parameters_)].setIntValue(lpSolver->factorizationFrequency());
     714  parameters_[whichParam(CLP_PARAM_INT_MAXITERATION, parameters_)].setIntValue(lpSolver->maximumIterations());
     715  parameters_[whichParam(CLP_PARAM_INT_PERTVALUE, parameters_)].setIntValue(lpSolver->perturbation());
     716  parameters_[whichParam(CLP_PARAM_DBL_PRIMALTOLERANCE, parameters_)].setDoubleValue(lpSolver->primalTolerance());
     717  parameters_[whichParam(CLP_PARAM_DBL_PRIMALWEIGHT, parameters_)].setDoubleValue(lpSolver->infeasibilityCost());
     718  parameters_[whichParam(CBC_PARAM_INT_NUMBERBEFORE, parameters_)].setIntValue(model_.numberBeforeTrust());
     719  parameters_[whichParam(CBC_PARAM_INT_MAXNODES, parameters_)].setIntValue(model_.getMaximumNodes());
     720  parameters_[whichParam(CBC_PARAM_INT_STRONGBRANCHING, parameters_)].setIntValue(model_.numberStrong());
     721  parameters_[whichParam(CBC_PARAM_DBL_INFEASIBILITYWEIGHT, parameters_)].setDoubleValue(model_.getDblParam(CbcModel::CbcInfeasibilityWeight));
     722  parameters_[whichParam(CBC_PARAM_DBL_INTEGERTOLERANCE, parameters_)].setDoubleValue(model_.getDblParam(CbcModel::CbcIntegerTolerance));
     723  parameters_[whichParam(CBC_PARAM_DBL_INCREMENT, parameters_)].setDoubleValue(model_.getDblParam(CbcModel::CbcCutoffIncrement));
    747724}
    748725// Add user function
     
    10461023int callCbc(const std::string input2, CbcModel &babSolver)
    10471024{
     1025  CbcSolverUsefulData cbcData;
     1026  cbcData.noPrinting_ = false;
    10481027  char *input3 = CoinStrdup(input2.c_str());
    1049   CbcMain0(babSolver);
    1050   int returnCode = callCbc1(input3, babSolver);
     1028  CbcMain0(babSolver, cbcData);
     1029  int returnCode = callCbc1(input3, babSolver, dummyCallBack, cbcData);
    10511030  free(input3);
    10521031  return returnCode;
     
    10621041*/
    10631042
    1064 int callCbc1(const std::string input2, CbcModel &babSolver)
    1065 {
    1066   char *input3 = CoinStrdup(input2.c_str());
    1067   int returnCode = callCbc1(input3, babSolver);
    1068   free(input3);
    1069   return returnCode;
    1070 }
    1071 
    1072 int callCbc1(const char *input2, CbcModel &model)
    1073 {
    1074   return callCbc1(input2, model, dummyCallBack);
    1075 }
    1076 
    1077 int callCbc1(const std::string input2, CbcModel &babSolver,
    1078   int callBack(CbcModel *currentSolver, int whereFrom))
    1079 {
    1080   char *input3 = CoinStrdup(input2.c_str());
    1081   int returnCode = callCbc1(input3, babSolver, callBack);
    1082   free(input3);
    1083   return returnCode;
    1084 }
     1043// Disabling non thread safe overloads
     1044/*
     1045   int callCbc1(const std::string input2, CbcModel & babSolver)
     1046   {
     1047   char * input3 = CoinStrdup(input2.c_str());
     1048   int returnCode = callCbc1(input3, babSolver);
     1049   free(input3);
     1050   return returnCode;
     1051   }
     1052
     1053   int callCbc1(const char * input2, CbcModel & model)
     1054   {
     1055   return callCbc1(input2, model, dummyCallBack);
     1056   }
     1057
     1058   int callCbc1(const std::string input2, CbcModel & babSolver,
     1059   int callBack(CbcModel * currentSolver, int whereFrom))
     1060   {
     1061   char * input3 = CoinStrdup(input2.c_str());
     1062   int returnCode = callCbc1(input3, babSolver, callBack);
     1063   free(input3);
     1064   return returnCode;
     1065   }
     1066   */
    10851067int callCbc1(const char *input2, CbcModel &model,
    10861068  int callBack(CbcModel *currentSolver, int whereFrom),
     
    11411123  return returnCode;
    11421124}
    1143 static CbcSolverUsefulData staticParameterData;
     1125
    11441126int callCbc1(const char *input2, CbcModel &model,
    11451127  int callBack(CbcModel *currentSolver, int whereFrom))
    11461128{
     1129  CbcSolverUsefulData data;
    11471130  // allow interrupts and printing
    11481131#ifndef CBC_NO_INTERRUPT
    1149   staticParameterData.useSignalHandler_ = true;
     1132  data.useSignalHandler_ = true;
    11501133#endif
    11511134#ifndef CBC_NO_PRINTING
    1152   staticParameterData.noPrinting_ = false;
    1153 #endif
    1154   return callCbc1(input2, model, callBack, staticParameterData);
     1135  data.noPrinting_ = false;
     1136#endif
     1137  return callCbc1(input2, model, callBack, data);
    11551138}
    11561139
     
    11611144  const double *stuff);
    11621145
    1163 int CbcMain1(int argc, const char *argv[],
    1164   CbcModel &model)
    1165 {
    1166   return CbcMain1(argc, argv, model, dummyCallBack);
    1167 }
     1146/*
     1147   int CbcMain1 (int argc, const char *argv[],
     1148   CbcModel  & model)
     1149   {
     1150   return CbcMain1(argc, argv, model, dummyCallBack);
     1151   }*/
    11681152
    11691153#ifdef CBC_THREAD_SAFE
     
    12471231  noPrinting_ = true;
    12481232  useSignalHandler_ = false;
    1249   establishParams(numberParameters_, parameters_);
     1233  establishParams(parameters_);
    12501234}
    12511235
     
    12571241  noPrinting_ = rhs.noPrinting_;
    12581242  useSignalHandler_ = rhs.useSignalHandler_;
    1259   numberParameters_ = rhs.numberParameters_;
    1260   memcpy(parameters_, rhs.parameters_, sizeof(parameters_));
     1243  this->parameters_ = rhs.parameters_;
    12611244}
    12621245
     
    12681251    noPrinting_ = rhs.noPrinting_;
    12691252    useSignalHandler_ = rhs.useSignalHandler_;
    1270     numberParameters_ = rhs.numberParameters_;
    1271     memcpy(parameters_, rhs.parameters_, sizeof(parameters_));
     1253    this->parameters_ = rhs.parameters_;
    12721254  }
    12731255  return *this;
     
    12931275  int callBack(CbcModel *currentSolver, int whereFrom))
    12941276{
     1277  CbcSolverUsefulData data;
    12951278  // allow interrupts and printing
    1296   staticParameterData.noPrinting_ = false;
    1297   staticParameterData.useSignalHandler_ = true;
    1298   return CbcMain1(argc, argv, model, callBack, staticParameterData);
    1299 }
    1300 // Get int value for an option
    1301 static int intValueOfOption(CbcSolverUsefulData &parameterData, CbcOrClpParameterType type)
    1302 {
    1303   CbcOrClpParam *parameters = parameterData.parameters_;
    1304   int numberParameters = parameterData.numberParameters_;
    1305   int jParam = whichParam(type, numberParameters, parameters);
    1306   return parameters[jParam].currentOptionAsInteger();
     1279  data.noPrinting_ = false;
     1280  data.useSignalHandler_ = true;
     1281  return CbcMain1(argc, argv, model, callBack, data);
    13071282}
    13081283static void printGeneralMessage(CbcModel &model, const char *message);
     
    13211296  CbcSolverUsefulData &parameterData)
    13221297{
    1323   CbcOrClpParam *parameters_ = parameterData.parameters_;
    1324   int numberParameters_ = parameterData.numberParameters_;
     1298  std::vector< CbcOrClpParam > parameters_(parameterData.parameters_);
    13251299  double totalTime = parameterData.totalTime_;
    13261300  bool noPrinting = parameterData.noPrinting_;
     
    17131687    std::string solutionFile = "stdout";
    17141688    std::string solutionSaveFile = "solution.file";
    1715     int slog = whichParam(CLP_PARAM_INT_SOLVERLOGLEVEL, numberParameters_, parameters_);
    1716     int log = whichParam(CLP_PARAM_INT_LOGLEVEL, numberParameters_, parameters_);
     1689    int slog = whichParam(CLP_PARAM_INT_SOLVERLOGLEVEL, parameters_);
     1690    int log = whichParam(CLP_PARAM_INT_LOGLEVEL, parameters_);
    17171691#ifndef CBC_OTHER_SOLVER
    17181692    double normalIncrement = model_.getCutoffIncrement();
     
    18131787    //zerohalfGen.switchOnExpensive();
    18141788    // set default action (0=off,1=on,2=root)
    1815     int zerohalfAction = 0;
     1789    int zerohalfAction = 3;
    18161790
    18171791    // Stored cuts
     
    18551829#endif
    18561830      int iParam;
    1857       iParam = whichParam(CBC_PARAM_INT_DIVEOPT, numberParameters_, parameters_);
     1831      iParam = whichParam(CBC_PARAM_INT_DIVEOPT, parameters_);
    18581832      parameters_[iParam].setIntValue(2);
    1859       iParam = whichParam(CBC_PARAM_INT_FPUMPITS, numberParameters_, parameters_);
     1833      iParam = whichParam(CBC_PARAM_INT_FPUMPITS, parameters_);
    18601834      parameters_[iParam].setIntValue(30);
    1861       iParam = whichParam(CBC_PARAM_INT_FPUMPTUNE, numberParameters_, parameters_);
     1835      iParam = whichParam(CBC_PARAM_INT_FPUMPTUNE, parameters_);
    18621836      parameters_[iParam].setIntValue(1005043);
    18631837      initialPumpTune = 1005043;
    1864       iParam = whichParam(CLP_PARAM_INT_PROCESSTUNE, numberParameters_, parameters_);
     1838      iParam = whichParam(CLP_PARAM_INT_PROCESSTUNE, parameters_);
    18651839      parameters_[iParam].setIntValue(6);
    18661840      tunePreProcess = 6;
    1867       iParam = whichParam(CBC_PARAM_STR_DIVINGC, numberParameters_, parameters_);
     1841      iParam = whichParam(CBC_PARAM_STR_DIVINGC, parameters_);
    18681842      parameters_[iParam].setCurrentOption("on");
    1869       iParam = whichParam(CBC_PARAM_STR_RINS, numberParameters_, parameters_);
     1843      iParam = whichParam(CBC_PARAM_STR_RINS, parameters_);
    18701844      parameters_[iParam].setCurrentOption("on");
    1871       iParam = whichParam(CBC_PARAM_STR_PROBINGCUTS, numberParameters_, parameters_);
     1845      iParam = whichParam(CBC_PARAM_STR_PROBINGCUTS, parameters_);
    18721846      parameters_[iParam].setCurrentOption("on");
    18731847      probingAction = 3;
     
    19671941      int numberMatches = 0;
    19681942      int firstMatch = -1;
    1969       for (iParam = 0; iParam < numberParameters_; iParam++) {
     1943      for (iParam = 0; iParam < (int)parameters_.size(); iParam++) {
    19701944        int match = parameters_[iParam].matches(field);
    19711945        if (match == 1) {
     
    19791953        }
    19801954      }
    1981       if (iParam < numberParameters_ && !numberQuery) {
     1955      if (iParam < (int)parameters_.size() && !numberQuery) {
    19821956        // found
    19831957        CbcOrClpParam found = parameters_[iParam];
     
    20091983          bool evenHidden = false;
    20101984          int printLevel = parameters_[whichParam(CLP_PARAM_STR_ALLCOMMANDS,
    2011                                          numberParameters_, parameters_)]
     1985                                         parameters_)]
    20121986                             .currentOptionAsInteger();
    20131987          int convertP[] = { 2, 1, 0 };
     
    20612035            if ((verbose & 2) != 0)
    20622036              std::cout << std::endl;
    2063             for (iParam = 0; iParam < numberParameters_; iParam++) {
     2037            for (iParam = 0; iParam < (int)parameters_.size(); iParam++) {
    20642038              int type = parameters_[iParam].type();
    20652039              //printf("%d type %d limits %d %d display %d\n",iParam,
     
    21222096            int across = 0;
    21232097            std::cout << types[iType] << "  ";
    2124             for (iParam = 0; iParam < numberParameters_; iParam++) {
     2098            for (iParam = 0; iParam < (int)parameters_.size(); iParam++) {
    21252099              int type = parameters_[iParam].type();
    21262100              if (type >= limits[iType]
     
    21842158                  double *dj = lpSolver->dualColumnSolution();
    21852159                  int numberFixed = 0;
    2186                   double dextra4 = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA4, numberParameters_, parameters_)].doubleValue();
     2160                  double dextra4 = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA4, parameters_)].doubleValue();
    21872161                  if (dextra4)
    21882162                    printf("Multiple for continuous dj fixing is %g\n", dextra4);
     
    22792253                  const char *message = NULL;
    22802254                  value -= 1000 * switchValue;
    2281                   parameters_[whichParam(CBC_PARAM_INT_EXPERIMENT, numberParameters_, parameters_)].setIntValue(0 /*value*/);
     2255                  parameters_[whichParam(CBC_PARAM_INT_EXPERIMENT, parameters_)].setIntValue(0 /*value*/);
    22822256                  switch (switchValue) {
    22832257                  default:
    22842258                  case 4:
    22852259                    // hotstart 500, -200 cut passes
    2286                     message = parameters_[whichParam(CBC_PARAM_INT_MAXHOTITS, numberParameters_, parameters_)].setIntValueWithMessage(500);
     2260                    message = parameters_[whichParam(CBC_PARAM_INT_MAXHOTITS, parameters_)].setIntValueWithMessage(500);
    22872261                    if (!noPrinting_ && message)
    22882262                      generalMessageHandler->message(CLP_GENERAL, generalMessages)
    22892263                        << message << CoinMessageEol;
    2290                     message = parameters_[whichParam(CBC_PARAM_INT_CUTPASS, numberParameters_, parameters_)].setIntValueWithMessage(-200);
     2264                    message = parameters_[whichParam(CBC_PARAM_INT_CUTPASS, parameters_)].setIntValueWithMessage(-200);
    22912265                    if (!noPrinting_ && message)
    22922266                      generalMessageHandler->message(CLP_GENERAL, generalMessages)
     
    22942268                  case 3:
    22952269                    // multiple 4
    2296                     message = parameters_[whichParam(CBC_PARAM_INT_MULTIPLEROOTS, numberParameters_, parameters_)].setIntValueWithMessage(4);
     2270                    message = parameters_[whichParam(CBC_PARAM_INT_MULTIPLEROOTS, parameters_)].setIntValueWithMessage(4);
    22972271                    if (!noPrinting_ && message)
    22982272                      generalMessageHandler->message(CLP_GENERAL, generalMessages)
     
    23002274                  case 2:
    23012275                    // rens plus all diving at root
    2302                     message = parameters_[whichParam(CBC_PARAM_INT_DIVEOPT, numberParameters_, parameters_)].setIntValueWithMessage(16);
     2276                    message = parameters_[whichParam(CBC_PARAM_INT_DIVEOPT, parameters_)].setIntValueWithMessage(16);
    23032277                    if (!noPrinting_ && message)
    23042278                      generalMessageHandler->message(CLP_GENERAL, generalMessages)
     
    23082282                  case 1:
    23092283                    tunePreProcess = 7;
    2310                     message = parameters_[whichParam(CLP_PARAM_INT_PROCESSTUNE, numberParameters_, parameters_)].setIntValueWithMessage(7);
     2284                    message = parameters_[whichParam(CLP_PARAM_INT_PROCESSTUNE, parameters_)].setIntValueWithMessage(7);
    23112285                    if (!noPrinting_ && message)
    23122286                      generalMessageHandler->message(CLP_GENERAL, generalMessages)
    23132287                        << message << CoinMessageEol;
    2314                     //message = parameters_[whichParam(CBC_PARAM_INT_MIPOPTIONS, numberParameters_, parameters_)].setIntValueWithMessage(1025);
     2288                    //message = parameters_[whichParam(CBC_PARAM_INT_MIPOPTIONS, parameters_)].setIntValueWithMessage(1025);
    23152289                    //if (!noPrinting_&&message)
    23162290                    //    generalMessageHandler->message(CLP_GENERAL, generalMessages)
    23172291                    //  << message << CoinMessageEol;
    2318                     message = parameters_[whichParam(CBC_PARAM_STR_PROBINGCUTS, numberParameters_, parameters_)].setCurrentOptionWithMessage("on");
     2292                    message = parameters_[whichParam(CBC_PARAM_STR_PROBINGCUTS, parameters_)].setCurrentOptionWithMessage("on");
    23192293                    probingAction = 1;
    23202294                    if (!noPrinting_ && message)
    23212295                      generalMessageHandler->message(CLP_GENERAL, generalMessages)
    23222296                        << message << CoinMessageEol;
    2323                     message = parameters_[whichParam(CBC_PARAM_STR_ZEROHALFCUTS, numberParameters_, parameters_)].setCurrentOptionWithMessage("root");
     2297                    message = parameters_[whichParam(CBC_PARAM_STR_ZEROHALFCUTS, parameters_)].setCurrentOptionWithMessage("root");
    23242298                    if (!noPrinting_ && message)
    23252299                      generalMessageHandler->message(CLP_GENERAL, generalMessages)
    23262300                        << message << CoinMessageEol;
    2327                     message = parameters_[whichParam(CBC_PARAM_STR_LAGOMORYCUTS, numberParameters_, parameters_)].setCurrentOptionWithMessage("root");
     2301                    message = parameters_[whichParam(CBC_PARAM_STR_LAGOMORYCUTS, parameters_)].setCurrentOptionWithMessage("root");
    23282302                    if (!noPrinting_ && message)
    23292303                      generalMessageHandler->message(CLP_GENERAL, generalMessages)
    23302304                        << message << CoinMessageEol;
    23312305                    GMIAction = 2;
    2332                     message = parameters_[whichParam(CBC_PARAM_STR_GMICUTS, numberParameters_, parameters_)].setCurrentOptionWithMessage("root");
     2306                    message = parameters_[whichParam(CBC_PARAM_STR_GMICUTS, parameters_)].setCurrentOptionWithMessage("root");
    23332307                    if (!noPrinting_ && message)
    23342308                      generalMessageHandler->message(CLP_GENERAL, generalMessages)
     
    23402314                  addFlags = 1048576 * (value / 10);
    23412315                  value = value % 10;
    2342                   parameters_[whichParam(CBC_PARAM_INT_EXPERIMENT, numberParameters_, parameters_)].setIntValue(value);
     2316                  parameters_[whichParam(CBC_PARAM_INT_EXPERIMENT, parameters_)].setIntValue(value);
    23432317                }
    23442318                if (value >= 1) {
     
    23462320                  if (value >= 2 && value <= 3) {
    23472321                    // swap default diving
    2348                     int iParam = whichParam(CBC_PARAM_STR_DIVINGC, numberParameters_, parameters_);
     2322                    int iParam = whichParam(CBC_PARAM_STR_DIVINGC, parameters_);
    23492323                    parameters_[iParam].setCurrentOption("off");
    2350                     iParam = whichParam(CBC_PARAM_STR_DIVINGP, numberParameters_, parameters_);
     2324                    iParam = whichParam(CBC_PARAM_STR_DIVINGP, parameters_);
    23512325                    parameters_[iParam].setCurrentOption("on");
    23522326                  }
    23532327                  int extra4 = values[value - 1] + addFlags;
    2354                   parameters_[whichParam(CBC_PARAM_INT_EXTRA4, numberParameters_, parameters_)].setIntValue(extra4);
     2328                  parameters_[whichParam(CBC_PARAM_INT_EXTRA4, parameters_)].setIntValue(extra4);
    23552329                  if (!noPrinting_) {
    23562330                    generalMessageHandler->message(CLP_GENERAL, generalMessages)
     
    23652339                      << CoinMessageEol;
    23662340                  }
    2367                   parameters_[whichParam(CBC_PARAM_STR_PROBINGCUTS, numberParameters_, parameters_)].setCurrentOption("forceOnStrong");
     2341                  parameters_[whichParam(CBC_PARAM_STR_PROBINGCUTS, parameters_)].setCurrentOption("forceOnStrong");
    23682342                  probingAction = 8;
    2369                   parameters_[whichParam(CBC_PARAM_STR_GOMORYCUTS, numberParameters_, parameters_)].setCurrentOption("onGlobal");
     2343                  parameters_[whichParam(CBC_PARAM_STR_GOMORYCUTS, parameters_)].setCurrentOption("onGlobal");
    23702344                  gomoryAction = 5;
    2371                   parameters_[whichParam(CBC_PARAM_STR_KNAPSACKCUTS, numberParameters_, parameters_)].setCurrentOption("onGlobal");
     2345                  parameters_[whichParam(CBC_PARAM_STR_KNAPSACKCUTS, parameters_)].setCurrentOption("onGlobal");
    23722346                  knapsackAction = 5;
    2373                   parameters_[whichParam(CLP_PARAM_STR_FACTORIZATION, numberParameters_, parameters_)].setCurrentOption("osl");
     2347                  parameters_[whichParam(CLP_PARAM_STR_FACTORIZATION, parameters_)].setCurrentOption("osl");
    23742348                  lpSolver->factorization()->forceOtherFactorization(3);
    2375                   parameters_[whichParam(CBC_PARAM_INT_MAXHOTITS, numberParameters_, parameters_)].setIntValue(100);
    2376                   parameters_[whichParam(CBC_PARAM_INT_CUTPASS, numberParameters_, parameters_)].setIntValue(1000);
     2349                  parameters_[whichParam(CBC_PARAM_INT_MAXHOTITS, parameters_)].setIntValue(100);
     2350                  parameters_[whichParam(CBC_PARAM_INT_CUTPASS, parameters_)].setIntValue(1000);
    23772351                  cutPass = 1000;
    2378                   parameters_[whichParam(CBC_PARAM_STR_RENS, numberParameters_, parameters_)].setCurrentOption("on");
     2352                  parameters_[whichParam(CBC_PARAM_STR_RENS, parameters_)].setCurrentOption("on");
    23792353                }
    23802354              } else if (parameters_[iParam].type() == CBC_PARAM_INT_STRATEGY) {
     
    23822356                  gomoryGen.setAwayAtRoot(0.05);
    23832357                  int iParam;
    2384                   iParam = whichParam(CBC_PARAM_INT_DIVEOPT, numberParameters_, parameters_);
     2358                  iParam = whichParam(CBC_PARAM_INT_DIVEOPT, parameters_);
    23852359                  parameters_[iParam].setIntValue(-1);
    2386                   iParam = whichParam(CBC_PARAM_INT_FPUMPITS, numberParameters_, parameters_);
     2360                  iParam = whichParam(CBC_PARAM_INT_FPUMPITS, parameters_);
    23872361                  parameters_[iParam].setIntValue(20);
    2388                   iParam = whichParam(CBC_PARAM_INT_FPUMPTUNE, numberParameters_, parameters_);
     2362                  iParam = whichParam(CBC_PARAM_INT_FPUMPTUNE, parameters_);
    23892363                  parameters_[iParam].setIntValue(1003);
    23902364                  initialPumpTune = 1003;
    2391                   iParam = whichParam(CLP_PARAM_INT_PROCESSTUNE, numberParameters_, parameters_);
     2365                  iParam = whichParam(CLP_PARAM_INT_PROCESSTUNE, parameters_);
    23922366                  parameters_[iParam].setIntValue(0);
    23932367                  tunePreProcess = 0;
    2394                   iParam = whichParam(CBC_PARAM_STR_DIVINGC, numberParameters_, parameters_);
     2368                  iParam = whichParam(CBC_PARAM_STR_DIVINGC, parameters_);
    23952369                  parameters_[iParam].setCurrentOption("off");
    2396                   iParam = whichParam(CBC_PARAM_STR_RINS, numberParameters_, parameters_);
     2370                  iParam = whichParam(CBC_PARAM_STR_RINS, parameters_);
    23972371                  parameters_[iParam].setCurrentOption("off");
    2398                   iParam = whichParam(CBC_PARAM_STR_PROBINGCUTS, numberParameters_, parameters_);
     2372                  iParam = whichParam(CBC_PARAM_STR_PROBINGCUTS, parameters_);
    23992373                  // but not if cuts off
    2400                   int jParam = whichParam(CBC_PARAM_STR_CUTSSTRATEGY, numberParameters_, parameters_);
     2374                  int jParam = whichParam(CBC_PARAM_STR_CUTSSTRATEGY, parameters_);
    24012375
    24022376                  jParam = parameters_[jParam].currentOptionAsInteger();
     
    24692443              } else if (action == 4) {
    24702444                // Positive edge steepest
    2471                 ClpPEDualRowSteepest p(fabs(parameters_[whichParam(CLP_PARAM_DBL_PSI, numberParameters_, parameters_)].doubleValue()));
     2445                ClpPEDualRowSteepest p(fabs(parameters_[whichParam(CLP_PARAM_DBL_PSI, parameters_)].doubleValue()));
    24722446                lpSolver->setDualRowPivotAlgorithm(p);
    24732447              } else if (action == 5) {
    24742448                // Positive edge Dantzig
    2475                 ClpPEDualRowDantzig p(fabs(parameters_[whichParam(CLP_PARAM_DBL_PSI, numberParameters_, parameters_)].doubleValue()));
     2449                ClpPEDualRowDantzig p(fabs(parameters_[whichParam(CLP_PARAM_DBL_PSI, parameters_)].doubleValue()));
    24762450                lpSolver->setDualRowPivotAlgorithm(p);
    24772451              }
     
    25012475              } else if (action == 7) {
    25022476                // Positive edge steepest
    2503                 ClpPEPrimalColumnSteepest p(fabs(parameters_[whichParam(CLP_PARAM_DBL_PSI, numberParameters_, parameters_)].doubleValue()));
     2477                ClpPEPrimalColumnSteepest p(fabs(parameters_[whichParam(CLP_PARAM_DBL_PSI, parameters_)].doubleValue()));
    25042478                lpSolver->setPrimalColumnPivotAlgorithm(p);
    25052479              } else if (action == 8) {
    25062480                // Positive edge Dantzig
    2507                 ClpPEPrimalColumnDantzig p(fabs(parameters_[whichParam(CLP_PARAM_DBL_PSI, numberParameters_, parameters_)].doubleValue()));
     2481                ClpPEPrimalColumnDantzig p(fabs(parameters_[whichParam(CLP_PARAM_DBL_PSI, parameters_)].doubleValue()));
    25082482                lpSolver->setPrimalColumnPivotAlgorithm(p);
    25092483              }
     
    26622636              twomirAction = action;
    26632637              //landpAction = action;
    2664               parameters_[whichParam(CBC_PARAM_STR_GOMORYCUTS, numberParameters_, parameters_)].setCurrentOption(action);
    2665               parameters_[whichParam(CBC_PARAM_STR_PROBINGCUTS, numberParameters_, parameters_)].setCurrentOption(action);
    2666               parameters_[whichParam(CBC_PARAM_STR_KNAPSACKCUTS, numberParameters_, parameters_)].setCurrentOption(action);
    2667               parameters_[whichParam(CBC_PARAM_STR_CLIQUECUTS, numberParameters_, parameters_)].setCurrentOption(action);
    2668               parameters_[whichParam(CBC_PARAM_STR_FLOWCUTS, numberParameters_, parameters_)].setCurrentOption(action);
    2669               parameters_[whichParam(CBC_PARAM_STR_MIXEDCUTS, numberParameters_, parameters_)].setCurrentOption(action);
    2670               parameters_[whichParam(CBC_PARAM_STR_TWOMIRCUTS, numberParameters_, parameters_)].setCurrentOption(action);
     2638              parameters_[whichParam(CBC_PARAM_STR_GOMORYCUTS, parameters_)].setCurrentOption(action);
     2639              parameters_[whichParam(CBC_PARAM_STR_PROBINGCUTS, parameters_)].setCurrentOption(action);
     2640              parameters_[whichParam(CBC_PARAM_STR_KNAPSACKCUTS, parameters_)].setCurrentOption(action);
     2641              parameters_[whichParam(CBC_PARAM_STR_CLIQUECUTS, parameters_)].setCurrentOption(action);
     2642              parameters_[whichParam(CBC_PARAM_STR_FLOWCUTS, parameters_)].setCurrentOption(action);
     2643              parameters_[whichParam(CBC_PARAM_STR_MIXEDCUTS, parameters_)].setCurrentOption(action);
     2644              parameters_[whichParam(CBC_PARAM_STR_TWOMIRCUTS, parameters_)].setCurrentOption(action);
    26712645              if (!action) {
    26722646                zerohalfAction = action;
    2673                 parameters_[whichParam(CBC_PARAM_STR_ZEROHALFCUTS, numberParameters_, parameters_)].setCurrentOption(action);
     2647                parameters_[whichParam(CBC_PARAM_STR_ZEROHALFCUTS, parameters_)].setCurrentOption(action);
    26742648                redsplitAction = action;
    2675                 parameters_[whichParam(CBC_PARAM_STR_REDSPLITCUTS, numberParameters_, parameters_)].setCurrentOption(action);
     2649                parameters_[whichParam(CBC_PARAM_STR_REDSPLITCUTS, parameters_)].setCurrentOption(action);
    26762650                redsplit2Action = action;
    2677                 parameters_[whichParam(CBC_PARAM_STR_REDSPLIT2CUTS, numberParameters_, parameters_)].setCurrentOption(action);
     2651                parameters_[whichParam(CBC_PARAM_STR_REDSPLIT2CUTS, parameters_)].setCurrentOption(action);
    26782652                GMIAction = action;
    2679                 parameters_[whichParam(CBC_PARAM_STR_GMICUTS, numberParameters_, parameters_)].setCurrentOption(action);
     2653                parameters_[whichParam(CBC_PARAM_STR_GMICUTS, parameters_)].setCurrentOption(action);
    26802654                landpAction = action;
    2681                 parameters_[whichParam(CBC_PARAM_STR_LANDPCUTS, numberParameters_, parameters_)].setCurrentOption(action);
     2655                parameters_[whichParam(CBC_PARAM_STR_LANDPCUTS, parameters_)].setCurrentOption(action);
    26822656                residualCapacityAction = action;
    2683                 parameters_[whichParam(CBC_PARAM_STR_RESIDCUTS, numberParameters_, parameters_)].setCurrentOption(action);
     2657                parameters_[whichParam(CBC_PARAM_STR_RESIDCUTS, parameters_)].setCurrentOption(action);
    26842658              }
    26852659              break;
    26862660            case CBC_PARAM_STR_HEURISTICSTRATEGY:
    2687               parameters_[whichParam(CBC_PARAM_STR_ROUNDING, numberParameters_, parameters_)].setCurrentOption(action);
    2688               parameters_[whichParam(CBC_PARAM_STR_GREEDY, numberParameters_, parameters_)].setCurrentOption(action);
    2689               parameters_[whichParam(CBC_PARAM_STR_COMBINE, numberParameters_, parameters_)].setCurrentOption(action);
     2661              parameters_[whichParam(CBC_PARAM_STR_ROUNDING, parameters_)].setCurrentOption(action);
     2662              parameters_[whichParam(CBC_PARAM_STR_GREEDY, parameters_)].setCurrentOption(action);
     2663              parameters_[whichParam(CBC_PARAM_STR_COMBINE, parameters_)].setCurrentOption(action);
    26902664              //parameters_[whichParam(CBC_PARAM_STR_LOCALTREE,numberParameters_,parameters_)].setCurrentOption(action);
    2691               parameters_[whichParam(CBC_PARAM_STR_FPUMP, numberParameters_, parameters_)].setCurrentOption(action);
    2692               parameters_[whichParam(CBC_PARAM_STR_DIVINGC, numberParameters_, parameters_)].setCurrentOption(action);
    2693               parameters_[whichParam(CBC_PARAM_STR_RINS, numberParameters_, parameters_)].setCurrentOption(action);
     2665              parameters_[whichParam(CBC_PARAM_STR_FPUMP, parameters_)].setCurrentOption(action);
     2666              parameters_[whichParam(CBC_PARAM_STR_DIVINGC, parameters_)].setCurrentOption(action);
     2667              parameters_[whichParam(CBC_PARAM_STR_RINS, parameters_)].setCurrentOption(action);
    26942668              break;
    26952669            case CBC_PARAM_STR_GREEDY:
     
    27492723              // Say not in integer
    27502724              integerStatus = -1;
    2751               double objScale = parameters_[whichParam(CLP_PARAM_DBL_OBJSCALE2, numberParameters_, parameters_)].doubleValue();
     2725              double objScale = parameters_[whichParam(CLP_PARAM_DBL_OBJSCALE2, parameters_)].doubleValue();
    27522726              // deal with positive edge
    2753               double psi = parameters_[whichParam(CLP_PARAM_DBL_PSI, numberParameters_, parameters_)].doubleValue();
     2727              double psi = parameters_[whichParam(CLP_PARAM_DBL_PSI, parameters_)].doubleValue();
    27542728              if (psi > 0.0) {
    27552729                ClpDualRowPivot *dualp = lpSolver->dualRowPivot();
     
    29492923              } else {
    29502924                // special solver
    2951                 int testOsiOptions = parameters_[whichParam(CBC_PARAM_INT_TESTOSI, numberParameters_, parameters_)].intValue();
     2925                int testOsiOptions = parameters_[whichParam(CBC_PARAM_INT_TESTOSI, parameters_)].intValue();
    29522926                double *solution = NULL;
    29532927                if (testOsiOptions < 10) {
     
    31763150                if ((printOptions & 1) != 0)
    31773151                  pinfo.statistics();
    3178                 double presolveTolerance = parameters_[whichParam(CLP_PARAM_DBL_PRESOLVETOLERANCE, numberParameters_, parameters_)].doubleValue();
     3152                double presolveTolerance = parameters_[whichParam(CLP_PARAM_DBL_PRESOLVETOLERANCE, parameters_)].doubleValue();
    31793153                model2 = pinfo.presolvedModel(*lpSolver, presolveTolerance,
    31803154                  true, preSolve);
     
    32863260                model_.setDblParam(CbcModel::CbcStartSeconds, CoinCpuTime());
    32873261#endif
    3288               int vubAction = parameters_[whichParam(CBC_PARAM_INT_VUBTRY, numberParameters_, parameters_)].intValue();
     3262              int vubAction = parameters_[whichParam(CBC_PARAM_INT_VUBTRY, parameters_)].intValue();
    32893263              if (vubAction != -1) {
    32903264                // look at vubs
    32913265                // extra1 is number of ints to leave free
    32923266                // Just ones which affect >= extra3
    3293                 int extra3 = parameters_[whichParam(CBC_PARAM_INT_EXTRA3, numberParameters_, parameters_)].intValue();
     3267                int extra3 = parameters_[whichParam(CBC_PARAM_INT_EXTRA3, parameters_)].intValue();
    32943268                /* 2 is cost above which to fix if feasible
    32953269                                   3 is fraction of integer variables fixed if relaxing (0.97)
     
    32983272                double dextra[6];
    32993273                int extra[5];
    3300                 extra[1] = parameters_[whichParam(CBC_PARAM_INT_EXTRA1, numberParameters_, parameters_)].intValue();
    3301                 int exp1 = parameters_[whichParam(CBC_PARAM_INT_EXPERIMENT, numberParameters_,
    3302                                          parameters_)]
    3303                              .intValue();
     3274                extra[1] = parameters_[whichParam(CBC_PARAM_INT_EXTRA1, parameters_)].intValue();
     3275                int exp1 = parameters_[whichParam(CBC_PARAM_INT_EXPERIMENT, parameters_)].intValue();
    33043276                if (exp1 == 4 && extra[1] == -1)
    33053277                  extra[1] = 999998;
    3306                 dextra[1] = parameters_[whichParam(CBC_PARAM_DBL_FAKEINCREMENT, numberParameters_, parameters_)].doubleValue();
    3307                 dextra[2] = parameters_[whichParam(CBC_PARAM_DBL_FAKECUTOFF, numberParameters_, parameters_)].doubleValue();
    3308                 dextra[3] = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA3, numberParameters_, parameters_)].doubleValue();
    3309                 dextra[4] = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA4, numberParameters_, parameters_)].doubleValue();
    3310                 dextra[5] = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA5, numberParameters_, parameters_)].doubleValue();
     3278                dextra[1] = parameters_[whichParam(CBC_PARAM_DBL_FAKEINCREMENT, parameters_)].doubleValue();
     3279                dextra[2] = parameters_[whichParam(CBC_PARAM_DBL_FAKECUTOFF, parameters_)].doubleValue();
     3280                dextra[3] = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA3, parameters_)].doubleValue();
     3281                dextra[4] = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA4, parameters_)].doubleValue();
     3282                dextra[5] = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA5, parameters_)].doubleValue();
    33113283                if (!dextra[3])
    33123284                  dextra[3] = 0.97;
     
    33553327              }
    33563328              doHeuristics(&model_, 2, parameters_,
    3357                 numberParameters_, noPrinting_, initialPumpTune);
     3329                noPrinting_, initialPumpTune);
    33583330              if (!objectsExist) {
    33593331                model_.deleteObjects(false);
     
    34173389            // User can set options - main difference is lack of model and CglPreProcess
    34183390            goodModel = true;
    3419             parameters_[whichParam(CBC_PARAM_INT_MULTIPLEROOTS, numberParameters_, parameters_)].setIntValue(0);
     3391            parameters_[whichParam(CBC_PARAM_INT_MULTIPLEROOTS, parameters_)].setIntValue(0);
    34203392            /*
    34213393                          Run branch-and-cut. First set a few options -- node comparison, scaling.
     
    34473419                ClpSimplex *lpSolver = si->getModelPtr();
    34483420                // deal with positive edge
    3449                 double psi = parameters_[whichParam(CLP_PARAM_DBL_PSI, numberParameters_, parameters_)].doubleValue();
     3421                double psi = parameters_[whichParam(CLP_PARAM_DBL_PSI, parameters_)].doubleValue();
    34503422                if (psi > 0.0) {
    34513423                  ClpDualRowPivot *dualp = lpSolver->dualRowPivot();
     
    34923464                  if (obj) {
    34933465                    preProcess = 0;
    3494                     int testOsiOptions = parameters_[whichParam(CBC_PARAM_INT_TESTOSI, numberParameters_, parameters_)].intValue();
    3495                     parameters_[whichParam(CBC_PARAM_INT_TESTOSI, numberParameters_, parameters_)].setIntValue(CoinMax(0, testOsiOptions));
     3466                    int testOsiOptions = parameters_[whichParam(CBC_PARAM_INT_TESTOSI, parameters_)].intValue();
     3467                    parameters_[whichParam(CBC_PARAM_INT_TESTOSI, parameters_)].setIntValue(CoinMax(0, testOsiOptions));
    34963468                    // create coin model
    34973469                    coinModel = lpSolver->createCoinModel();
     
    35063478                    // need some relative granularity
    35073479                    si->setDefaultBound(100.0);
    3508                     double dextra3 = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA3, numberParameters_, parameters_)].doubleValue();
     3480                    double dextra3 = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA3, parameters_)].doubleValue();
    35093481                    if (dextra3)
    35103482                      si->setDefaultMeshSize(dextra3);
     
    35423514
    35433515                      // Set changed values
     3516                      int numCutGens = 0;
     3517
    35443518
    35453519                      CglProbing probing;
     
    35523526                      probing.setUsingObjective(true);
    35533527                      cbcModel->addCutGenerator(&probing, -1, "Probing", true, false, false, -100, -1, -1);
    3554                       cbcModel->cutGenerator(0)->setTiming(true);
     3528                      cbcModel->cutGenerator(numCutGens++)->setTiming(true);
    35553529
    35563530                      CglGomory gomory;
    35573531                      gomory.setLimitAtRoot(512);
    35583532                      cbcModel->addCutGenerator(&gomory, -98, "Gomory", true, false, false, -100, -1, -1);
    3559                       cbcModel->cutGenerator(1)->setTiming(true);
     3533                      cbcModel->cutGenerator(numCutGens++)->setTiming(true);
    35603534
    35613535                      CglKnapsackCover knapsackCover;
    35623536                      cbcModel->addCutGenerator(&knapsackCover, -98, "KnapsackCover", true, false, false, -100, -1, -1);
    3563                       cbcModel->cutGenerator(2)->setTiming(true);
     3537                      cbcModel->cutGenerator(numCutGens++)->setTiming(true);
    35643538
    35653539                      CglRedSplit redSplit;
    35663540                      cbcModel->addCutGenerator(&redSplit, -99, "RedSplit", true, false, false, -100, -1, -1);
    3567                       cbcModel->cutGenerator(3)->setTiming(true);
     3541                      cbcModel->cutGenerator(numCutGens++)->setTiming(true);
    35683542
    35693543                      CglClique clique;
     
    35723546                      clique.setMinViolation(0.1);
    35733547                      cbcModel->addCutGenerator(&clique, -98, "Clique", true, false, false, -100, -1, -1);
    3574                       cbcModel->cutGenerator(4)->setTiming(true);
     3548                      cbcModel->cutGenerator(numCutGens++)->setTiming(true);
    35753549
    35763550                      CglMixedIntegerRounding2 mixedIntegerRounding2;
    35773551                      cbcModel->addCutGenerator(&mixedIntegerRounding2, -98, "MixedIntegerRounding2", true, false, false, -100, -1, -1);
    3578                       cbcModel->cutGenerator(5)->setTiming(true);
     3552                      cbcModel->cutGenerator(numCutGens++)->setTiming(true);
    35793553
    35803554                      CglFlowCover flowCover;
    35813555                      cbcModel->addCutGenerator(&flowCover, -98, "FlowCover", true, false, false, -100, -1, -1);
    3582                       cbcModel->cutGenerator(6)->setTiming(true);
     3556                      cbcModel->cutGenerator(numCutGens++)->setTiming(true);
    35833557
    35843558                      CglTwomir twomir;
    35853559                      twomir.setMaxElements(250);
    35863560                      cbcModel->addCutGenerator(&twomir, -99, "Twomir", true, false, false, -100, -1, -1);
    3587                       cbcModel->cutGenerator(7)->setTiming(true);
     3561                      cbcModel->cutGenerator(numCutGens++)->setTiming(true);
    35883562
    35893563                      CbcHeuristicFPump heuristicFPump(*cbcModel);
     
    36443618                      cbcModel->initialSolve();
    36453619#ifdef CBC_THREAD
    3646                       int numberThreads = parameters_[whichParam(CBC_PARAM_INT_THREADS, numberParameters_, parameters_)].intValue();
     3620                      int numberThreads = parameters_[whichParam(CBC_PARAM_INT_THREADS, parameters_)].intValue();
    36473621                      cbcModel->setNumberThreads(numberThreads % 100);
    36483622                      cbcModel->setThreadMode(CoinMin(numberThreads / 100, 7));
     
    43434317#endif
    43444318                    redoSOS = true;
    4345 
    4346                     bool keepPPN = parameters_[whichParam(CBC_PARAM_STR_PREPROCNAMES, numberParameters_, parameters_)].currentOptionAsInteger();
     4319                    bool keepPPN = parameters_[whichParam(CBC_PARAM_STR_PREPROCNAMES, parameters_)].currentOptionAsInteger();
    43474320#ifdef SAVE_NAUTY
    43484321                    keepPPN = 1;
     
    44524425                    //strcpy(name,lpSolver->problemName().c_str());
    44534426                    int iParam;
    4454                     for (iParam = 0; iParam < numberParameters_; iParam++) {
     4427                    for (iParam = 0; iParam < (int)parameters_.size(); iParam++) {
    44554428                      int match = parameters_[iParam].matches("import");
    44564429                      if (match == 1)
     
    45584531                solver2 = solver2->clone();
    45594532                // see if extra variables wanted
    4560                 int threshold = parameters_[whichParam(CBC_PARAM_INT_EXTRA_VARIABLES, numberParameters_, parameters_)].intValue();
    4561                 int more2 = parameters_[whichParam(CBC_PARAM_INT_MOREMOREMIPOPTIONS, numberParameters_, parameters_)].intValue();
     4533                int threshold = parameters_[whichParam(CBC_PARAM_INT_EXTRA_VARIABLES, parameters_)].intValue();
     4534                int more2 = parameters_[whichParam(CBC_PARAM_INT_MOREMOREMIPOPTIONS, parameters_)].intValue();
    45624535                if (threshold || (more2 & (512 | 1024)) != 0) {
    45634536                  int numberColumns = solver2->getNumCols();
     
    49864959                      more2 &= ~(512 | 1024);
    49874960                    }
    4988                     parameters_[whichParam(CBC_PARAM_INT_MOREMOREMIPOPTIONS, numberParameters_, parameters_)].setIntValue(more2);
     4961                    parameters_[whichParam(CBC_PARAM_INT_MOREMOREMIPOPTIONS, parameters_)].setIntValue(more2);
    49894962                  }
    49904963                  if (modifiedModel) {
     
    50405013                //                         babModel_->getNumCols());
    50415014              }
    5042               int testOsiOptions = parameters_[whichParam(CBC_PARAM_INT_TESTOSI, numberParameters_, parameters_)].intValue();
     5015              int testOsiOptions = parameters_[whichParam(CBC_PARAM_INT_TESTOSI, parameters_)].intValue();
    50435016              //#ifdef COIN_HAS_ASL
    50445017#ifndef JJF_ONE
     
    50465019              {
    50475020                OsiSolverLink *solver3 = dynamic_cast< OsiSolverLink * >(babModel_->solver());
    5048                 int options = parameters_[whichParam(CBC_PARAM_INT_MIPOPTIONS, numberParameters_, parameters_)].intValue() / 10000;
     5021                int options = parameters_[whichParam(CBC_PARAM_INT_MIPOPTIONS, parameters_)].intValue() / 10000;
    50495022                if (solver3 || (options & 16) != 0) {
    50505023                  if (options) {
     
    50635036                      knapsackRow = new int[numberRows];
    50645037                      numberKnapsack = 10000;
    5065                       int extra1 = parameters_[whichParam(CBC_PARAM_INT_EXTRA1, numberParameters_, parameters_)].intValue();
    5066                       int extra2 = parameters_[whichParam(CBC_PARAM_INT_EXTRA2, numberParameters_, parameters_)].intValue();
     5038                      int extra1 = parameters_[whichParam(CBC_PARAM_INT_EXTRA1, parameters_)].intValue();
     5039                      int extra2 = parameters_[whichParam(CBC_PARAM_INT_EXTRA2, parameters_)].intValue();
    50675040                      int logLevel = parameters_[log].intValue();
    50685041                      OsiSolverInterface *solver = expandKnapsack(saveCoinModel, whichColumn, knapsackStart,
     
    51545127              // Set up heuristics
    51555128              doHeuristics(babModel_, ((!miplib) ? 1 : 10), parameters_,
    5156                 numberParameters_, noPrinting_, initialPumpTune);
     5129                noPrinting_, initialPumpTune);
    51575130              if (!miplib) {
    5158                 if (parameters_[whichParam(CBC_PARAM_STR_LOCALTREE, numberParameters_, parameters_)].currentOptionAsInteger()) {
     5131                if (parameters_[whichParam(CBC_PARAM_STR_LOCALTREE, parameters_)].currentOptionAsInteger()) {
    51595132                  CbcTreeLocal localTree(babModel_, NULL, 10, 0, 0, 10000, 2000);
    51605133                  babModel_->passInTreeHandler(localTree);
     
    51655138                  babModel_->setNumberBeforeTrust(10);
    51665139              }
    5167               int experimentFlag = parameters_[whichParam(CBC_PARAM_INT_EXPERIMENT, numberParameters_,
    5168                                                  parameters_)]
    5169                                      .intValue();
    5170               int strategyFlag = parameters_[whichParam(CBC_PARAM_INT_STRATEGY, numberParameters_,
    5171                                                parameters_)]
    5172                                    .intValue();
     5140              int experimentFlag = parameters_[whichParam(CBC_PARAM_INT_EXPERIMENT, parameters_)].intValue();
     5141              int strategyFlag = parameters_[whichParam(CBC_PARAM_INT_STRATEGY, parameters_)].intValue();
    51735142              int bothFlags = CoinMax(CoinMin(experimentFlag, 1), strategyFlag);
    51745143              // add cut generators if wanted
     
    51795148              int translate[] = { -100, -1, -99, -98, 1, -1098, -999, 1, 1, 1, -1 };
    51805149              int maximumSlowPasses = parameters_[whichParam(CBC_PARAM_INT_MAX_SLOW_CUTS,
    5181                                                     numberParameters_, parameters_)]
     5150                                                    parameters_)]
    51825151                                        .intValue();
    51835152              if (probingAction) {
     
    52425211#endif
    52435212                }
    5244                 int cutLength = parameters_[whichParam(CBC_PARAM_INT_CUTLENGTH, numberParameters_, parameters_)].intValue();
     5213                int cutLength = parameters_[whichParam(CBC_PARAM_INT_CUTLENGTH, parameters_)].intValue();
    52455214                if (cutLength != -1) {
    52465215                  gomoryGen.setLimitAtRoot(cutLength);
     
    52515220                  }
    52525221                }
    5253                 int laGomory = parameters_[whichParam(CBC_PARAM_STR_LAGOMORYCUTS, numberParameters_, parameters_)].currentOptionAsInteger();
     5222                int laGomory = parameters_[whichParam(CBC_PARAM_STR_LAGOMORYCUTS, parameters_)].currentOptionAsInteger();
    52545223                int gType = translate[gomoryAction];
    52555224                if (!laGomory) {
     
    53865355                  twomirGen.setMaxElements(2000);
    53875356                }
    5388                 int laTwomir = parameters_[whichParam(CBC_PARAM_STR_LATWOMIRCUTS, numberParameters_, parameters_)].currentOptionAsInteger();
     5357                int laTwomir = parameters_[whichParam(CBC_PARAM_STR_LATWOMIRCUTS, parameters_)].currentOptionAsInteger();
    53895358                int twomirType = translate[twomirAction];
    53905359                if (!laTwomir) {
     
    54635432              numberGenerators = babModel_->numberCutGenerators();
    54645433              int iGenerator;
    5465               int cutDepth = parameters_[whichParam(CBC_PARAM_INT_CUTDEPTH, numberParameters_, parameters_)].intValue();
     5434              int cutDepth = parameters_[whichParam(CBC_PARAM_INT_CUTDEPTH, parameters_)].intValue();
    54665435              for (iGenerator = 0; iGenerator < numberGenerators; iGenerator++) {
    54675436                CbcCutGenerator *generator = babModel_->cutGenerator(iGenerator);
     
    55265495
    55275496              babModel_->solver()->setIntParam(OsiMaxNumIterationHotStart,
    5528                 parameters_[whichParam(CBC_PARAM_INT_MAXHOTITS, numberParameters_, parameters_)].intValue());
     5497                parameters_[whichParam(CBC_PARAM_INT_MAXHOTITS, parameters_)].intValue());
    55295498#ifndef CBC_OTHER_SOLVER
    55305499              OsiClpSolverInterface *osiclp = dynamic_cast< OsiClpSolverInterface * >(babModel_->solver());
     
    56015570              // Turn this off if you get problems
    56025571              // Used to be automatically set
    5603               int mipOptions = parameters_[whichParam(CBC_PARAM_INT_MIPOPTIONS, numberParameters_, parameters_)].intValue() % 10000;
     5572              int mipOptions = parameters_[whichParam(CBC_PARAM_INT_MIPOPTIONS, parameters_)].intValue() % 10000;
    56045573              if (mipOptions != (1057) && mipOptions != 1025) {
    56055574                sprintf(generalPrint, "mip options %d", mipOptions);
     
    56265595                }
    56275596                {
    5628                   int depthMiniBab = parameters_[whichParam(CBC_PARAM_INT_DEPTHMINIBAB, numberParameters_, parameters_)].intValue();
     5597                  int depthMiniBab = parameters_[whichParam(CBC_PARAM_INT_DEPTHMINIBAB, parameters_)].intValue();
    56295598                  if (depthMiniBab != -1)
    56305599                    babModel_->setFastNodeDepth(depthMiniBab);
    56315600                }
    5632                 int extra4 = parameters_[whichParam(CBC_PARAM_INT_EXTRA4, numberParameters_, parameters_)].intValue();
     5601                int extra4 = parameters_[whichParam(CBC_PARAM_INT_EXTRA4, parameters_)].intValue();
    56335602                if (extra4 >= 0) {
    56345603                  int strategy = extra4 % 10;
     
    56395608                  babModel_->setMoreSpecialOptions(extra4);
    56405609                }
    5641                 int moreMipOptions = parameters_[whichParam(CBC_PARAM_INT_MOREMIPOPTIONS, numberParameters_, parameters_)].intValue();
     5610                int moreMipOptions = parameters_[whichParam(CBC_PARAM_INT_MOREMIPOPTIONS, parameters_)].intValue();
    56425611                if (moreMipOptions >= 0) {
    56435612                  sprintf(generalPrint, "more mip options %d", moreMipOptions);
     
    56795648              }
    56805649              {
    5681                 int extra1 = parameters_[whichParam(CBC_PARAM_INT_EXTRA1, numberParameters_, parameters_)].intValue();
     5650                int extra1 = parameters_[whichParam(CBC_PARAM_INT_EXTRA1, parameters_)].intValue();
    56825651                if (extra1 != -1) {
    56835652                  if (extra1 < 0) {
     
    60466015                        }
    60476016                      }
    6048                       int sosPriorityOption = intValueOfOption(parameterData,
    6049                         CBC_PARAM_STR_SOSPRIORITIZE);
     6017                      int sosPriorityOption = parameters_[whichParam(CBC_PARAM_STR_SOSPRIORITIZE, parameters_)].intValue();
     6018
    60506019                      if (sosPriorityOption) {
    60516020                        const char *msg[4] = {
     
    64176386                      serendipity.setHeuristicName("linked");
    64186387                      babModel_->addHeuristic(&serendipity);
    6419                       double dextra3 = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA3, numberParameters_, parameters_)].doubleValue();
     6388                      double dextra3 = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA3, parameters_)].doubleValue();
    64206389                      if (dextra3)
    64216390                        solver3->setMeshSizes(dextra3);
    6422                       int options = parameters_[whichParam(CBC_PARAM_INT_MIPOPTIONS, numberParameters_, parameters_)].intValue() / 10000;
     6391                      int options = parameters_[whichParam(CBC_PARAM_INT_MIPOPTIONS, parameters_)].intValue() / 10000;
    64236392                      CglStored stored;
    64246393                      if (options) {
     
    64446413                          solver3->sayConvex((options & 32) == 0);
    64456414                        }
    6446                         int extra1 = parameters_[whichParam(CBC_PARAM_INT_EXTRA1, numberParameters_, parameters_)].intValue();
     6415                        int extra1 = parameters_[whichParam(CBC_PARAM_INT_EXTRA1, parameters_)].intValue();
    64476416                        if ((options & 1) != 0 && extra1 > 0)
    64486417                          solver3->setFixedPriority(extra1);
     
    64766445                      OsiSolverLink *solver3 = dynamic_cast< OsiSolverLink * >(babModel_->solver());
    64776446                      assert(solver3);
    6478                       int extra1 = parameters_[whichParam(CBC_PARAM_INT_EXTRA1, numberParameters_, parameters_)].intValue();
     6447                      int extra1 = parameters_[whichParam(CBC_PARAM_INT_EXTRA1, parameters_)].intValue();
    64796448                      solver3->setBiLinearPriority(extra1);
    64806449                      printf("bilinear priority now %d\n", extra1);
    6481                       int extra2 = parameters_[whichParam(CBC_PARAM_INT_EXTRA2, numberParameters_, parameters_)].intValue();
     6450                      int extra2 = parameters_[whichParam(CBC_PARAM_INT_EXTRA2, parameters_)].intValue();
    64826451                      double saveDefault = solver3->defaultBound();
    64836452                      solver3->setDefaultBound(static_cast< double >(extra2));
     
    67416710                }
    67426711#ifdef CBC_THREAD
    6743                 int numberThreads = parameters_[whichParam(CBC_PARAM_INT_THREADS, numberParameters_, parameters_)].intValue();
     6712                int numberThreads = parameters_[whichParam(CBC_PARAM_INT_THREADS, parameters_)].intValue();
    67446713                babModel_->setNumberThreads(numberThreads % 100);
    67456714                babModel_->setThreadMode(numberThreads / 100);
     
    67556724                osiclp = dynamic_cast< OsiClpSolverInterface * >(babModel_->solver());
    67566725                lpSolver = osiclp->getModelPtr();
    6757                 int hotits = parameters_[whichParam(CBC_PARAM_INT_MAXHOTITS, numberParameters_, parameters_)].intValue();
     6726                int hotits = parameters_[whichParam(CBC_PARAM_INT_MAXHOTITS, parameters_)].intValue();
    67586727                if (hotits > 100) {
    67596728                  osiclp->setSpecialOptions(osiclp->specialOptions() & ~32);
     
    67706739                  babModel_->setFastNodeDepth(-1);
    67716740                }
    6772                 int heurOptions = parameters_[whichParam(CBC_PARAM_INT_HOPTIONS, numberParameters_, parameters_)].intValue();
     6741                int heurOptions = parameters_[whichParam(CBC_PARAM_INT_HOPTIONS, parameters_)].intValue();
    67736742                if (heurOptions > 100)
    67746743                  babModel_->setSpecialOptions(babModel_->specialOptions() | 8192);
     
    67766745#ifndef CBC_OTHER_SOLVER
    67776746#ifdef CLP_MULTIPLE_FACTORIZATIONS
    6778                 int denseCode = parameters_[whichParam(CBC_PARAM_INT_DENSE, numberParameters_, parameters_)].intValue();
    6779                 int smallCode = parameters_[whichParam(CBC_PARAM_INT_SMALLFACT, numberParameters_, parameters_)].intValue();
     6747                int denseCode = parameters_[whichParam(CBC_PARAM_INT_DENSE, parameters_)].intValue();
     6748                int smallCode = parameters_[whichParam(CBC_PARAM_INT_SMALLFACT, parameters_)].intValue();
    67806749                if (bothFlags >= 1) {
    67816750                  if (denseCode < 0)
     
    69836952                exit(1);
    69846953#endif
    6985                 int hOp1 = parameters_[whichParam(CBC_PARAM_INT_HOPTIONS, numberParameters_, parameters_)].intValue() / 100000;
     6954                int hOp1 = parameters_[whichParam(CBC_PARAM_INT_HOPTIONS, parameters_)].intValue() / 100000;
    69866955                if (hOp1 % 10) {
    69876956                  CbcCompareDefault compare;
     
    69966965                  babModel_->solver()->messageHandler()->setLogLevel(0);
    69976966#endif
    6998                 if (parameters_[whichParam(CBC_PARAM_STR_CPX, numberParameters_, parameters_)].currentOptionAsInteger()) {
     6967                if (parameters_[whichParam(CBC_PARAM_STR_CPX, parameters_)].currentOptionAsInteger()) {
    69996968                  babModel_->setSpecialOptions(babModel_->specialOptions() | 16384);
    70006969                  //if (babModel_->fastNodeDepth()==-1)
    70016970                  babModel_->setFastNodeDepth(-2); // Use Cplex at root
    70026971                }
    7003                 int hOp2 = parameters_[whichParam(CBC_PARAM_INT_HOPTIONS, numberParameters_, parameters_)].intValue() / 10000;
     6972                int hOp2 = parameters_[whichParam(CBC_PARAM_INT_HOPTIONS, parameters_)].intValue() / 10000;
    70046973                if (hOp2 % 10) {
    70056974                  babModel_->setSpecialOptions(babModel_->specialOptions() | 16384);
     
    70447013                }
    70457014                // We may have priorities from extra variables
    7046                 int more2 = parameters_[whichParam(CBC_PARAM_INT_MOREMOREMIPOPTIONS, numberParameters_, parameters_)].intValue();
     7015                int more2 = parameters_[whichParam(CBC_PARAM_INT_MOREMOREMIPOPTIONS, parameters_)].intValue();
    70477016                if (newPriorities) {
    70487017                  if (truncateColumns < babModel_->getNumCols()) {
     
    70597028                    newPriorities[i] = babModel_->priority(i);
    70607029#if 1
    7061                   int ixxxxxx = parameters_[whichParam(CBC_PARAM_INT_MAXNODES, numberParameters_, parameters_)].intValue();
     7030                  int ixxxxxx = parameters_[whichParam(CBC_PARAM_INT_MAXNODES, parameters_)].intValue();
    70627031                  int obj_priority = 1000;
    70637032                  int slack_priority = 1000;
     
    71327101                }
    71337102#ifdef JJF_ZERO
    7134                 int extra5 = parameters_[whichParam(EXTRA5, numberParameters_, parameters_)].intValue();
     7103                int extra5 = parameters_[whichParam(EXTRA5, parameters_)].intValue();
    71357104                if (extra5 > 0) {
    71367105                  int numberGenerators = babModel_->numberCutGenerators();
     
    71477116                }
    71487117#endif
    7149                 int specialOptions = parameters_[whichParam(CBC_PARAM_INT_STRONG_STRATEGY, numberParameters_, parameters_)].intValue();
     7118                int specialOptions = parameters_[whichParam(CBC_PARAM_INT_STRONG_STRATEGY, parameters_)].intValue();
    71507119                if (specialOptions >= 0)
    71517120                  babModel_->setStrongStrategy(specialOptions);
    71527121                int jParam = whichParam(CBC_PARAM_STR_CUTOFF_CONSTRAINT,
    7153                   numberParameters_, parameters_);
     7122                  parameters_);
    71547123                if (parameters_[jParam].currentOptionAsInteger()) {
    71557124                  babModel_->setCutoffAsConstraint(true);
     
    71587127                    babModel_->setMoreSpecialOptions(moreOptions | 4194304);
    71597128                }
    7160                 int multipleRoot = parameters_[whichParam(CBC_PARAM_INT_MULTIPLEROOTS, numberParameters_, parameters_)].intValue();
     7129                int multipleRoot = parameters_[whichParam(CBC_PARAM_INT_MULTIPLEROOTS, parameters_)].intValue();
    71617130                if (multipleRoot < 10000) {
    71627131                  babModel_->setMultipleRootTries(multipleRoot);
     
    72467215                if (biLinearProblem)
    72477216                  babModel_->setSpecialOptions(babModel_->specialOptions() & (~(512 | 32768)));
    7248                 babModel_->setMoreSpecialOptions2(parameters_[whichParam(CBC_PARAM_INT_MOREMOREMIPOPTIONS, numberParameters_, parameters_)].intValue());
     7217                babModel_->setMoreSpecialOptions2(parameters_[whichParam(CBC_PARAM_INT_MOREMOREMIPOPTIONS, parameters_)].intValue());
    72497218#ifdef COIN_HAS_NTY
    72507219                int nautyAdded = 0;
    72517220                {
    72527221                  int jParam = whichParam(CBC_PARAM_STR_ORBITAL,
    7253                     numberParameters_, parameters_);
     7222                    parameters_);
    72547223                  if (parameters_[jParam].currentOptionAsInteger()) {
    72557224                    int k = parameters_[jParam].currentOptionAsInteger();
     
    73617330                babModel_->setStrategy(strategy);
    73627331#ifdef CBC_THREAD
    7363                 int numberThreads = parameters_[whichParam(CBC_PARAM_INT_THREADS, numberParameters_, parameters_)].intValue();
     7332                int numberThreads = parameters_[whichParam(CBC_PARAM_INT_THREADS, parameters_)].intValue();
    73647333                babModel_->setNumberThreads(numberThreads % 100);
    73657334                babModel_->setThreadMode(numberThreads / 100);
     
    74067375                                   could be passed to CbcClpUnitTest. */
    74077376                /* JJF: No need to have 777 flag at all - user
    7408                                    says -miplib
    7409                                 */
    7410                 int extra2 = parameters_[whichParam(CBC_PARAM_INT_EXTRA2, numberParameters_, parameters_)].intValue();
     7377                     says -miplib
     7378                     */
     7379                int extra2 = parameters_[whichParam(CBC_PARAM_INT_EXTRA2, parameters_)].intValue();
    74117380                double stuff[11];
    7412                 stuff[0] = parameters_[whichParam(CBC_PARAM_DBL_FAKEINCREMENT, numberParameters_, parameters_)].doubleValue();
    7413                 stuff[1] = parameters_[whichParam(CBC_PARAM_DBL_FAKECUTOFF, numberParameters_, parameters_)].doubleValue();
    7414                 stuff[2] = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA3, numberParameters_, parameters_)].doubleValue();
    7415                 stuff[3] = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA4, numberParameters_, parameters_)].doubleValue();
    7416                 stuff[4] = parameters_[whichParam(CBC_PARAM_INT_DENSE, numberParameters_, parameters_)].intValue();
    7417                 stuff[5] = parameters_[whichParam(CBC_PARAM_INT_EXTRA1, numberParameters_, parameters_)].intValue();
    7418                 stuff[6] = parameters_[whichParam(CBC_PARAM_INT_EXTRA3, numberParameters_, parameters_)].intValue();
    7419                 stuff[7] = parameters_[whichParam(CBC_PARAM_INT_DEPTHMINIBAB, numberParameters_, parameters_)].intValue();
     7381                stuff[0] = parameters_[whichParam(CBC_PARAM_DBL_FAKEINCREMENT, parameters_)].doubleValue();
     7382                stuff[1] = parameters_[whichParam(CBC_PARAM_DBL_FAKECUTOFF, parameters_)].doubleValue();
     7383                stuff[2] = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA3, parameters_)].doubleValue();
     7384                stuff[3] = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA4, parameters_)].doubleValue();
     7385                stuff[4] = parameters_[whichParam(CBC_PARAM_INT_DENSE, parameters_)].intValue();
     7386                stuff[5] = parameters_[whichParam(CBC_PARAM_INT_EXTRA1, parameters_)].intValue();
     7387                stuff[6] = parameters_[whichParam(CBC_PARAM_INT_EXTRA3, parameters_)].intValue();
     7388                stuff[7] = parameters_[whichParam(CBC_PARAM_INT_DEPTHMINIBAB, parameters_)].intValue();
    74207389                stuff[8] = bothFlags;
    74217390                stuff[9] = doVector;
    7422                 stuff[10] = parameters_[whichParam(CBC_PARAM_INT_SMALLFACT, numberParameters_, parameters_)].intValue();
     7391                stuff[10] = parameters_[whichParam(CBC_PARAM_INT_SMALLFACT, parameters_)].intValue();
    74237392                if (dominatedCuts)
    74247393                  model_.setSpecialOptions(model_.specialOptions() | 64);
    7425                 if (parameters_[whichParam(CBC_PARAM_STR_CPX, numberParameters_, parameters_)].currentOptionAsInteger()) {
     7394                if (parameters_[whichParam(CBC_PARAM_STR_CPX, parameters_)].currentOptionAsInteger()) {
    74267395                  model_.setSpecialOptions(model_.specialOptions() | 16384);
    74277396                  //if (model_.fastNodeDepth()==-1)
    74287397                  model_.setFastNodeDepth(-2); // Use Cplex at root
    74297398                }
    7430                 int hOp2 = parameters_[whichParam(CBC_PARAM_INT_HOPTIONS, numberParameters_, parameters_)].intValue() / 10000;
     7399                int hOp2 = parameters_[whichParam(CBC_PARAM_INT_HOPTIONS, parameters_)].intValue() / 10000;
    74317400                if (hOp2 % 10) {
    74327401                  model_.setSpecialOptions(model_.specialOptions() | 16384);
     
    74347403                    model_.setFastNodeDepth(-2); // Use Cplex at root
    74357404                }
    7436                 int multipleRoot = parameters_[whichParam(CBC_PARAM_INT_MULTIPLEROOTS, numberParameters_, parameters_)].intValue();
     7405                int multipleRoot = parameters_[whichParam(CBC_PARAM_INT_MULTIPLEROOTS, parameters_)].intValue();
    74377406                model_.setMultipleRootTries(multipleRoot);
    7438                 int specialOptions = parameters_[whichParam(CBC_PARAM_INT_STRONG_STRATEGY, numberParameters_, parameters_)].intValue();
     7407                int specialOptions = parameters_[whichParam(CBC_PARAM_INT_STRONG_STRATEGY, parameters_)].intValue();
    74397408                if (specialOptions >= 0)
    74407409                  model_.setStrongStrategy(specialOptions);
     
    83858354              // need some relative granularity
    83868355              si->setDefaultBound(100.0);
    8387               double dextra3 = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA3, numberParameters_, parameters_)].doubleValue();
     8356              double dextra3 = parameters_[whichParam(CBC_PARAM_DBL_DEXTRA3, parameters_)].doubleValue();
    83888357              if (dextra3)
    83898358                si->setDefaultMeshSize(dextra3);
     
    84778446                  if ((printOptions & 1) != 0)
    84788447                    pinfo.statistics();
    8479                   double presolveTolerance = parameters_[whichParam(CLP_PARAM_DBL_PRESOLVETOLERANCE, numberParameters_, parameters_)].doubleValue();
     8448                  double presolveTolerance = parameters_[whichParam(CLP_PARAM_DBL_PRESOLVETOLERANCE, parameters_)].doubleValue();
    84808449                  model2 = pinfo.presolvedModel(*lpSolver, presolveTolerance,
    84818450                    true, preSolve);
     
    92429211              if (preSolve) {
    92439212                ClpPresolve pinfo;
    9244                 double presolveTolerance = parameters_[whichParam(CLP_PARAM_DBL_PRESOLVETOLERANCE, numberParameters_, parameters_)].doubleValue();
     9213                double presolveTolerance = parameters_[whichParam(CLP_PARAM_DBL_PRESOLVETOLERANCE, parameters_)].doubleValue();
    92459214                model2 = pinfo.presolvedModel(*lpSolver, presolveTolerance,
    92469215                  false, preSolve);
     
    1046010429        else
    1046110430          std::cout << "Completions of " << field << ":" << std::endl;
    10462         for (iParam = 0; iParam < numberParameters_; iParam++) {
     10431        for (iParam = 0; iParam < (int)parameters_.size(); iParam++) {
    1046310432          int match = parameters_[iParam].matches(field);
    1046410433          if (match && parameters_[iParam].displayThis()) {
     
    1054010509  CbcModel &model)
    1054110510{
    10542   CbcMain0(model);
    10543   return CbcMain1(argc, argv, model);
     10511  CbcSolverUsefulData cbcData;
     10512  cbcData.noPrinting_ = false;
     10513  CbcMain0(model, cbcData);
     10514  return CbcMain1(argc, argv, model, dummyCallBack, cbcData);
    1054410515}
    1054510516
    1054610517void CbcMain0(CbcModel &model)
    1054710518{
    10548   CbcMain0(model, staticParameterData);
     10519  CbcSolverUsefulData solverData;
     10520  CbcMain0(model, solverData);
    1054910521}
    1055010522void CbcMain0(CbcModel &model,
    1055110523  CbcSolverUsefulData &parameterData)
    1055210524{
    10553   CbcOrClpParam *parameters = parameterData.parameters_;
    10554   int numberParameters = parameterData.numberParameters_;
     10525  std::vector< CbcOrClpParam > &parameters = parameterData.parameters_;
    1055510526#ifndef CBC_OTHER_SOLVER
    1055610527  OsiClpSolverInterface *originalSolver = dynamic_cast< OsiClpSolverInterface * >(model.solver());
     
    1060810579  int doSprint = -1;
    1060910580  int testOsiParameters = -1;
    10610   parameters[whichParam(CLP_PARAM_ACTION_BASISIN, numberParameters, parameters)].setStringValue(importBasisFile);
    10611   parameters[whichParam(CBC_PARAM_ACTION_PRIORITYIN, numberParameters, parameters)].setStringValue(importPriorityFile);
    10612   parameters[whichParam(CLP_PARAM_ACTION_BASISOUT, numberParameters, parameters)].setStringValue(exportBasisFile);
    10613   parameters[whichParam(CLP_PARAM_ACTION_DEBUG, numberParameters, parameters)].setStringValue(debugFile);
    10614   parameters[whichParam(CLP_PARAM_ACTION_PRINTMASK, numberParameters, parameters)].setStringValue(printMask);
    10615   parameters[whichParam(CLP_PARAM_ACTION_DIRECTORY, numberParameters, parameters)].setStringValue(directory);
    10616   parameters[whichParam(CLP_PARAM_ACTION_DIRSAMPLE, numberParameters, parameters)].setStringValue(dirSample);
    10617   parameters[whichParam(CLP_PARAM_ACTION_DIRNETLIB, numberParameters, parameters)].setStringValue(dirNetlib);
    10618   parameters[whichParam(CBC_PARAM_ACTION_DIRMIPLIB, numberParameters, parameters)].setStringValue(dirMiplib);
    10619   parameters[whichParam(CLP_PARAM_DBL_DUALBOUND, numberParameters, parameters)].setDoubleValue(lpSolver->dualBound());
    10620   parameters[whichParam(CLP_PARAM_DBL_DUALTOLERANCE, numberParameters, parameters)].setDoubleValue(lpSolver->dualTolerance());
    10621   parameters[whichParam(CLP_PARAM_ACTION_EXPORT, numberParameters, parameters)].setStringValue(exportFile);
    10622   parameters[whichParam(CLP_PARAM_INT_IDIOT, numberParameters, parameters)].setIntValue(doIdiot);
    10623   parameters[whichParam(CLP_PARAM_ACTION_IMPORT, numberParameters, parameters)].setStringValue(importFile);
    10624   parameters[whichParam(CLP_PARAM_DBL_PRESOLVETOLERANCE, numberParameters, parameters)].setDoubleValue(1.0e-8);
    10625   int slog = whichParam(CLP_PARAM_INT_SOLVERLOGLEVEL, numberParameters, parameters);
    10626   int log = whichParam(CLP_PARAM_INT_LOGLEVEL, numberParameters, parameters);
     10581  parameters[whichParam(CLP_PARAM_ACTION_BASISIN, parameters)].setStringValue(importBasisFile);
     10582  parameters[whichParam(CBC_PARAM_ACTION_PRIORITYIN, parameters)].setStringValue(importPriorityFile);
     10583  parameters[whichParam(CLP_PARAM_ACTION_BASISOUT, parameters)].setStringValue(exportBasisFile);
     10584  parameters[whichParam(CLP_PARAM_ACTION_DEBUG, parameters)].setStringValue(debugFile);
     10585  parameters[whichParam(CLP_PARAM_ACTION_PRINTMASK, parameters)].setStringValue(printMask);
     10586  parameters[whichParam(CLP_PARAM_ACTION_DIRECTORY, parameters)].setStringValue(directory);
     10587  parameters[whichParam(CLP_PARAM_ACTION_DIRSAMPLE, parameters)].setStringValue(dirSample);
     10588  parameters[whichParam(CLP_PARAM_ACTION_DIRNETLIB, parameters)].setStringValue(dirNetlib);
     10589  parameters[whichParam(CBC_PARAM_ACTION_DIRMIPLIB, parameters)].setStringValue(dirMiplib);
     10590  parameters[whichParam(CLP_PARAM_DBL_DUALBOUND, parameters)].setDoubleValue(lpSolver->dualBound());
     10591  parameters[whichParam(CLP_PARAM_DBL_DUALTOLERANCE, parameters)].setDoubleValue(lpSolver->dualTolerance());
     10592  parameters[whichParam(CLP_PARAM_ACTION_EXPORT, parameters)].setStringValue(exportFile);
     10593  parameters[whichParam(CLP_PARAM_INT_IDIOT, parameters)].setIntValue(doIdiot);
     10594  parameters[whichParam(CLP_PARAM_ACTION_IMPORT, parameters)].setStringValue(importFile);
     10595  parameters[whichParam(CLP_PARAM_DBL_PRESOLVETOLERANCE, parameters)].setDoubleValue(1.0e-8);
     10596  int slog = whichParam(CLP_PARAM_INT_SOLVERLOGLEVEL, parameters);
     10597  int log = whichParam(CLP_PARAM_INT_LOGLEVEL, parameters);
    1062710598  parameters[slog].setIntValue(1);
    1062810599  clpSolver->messageHandler()->setLogLevel(1);
     
    1063010601  lpSolver->setLogLevel(1);
    1063110602  parameters[log].setIntValue(1);
    10632   parameters[whichParam(CLP_PARAM_INT_MAXFACTOR, numberParameters, parameters)].setIntValue(lpSolver->factorizationFrequency());
    10633   parameters[whichParam(CLP_PARAM_INT_MAXITERATION, numberParameters, parameters)].setIntValue(lpSolver->maximumIterations());
    10634   parameters[whichParam(CLP_PARAM_INT_OUTPUTFORMAT, numberParameters, parameters)].setIntValue(outputFormat);
    10635   parameters[whichParam(CLP_PARAM_INT_PRESOLVEPASS, numberParameters, parameters)].setIntValue(preSolve);
    10636   parameters[whichParam(CLP_PARAM_INT_PERTVALUE, numberParameters, parameters)].setIntValue(lpSolver->perturbation());
    10637   parameters[whichParam(CLP_PARAM_DBL_PRIMALTOLERANCE, numberParameters, parameters)].setDoubleValue(lpSolver->primalTolerance());
    10638   parameters[whichParam(CLP_PARAM_DBL_PRIMALWEIGHT, numberParameters, parameters)].setDoubleValue(lpSolver->infeasibilityCost());
    10639   parameters[whichParam(CLP_PARAM_ACTION_RESTORE, numberParameters, parameters)].setStringValue(restoreFile);
    10640   parameters[whichParam(CLP_PARAM_ACTION_SAVE, numberParameters, parameters)].setStringValue(saveFile);
     10603  parameters[whichParam(CLP_PARAM_INT_MAXFACTOR, parameters)].setIntValue(lpSolver->factorizationFrequency());
     10604  parameters[whichParam(CLP_PARAM_INT_MAXITERATION, parameters)].setIntValue(lpSolver->maximumIterations());
     10605  parameters[whichParam(CLP_PARAM_INT_OUTPUTFORMAT, parameters)].setIntValue(outputFormat);
     10606  parameters[whichParam(CLP_PARAM_INT_PRESOLVEPASS, parameters)].setIntValue(preSolve);
     10607  parameters[whichParam(CLP_PARAM_INT_PERTVALUE, parameters)].setIntValue(lpSolver->perturbation());
     10608  parameters[whichParam(CLP_PARAM_DBL_PRIMALTOLERANCE, parameters)].setDoubleValue(lpSolver->primalTolerance());
     10609  parameters[whichParam(CLP_PARAM_DBL_PRIMALWEIGHT, parameters)].setDoubleValue(lpSolver->infeasibilityCost());
     10610  parameters[whichParam(CLP_PARAM_ACTION_RESTORE, parameters)].setStringValue(restoreFile);
     10611  parameters[whichParam(CLP_PARAM_ACTION_SAVE, parameters)].setStringValue(saveFile);
    1064110612  //parameters[whichParam(CLP_PARAM_DBL_TIMELIMIT,numberParameters,parameters)].setDoubleValue(1.0e8);
    10642   parameters[whichParam(CBC_PARAM_DBL_TIMELIMIT_BAB, numberParameters, parameters)].setDoubleValue(1.0e8);
    10643   parameters[whichParam(CLP_PARAM_ACTION_SOLUTION, numberParameters, parameters)].setStringValue(solutionFile);
    10644   parameters[whichParam(CLP_PARAM_ACTION_NEXTBESTSOLUTION, numberParameters, parameters)].setStringValue(solutionFile);
    10645   parameters[whichParam(CLP_PARAM_ACTION_SAVESOL, numberParameters, parameters)].setStringValue(solutionSaveFile);
    10646   parameters[whichParam(CLP_PARAM_INT_SPRINT, numberParameters, parameters)].setIntValue(doSprint);
    10647   parameters[whichParam(CLP_PARAM_INT_SUBSTITUTION, numberParameters, parameters)].setIntValue(substitution);
    10648   parameters[whichParam(CLP_PARAM_INT_DUALIZE, numberParameters, parameters)].setIntValue(dualize);
     10613  parameters[whichParam(CBC_PARAM_DBL_TIMELIMIT_BAB, parameters)].setDoubleValue(1.0e8);
     10614  parameters[whichParam(CLP_PARAM_ACTION_SOLUTION, parameters)].setStringValue(solutionFile);
     10615  parameters[whichParam(CLP_PARAM_ACTION_NEXTBESTSOLUTION, parameters)].setStringValue(solutionFile);
     10616  parameters[whichParam(CLP_PARAM_ACTION_SAVESOL, parameters)].setStringValue(solutionSaveFile);
     10617  parameters[whichParam(CLP_PARAM_INT_SPRINT, parameters)].setIntValue(doSprint);
     10618  parameters[whichParam(CLP_PARAM_INT_SUBSTITUTION, parameters)].setIntValue(substitution);
     10619  parameters[whichParam(CLP_PARAM_INT_DUALIZE, parameters)].setIntValue(dualize);
    1064910620  model.setNumberBeforeTrust(10);
    10650   parameters[whichParam(CBC_PARAM_INT_NUMBERBEFORE, numberParameters, parameters)].setIntValue(5);
    10651   parameters[whichParam(CBC_PARAM_INT_MAXNODES, numberParameters, parameters)].setIntValue(model.getMaximumNodes());
     10621  parameters[whichParam(CBC_PARAM_INT_NUMBERBEFORE, parameters)].setIntValue(5);
     10622  parameters[whichParam(CBC_PARAM_INT_MAXNODES, parameters)].setIntValue(model.getMaximumNodes());
    1065210623  model.setNumberStrong(5);
    10653   parameters[whichParam(CBC_PARAM_INT_STRONGBRANCHING, numberParameters, parameters)].setIntValue(model.numberStrong());
    10654   parameters[whichParam(CBC_PARAM_DBL_INFEASIBILITYWEIGHT, numberParameters, parameters)].setDoubleValue(model.getDblParam(CbcModel::CbcInfeasibilityWeight));
    10655   parameters[whichParam(CBC_PARAM_DBL_INTEGERTOLERANCE, numberParameters, parameters)].setDoubleValue(model.getDblParam(CbcModel::CbcIntegerTolerance));
    10656   parameters[whichParam(CBC_PARAM_DBL_INCREMENT, numberParameters, parameters)].setDoubleValue(model.getDblParam(CbcModel::CbcCutoffIncrement));
    10657   parameters[whichParam(CBC_PARAM_INT_TESTOSI, numberParameters, parameters)].setIntValue(testOsiParameters);
    10658   parameters[whichParam(CBC_PARAM_INT_FPUMPTUNE, numberParameters, parameters)].setIntValue(1003);
     10624  parameters[whichParam(CBC_PARAM_INT_STRONGBRANCHING, parameters)].setIntValue(model.numberStrong());
     10625  parameters[whichParam(CBC_PARAM_DBL_INFEASIBILITYWEIGHT, parameters)].setDoubleValue(model.getDblParam(CbcModel::CbcInfeasibilityWeight));
     10626  parameters[whichParam(CBC_PARAM_DBL_INTEGERTOLERANCE, parameters)].setDoubleValue(model.getDblParam(CbcModel::CbcIntegerTolerance));
     10627  parameters[whichParam(CBC_PARAM_DBL_INCREMENT, parameters)].setDoubleValue(model.getDblParam(CbcModel::CbcCutoffIncrement));
     10628  parameters[whichParam(CBC_PARAM_INT_TESTOSI, parameters)].setIntValue(testOsiParameters);
     10629  parameters[whichParam(CBC_PARAM_INT_FPUMPTUNE, parameters)].setIntValue(1003);
    1065910630  initialPumpTune = 1003;
    1066010631#ifdef CBC_THREAD
    10661   parameters[whichParam(CBC_PARAM_INT_THREADS, numberParameters, parameters)].setIntValue(0);
     10632  parameters[whichParam(CBC_PARAM_INT_THREADS, parameters)].setIntValue(0);
    1066210633#endif
    1066310634  // Set up likely cut generators and defaults
    10664   parameters[whichParam(CBC_PARAM_STR_PREPROCESS, numberParameters, parameters)].setCurrentOption("sos");
    10665   parameters[whichParam(CBC_PARAM_INT_MIPOPTIONS, numberParameters, parameters)].setIntValue(1057);
    10666   parameters[whichParam(CBC_PARAM_INT_CUTPASSINTREE, numberParameters, parameters)].setIntValue(1);
    10667   parameters[whichParam(CBC_PARAM_INT_MOREMIPOPTIONS, numberParameters, parameters)].setIntValue(-1);
    10668   parameters[whichParam(CBC_PARAM_INT_MAXHOTITS, numberParameters, parameters)].setIntValue(100);
    10669   parameters[whichParam(CBC_PARAM_STR_CUTSSTRATEGY, numberParameters, parameters)].setCurrentOption("on");
    10670   parameters[whichParam(CBC_PARAM_STR_HEURISTICSTRATEGY, numberParameters, parameters)].setCurrentOption("on");
    10671   parameters[whichParam(CBC_PARAM_STR_NODESTRATEGY, numberParameters, parameters)].setCurrentOption("fewest");
    10672   parameters[whichParam(CBC_PARAM_STR_GOMORYCUTS, numberParameters, parameters)].setCurrentOption("ifmove");
    10673   parameters[whichParam(CBC_PARAM_STR_PROBINGCUTS, numberParameters, parameters)].setCurrentOption("ifmove");
    10674   parameters[whichParam(CBC_PARAM_STR_KNAPSACKCUTS, numberParameters, parameters)].setCurrentOption("ifmove");
    10675   parameters[whichParam(CBC_PARAM_STR_ZEROHALFCUTS, numberParameters, parameters)].setCurrentOption("ifmove");
    10676   parameters[whichParam(CBC_PARAM_STR_REDSPLITCUTS, numberParameters, parameters)].setCurrentOption("off");
    10677   parameters[whichParam(CBC_PARAM_STR_REDSPLIT2CUTS, numberParameters, parameters)].setCurrentOption("off");
    10678   parameters[whichParam(CBC_PARAM_STR_GMICUTS, numberParameters, parameters)].setCurrentOption("off");
    10679   parameters[whichParam(CBC_PARAM_STR_CLIQUECUTS, numberParameters, parameters)].setCurrentOption("ifmove");
    10680   parameters[whichParam(CBC_PARAM_STR_MIXEDCUTS, numberParameters, parameters)].setCurrentOption("ifmove");
    10681   parameters[whichParam(CBC_PARAM_STR_FLOWCUTS, numberParameters, parameters)].setCurrentOption("ifmove");
    10682   parameters[whichParam(CBC_PARAM_STR_TWOMIRCUTS, numberParameters, parameters)].setCurrentOption("root");
    10683   parameters[whichParam(CBC_PARAM_STR_LANDPCUTS, numberParameters, parameters)].setCurrentOption("off");
    10684   parameters[whichParam(CBC_PARAM_STR_RESIDCUTS, numberParameters, parameters)].setCurrentOption("off");
    10685   parameters[whichParam(CBC_PARAM_STR_ROUNDING, numberParameters, parameters)].setCurrentOption("on");
    10686   parameters[whichParam(CBC_PARAM_STR_FPUMP, numberParameters, parameters)].setCurrentOption("on");
    10687   parameters[whichParam(CBC_PARAM_STR_GREEDY, numberParameters, parameters)].setCurrentOption("on");
    10688   parameters[whichParam(CBC_PARAM_STR_COMBINE, numberParameters, parameters)].setCurrentOption("off");
    10689   parameters[whichParam(CBC_PARAM_STR_CROSSOVER2, numberParameters, parameters)].setCurrentOption("off");
    10690   parameters[whichParam(CBC_PARAM_STR_PIVOTANDCOMPLEMENT, numberParameters, parameters)].setCurrentOption("off");
    10691   parameters[whichParam(CBC_PARAM_STR_PIVOTANDFIX, numberParameters, parameters)].setCurrentOption("off");
    10692   parameters[whichParam(CBC_PARAM_STR_RANDROUND, numberParameters, parameters)].setCurrentOption("off");
    10693   parameters[whichParam(CBC_PARAM_STR_NAIVE, numberParameters, parameters)].setCurrentOption("off");
    10694   parameters[whichParam(CBC_PARAM_STR_RINS, numberParameters, parameters)].setCurrentOption("off");
    10695   parameters[whichParam(CBC_PARAM_STR_DINS, numberParameters, parameters)].setCurrentOption("off");
    10696   parameters[whichParam(CBC_PARAM_STR_RENS, numberParameters, parameters)].setCurrentOption("off");
    10697   parameters[whichParam(CBC_PARAM_STR_LOCALTREE, numberParameters, parameters)].setCurrentOption("off");
    10698   parameters[whichParam(CBC_PARAM_STR_COSTSTRATEGY, numberParameters, parameters)].setCurrentOption("off");
     10635  parameters[whichParam(CBC_PARAM_STR_PREPROCESS, parameters)].setCurrentOption("sos");
     10636  parameters[whichParam(CBC_PARAM_INT_MIPOPTIONS, parameters)].setIntValue(1057);
     10637  parameters[whichParam(CBC_PARAM_INT_CUTPASSINTREE, parameters)].setIntValue(1);
     10638  parameters[whichParam(CBC_PARAM_INT_MOREMIPOPTIONS, parameters)].setIntValue(-1);
     10639  parameters[whichParam(CBC_PARAM_INT_MAXHOTITS, parameters)].setIntValue(100);
     10640  parameters[whichParam(CBC_PARAM_STR_CUTSSTRATEGY, parameters)].setCurrentOption("on");
     10641  parameters[whichParam(CBC_PARAM_STR_HEURISTICSTRATEGY, parameters)].setCurrentOption("on");
     10642  parameters[whichParam(CBC_PARAM_STR_NODESTRATEGY, parameters)].setCurrentOption("fewest");
     10643  parameters[whichParam(CBC_PARAM_STR_GOMORYCUTS, parameters)].setCurrentOption("ifmove");
     10644  parameters[whichParam(CBC_PARAM_STR_PROBINGCUTS, parameters)].setCurrentOption("ifmove");
     10645  parameters[whichParam(CBC_PARAM_STR_KNAPSACKCUTS, parameters)].setCurrentOption("ifmove");
     10646  parameters[whichParam(CBC_PARAM_STR_ZEROHALFCUTS, parameters)].setCurrentOption("ifmove");
     10647  parameters[whichParam(CBC_PARAM_STR_REDSPLITCUTS, parameters)].setCurrentOption("off");
     10648  parameters[whichParam(CBC_PARAM_STR_REDSPLIT2CUTS, parameters)].setCurrentOption("off");
     10649  parameters[whichParam(CBC_PARAM_STR_GMICUTS, parameters)].setCurrentOption("off");
     10650  parameters[whichParam(CBC_PARAM_STR_CLIQUECUTS, parameters)].setCurrentOption("ifmove");
     10651  parameters[whichParam(CBC_PARAM_STR_MIXEDCUTS, parameters)].setCurrentOption("ifmove");
     10652  parameters[whichParam(CBC_PARAM_STR_FLOWCUTS, parameters)].setCurrentOption("ifmove");
     10653  parameters[whichParam(CBC_PARAM_STR_TWOMIRCUTS, parameters)].setCurrentOption("root");
     10654  parameters[whichParam(CBC_PARAM_STR_LANDPCUTS, parameters)].setCurrentOption("off");
     10655  parameters[whichParam(CBC_PARAM_STR_RESIDCUTS, parameters)].setCurrentOption("off");
     10656  parameters[whichParam(CBC_PARAM_STR_ROUNDING, parameters)].setCurrentOption("on");
     10657  parameters[whichParam(CBC_PARAM_STR_FPUMP, parameters)].setCurrentOption("on");
     10658  parameters[whichParam(CBC_PARAM_STR_GREEDY, parameters)].setCurrentOption("on");
     10659  parameters[whichParam(CBC_PARAM_STR_COMBINE, parameters)].setCurrentOption("off");
     10660  parameters[whichParam(CBC_PARAM_STR_CROSSOVER2, parameters)].setCurrentOption("off");
     10661  parameters[whichParam(CBC_PARAM_STR_PIVOTANDCOMPLEMENT, parameters)].setCurrentOption("off");
     10662  parameters[whichParam(CBC_PARAM_STR_PIVOTANDFIX, parameters)].setCurrentOption("off");
     10663  parameters[whichParam(CBC_PARAM_STR_RANDROUND, parameters)].setCurrentOption("off");
     10664  parameters[whichParam(CBC_PARAM_STR_NAIVE, parameters)].setCurrentOption("off");
     10665  parameters[whichParam(CBC_PARAM_STR_RINS, parameters)].setCurrentOption("off");
     10666  parameters[whichParam(CBC_PARAM_STR_DINS, parameters)].setCurrentOption("off");
     10667  parameters[whichParam(CBC_PARAM_STR_RENS, parameters)].setCurrentOption("off");
     10668  parameters[whichParam(CBC_PARAM_STR_LOCALTREE, parameters)].setCurrentOption("off");
     10669  parameters[whichParam(CBC_PARAM_STR_COSTSTRATEGY, parameters)].setCurrentOption("off");
    1069910670}
    1070010671
  • trunk/Cbc/src/CbcSolver.hpp

    r2465 r2479  
    234234  double startTime_;
    235235  /// Parameters and values
    236   CbcOrClpParam *parameters_;
    237   /// Number of parameters
    238   int numberParameters_;
     236  std::vector< CbcOrClpParam > parameters_;
    239237  /// Whether to do miplib test
    240238  bool doMiplib_;
     
    294292  double totalTime_;
    295293  // Parameters
    296   CbcOrClpParam parameters_[CBCMAXPARAMETERS];
     294  std::vector<CbcOrClpParam> parameters_;
    297295  // Printing
    298296  bool noPrinting_;
    299297  // Whether to use signal handler
    300298  bool useSignalHandler_;
    301   // Number of Parameters
    302   int numberParameters_;
    303299  // Default pump tuning
    304300  int initialPumpTune_;
  • trunk/Cbc/src/CbcSolverHeuristics.cpp

    r2467 r2479  
    11251125}
    11261126
    1127 int doHeuristics(CbcModel *model, int type, CbcOrClpParam *parameters_,
    1128   int numberParameters_, int noPrinting_, int initialPumpTune)
     1127int doHeuristics(CbcModel *model, int type, std::vector< CbcOrClpParam > parameters_,
     1128  int noPrinting_, int initialPumpTune)
    11291129{
    11301130#ifdef JJF_ZERO //NEW_STYLE_SOLVER==0
     
    11381138  //generalMessageHandler->setPrefix(false);
    11391139  bool anyToDo = false;
    1140   int logLevel = parameters_[whichParam(CLP_PARAM_INT_LOGLEVEL, numberParameters_, parameters_)].intValue();
    1141   int useFpump = parameters_[whichParam(CBC_PARAM_STR_FPUMP, numberParameters_, parameters_)].currentOptionAsInteger();
    1142   int useRounding = parameters_[whichParam(CBC_PARAM_STR_ROUNDING, numberParameters_, parameters_)].currentOptionAsInteger();
    1143   int useGreedy = parameters_[whichParam(CBC_PARAM_STR_GREEDY, numberParameters_, parameters_)].currentOptionAsInteger();
    1144   int useCombine = parameters_[whichParam(CBC_PARAM_STR_COMBINE, numberParameters_, parameters_)].currentOptionAsInteger();
    1145   int useProximity = parameters_[whichParam(CBC_PARAM_STR_PROXIMITY, numberParameters_, parameters_)].currentOptionAsInteger();
    1146   int useCrossover = parameters_[whichParam(CBC_PARAM_STR_CROSSOVER2, numberParameters_, parameters_)].currentOptionAsInteger();
    1147   //int usePivotC = parameters_[whichParam(CBC_PARAM_STR_PIVOTANDCOMPLEMENT, numberParameters_, parameters_)].currentOptionAsInteger();
    1148   int usePivotF = parameters_[whichParam(CBC_PARAM_STR_PIVOTANDFIX, numberParameters_, parameters_)].currentOptionAsInteger();
    1149   int useRand = parameters_[whichParam(CBC_PARAM_STR_RANDROUND, numberParameters_, parameters_)].currentOptionAsInteger();
    1150   int useRINS = parameters_[whichParam(CBC_PARAM_STR_RINS, numberParameters_, parameters_)].currentOptionAsInteger();
    1151   int useRENS = parameters_[whichParam(CBC_PARAM_STR_RENS, numberParameters_, parameters_)].currentOptionAsInteger();
    1152   int useVND = parameters_[whichParam(CBC_PARAM_STR_VND, numberParameters_, parameters_)].currentOptionAsInteger();
    1153   int useDINS = parameters_[whichParam(CBC_PARAM_STR_DINS, numberParameters_, parameters_)].currentOptionAsInteger();
    1154   int useDIVING2 = parameters_[whichParam(CBC_PARAM_STR_DIVINGS, numberParameters_, parameters_)].currentOptionAsInteger();
    1155   int useNaive = parameters_[whichParam(CBC_PARAM_STR_NAIVE, numberParameters_, parameters_)].currentOptionAsInteger();
    1156   int useDW = parameters_[whichParam(CBC_PARAM_STR_DW, numberParameters_, parameters_)].currentOptionAsInteger();
     1140  int logLevel = parameters_[whichParam(CLP_PARAM_INT_LOGLEVEL, parameters_)].intValue();
     1141  int useFpump = parameters_[whichParam(CBC_PARAM_STR_FPUMP, parameters_)].currentOptionAsInteger();
     1142  int useRounding = parameters_[whichParam(CBC_PARAM_STR_ROUNDING, parameters_)].currentOptionAsInteger();
     1143  int useGreedy = parameters_[whichParam(CBC_PARAM_STR_GREEDY, parameters_)].currentOptionAsInteger();
     1144  int useCombine = parameters_[whichParam(CBC_PARAM_STR_COMBINE, parameters_)].currentOptionAsInteger();
     1145  int useProximity = parameters_[whichParam(CBC_PARAM_STR_PROXIMITY, parameters_)].currentOptionAsInteger();
     1146  int useCrossover = parameters_[whichParam(CBC_PARAM_STR_CROSSOVER2, parameters_)].currentOptionAsInteger();
     1147  //int usePivotC = parameters_[whichParam(CBC_PARAM_STR_PIVOTANDCOMPLEMENT, parameters_)].currentOptionAsInteger();
     1148  int usePivotF = parameters_[whichParam(CBC_PARAM_STR_PIVOTANDFIX, parameters_)].currentOptionAsInteger();
     1149  int useRand = parameters_[whichParam(CBC_PARAM_STR_RANDROUND, parameters_)].currentOptionAsInteger();
     1150  int useRINS = parameters_[whichParam(CBC_PARAM_STR_RINS, parameters_)].currentOptionAsInteger();
     1151  int useRENS = parameters_[whichParam(CBC_PARAM_STR_RENS, parameters_)].currentOptionAsInteger();
     1152  int useVND = parameters_[whichParam(CBC_PARAM_STR_VND, parameters_)].currentOptionAsInteger();
     1153  int useDINS = parameters_[whichParam(CBC_PARAM_STR_DINS, parameters_)].currentOptionAsInteger();
     1154  int useDIVING2 = parameters_[whichParam(CBC_PARAM_STR_DIVINGS, parameters_)].currentOptionAsInteger();
     1155  int useNaive = parameters_[whichParam(CBC_PARAM_STR_NAIVE, parameters_)].currentOptionAsInteger();
     1156  int useDW = parameters_[whichParam(CBC_PARAM_STR_DW, parameters_)].currentOptionAsInteger();
    11571157  int kType = (type < 10) ? type : 1;
    11581158  assert(kType == 1 || kType == 2);
     
    11611161    anyToDo = true;
    11621162    CbcHeuristicFPump heuristic4(*model);
    1163     double dextra3 = parameters_[whichParam(CBC_PARAM_DBL_SMALLBAB, numberParameters_, parameters_)].doubleValue();
     1163    double dextra3 = parameters_[whichParam(CBC_PARAM_DBL_SMALLBAB, parameters_)].doubleValue();
    11641164    heuristic4.setFractionSmall(dextra3);
    1165     double dextra1 = parameters_[whichParam(CBC_PARAM_DBL_ARTIFICIALCOST, numberParameters_, parameters_)].doubleValue();
     1165    double dextra1 = parameters_[whichParam(CBC_PARAM_DBL_ARTIFICIALCOST, parameters_)].doubleValue();
    11661166    if (dextra1)
    11671167      heuristic4.setArtificialCost(dextra1);
    1168     heuristic4.setMaximumPasses(parameters_[whichParam(CBC_PARAM_INT_FPUMPITS, numberParameters_, parameters_)].intValue());
    1169     if (parameters_[whichParam(CBC_PARAM_INT_FPUMPITS, numberParameters_, parameters_)].intValue() == 21)
     1168    heuristic4.setMaximumPasses(parameters_[whichParam(CBC_PARAM_INT_FPUMPITS, parameters_)].intValue());
     1169    if (parameters_[whichParam(CBC_PARAM_INT_FPUMPITS, parameters_)].intValue() == 21)
    11701170      heuristic4.setIterationRatio(1.0);
    1171     int pumpTune = parameters_[whichParam(CBC_PARAM_INT_FPUMPTUNE, numberParameters_, parameters_)].intValue();
    1172     int pumpTune2 = parameters_[whichParam(CBC_PARAM_INT_FPUMPTUNE2, numberParameters_, parameters_)].intValue();
     1171    int pumpTune = parameters_[whichParam(CBC_PARAM_INT_FPUMPTUNE, parameters_)].intValue();
     1172    int pumpTune2 = parameters_[whichParam(CBC_PARAM_INT_FPUMPTUNE2, parameters_)].intValue();
    11731173    if (pumpTune > 0) {
    11741174      bool printStuff = (pumpTune != initialPumpTune || logLevel > 1 || pumpTune2 > 0)
     
    12201220        model->solver()->getDblParam(OsiDualObjectiveLimit, cutoff);
    12211221        cutoff = CoinMin(cutoff, value + 0.05 * fabs(value) * c);
    1222         double fakeCutoff = parameters_[whichParam(CBC_PARAM_DBL_FAKECUTOFF, numberParameters_, parameters_)].doubleValue();
     1222        double fakeCutoff = parameters_[whichParam(CBC_PARAM_DBL_FAKECUTOFF, parameters_)].doubleValue();
    12231223        if (fakeCutoff)
    12241224          cutoff = fakeCutoff;
     
    12771277        //double increment = (0.01*i+0.005)*(fabs(value)+1.0e-12);
    12781278        double increment = 0.0;
    1279         double fakeIncrement = parameters_[whichParam(CBC_PARAM_DBL_FAKEINCREMENT, numberParameters_, parameters_)].doubleValue();
     1279        double fakeIncrement = parameters_[whichParam(CBC_PARAM_DBL_FAKEINCREMENT, parameters_)].doubleValue();
    12801280        if (fakeIncrement)
    12811281          increment = fakeIncrement;
     
    14051405  {
    14061406    int useD;
    1407     useD = parameters_[whichParam(CBC_PARAM_STR_DIVINGV, numberParameters_, parameters_)].currentOptionAsInteger();
     1407    useD = parameters_[whichParam(CBC_PARAM_STR_DIVINGV, parameters_)].currentOptionAsInteger();
    14081408    useDIVING |= 1 * ((useD >= kType) ? 1 : 0);
    1409     useD = parameters_[whichParam(CBC_PARAM_STR_DIVINGG, numberParameters_, parameters_)].currentOptionAsInteger();
     1409    useD = parameters_[whichParam(CBC_PARAM_STR_DIVINGG, parameters_)].currentOptionAsInteger();
    14101410    useDIVING |= 2 * ((useD >= kType) ? 1 : 0);
    1411     useD = parameters_[whichParam(CBC_PARAM_STR_DIVINGF, numberParameters_, parameters_)].currentOptionAsInteger();
     1411    useD = parameters_[whichParam(CBC_PARAM_STR_DIVINGF, parameters_)].currentOptionAsInteger();
    14121412    useDIVING |= 4 * ((useD >= kType) ? 1 : 0);
    1413     useD = parameters_[whichParam(CBC_PARAM_STR_DIVINGC, numberParameters_, parameters_)].currentOptionAsInteger();
     1413    useD = parameters_[whichParam(CBC_PARAM_STR_DIVINGC, parameters_)].currentOptionAsInteger();
    14141414    useDIVING |= 8 * ((useD >= kType) ? 1 : 0);
    1415     useD = parameters_[whichParam(CBC_PARAM_STR_DIVINGL, numberParameters_, parameters_)].currentOptionAsInteger();
     1415    useD = parameters_[whichParam(CBC_PARAM_STR_DIVINGL, parameters_)].currentOptionAsInteger();
    14161416    useDIVING |= 16 * ((useD >= kType) ? 1 : 0);
    1417     useD = parameters_[whichParam(CBC_PARAM_STR_DIVINGP, numberParameters_, parameters_)].currentOptionAsInteger();
     1417    useD = parameters_[whichParam(CBC_PARAM_STR_DIVINGP, parameters_)].currentOptionAsInteger();
    14181418    useDIVING |= 32 * ((useD >= kType) ? 1 : 0);
    14191419  }
    14201420  if (useDIVING2 >= kType && useDIVING2 <= kType + 1) {
    1421     int diveOptions = parameters_[whichParam(CBC_PARAM_INT_DIVEOPT, numberParameters_, parameters_)].intValue();
     1421    int diveOptions = parameters_[whichParam(CBC_PARAM_INT_DIVEOPT, parameters_)].intValue();
    14221422    if (diveOptions < 0 || diveOptions > 10)
    14231423      diveOptions = 2;
     
    14501450
    14511451  if (useDIVING > 0) {
    1452     int majorIterations = parameters_[whichParam(CBC_PARAM_INT_DIVEOPTSOLVES, numberParameters_, parameters_)].intValue();
    1453     int diveOptions2 = parameters_[whichParam(CBC_PARAM_INT_DIVEOPT, numberParameters_, parameters_)].intValue();
     1452    int majorIterations = parameters_[whichParam(CBC_PARAM_INT_DIVEOPTSOLVES, parameters_)].intValue();
     1453    int diveOptions2 = parameters_[whichParam(CBC_PARAM_INT_DIVEOPT, parameters_)].intValue();
    14541454    int diveOptions;
    14551455    if (diveOptions2 > 99) {
     
    16371637    } else {
    16381638      int proximityNumber;
    1639       parameters_[whichParam(CBC_PARAM_STR_PROXIMITY, numberParameters_, parameters_)].currentOptionAsInteger(proximityNumber);
     1639      parameters_[whichParam(CBC_PARAM_STR_PROXIMITY, parameters_)].currentOptionAsInteger(proximityNumber);
    16401640      if (proximityNumber > 0) {
    16411641        heuristic2a.setNumberNodes(proximityNumber);
     
    16581658    anyToDo = true;
    16591659  }
    1660   int heurSwitches = parameters_[whichParam(CBC_PARAM_INT_HOPTIONS, numberParameters_, parameters_)].intValue() % 100;
     1660  int heurSwitches = parameters_[whichParam(CBC_PARAM_INT_HOPTIONS, parameters_)].intValue() % 100;
    16611661  if (heurSwitches) {
    16621662    for (int iHeur = 0; iHeur < model->numberHeuristics(); iHeur++) {
     
    16821682    bool cleanModel = !model2.numberIntegers() && !model2.numberObjects();
    16831683    model2.findIntegers(false);
    1684     int heurOptions = (parameters_[whichParam(CBC_PARAM_INT_HOPTIONS, numberParameters_, parameters_)].intValue() / 100) % 100;
     1684    int heurOptions = (parameters_[whichParam(CBC_PARAM_INT_HOPTIONS, parameters_)].intValue() / 100) % 100;
    16851685    if (heurOptions == 0 || heurOptions == 2) {
    16861686      model2.doHeuristicsAtRoot(1);
  • trunk/Cbc/src/CbcSolverHeuristics.hpp

    r2465 r2479  
    3737        (out model later)
    3838    */
    39 int doHeuristics(CbcModel *model, int type, CbcOrClpParam *parameters_,
    40   int numberParameters_, int noPrinting_, int initialPumpTune);
     39int doHeuristics(CbcModel *model, int type, std::vector< CbcOrClpParam > parameters_,
     40  int noPrinting_, int initialPumpTune);
    4141
    4242#endif //CbcSolverHeuristics_H
  • trunk/Cbc/src/Cbc_C_Interface.cpp

    r2478 r2479  
    1414
    1515#include "CbcModel.hpp"
     16#include "CbcSolver.hpp"
    1617#include "CbcBranchActual.hpp"
    1718
     
    424425  model->model_ = new CbcModel(solver1);
    425426  model->solver_ = dynamic_cast< OsiClpSolverInterface * >(model->model_->solver());
    426   CbcMain0(*model->model_);
     427  CbcMain0(*model->model_, *model->cbcData);
    427428  model->handler_ = NULL;
     429  model->cbcData = new CbcSolverUsefulData();
     430  model->cbcData->noPrinting_ = false;
    428431  model->relax_ = 0;
    429432
     
    465468  delete model->handler_;
    466469
     470  delete model->cbcData;
     471
    467472  if (VERBOSE > 1)
    468473    printf("%s delete model\n", prefix);
     
    853858  try {
    854859
    855     CbcMain1((int)argv.size(), &argv[0], *model->model_);
     860    CbcMain1((int)argv.size(), &argv[0], *model->model_, NULL, *model->cbcData);
    856861  } catch (CoinError e) {
    857862    printf("%s ERROR: %s::%s, %s\n", prefix,
  • trunk/Cbc/src/CoinSolve.cpp

    r2467 r2479  
    1111#include "CoinPragma.hpp"
    1212#include "CbcModel.hpp"
     13#include "CbcSolver.hpp"
    1314#include "OsiClpSolverInterface.hpp"
    1415
     
    300301}
    301302#endif
     303
     304static int dummyCallBack(CbcModel * /*model*/, int /*whereFrom*/)
     305{
     306  return 0;
     307}
     308
    302309int main(int argc, const char *argv[])
    303310{
     
    328335#endif
    329336
     337    CbcSolverUsefulData cbcData;
     338    cbcData.noPrinting_ = false;
    330339    // initialize
    331     CbcMain0(model);
     340    CbcMain0(model, cbcData);
    332341
    333342#ifdef TEST_MESSAGE_HANDLER
     
    340349#endif
    341350
    342     returnCode = CbcMain1(argc, argv, model);
     351    returnCode = CbcMain1(argc, argv, model, dummyCallBack, cbcData);
    343352  }
    344353
Note: See TracChangeset for help on using the changeset viewer.