Ignore:
Timestamp:
Jan 6, 2019 2:43:06 PM (4 months ago)
Author:
unxusr
Message:

formatting

File:
1 edited

Legend:

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

    r2384 r2385  
    3939#endif
    4040#endif
    41 #if defined(COIN_HAS_WSMP) && ! defined(USE_EKKWSSMP)
     41#if defined(COIN_HAS_WSMP) && !defined(USE_EKKWSSMP)
    4242#ifndef CBC_THREAD
    4343#define CBC_THREAD
     
    5151static std::string afterEquals = "";
    5252static char printArray[200];
    53 #if COIN_INT_MAX==0
     53#if COIN_INT_MAX == 0
    5454#undef COIN_INT_MAX
    5555#define COIN_INT_MAX 2147483647
    5656#endif
    5757#if FLUSH_PRINT_BUFFER > 2
    58 int coinFlushBufferFlag=0;
     58int coinFlushBufferFlag = 0;
    5959#endif
    6060void setCbcOrClpPrinting(bool yesNo)
    6161{
    62      doPrinting = yesNo;
     62  doPrinting = yesNo;
    6363}
    6464//#############################################################################
     
    6969// Default Constructor
    7070//-------------------------------------------------------------------
    71 CbcOrClpParam::CbcOrClpParam ()
    72      : type_(CBC_PARAM_NOTUSED_INVALID),
    73        lowerDoubleValue_(0.0),
    74        upperDoubleValue_(0.0),
    75        lowerIntValue_(0),
    76        upperIntValue_(0),
    77        lengthName_(0),
    78        lengthMatch_(0),
    79        definedKeyWords_(),
    80        name_(),
    81        shortHelp_(),
    82        longHelp_(),
    83        action_(CBC_PARAM_NOTUSED_INVALID),
    84        currentKeyWord_(-1),
    85        display_(0),
    86        intValue_(-1),
    87        doubleValue_(-1.0),
    88        stringValue_(""),
    89        whereUsed_(7),
    90        fakeKeyWord_(-1),
    91       fakeValue_(0)
     71CbcOrClpParam::CbcOrClpParam()
     72  : type_(CBC_PARAM_NOTUSED_INVALID)
     73  , lowerDoubleValue_(0.0)
     74  , upperDoubleValue_(0.0)
     75  , lowerIntValue_(0)
     76  , upperIntValue_(0)
     77  , lengthName_(0)
     78  , lengthMatch_(0)
     79  , definedKeyWords_()
     80  , name_()
     81  , shortHelp_()
     82  , longHelp_()
     83  , action_(CBC_PARAM_NOTUSED_INVALID)
     84  , currentKeyWord_(-1)
     85  , display_(0)
     86  , intValue_(-1)
     87  , doubleValue_(-1.0)
     88  , stringValue_("")
     89  , whereUsed_(7)
     90  , fakeKeyWord_(-1)
     91  , fakeValue_(0)
    9292{
    9393}
    9494// Other constructors
    95 CbcOrClpParam::CbcOrClpParam (std::string name, std::string help,
    96                               double lower, double upper, CbcOrClpParameterType type,
    97                               int display)
    98      : type_(type),
    99        lowerIntValue_(0),
    100        upperIntValue_(0),
    101        definedKeyWords_(),
    102        name_(name),
    103        shortHelp_(help),
    104        longHelp_(),
    105        action_(type),
    106        currentKeyWord_(-1),
    107        display_(display),
    108        intValue_(-1),
    109        doubleValue_(-1.0),
    110        stringValue_(""),
    111        whereUsed_(7),
    112        fakeKeyWord_(-1),
    113       fakeValue_(0)
    114 {
    115      lowerDoubleValue_ = lower;
    116      upperDoubleValue_ = upper;
    117      gutsOfConstructor();
    118 }
    119 CbcOrClpParam::CbcOrClpParam (std::string name, std::string help,
    120                               int lower, int upper, CbcOrClpParameterType type,
    121                               int display)
    122      : type_(type),
    123        lowerDoubleValue_(0.0),
    124        upperDoubleValue_(0.0),
    125        definedKeyWords_(),
    126        name_(name),
    127        shortHelp_(help),
    128        longHelp_(),
    129        action_(type),
    130        currentKeyWord_(-1),
    131        display_(display),
    132        intValue_(-1),
    133        doubleValue_(-1.0),
    134        stringValue_(""),
    135        whereUsed_(7),
    136        fakeKeyWord_(-1),
    137       fakeValue_(0)
    138 {
    139      gutsOfConstructor();
    140      lowerIntValue_ = lower;
    141      upperIntValue_ = upper;
     95CbcOrClpParam::CbcOrClpParam(std::string name, std::string help,
     96  double lower, double upper, CbcOrClpParameterType type,
     97  int display)
     98  : type_(type)
     99  , lowerIntValue_(0)
     100  , upperIntValue_(0)
     101  , definedKeyWords_()
     102  , name_(name)
     103  , shortHelp_(help)
     104  , longHelp_()
     105  , action_(type)
     106  , currentKeyWord_(-1)
     107  , display_(display)
     108  , intValue_(-1)
     109  , doubleValue_(-1.0)
     110  , stringValue_("")
     111  , whereUsed_(7)
     112  , fakeKeyWord_(-1)
     113  , fakeValue_(0)
     114{
     115  lowerDoubleValue_ = lower;
     116  upperDoubleValue_ = upper;
     117  gutsOfConstructor();
     118}
     119CbcOrClpParam::CbcOrClpParam(std::string name, std::string help,
     120  int lower, int upper, CbcOrClpParameterType type,
     121  int display)
     122  : type_(type)
     123  , lowerDoubleValue_(0.0)
     124  , upperDoubleValue_(0.0)
     125  , definedKeyWords_()
     126  , name_(name)
     127  , shortHelp_(help)
     128  , longHelp_()
     129  , action_(type)
     130  , currentKeyWord_(-1)
     131  , display_(display)
     132  , intValue_(-1)
     133  , doubleValue_(-1.0)
     134  , stringValue_("")
     135  , whereUsed_(7)
     136  , fakeKeyWord_(-1)
     137  , fakeValue_(0)
     138{
     139  gutsOfConstructor();
     140  lowerIntValue_ = lower;
     141  upperIntValue_ = upper;
    142142}
    143143// Other strings will be added by append
    144 CbcOrClpParam::CbcOrClpParam (std::string name, std::string help,
    145                               std::string firstValue,
    146                               CbcOrClpParameterType type, int whereUsed,
    147                               int display)
    148      : type_(type),
    149        lowerDoubleValue_(0.0),
    150        upperDoubleValue_(0.0),
    151        lowerIntValue_(0),
    152        upperIntValue_(0),
    153        definedKeyWords_(),
    154        name_(name),
    155        shortHelp_(help),
    156        longHelp_(),
    157        action_(type),
    158        currentKeyWord_(0),
    159        display_(display),
    160        intValue_(-1),
    161        doubleValue_(-1.0),
    162        stringValue_(""),
    163        whereUsed_(whereUsed),
    164        fakeKeyWord_(-1),
    165       fakeValue_(0)
    166 {
    167      gutsOfConstructor();
    168      definedKeyWords_.push_back(firstValue);
     144CbcOrClpParam::CbcOrClpParam(std::string name, std::string help,
     145  std::string firstValue,
     146  CbcOrClpParameterType type, int whereUsed,
     147  int display)
     148  : type_(type)
     149  , lowerDoubleValue_(0.0)
     150  , upperDoubleValue_(0.0)
     151  , lowerIntValue_(0)
     152  , upperIntValue_(0)
     153  , definedKeyWords_()
     154  , name_(name)
     155  , shortHelp_(help)
     156  , longHelp_()
     157  , action_(type)
     158  , currentKeyWord_(0)
     159  , display_(display)
     160  , intValue_(-1)
     161  , doubleValue_(-1.0)
     162  , stringValue_("")
     163  , whereUsed_(whereUsed)
     164  , fakeKeyWord_(-1)
     165  , fakeValue_(0)
     166{
     167  gutsOfConstructor();
     168  definedKeyWords_.push_back(firstValue);
    169169}
    170170// Action
    171 CbcOrClpParam::CbcOrClpParam (std::string name, std::string help,
    172                               CbcOrClpParameterType type, int whereUsed,
    173                               int display)
    174      : type_(type),
    175        lowerDoubleValue_(0.0),
    176        upperDoubleValue_(0.0),
    177        lowerIntValue_(0),
    178        upperIntValue_(0),
    179        definedKeyWords_(),
    180        name_(name),
    181        shortHelp_(help),
    182        longHelp_(),
    183        action_(type),
    184        currentKeyWord_(-1),
    185        display_(display),
    186        intValue_(-1),
    187        doubleValue_(-1.0),
    188        stringValue_(""),
    189        fakeKeyWord_(-1),
    190       fakeValue_(0)
    191 {
    192      whereUsed_ = whereUsed;
    193      gutsOfConstructor();
     171CbcOrClpParam::CbcOrClpParam(std::string name, std::string help,
     172  CbcOrClpParameterType type, int whereUsed,
     173  int display)
     174  : type_(type)
     175  , lowerDoubleValue_(0.0)
     176  , upperDoubleValue_(0.0)
     177  , lowerIntValue_(0)
     178  , upperIntValue_(0)
     179  , definedKeyWords_()
     180  , name_(name)
     181  , shortHelp_(help)
     182  , longHelp_()
     183  , action_(type)
     184  , currentKeyWord_(-1)
     185  , display_(display)
     186  , intValue_(-1)
     187  , doubleValue_(-1.0)
     188  , stringValue_("")
     189  , fakeKeyWord_(-1)
     190  , fakeValue_(0)
     191{
     192  whereUsed_ = whereUsed;
     193  gutsOfConstructor();
    194194}
    195195
     
    197197// Copy constructor
    198198//-------------------------------------------------------------------
    199 CbcOrClpParam::CbcOrClpParam (const CbcOrClpParam & rhs)
    200 {
    201      type_ = rhs.type_;
    202      lowerDoubleValue_ = rhs.lowerDoubleValue_;
    203      upperDoubleValue_ = rhs.upperDoubleValue_;
    204      lowerIntValue_ = rhs.lowerIntValue_;
    205      upperIntValue_ = rhs.upperIntValue_;
    206      lengthName_ = rhs.lengthName_;
    207      lengthMatch_ = rhs.lengthMatch_;
    208      definedKeyWords_ = rhs.definedKeyWords_;
    209      name_ = rhs.name_;
    210      shortHelp_ = rhs.shortHelp_;
    211      longHelp_ = rhs.longHelp_;
    212      action_ = rhs.action_;
    213      currentKeyWord_ = rhs.currentKeyWord_;
    214      display_ = rhs.display_;
    215      intValue_ = rhs.intValue_;
    216      doubleValue_ = rhs.doubleValue_;
    217      stringValue_ = rhs.stringValue_;
    218      whereUsed_ = rhs.whereUsed_;
    219      fakeKeyWord_ = rhs.fakeKeyWord_;
    220      fakeValue_ = rhs.fakeValue_;
     199CbcOrClpParam::CbcOrClpParam(const CbcOrClpParam &rhs)
     200{
     201  type_ = rhs.type_;
     202  lowerDoubleValue_ = rhs.lowerDoubleValue_;
     203  upperDoubleValue_ = rhs.upperDoubleValue_;
     204  lowerIntValue_ = rhs.lowerIntValue_;
     205  upperIntValue_ = rhs.upperIntValue_;
     206  lengthName_ = rhs.lengthName_;
     207  lengthMatch_ = rhs.lengthMatch_;
     208  definedKeyWords_ = rhs.definedKeyWords_;
     209  name_ = rhs.name_;
     210  shortHelp_ = rhs.shortHelp_;
     211  longHelp_ = rhs.longHelp_;
     212  action_ = rhs.action_;
     213  currentKeyWord_ = rhs.currentKeyWord_;
     214  display_ = rhs.display_;
     215  intValue_ = rhs.intValue_;
     216  doubleValue_ = rhs.doubleValue_;
     217  stringValue_ = rhs.stringValue_;
     218  whereUsed_ = rhs.whereUsed_;
     219  fakeKeyWord_ = rhs.fakeKeyWord_;
     220  fakeValue_ = rhs.fakeValue_;
    221221}
    222222
     
    224224// Destructor
    225225//-------------------------------------------------------------------
    226 CbcOrClpParam::~CbcOrClpParam ()
     226CbcOrClpParam::~CbcOrClpParam()
    227227{
    228228}
     
    232232//-------------------------------------------------------------------
    233233CbcOrClpParam &
    234 CbcOrClpParam::operator=(const CbcOrClpParam & rhs)
    235 {
    236      if (this != &rhs) {
    237           type_ = rhs.type_;
    238           lowerDoubleValue_ = rhs.lowerDoubleValue_;
    239           upperDoubleValue_ = rhs.upperDoubleValue_;
    240           lowerIntValue_ = rhs.lowerIntValue_;
    241           upperIntValue_ = rhs.upperIntValue_;
    242           lengthName_ = rhs.lengthName_;
    243           lengthMatch_ = rhs.lengthMatch_;
    244           definedKeyWords_ = rhs.definedKeyWords_;
    245           name_ = rhs.name_;
    246           shortHelp_ = rhs.shortHelp_;
    247           longHelp_ = rhs.longHelp_;
    248           action_ = rhs.action_;
    249           currentKeyWord_ = rhs.currentKeyWord_;
    250           display_ = rhs.display_;
    251           intValue_ = rhs.intValue_;
    252           doubleValue_ = rhs.doubleValue_;
    253           stringValue_ = rhs.stringValue_;
    254           whereUsed_ = rhs.whereUsed_;
    255           fakeKeyWord_ = rhs.fakeKeyWord_;
    256           fakeValue_ = rhs.fakeValue_;
    257      }
    258      return *this;
    259 }
    260 void
    261 CbcOrClpParam::gutsOfConstructor()
    262 {
    263      std::string::size_type  shriekPos = name_.find('!');
    264      lengthName_ = static_cast<unsigned int>(name_.length());
    265      if ( shriekPos == std::string::npos ) {
    266           //does not contain '!'
    267           lengthMatch_ = lengthName_;
    268      } else {
    269           lengthMatch_ = static_cast<unsigned int>(shriekPos);
    270           name_ = name_.substr(0, shriekPos) + name_.substr(shriekPos + 1);
    271           lengthName_--;
    272      }
    273 }
    274 // Sets value of fake keyword to current size of keywords
    275 void
    276 CbcOrClpParam::setFakeKeyWord(int fakeValue)
    277 {
    278   fakeKeyWord_ = static_cast<int>(definedKeyWords_.size());
    279   assert (fakeKeyWord_>0);
     234CbcOrClpParam::operator=(const CbcOrClpParam &rhs)
     235{
     236  if (this != &rhs) {
     237    type_ = rhs.type_;
     238    lowerDoubleValue_ = rhs.lowerDoubleValue_;
     239    upperDoubleValue_ = rhs.upperDoubleValue_;
     240    lowerIntValue_ = rhs.lowerIntValue_;
     241    upperIntValue_ = rhs.upperIntValue_;
     242    lengthName_ = rhs.lengthName_;
     243    lengthMatch_ = rhs.lengthMatch_;
     244    definedKeyWords_ = rhs.definedKeyWords_;
     245    name_ = rhs.name_;
     246    shortHelp_ = rhs.shortHelp_;
     247    longHelp_ = rhs.longHelp_;
     248    action_ = rhs.action_;
     249    currentKeyWord_ = rhs.currentKeyWord_;
     250    display_ = rhs.display_;
     251    intValue_ = rhs.intValue_;
     252    doubleValue_ = rhs.doubleValue_;
     253    stringValue_ = rhs.stringValue_;
     254    whereUsed_ = rhs.whereUsed_;
     255    fakeKeyWord_ = rhs.fakeKeyWord_;
     256    fakeValue_ = rhs.fakeValue_;
     257  }
     258  return *this;
     259}
     260void CbcOrClpParam::gutsOfConstructor()
     261{
     262  std::string::size_type shriekPos = name_.find('!');
     263  lengthName_ = static_cast< unsigned int >(name_.length());
     264  if (shriekPos == std::string::npos) {
     265    //does not contain '!'
     266    lengthMatch_ = lengthName_;
     267  } else {
     268    lengthMatch_ = static_cast< unsigned int >(shriekPos);
     269    name_ = name_.substr(0, shriekPos) + name_.substr(shriekPos + 1);
     270    lengthName_--;
     271  }
     272}
     273// Sets value of fake keyword to current size of keywords
     274void CbcOrClpParam::setFakeKeyWord(int fakeValue)
     275{
     276  fakeKeyWord_ = static_cast< int >(definedKeyWords_.size());
     277  assert(fakeKeyWord_ > 0);
    280278  fakeValue_ = fakeValue;
    281   assert (fakeValue_>=0);
     279  assert(fakeValue_ >= 0);
    282280}
    283281/* Returns current parameter option position
    284282   but if fake keyword returns fakeValue_
    285283*/
    286 int
    287 CbcOrClpParam::currentOptionAsInteger (  ) const
     284int CbcOrClpParam::currentOptionAsInteger() const
    288285{
    289286  int fakeInteger;
     
    294291   fakeInteger to value
    295292*/
    296 int
    297 CbcOrClpParam::currentOptionAsInteger ( int & fakeInteger ) const
    298 {
    299   fakeInteger=-COIN_INT_MAX;
    300   if (fakeKeyWord_<0) {
     293int CbcOrClpParam::currentOptionAsInteger(int &fakeInteger) const
     294{
     295  fakeInteger = -COIN_INT_MAX;
     296  if (fakeKeyWord_ < 0) {
    301297    return currentKeyWord_;
    302   } else if (currentKeyWord_>=0&&currentKeyWord_<fakeKeyWord_){
     298  } else if (currentKeyWord_ >= 0 && currentKeyWord_ < fakeKeyWord_) {
    303299    return currentKeyWord_;
    304300  } else {
    305301    // fake
    306     if (currentKeyWord_<0)
     302    if (currentKeyWord_ < 0)
    307303      fakeInteger = currentKeyWord_ + 1000;
    308304    else
     
    312308}
    313309// Returns length of name for printing
    314 int
    315 CbcOrClpParam::lengthMatchName (  ) const
    316 {
    317      if (lengthName_ == lengthMatch_)
    318           return lengthName_;
    319      else
    320           return lengthName_ + 2;
     310int CbcOrClpParam::lengthMatchName() const
     311{
     312  if (lengthName_ == lengthMatch_)
     313    return lengthName_;
     314  else
     315    return lengthName_ + 2;
    321316}
    322317// Insert string (only valid for keywords)
    323 void
    324 CbcOrClpParam::append(std::string keyWord)
    325 {
    326      definedKeyWords_.push_back(keyWord);
     318void CbcOrClpParam::append(std::string keyWord)
     319{
     320  definedKeyWords_.push_back(keyWord);
    327321}
    328322
    329 int
    330 CbcOrClpParam::matches (std::string input) const
    331 {
    332      // look up strings to do more elegantly
    333      if (input.length() > lengthName_) {
    334           return 0;
    335      } else {
    336           unsigned int i;
    337           for (i = 0; i < input.length(); i++) {
    338                if (tolower(name_[i]) != tolower(input[i]))
    339                     break;
    340           }
    341           if (i < input.length()) {
    342                return 0;
    343           } else if (i >= lengthMatch_) {
    344                return 1;
    345           } else {
    346                // matched but too short
    347                return 2;
    348           }
    349      }
     323int CbcOrClpParam::matches(std::string input) const
     324{
     325  // look up strings to do more elegantly
     326  if (input.length() > lengthName_) {
     327    return 0;
     328  } else {
     329    unsigned int i;
     330    for (i = 0; i < input.length(); i++) {
     331      if (tolower(name_[i]) != tolower(input[i]))
     332        break;
     333    }
     334    if (i < input.length()) {
     335      return 0;
     336    } else if (i >= lengthMatch_) {
     337      return 1;
     338    } else {
     339      // matched but too short
     340      return 2;
     341    }
     342  }
    350343}
    351344// Returns name which could match
    352345std::string
    353 CbcOrClpParam::matchName (  ) const
    354 {
    355      if (lengthMatch_ == lengthName_)
    356           return name_;
    357      else
    358           return name_.substr(0, lengthMatch_) + "(" + name_.substr(lengthMatch_) + ")";
     346CbcOrClpParam::matchName() const
     347{
     348  if (lengthMatch_ == lengthName_)
     349    return name_;
     350  else
     351    return name_.substr(0, lengthMatch_) + "(" + name_.substr(lengthMatch_) + ")";
    359352}
    360353
    361354// Returns parameter option which matches (-1 if none)
    362 int
    363 CbcOrClpParam::parameterOption ( std::string check ) const
    364 {
    365      int numberItems = static_cast<int>(definedKeyWords_.size());
    366      if (!numberItems) {
     355int CbcOrClpParam::parameterOption(std::string check) const
     356{
     357  int numberItems = static_cast< int >(definedKeyWords_.size());
     358  if (!numberItems) {
     359    return -1;
     360  } else {
     361    int whichItem = 0;
     362    unsigned int it;
     363    for (it = 0; it < definedKeyWords_.size(); it++) {
     364      std::string thisOne = definedKeyWords_[it];
     365      std::string::size_type shriekPos = thisOne.find('!');
     366      size_t length1 = thisOne.length();
     367      size_t length2 = length1;
     368      if (shriekPos != std::string::npos) {
     369        //contains '!'
     370        length2 = shriekPos;
     371        thisOne = thisOne.substr(0, shriekPos) + thisOne.substr(shriekPos + 1);
     372        length1 = thisOne.length();
     373      }
     374      if (check.length() <= length1 && length2 <= check.length()) {
     375        unsigned int i;
     376        for (i = 0; i < check.length(); i++) {
     377          if (tolower(thisOne[i]) != tolower(check[i]))
     378            break;
     379        }
     380        if (i < check.length()) {
     381          whichItem++;
     382        } else if (i >= length2) {
     383          break;
     384        }
     385      } else {
     386        whichItem++;
     387      }
     388    }
     389    if (whichItem < numberItems) {
     390      return whichItem;
     391    } else {
     392      if (fakeKeyWord_ <= 0)
     393        return -1;
     394      // allow plus or minus
     395      int n;
     396      if (check.substr(0, 4) == "plus" || check.substr(0, 4) == "PLUS") {
     397        n = 4;
     398      } else if (check.substr(0, 5) == "minus" || check.substr(0, 5) == "MINUS") {
     399        n = 5;
     400      } else {
     401        return -1;
     402      }
     403      int value = 0;
     404      std::string field = check.substr(n);
     405      if (field != "EOL") {
     406        const char *start = field.c_str();
     407        char *endPointer = NULL;
     408        // check valid
     409        value = static_cast< int >(strtol(start, &endPointer, 10));
     410        if (*endPointer != '\0') {
    367411          return -1;
    368      } else {
    369           int whichItem = 0;
    370           unsigned int it;
    371           for (it = 0; it < definedKeyWords_.size(); it++) {
    372                std::string thisOne = definedKeyWords_[it];
    373                std::string::size_type  shriekPos = thisOne.find('!');
    374                size_t length1 = thisOne.length();
    375                size_t length2 = length1;
    376                if ( shriekPos != std::string::npos ) {
    377                     //contains '!'
    378                     length2 = shriekPos;
    379                     thisOne = thisOne.substr(0, shriekPos) +
    380                               thisOne.substr(shriekPos + 1);
    381                     length1 = thisOne.length();
    382                }
    383                if (check.length() <= length1 && length2 <= check.length()) {
    384                     unsigned int i;
    385                     for (i = 0; i < check.length(); i++) {
    386                          if (tolower(thisOne[i]) != tolower(check[i]))
    387                               break;
    388                     }
    389                     if (i < check.length()) {
    390                          whichItem++;
    391                     } else if (i >= length2) {
    392                          break;
    393                     }
    394                } else {
    395                     whichItem++;
    396                }
    397           }
    398           if (whichItem < numberItems) {
    399                return whichItem;
    400           } else {
    401             if (fakeKeyWord_<=0)
    402               return -1;
    403             // allow plus or minus
    404             int n;
    405             if (check.substr(0,4)=="plus"||check.substr(0,4)=="PLUS") {
    406               n = 4;
    407             } else if (check.substr(0,5)=="minus"||check.substr(0,5)=="MINUS") {
    408               n = 5;
    409             } else {
    410               return -1;
    411             }
    412             int value = 0;
    413             std::string field=check.substr(n);
    414             if (field != "EOL") {
    415               const char * start = field.c_str();
    416               char * endPointer = NULL;
    417               // check valid
    418               value =  static_cast<int>(strtol(start, &endPointer, 10));
    419               if (*endPointer != '\0') {
    420                 return -1;
    421               }
    422               if (n==4)
    423                 return value + 1000;
    424               else
    425                 return -value - 1000;
    426             } else {
    427               return -1;
    428             }
    429           }
    430      }
     412        }
     413        if (n == 4)
     414          return value + 1000;
     415        else
     416          return -value - 1000;
     417      } else {
     418        return -1;
     419      }
     420    }
     421  }
    431422}
    432423// Prints parameter options
    433 void
    434 CbcOrClpParam::printOptions (  ) const
    435 {
    436      std::cout << "<Possible options for " << name_ << " are:";
    437      unsigned int it;
    438      for (it = 0; it < definedKeyWords_.size(); it++) {
    439           std::string thisOne = definedKeyWords_[it];
    440           std::string::size_type  shriekPos = thisOne.find('!');
    441           if ( shriekPos != std::string::npos ) {
    442                //contains '!'
    443                thisOne = thisOne.substr(0, shriekPos) +
    444                          "(" + thisOne.substr(shriekPos + 1) + ")";
    445           }
    446           std::cout << " " << thisOne;
    447      }
    448      assert (currentKeyWord_ >= 0 && currentKeyWord_ < static_cast<int>(definedKeyWords_.size()));
    449      std::string current = definedKeyWords_[currentKeyWord_];
    450      std::string::size_type  shriekPos = current.find('!');
    451      if ( shriekPos != std::string::npos ) {
    452           //contains '!'
    453           current = current.substr(0, shriekPos) +
    454                     "(" + current.substr(shriekPos + 1) + ")";
    455      }
    456      std::cout << ";\n\tcurrent  " << current << ">" << std::endl;
     424void CbcOrClpParam::printOptions() const
     425{
     426  std::cout << "<Possible options for " << name_ << " are:";
     427  unsigned int it;
     428  for (it = 0; it < definedKeyWords_.size(); it++) {
     429    std::string thisOne = definedKeyWords_[it];
     430    std::string::size_type shriekPos = thisOne.find('!');
     431    if (shriekPos != std::string::npos) {
     432      //contains '!'
     433      thisOne = thisOne.substr(0, shriekPos) + "(" + thisOne.substr(shriekPos + 1) + ")";
     434    }
     435    std::cout << " " << thisOne;
     436  }
     437  assert(currentKeyWord_ >= 0 && currentKeyWord_ < static_cast< int >(definedKeyWords_.size()));
     438  std::string current = definedKeyWords_[currentKeyWord_];
     439  std::string::size_type shriekPos = current.find('!');
     440  if (shriekPos != std::string::npos) {
     441    //contains '!'
     442    current = current.substr(0, shriekPos) + "(" + current.substr(shriekPos + 1) + ")";
     443  }
     444  std::cout << ";\n\tcurrent  " << current << ">" << std::endl;
    457445}
    458446// Print action and string
    459 void
    460 CbcOrClpParam::printString() const
    461 {
    462      if (name_ == "directory")
    463           std::cout << "Current working directory is " << stringValue_ << std::endl;
    464      else if (name_.substr(0, 6) == "printM")
    465           std::cout << "Current value of printMask is " << stringValue_ << std::endl;
    466      else
    467           std::cout << "Current default (if $ as parameter) for " << name_
    468                     << " is " << stringValue_ << std::endl;
    469 }
    470 void CoinReadPrintit(const char * input)
    471 {
    472      int length = static_cast<int>(strlen(input));
    473      char temp[101];
    474      int i;
    475      int n = 0;
    476      for (i = 0; i < length; i++) {
    477           if (input[i] == '\n') {
    478                temp[n] = '\0';
    479                std::cout << temp << std::endl;
    480                n = 0;
    481           } else if (n >= 65 && input[i] == ' ') {
    482                temp[n] = '\0';
    483                std::cout << temp << std::endl;
    484                n = 0;
    485           } else if (n || input[i] != ' ') {
    486                temp[n++] = input[i];
    487           }
    488      }
    489      if (n) {
    490           temp[n] = '\0';
    491           std::cout << temp << std::endl;
    492      }
     447void CbcOrClpParam::printString() const
     448{
     449  if (name_ == "directory")
     450    std::cout << "Current working directory is " << stringValue_ << std::endl;
     451  else if (name_.substr(0, 6) == "printM")
     452    std::cout << "Current value of printMask is " << stringValue_ << std::endl;
     453  else
     454    std::cout << "Current default (if $ as parameter) for " << name_
     455              << " is " << stringValue_ << std::endl;
     456}
     457void CoinReadPrintit(const char *input)
     458{
     459  int length = static_cast< int >(strlen(input));
     460  char temp[101];
     461  int i;
     462  int n = 0;
     463  for (i = 0; i < length; i++) {
     464    if (input[i] == '\n') {
     465      temp[n] = '\0';
     466      std::cout << temp << std::endl;
     467      n = 0;
     468    } else if (n >= 65 && input[i] == ' ') {
     469      temp[n] = '\0';
     470      std::cout << temp << std::endl;
     471      n = 0;
     472    } else if (n || input[i] != ' ') {
     473      temp[n++] = input[i];
     474    }
     475  }
     476  if (n) {
     477    temp[n] = '\0';
     478    std::cout << temp << std::endl;
     479  }
    493480}
    494481// Print Long help
    495 void
    496 CbcOrClpParam::printLongHelp() const
    497 {
    498      if (type_ >= 1 && type_ < 400) {
    499           CoinReadPrintit(longHelp_.c_str());
    500           if (type_ < CLP_PARAM_INT_SOLVERLOGLEVEL) {
    501                printf("<Range of values is %g to %g;\n\tcurrent %g>\n", lowerDoubleValue_, upperDoubleValue_, doubleValue_);
    502                assert (upperDoubleValue_ > lowerDoubleValue_);
    503           } else if (type_ < CLP_PARAM_STR_DIRECTION) {
    504                printf("<Range of values is %d to %d;\n\tcurrent %d>\n", lowerIntValue_, upperIntValue_, intValue_);
    505                assert (upperIntValue_ > lowerIntValue_);
    506           } else if (type_ < CLP_PARAM_ACTION_DIRECTORY) {
    507                printOptions();
    508           }
    509      }
    510 }
    511 #ifdef COIN_HAS_CBC
    512 int
    513 CbcOrClpParam::setDoubleParameter (OsiSolverInterface * model, double value)
    514 {
    515      int returnCode;
    516      setDoubleParameterWithMessage(model, value, returnCode);
    517      if (doPrinting && strlen(printArray))
    518           std::cout << printArray << std::endl;
    519      return returnCode;
     482void CbcOrClpParam::printLongHelp() const
     483{
     484  if (type_ >= 1 && type_ < 400) {
     485    CoinReadPrintit(longHelp_.c_str());
     486    if (type_ < CLP_PARAM_INT_SOLVERLOGLEVEL) {
     487      printf("<Range of values is %g to %g;\n\tcurrent %g>\n", lowerDoubleValue_, upperDoubleValue_, doubleValue_);
     488      assert(upperDoubleValue_ > lowerDoubleValue_);
     489    } else if (type_ < CLP_PARAM_STR_DIRECTION) {
     490      printf("<Range of values is %d to %d;\n\tcurrent %d>\n", lowerIntValue_, upperIntValue_, intValue_);
     491      assert(upperIntValue_ > lowerIntValue_);
     492    } else if (type_ < CLP_PARAM_ACTION_DIRECTORY) {
     493      printOptions();
     494    }
     495  }
     496}
     497#ifdef COIN_HAS_CBC
     498int CbcOrClpParam::setDoubleParameter(OsiSolverInterface *model, double value)
     499{
     500  int returnCode;
     501  setDoubleParameterWithMessage(model, value, returnCode);
     502  if (doPrinting && strlen(printArray))
     503    std::cout << printArray << std::endl;
     504  return returnCode;
    520505}
    521506// Sets double parameter and returns printable string and error code
    522507const char *
    523 CbcOrClpParam::setDoubleParameterWithMessage ( OsiSolverInterface * model, double  value , int & returnCode)
    524 {
    525      if (value < lowerDoubleValue_ || value > upperDoubleValue_) {
    526           sprintf(printArray, "%g was provided for %s - valid range is %g to %g",
    527                   value, name_.c_str(), lowerDoubleValue_, upperDoubleValue_);
    528           std::cout << value << " was provided for " << name_ <<
    529                     " - valid range is " << lowerDoubleValue_ << " to " <<
    530                     upperDoubleValue_ << std::endl;
    531           returnCode = 1;
    532      } else {
    533           double oldValue = doubleValue_;
    534           doubleValue_ = value;
    535           switch (type_) {
    536           case CLP_PARAM_DBL_DUALTOLERANCE:
    537                model->getDblParam(OsiDualTolerance, oldValue);
    538                model->setDblParam(OsiDualTolerance, value);
    539                break;
    540           case CLP_PARAM_DBL_PRIMALTOLERANCE:
    541                model->getDblParam(OsiPrimalTolerance, oldValue);
    542                model->setDblParam(OsiPrimalTolerance, value);
    543                break;
    544           default:
    545                break;
    546           }
    547           sprintf(printArray, "%s was changed from %g to %g",
    548                   name_.c_str(), oldValue, value);
    549           returnCode = 0;
    550      }
    551      return printArray;
     508CbcOrClpParam::setDoubleParameterWithMessage(OsiSolverInterface *model, double value, int &returnCode)
     509{
     510  if (value < lowerDoubleValue_ || value > upperDoubleValue_) {
     511    sprintf(printArray, "%g was provided for %s - valid range is %g to %g",
     512      value, name_.c_str(), lowerDoubleValue_, upperDoubleValue_);
     513    std::cout << value << " was provided for " << name_ << " - valid range is " << lowerDoubleValue_ << " to " << upperDoubleValue_ << std::endl;
     514    returnCode = 1;
     515  } else {
     516    double oldValue = doubleValue_;
     517    doubleValue_ = value;
     518    switch (type_) {
     519    case CLP_PARAM_DBL_DUALTOLERANCE:
     520      model->getDblParam(OsiDualTolerance, oldValue);
     521      model->setDblParam(OsiDualTolerance, value);
     522      break;
     523    case CLP_PARAM_DBL_PRIMALTOLERANCE:
     524      model->getDblParam(OsiPrimalTolerance, oldValue);
     525      model->setDblParam(OsiPrimalTolerance, value);
     526      break;
     527    default:
     528      break;
     529    }
     530    sprintf(printArray, "%s was changed from %g to %g",
     531      name_.c_str(), oldValue, value);
     532    returnCode = 0;
     533  }
     534  return printArray;
    552535}
    553536#endif
    554537#ifdef COIN_HAS_CLP
    555 int
    556 CbcOrClpParam::setDoubleParameter (ClpSimplex * model, double value)
    557 {
    558      int returnCode;
    559      setDoubleParameterWithMessage(model, value, returnCode);
    560      if (doPrinting && strlen(printArray))
    561           std::cout << printArray << std::endl;
    562      return returnCode;
     538int CbcOrClpParam::setDoubleParameter(ClpSimplex *model, double value)
     539{
     540  int returnCode;
     541  setDoubleParameterWithMessage(model, value, returnCode);
     542  if (doPrinting && strlen(printArray))
     543    std::cout << printArray << std::endl;
     544  return returnCode;
    563545}
    564546// Sets int parameter and returns printable string and error code
    565547const char *
    566 CbcOrClpParam::setDoubleParameterWithMessage ( ClpSimplex * model, double value , int & returnCode)
    567 {
    568      double oldValue = doubleValue_;
    569      if (value < lowerDoubleValue_ || value > upperDoubleValue_) {
    570           sprintf(printArray, "%g was provided for %s - valid range is %g to %g",
    571                   value, name_.c_str(), lowerDoubleValue_, upperDoubleValue_);
    572           returnCode = 1;
    573      } else {
    574           sprintf(printArray, "%s was changed from %g to %g",
    575                   name_.c_str(), oldValue, value);
    576           returnCode = 0;
    577           doubleValue_ = value;
    578           switch (type_) {
    579           case CLP_PARAM_DBL_DUALTOLERANCE:
    580                model->setDualTolerance(value);
    581                break;
    582           case CLP_PARAM_DBL_PRIMALTOLERANCE:
    583                model->setPrimalTolerance(value);
    584                break;
    585           case CLP_PARAM_DBL_ZEROTOLERANCE:
    586                model->setSmallElementValue(value);
    587                break;
    588           case CLP_PARAM_DBL_DUALBOUND:
    589                model->setDualBound(value);
    590                break;
    591           case CLP_PARAM_DBL_PRIMALWEIGHT:
    592                model->setInfeasibilityCost(value);
    593                break;
     548CbcOrClpParam::setDoubleParameterWithMessage(ClpSimplex *model, double value, int &returnCode)
     549{
     550  double oldValue = doubleValue_;
     551  if (value < lowerDoubleValue_ || value > upperDoubleValue_) {
     552    sprintf(printArray, "%g was provided for %s - valid range is %g to %g",
     553      value, name_.c_str(), lowerDoubleValue_, upperDoubleValue_);
     554    returnCode = 1;
     555  } else {
     556    sprintf(printArray, "%s was changed from %g to %g",
     557      name_.c_str(), oldValue, value);
     558    returnCode = 0;
     559    doubleValue_ = value;
     560    switch (type_) {
     561    case CLP_PARAM_DBL_DUALTOLERANCE:
     562      model->setDualTolerance(value);
     563      break;
     564    case CLP_PARAM_DBL_PRIMALTOLERANCE:
     565      model->setPrimalTolerance(value);
     566      break;
     567    case CLP_PARAM_DBL_ZEROTOLERANCE:
     568      model->setSmallElementValue(value);
     569      break;
     570    case CLP_PARAM_DBL_DUALBOUND:
     571      model->setDualBound(value);
     572      break;
     573    case CLP_PARAM_DBL_PRIMALWEIGHT:
     574      model->setInfeasibilityCost(value);
     575      break;
    594576#ifndef COIN_HAS_CBC
    595           case CLP_PARAM_DBL_TIMELIMIT:
    596                model->setMaximumSeconds(value);
    597                break;
    598 #endif
    599           case CLP_PARAM_DBL_OBJSCALE:
    600                model->setObjectiveScale(value);
    601                break;
    602           case CLP_PARAM_DBL_RHSSCALE:
    603                model->setRhsScale(value);
    604                break;
    605           case CLP_PARAM_DBL_PRESOLVETOLERANCE:
    606                model->setDblParam(ClpPresolveTolerance, value);
    607                break;
    608           default:
    609                break;
    610           }
    611      }
    612      return printArray;
     577    case CLP_PARAM_DBL_TIMELIMIT:
     578      model->setMaximumSeconds(value);
     579      break;
     580#endif
     581    case CLP_PARAM_DBL_OBJSCALE:
     582      model->setObjectiveScale(value);
     583      break;
     584    case CLP_PARAM_DBL_RHSSCALE:
     585      model->setRhsScale(value);
     586      break;
     587    case CLP_PARAM_DBL_PRESOLVETOLERANCE:
     588      model->setDblParam(ClpPresolveTolerance, value);
     589      break;
     590    default:
     591      break;
     592    }
     593  }
     594  return printArray;
    613595}
    614596double
    615 CbcOrClpParam::doubleParameter (ClpSimplex * model) const
    616 {
    617      double value;
    618      switch (type_) {
     597CbcOrClpParam::doubleParameter(ClpSimplex *model) const
     598{
     599  double value;
     600  switch (type_) {
    619601#ifndef COIN_HAS_CBC
    620      case CLP_PARAM_DBL_DUALTOLERANCE:
    621           value = model->dualTolerance();
    622           break;
    623      case CLP_PARAM_DBL_PRIMALTOLERANCE:
    624           value = model->primalTolerance();
    625           break;
    626 #endif
    627      case CLP_PARAM_DBL_ZEROTOLERANCE:
    628           value = model->getSmallElementValue();
    629           break;
    630      case CLP_PARAM_DBL_DUALBOUND:
    631           value = model->dualBound();
    632           break;
    633      case CLP_PARAM_DBL_PRIMALWEIGHT:
    634           value = model->infeasibilityCost();
    635           break;
     602  case CLP_PARAM_DBL_DUALTOLERANCE:
     603    value = model->dualTolerance();
     604    break;
     605  case CLP_PARAM_DBL_PRIMALTOLERANCE:
     606    value = model->primalTolerance();
     607    break;
     608#endif
     609  case CLP_PARAM_DBL_ZEROTOLERANCE:
     610    value = model->getSmallElementValue();
     611    break;
     612  case CLP_PARAM_DBL_DUALBOUND:
     613    value = model->dualBound();
     614    break;
     615  case CLP_PARAM_DBL_PRIMALWEIGHT:
     616    value = model->infeasibilityCost();
     617    break;
    636618#ifndef COIN_HAS_CBC
    637      case CLP_PARAM_DBL_TIMELIMIT:
    638           value = model->maximumSeconds();
    639           break;
    640 #endif
    641      case CLP_PARAM_DBL_OBJSCALE:
    642           value = model->objectiveScale();
    643           break;
    644      case CLP_PARAM_DBL_RHSSCALE:
    645           value = model->rhsScale();
    646           break;
    647      default:
    648           value = doubleValue_;
    649           break;
    650      }
    651      return value;
    652 }
    653 int
    654 CbcOrClpParam::setIntParameter (ClpSimplex * model, int value)
    655 {
    656      int returnCode;
    657      setIntParameterWithMessage(model, value, returnCode);
    658      if (doPrinting && strlen(printArray))
    659           std::cout << printArray << std::endl;
    660      return returnCode;
     619  case CLP_PARAM_DBL_TIMELIMIT:
     620    value = model->maximumSeconds();
     621    break;
     622#endif
     623  case CLP_PARAM_DBL_OBJSCALE:
     624    value = model->objectiveScale();
     625    break;
     626  case CLP_PARAM_DBL_RHSSCALE:
     627    value = model->rhsScale();
     628    break;
     629  default:
     630    value = doubleValue_;
     631    break;
     632  }
     633  return value;
     634}
     635int CbcOrClpParam::setIntParameter(ClpSimplex *model, int value)
     636{
     637  int returnCode;
     638  setIntParameterWithMessage(model, value, returnCode);
     639  if (doPrinting && strlen(printArray))
     640    std::cout << printArray << std::endl;
     641  return returnCode;
    661642}
    662643// Sets int parameter and returns printable string and error code
    663644const char *
    664 CbcOrClpParam::setIntParameterWithMessage ( ClpSimplex * model, int value , int & returnCode)
    665 {
    666      int oldValue = intValue_;
    667      if (value < lowerIntValue_ || value > upperIntValue_) {
    668           sprintf(printArray, "%d was provided for %s - valid range is %d to %d",
    669                   value, name_.c_str(), lowerIntValue_, upperIntValue_);
    670           returnCode = 1;
    671      } else {
    672           intValue_ = value;
    673           sprintf(printArray, "%s was changed from %d to %d",
    674                   name_.c_str(), oldValue, value);
    675           returnCode = 0;
    676           switch (type_) {
    677           case CLP_PARAM_INT_SOLVERLOGLEVEL:
    678                model->setLogLevel(value);
    679                if (value > 2)
    680                     model->factorization()->messageLevel(8);
    681                else
    682                     model->factorization()->messageLevel(0);
    683                break;
    684           case CLP_PARAM_INT_MAXFACTOR:
    685                model->factorization()->maximumPivots(value);
    686                break;
    687           case CLP_PARAM_INT_PERTVALUE:
    688                model->setPerturbation(value);
    689                break;
    690           case CLP_PARAM_INT_MAXITERATION:
    691                model->setMaximumIterations(value);
    692                break;
    693           case CLP_PARAM_INT_SPECIALOPTIONS:
    694                model->setSpecialOptions(value);
    695                break;
    696           case CLP_PARAM_INT_RANDOMSEED:
    697             {
    698               if (value==0) {
    699                 double time = fabs(CoinGetTimeOfDay());
    700                 while (time>=COIN_INT_MAX)
    701                   time *= 0.5;
    702                 value = static_cast<int>(time);
    703                 sprintf(printArray, "using time of day %s was changed from %d to %d",
    704                   name_.c_str(), oldValue, value);
    705               }
    706               model->setRandomSeed(value);
    707             }
    708                break;
    709           case CLP_PARAM_INT_MORESPECIALOPTIONS:
    710                model->setMoreSpecialOptions(value);
    711                break;
    712           case CLP_PARAM_INT_VECTOR_MODE:
    713                model->setVectorMode(value);
    714                break;
     645CbcOrClpParam::setIntParameterWithMessage(ClpSimplex *model, int value, int &returnCode)
     646{
     647  int oldValue = intValue_;
     648  if (value < lowerIntValue_ || value > upperIntValue_) {
     649    sprintf(printArray, "%d was provided for %s - valid range is %d to %d",
     650      value, name_.c_str(), lowerIntValue_, upperIntValue_);
     651    returnCode = 1;
     652  } else {
     653    intValue_ = value;
     654    sprintf(printArray, "%s was changed from %d to %d",
     655      name_.c_str(), oldValue, value);
     656    returnCode = 0;
     657    switch (type_) {
     658    case CLP_PARAM_INT_SOLVERLOGLEVEL:
     659      model->setLogLevel(value);
     660      if (value > 2)
     661        model->factorization()->messageLevel(8);
     662      else
     663        model->factorization()->messageLevel(0);
     664      break;
     665    case CLP_PARAM_INT_MAXFACTOR:
     666      model->factorization()->maximumPivots(value);
     667      break;
     668    case CLP_PARAM_INT_PERTVALUE:
     669      model->setPerturbation(value);
     670      break;
     671    case CLP_PARAM_INT_MAXITERATION:
     672      model->setMaximumIterations(value);
     673      break;
     674    case CLP_PARAM_INT_SPECIALOPTIONS:
     675      model->setSpecialOptions(value);
     676      break;
     677    case CLP_PARAM_INT_RANDOMSEED: {
     678      if (value == 0) {
     679        double time = fabs(CoinGetTimeOfDay());
     680        while (time >= COIN_INT_MAX)
     681          time *= 0.5;
     682        value = static_cast< int >(time);
     683        sprintf(printArray, "using time of day %s was changed from %d to %d",
     684          name_.c_str(), oldValue, value);
     685      }
     686      model->setRandomSeed(value);
     687    } break;
     688    case CLP_PARAM_INT_MORESPECIALOPTIONS:
     689      model->setMoreSpecialOptions(value);
     690      break;
     691    case CLP_PARAM_INT_VECTOR_MODE:
     692      model->setVectorMode(value);
     693      break;
    715694#ifndef COIN_HAS_CBC
    716695#ifdef CBC_THREAD
    717           case CBC_PARAM_INT_THREADS:
    718                model->setNumberThreads(value);
    719                break;
    720 #endif
    721 #endif
    722           default:
    723                break;
    724           }
    725      }
    726      return printArray;
    727 }
    728 int
    729 CbcOrClpParam::intParameter (ClpSimplex * model) const
    730 {
    731      int value;
    732      switch (type_) {
     696    case CBC_PARAM_INT_THREADS:
     697      model->setNumberThreads(value);
     698      break;
     699#endif
     700#endif
     701    default:
     702      break;
     703    }
     704  }
     705  return printArray;
     706}
     707int CbcOrClpParam::intParameter(ClpSimplex *model) const
     708{
     709  int value;
     710  switch (type_) {
    733711#ifndef COIN_HAS_CBC
    734      case CLP_PARAM_INT_SOLVERLOGLEVEL:
    735           value = model->logLevel();
    736           break;
    737 #endif
    738      case CLP_PARAM_INT_MAXFACTOR:
    739           value = model->factorization()->maximumPivots();
    740           break;
    741           break;
    742      case CLP_PARAM_INT_PERTVALUE:
    743           value = model->perturbation();
    744           break;
    745      case CLP_PARAM_INT_MAXITERATION:
    746           value = model->maximumIterations();
    747           break;
    748      case CLP_PARAM_INT_SPECIALOPTIONS:
    749           value = model->specialOptions();
    750           break;
    751      case CLP_PARAM_INT_RANDOMSEED:
    752           value = model->randomNumberGenerator()->getSeed();
    753           break;
    754      case CLP_PARAM_INT_MORESPECIALOPTIONS:
    755           value = model->moreSpecialOptions();
    756           break;
    757      case CLP_PARAM_INT_VECTOR_MODE:
    758           value = model->vectorMode();
    759           break;
     712  case CLP_PARAM_INT_SOLVERLOGLEVEL:
     713    value = model->logLevel();
     714    break;
     715#endif
     716  case CLP_PARAM_INT_MAXFACTOR:
     717    value = model->factorization()->maximumPivots();
     718    break;
     719    break;
     720  case CLP_PARAM_INT_PERTVALUE:
     721    value = model->perturbation();
     722    break;
     723  case CLP_PARAM_INT_MAXITERATION:
     724    value = model->maximumIterations();
     725    break;
     726  case CLP_PARAM_INT_SPECIALOPTIONS:
     727    value = model->specialOptions();
     728    break;
     729  case CLP_PARAM_INT_RANDOMSEED:
     730    value = model->randomNumberGenerator()->getSeed();
     731    break;
     732  case CLP_PARAM_INT_MORESPECIALOPTIONS:
     733    value = model->moreSpecialOptions();
     734    break;
     735  case CLP_PARAM_INT_VECTOR_MODE:
     736    value = model->vectorMode();
     737    break;
    760738#ifndef COIN_HAS_CBC
    761739#ifdef CBC_THREAD
    762      case CBC_PARAM_INT_THREADS:
    763           value = model->numberThreads();
    764           break;
    765 #endif
    766 #endif
    767      default:
    768           value = intValue_;
    769           break;
    770      }
    771      return value;
    772 }
    773 #endif
    774 int
    775 CbcOrClpParam::checkDoubleParameter (double value) const
    776 {
    777      if (value < lowerDoubleValue_ || value > upperDoubleValue_) {
    778           std::cout << value << " was provided for " << name_ <<
    779                     " - valid range is " << lowerDoubleValue_ << " to " <<
    780                     upperDoubleValue_ << std::endl;
    781           return 1;
    782      } else {
    783           return 0;
    784      }
     740  case CBC_PARAM_INT_THREADS:
     741    value = model->numberThreads();
     742    break;
     743#endif
     744#endif
     745  default:
     746    value = intValue_;
     747    break;
     748  }
     749  return value;
     750}
     751#endif
     752int CbcOrClpParam::checkDoubleParameter(double value) const
     753{
     754  if (value < lowerDoubleValue_ || value > upperDoubleValue_) {
     755    std::cout << value << " was provided for " << name_ << " - valid range is " << lowerDoubleValue_ << " to " << upperDoubleValue_ << std::endl;
     756    return 1;
     757  } else {
     758    return 0;
     759  }
    785760}
    786761#ifdef COIN_HAS_CBC
    787762double
    788 CbcOrClpParam::doubleParameter (OsiSolverInterface *
     763CbcOrClpParam::doubleParameter(OsiSolverInterface *
    789764#ifndef NDEBUG
    790                                 model
    791 #endif
    792                                ) const
    793 {
    794      double value = 0.0;
    795      switch (type_) {
    796      case CLP_PARAM_DBL_DUALTOLERANCE:
    797           assert(model->getDblParam(OsiDualTolerance, value));
    798           break;
    799      case CLP_PARAM_DBL_PRIMALTOLERANCE:
    800           assert(model->getDblParam(OsiPrimalTolerance, value));
    801           break;
    802      default:
    803           return doubleValue_;
    804           break;
    805      }
    806      return value;
    807 }
    808 int
    809 CbcOrClpParam::setIntParameter (OsiSolverInterface * model, int value)
    810 {
    811      int returnCode;
    812      setIntParameterWithMessage(model, value, returnCode);
    813      if (doPrinting && strlen(printArray))
    814           std::cout << printArray << std::endl;
    815      return returnCode;
     765    model
     766#endif
     767  ) const
     768{
     769  double value = 0.0;
     770  switch (type_) {
     771  case CLP_PARAM_DBL_DUALTOLERANCE:
     772    assert(model->getDblParam(OsiDualTolerance, value));
     773    break;
     774  case CLP_PARAM_DBL_PRIMALTOLERANCE:
     775    assert(model->getDblParam(OsiPrimalTolerance, value));
     776    break;
     777  default:
     778    return doubleValue_;
     779    break;
     780  }
     781  return value;
     782}
     783int CbcOrClpParam::setIntParameter(OsiSolverInterface *model, int value)
     784{
     785  int returnCode;
     786  setIntParameterWithMessage(model, value, returnCode);
     787  if (doPrinting && strlen(printArray))
     788    std::cout << printArray << std::endl;
     789  return returnCode;
    816790}
    817791// Sets int parameter and returns printable string and error code
    818792const char *
    819 CbcOrClpParam::setIntParameterWithMessage ( OsiSolverInterface * model, int  value , int & returnCode)
    820 {
    821      if (value < lowerIntValue_ || value > upperIntValue_) {
    822           sprintf(printArray, "%d was provided for %s - valid range is %d to %d",
    823                   value, name_.c_str(), lowerIntValue_, upperIntValue_);
    824           returnCode = 1;
    825      } else {
    826           int oldValue = intValue_;
    827           intValue_ = oldValue;
    828           switch (type_) {
    829           case CLP_PARAM_INT_SOLVERLOGLEVEL:
    830                model->messageHandler()->setLogLevel(value);
    831                break;
    832           default:
    833                break;
    834           }
    835           sprintf(printArray, "%s was changed from %d to %d",
    836                   name_.c_str(), oldValue, value);
    837           returnCode = 0;
    838      }
    839      return printArray;
    840 }
    841 int
    842 CbcOrClpParam::intParameter (OsiSolverInterface * model) const
    843 {
    844      int value = 0;
    845      switch (type_) {
    846      case CLP_PARAM_INT_SOLVERLOGLEVEL:
    847           value = model->messageHandler()->logLevel();
    848           break;
    849      default:
    850           value = intValue_;
    851           break;
    852      }
    853      return value;
    854 }
    855 int
    856 CbcOrClpParam::setDoubleParameter (CbcModel &model, double value)
    857 {
    858      int returnCode=0;
    859      setDoubleParameterWithMessage(model, value, returnCode);
    860      if (doPrinting && strlen(printArray))
    861           std::cout << printArray << std::endl;
    862      return returnCode;
     793CbcOrClpParam::setIntParameterWithMessage(OsiSolverInterface *model, int value, int &returnCode)
     794{
     795  if (value < lowerIntValue_ || value > upperIntValue_) {
     796    sprintf(printArray, "%d was provided for %s - valid range is %d to %d",
     797      value, name_.c_str(), lowerIntValue_, upperIntValue_);
     798    returnCode = 1;
     799  } else {
     800    int oldValue = intValue_;
     801    intValue_ = oldValue;
     802    switch (type_) {
     803    case CLP_PARAM_INT_SOLVERLOGLEVEL:
     804      model->messageHandler()->setLogLevel(value);
     805      break;
     806    default:
     807      break;
     808    }
     809    sprintf(printArray, "%s was changed from %d to %d",
     810      name_.c_str(), oldValue, value);
     811    returnCode = 0;
     812  }
     813  return printArray;
     814}
     815int CbcOrClpParam::intParameter(OsiSolverInterface *model) const
     816{
     817  int value = 0;
     818  switch (type_) {
     819  case CLP_PARAM_INT_SOLVERLOGLEVEL:
     820    value = model->messageHandler()->logLevel();
     821    break;
     822  default:
     823    value = intValue_;
     824    break;
     825  }
     826  return value;
     827}
     828int CbcOrClpParam::setDoubleParameter(CbcModel &model, double value)
     829{
     830  int returnCode = 0;
     831  setDoubleParameterWithMessage(model, value, returnCode);
     832  if (doPrinting && strlen(printArray))
     833    std::cout << printArray << std::endl;
     834  return returnCode;
    863835}
    864836// Sets double parameter and returns printable string and error code
    865837const char *
    866 CbcOrClpParam::setDoubleParameterWithMessage ( CbcModel & model, double  value , int & returnCode)
    867 {
    868      if (value < lowerDoubleValue_ || value > upperDoubleValue_) {
    869           sprintf(printArray, "%g was provided for %s - valid range is %g to %g",
    870                   value, name_.c_str(), lowerDoubleValue_, upperDoubleValue_);
    871           returnCode = 1;
    872      } else {
    873           double oldValue = doubleValue_;
    874           doubleValue_ = value;
    875           switch (type_) {
    876           case CBC_PARAM_DBL_INFEASIBILITYWEIGHT:
    877                oldValue = model.getDblParam(CbcModel::CbcInfeasibilityWeight);
    878                model.setDblParam(CbcModel::CbcInfeasibilityWeight, value);
    879                break;
    880           case CBC_PARAM_DBL_INTEGERTOLERANCE:
    881                oldValue = model.getDblParam(CbcModel::CbcIntegerTolerance);
    882                model.setDblParam(CbcModel::CbcIntegerTolerance, value);
    883                break;
    884           case CBC_PARAM_DBL_INCREMENT:
    885                oldValue = model.getDblParam(CbcModel::CbcCutoffIncrement);
    886                model.setDblParam(CbcModel::CbcCutoffIncrement, value);
    887           case CBC_PARAM_DBL_ALLOWABLEGAP:
    888                oldValue = model.getDblParam(CbcModel::CbcAllowableGap);
    889                model.setDblParam(CbcModel::CbcAllowableGap, value);
    890                break;
    891           case CBC_PARAM_DBL_GAPRATIO:
    892                oldValue = model.getDblParam(CbcModel::CbcAllowableFractionGap);
    893                model.setDblParam(CbcModel::CbcAllowableFractionGap, value);
    894                break;
    895           case CBC_PARAM_DBL_CUTOFF:
    896                oldValue = model.getCutoff();
    897                model.setCutoff(value);
    898                break;
    899           case CBC_PARAM_DBL_TIMELIMIT_BAB:
    900                oldValue = model.getDblParam(CbcModel::CbcMaximumSeconds) ;
    901                {
    902                     //OsiClpSolverInterface * clpSolver = dynamic_cast< OsiClpSolverInterface*> (model.solver());
    903                     //ClpSimplex * lpSolver = clpSolver->getModelPtr();
    904                     //lpSolver->setMaximumSeconds(value);
    905                     model.setDblParam(CbcModel::CbcMaximumSeconds, value) ;
    906                }
    907                break ;
    908           case CLP_PARAM_DBL_DUALTOLERANCE:
    909           case CLP_PARAM_DBL_PRIMALTOLERANCE:
    910                setDoubleParameter(model.solver(), value);
    911                return 0; // to avoid message
    912           default:
    913                break;
    914           }
    915           sprintf(printArray, "%s was changed from %g to %g",
    916                   name_.c_str(), oldValue, value);
    917           returnCode = 0;
    918      }
    919      return printArray;
     838CbcOrClpParam::setDoubleParameterWithMessage(CbcModel &model, double value, int &returnCode)
     839{
     840  if (value < lowerDoubleValue_ || value > upperDoubleValue_) {
     841    sprintf(printArray, "%g was provided for %s - valid range is %g to %g",
     842      value, name_.c_str(), lowerDoubleValue_, upperDoubleValue_);
     843    returnCode = 1;
     844  } else {
     845    double oldValue = doubleValue_;
     846    doubleValue_ = value;
     847    switch (type_) {
     848    case CBC_PARAM_DBL_INFEASIBILITYWEIGHT:
     849      oldValue = model.getDblParam(CbcModel::CbcInfeasibilityWeight);
     850      model.setDblParam(CbcModel::CbcInfeasibilityWeight, value);
     851      break;
     852    case CBC_PARAM_DBL_INTEGERTOLERANCE:
     853      oldValue = model.getDblParam(CbcModel::CbcIntegerTolerance);
     854      model.setDblParam(CbcModel::CbcIntegerTolerance, value);
     855      break;
     856    case CBC_PARAM_DBL_INCREMENT:
     857      oldValue = model.getDblParam(CbcModel::CbcCutoffIncrement);
     858      model.setDblParam(CbcModel::CbcCutoffIncrement, value);
     859    case CBC_PARAM_DBL_ALLOWABLEGAP:
     860      oldValue = model.getDblParam(CbcModel::CbcAllowableGap);
     861      model.setDblParam(CbcModel::CbcAllowableGap, value);
     862      break;
     863    case CBC_PARAM_DBL_GAPRATIO:
     864      oldValue = model.getDblParam(CbcModel::CbcAllowableFractionGap);
     865      model.setDblParam(CbcModel::CbcAllowableFractionGap, value);
     866      break;
     867    case CBC_PARAM_DBL_CUTOFF:
     868      oldValue = model.getCutoff();
     869      model.setCutoff(value);
     870      break;
     871    case CBC_PARAM_DBL_TIMELIMIT_BAB:
     872      oldValue = model.getDblParam(CbcModel::CbcMaximumSeconds);
     873      {
     874        //OsiClpSolverInterface * clpSolver = dynamic_cast< OsiClpSolverInterface*> (model.solver());
     875        //ClpSimplex * lpSolver = clpSolver->getModelPtr();
     876        //lpSolver->setMaximumSeconds(value);
     877        model.setDblParam(CbcModel::CbcMaximumSeconds, value);
     878      }
     879      break;
     880    case CLP_PARAM_DBL_DUALTOLERANCE:
     881    case CLP_PARAM_DBL_PRIMALTOLERANCE:
     882      setDoubleParameter(model.solver(), value);
     883      return 0; // to avoid message
     884    default:
     885      break;
     886    }
     887    sprintf(printArray, "%s was changed from %g to %g",
     888      name_.c_str(), oldValue, value);
     889    returnCode = 0;
     890  }
     891  return printArray;
    920892}
    921893double
    922 CbcOrClpParam::doubleParameter (CbcModel &model) const
    923 {
    924      double value;
    925      switch (type_) {
    926      case CBC_PARAM_DBL_INFEASIBILITYWEIGHT:
    927           value = model.getDblParam(CbcModel::CbcInfeasibilityWeight);
    928           break;
    929      case CBC_PARAM_DBL_INTEGERTOLERANCE:
    930           value = model.getDblParam(CbcModel::CbcIntegerTolerance);
    931           break;
    932      case CBC_PARAM_DBL_INCREMENT:
    933           value = model.getDblParam(CbcModel::CbcCutoffIncrement);
    934           break;
    935      case CBC_PARAM_DBL_ALLOWABLEGAP:
    936           value = model.getDblParam(CbcModel::CbcAllowableGap);
    937           break;
    938      case CBC_PARAM_DBL_GAPRATIO:
    939           value = model.getDblParam(CbcModel::CbcAllowableFractionGap);
    940           break;
    941      case CBC_PARAM_DBL_CUTOFF:
    942           value = model.getCutoff();
    943           break;
    944      case CBC_PARAM_DBL_TIMELIMIT_BAB:
    945           value = model.getDblParam(CbcModel::CbcMaximumSeconds) ;
    946           break ;
    947      case CLP_PARAM_DBL_DUALTOLERANCE:
    948      case CLP_PARAM_DBL_PRIMALTOLERANCE:
    949           value = doubleParameter(model.solver());
    950           break;
    951      default:
    952           value = doubleValue_;
    953           break;
    954      }
    955      return value;
    956 }
    957 int
    958 CbcOrClpParam::setIntParameter (CbcModel &model, int value)
    959 {
    960      int returnCode;
    961      setIntParameterWithMessage(model, value, returnCode);
    962      if (doPrinting && strlen(printArray))
    963           std::cout << printArray << std::endl;
    964      return returnCode;
     894CbcOrClpParam::doubleParameter(CbcModel &model) const
     895{
     896  double value;
     897  switch (type_) {
     898  case CBC_PARAM_DBL_INFEASIBILITYWEIGHT:
     899    value = model.getDblParam(CbcModel::CbcInfeasibilityWeight);
     900    break;
     901  case CBC_PARAM_DBL_INTEGERTOLERANCE:
     902    value = model.getDblParam(CbcModel::CbcIntegerTolerance);
     903    break;
     904  case CBC_PARAM_DBL_INCREMENT:
     905    value = model.getDblParam(CbcModel::CbcCutoffIncrement);
     906    break;
     907  case CBC_PARAM_DBL_ALLOWABLEGAP:
     908    value = model.getDblParam(CbcModel::CbcAllowableGap);
     909    break;
     910  case CBC_PARAM_DBL_GAPRATIO:
     911    value = model.getDblParam(CbcModel::CbcAllowableFractionGap);
     912    break;
     913  case CBC_PARAM_DBL_CUTOFF:
     914    value = model.getCutoff();
     915    break;
     916  case CBC_PARAM_DBL_TIMELIMIT_BAB:
     917    value = model.getDblParam(CbcModel::CbcMaximumSeconds);
     918    break;
     919  case CLP_PARAM_DBL_DUALTOLERANCE:
     920  case CLP_PARAM_DBL_PRIMALTOLERANCE:
     921    value = doubleParameter(model.solver());
     922    break;
     923  default:
     924    value = doubleValue_;
     925    break;
     926  }
     927  return value;
     928}
     929int CbcOrClpParam::setIntParameter(CbcModel &model, int value)
     930{
     931  int returnCode;
     932  setIntParameterWithMessage(model, value, returnCode);
     933  if (doPrinting && strlen(printArray))
     934    std::cout << printArray << std::endl;
     935  return returnCode;
    965936}
    966937// Sets int parameter and returns printable string and error code
    967938const char *
    968 CbcOrClpParam::setIntParameterWithMessage ( CbcModel & model, int value , int & returnCode)
    969 {
    970      if (value < lowerIntValue_ || value > upperIntValue_) {
    971           sprintf(printArray, "%d was provided for %s - valid range is %d to %d",
    972                   value, name_.c_str(), lowerIntValue_, upperIntValue_);
    973           returnCode = 1;
    974      } else {
    975           printArray[0] = '\0';
    976           if (value==intValue_)
    977             return printArray;
    978           int oldValue = intValue_;
    979           intValue_ = value;
    980           switch (type_) {
    981           case CLP_PARAM_INT_LOGLEVEL:
    982                oldValue = model.messageHandler()->logLevel();
    983                model.messageHandler()->setLogLevel(CoinAbs(value));
    984                break;
    985           case CLP_PARAM_INT_SOLVERLOGLEVEL:
    986                oldValue = model.solver()->messageHandler()->logLevel();
    987                model.solver()->messageHandler()->setLogLevel(value);
    988                break;
    989           case CBC_PARAM_INT_MAXNODES:
    990                oldValue = model.getIntParam(CbcModel::CbcMaxNumNode);
    991                model.setIntParam(CbcModel::CbcMaxNumNode, value);
    992                break;
    993           case CBC_PARAM_INT_MAXSOLS:
    994                oldValue = model.getIntParam(CbcModel::CbcMaxNumSol);
    995                model.setIntParam(CbcModel::CbcMaxNumSol, value);
    996                break;
    997           case CBC_PARAM_INT_MAXSAVEDSOLS:
    998                oldValue = model.maximumSavedSolutions();
    999                model.setMaximumSavedSolutions(value);
    1000                break;
    1001           case CBC_PARAM_INT_STRONGBRANCHING:
    1002                oldValue = model.numberStrong();
    1003                model.setNumberStrong(value);
    1004                break;
    1005           case CBC_PARAM_INT_NUMBERBEFORE:
    1006                oldValue = model.numberBeforeTrust();
    1007                model.setNumberBeforeTrust(value);
    1008                break;
    1009           case CBC_PARAM_INT_NUMBERANALYZE:
    1010                oldValue = model.numberAnalyzeIterations();
    1011                model.setNumberAnalyzeIterations(value);
    1012                break;
    1013           case CBC_PARAM_INT_CUTPASSINTREE:
    1014                oldValue = model.getMaximumCutPasses();
    1015                model.setMaximumCutPasses(value);
    1016                break;
    1017           case CBC_PARAM_INT_CUTPASS:
    1018                oldValue = model.getMaximumCutPassesAtRoot();
    1019                model.setMaximumCutPassesAtRoot(value);
    1020                break;
     939CbcOrClpParam::setIntParameterWithMessage(CbcModel &model, int value, int &returnCode)
     940{
     941  if (value < lowerIntValue_ || value > upperIntValue_) {
     942    sprintf(printArray, "%d was provided for %s - valid range is %d to %d",
     943      value, name_.c_str(), lowerIntValue_, upperIntValue_);
     944    returnCode = 1;
     945  } else {
     946    printArray[0] = '\0';
     947    if (value == intValue_)
     948      return printArray;
     949    int oldValue = intValue_;
     950    intValue_ = value;
     951    switch (type_) {
     952    case CLP_PARAM_INT_LOGLEVEL:
     953      oldValue = model.messageHandler()->logLevel();
     954      model.messageHandler()->setLogLevel(CoinAbs(value));
     955      break;
     956    case CLP_PARAM_INT_SOLVERLOGLEVEL:
     957      oldValue = model.solver()->messageHandler()->logLevel();
     958      model.solver()->messageHandler()->setLogLevel(value);
     959      break;
     960    case CBC_PARAM_INT_MAXNODES:
     961      oldValue = model.getIntParam(CbcModel::CbcMaxNumNode);
     962      model.setIntParam(CbcModel::CbcMaxNumNode, value);
     963      break;
     964    case CBC_PARAM_INT_MAXSOLS:
     965      oldValue = model.getIntParam(CbcModel::CbcMaxNumSol);
     966      model.setIntParam(CbcModel::CbcMaxNumSol, value);
     967      break;
     968    case CBC_PARAM_INT_MAXSAVEDSOLS:
     969      oldValue = model.maximumSavedSolutions();
     970      model.setMaximumSavedSolutions(value);
     971      break;
     972    case CBC_PARAM_INT_STRONGBRANCHING:
     973      oldValue = model.numberStrong();
     974      model.setNumberStrong(value);
     975      break;
     976    case CBC_PARAM_INT_NUMBERBEFORE:
     977      oldValue = model.numberBeforeTrust();
     978      model.setNumberBeforeTrust(value);
     979      break;
     980    case CBC_PARAM_INT_NUMBERANALYZE:
     981      oldValue = model.numberAnalyzeIterations();
     982      model.setNumberAnalyzeIterations(value);
     983      break;
     984    case CBC_PARAM_INT_CUTPASSINTREE:
     985      oldValue = model.getMaximumCutPasses();
     986      model.setMaximumCutPasses(value);
     987      break;
     988    case CBC_PARAM_INT_CUTPASS:
     989      oldValue = model.getMaximumCutPassesAtRoot();
     990      model.setMaximumCutPassesAtRoot(value);
     991      break;
    1021992#ifdef COIN_HAS_CBC
    1022993#ifdef CBC_THREAD
    1023           case CBC_PARAM_INT_THREADS:
    1024                oldValue = model.getNumberThreads();
    1025                model.setNumberThreads(value);
    1026                break;
    1027 #endif
    1028           case CBC_PARAM_INT_RANDOMSEED:
    1029                oldValue = model.getRandomSeed();
    1030                model.setRandomSeed(value);
    1031                break;
    1032 #endif
    1033           default:
    1034                break;
    1035           }
    1036           sprintf(printArray, "%s was changed from %d to %d",
    1037                   name_.c_str(), oldValue, value);
    1038           returnCode = 0;
    1039      }
    1040      return printArray;
    1041 }
    1042 int
    1043 CbcOrClpParam::intParameter (CbcModel &model) const
    1044 {
    1045      int value;
    1046      switch (type_) {
    1047      case CLP_PARAM_INT_LOGLEVEL:
    1048           value = model.messageHandler()->logLevel();
    1049           break;
    1050      case CLP_PARAM_INT_SOLVERLOGLEVEL:
    1051           value = model.solver()->messageHandler()->logLevel();
    1052           break;
    1053      case CBC_PARAM_INT_MAXNODES:
    1054           value = model.getIntParam(CbcModel::CbcMaxNumNode);
    1055           break;
    1056      case CBC_PARAM_INT_MAXSOLS:
    1057           value = model.getIntParam(CbcModel::CbcMaxNumSol);
    1058           break;
    1059      case CBC_PARAM_INT_MAXSAVEDSOLS:
    1060           value = model.maximumSavedSolutions();
    1061           break;
    1062      case CBC_PARAM_INT_STRONGBRANCHING:
    1063           value = model.numberStrong();
    1064           break;
    1065      case CBC_PARAM_INT_NUMBERBEFORE:
    1066           value = model.numberBeforeTrust();
    1067           break;
    1068      case CBC_PARAM_INT_NUMBERANALYZE:
    1069           value = model.numberAnalyzeIterations();
    1070           break;
    1071      case CBC_PARAM_INT_CUTPASSINTREE:
    1072           value = model.getMaximumCutPasses();
    1073           break;
    1074      case CBC_PARAM_INT_CUTPASS:
    1075           value = model.getMaximumCutPassesAtRoot();
    1076           break;
     994    case CBC_PARAM_INT_THREADS:
     995      oldValue = model.getNumberThreads();
     996      model.setNumberThreads(value);
     997      break;
     998#endif
     999    case CBC_PARAM_INT_RANDOMSEED:
     1000      oldValue = model.getRandomSeed();
     1001      model.setRandomSeed(value);
     1002      break;
     1003#endif
     1004    default:
     1005      break;
     1006    }
     1007    sprintf(printArray, "%s was changed from %d to %d",
     1008      name_.c_str(), oldValue, value);
     1009    returnCode = 0;
     1010  }
     1011  return printArray;
     1012}
     1013int CbcOrClpParam::intParameter(CbcModel &model) const
     1014{
     1015  int value;
     1016  switch (type_) {
     1017  case CLP_PARAM_INT_LOGLEVEL:
     1018    value = model.messageHandler()->logLevel();
     1019    break;
     1020  case CLP_PARAM_INT_SOLVERLOGLEVEL:
     1021    value = model.solver()->messageHandler()->logLevel();
     1022    break;
     1023  case CBC_PARAM_INT_MAXNODES:
     1024    value = model.getIntParam(CbcModel::CbcMaxNumNode);
     1025    break;
     1026  case CBC_PARAM_INT_MAXSOLS:
     1027    value = model.getIntParam(CbcModel::CbcMaxNumSol);
     1028    break;
     1029  case CBC_PARAM_INT_MAXSAVEDSOLS:
     1030    value = model.maximumSavedSolutions();
     1031    break;
     1032  case CBC_PARAM_INT_STRONGBRANCHING:
     1033    value = model.numberStrong();
     1034    break;
     1035  case CBC_PARAM_INT_NUMBERBEFORE:
     1036    value = model.numberBeforeTrust();
     1037    break;
     1038  case CBC_PARAM_INT_NUMBERANALYZE:
     1039    value = model.numberAnalyzeIterations();
     1040    break;
     1041  case CBC_PARAM_INT_CUTPASSINTREE:
     1042    value = model.getMaximumCutPasses();
     1043    break;
     1044  case CBC_PARAM_INT_CUTPASS:
     1045    value = model.getMaximumCutPassesAtRoot();
     1046    break;
    10771047#ifdef COIN_HAS_CBC
    10781048#ifdef CBC_THREAD
    1079      case CBC_PARAM_INT_THREADS:
    1080           value = model.getNumberThreads();
    1081 #endif
    1082      case CBC_PARAM_INT_RANDOMSEED:
    1083           value = model.getRandomSeed();
    1084           break;
    1085 #endif
    1086      default:
    1087           value = intValue_;
    1088           break;
    1089      }
    1090      return value;
     1049  case CBC_PARAM_INT_THREADS:
     1050    value = model.getNumberThreads();
     1051#endif
     1052  case CBC_PARAM_INT_RANDOMSEED:
     1053    value = model.getRandomSeed();
     1054    break;
     1055#endif
     1056  default:
     1057    value = intValue_;
     1058    break;
     1059  }
     1060  return value;
    10911061}
    10921062#endif
    10931063// Sets current parameter option using string
    1094 void
    1095 CbcOrClpParam::setCurrentOption ( const std::string value )
    1096 {
    1097      int action = parameterOption(value);
    1098      if (action >= 0)
    1099           currentKeyWord_ = action;
     1064void CbcOrClpParam::setCurrentOption(const std::string value)
     1065{
     1066  int action = parameterOption(value);
     1067  if (action >= 0)
     1068    currentKeyWord_ = action;
    11001069#if FLUSH_PRINT_BUFFER > 2
    1101      if (name_=="bufferedMode")
    1102        coinFlushBufferFlag=action;
     1070  if (name_ == "bufferedMode")
     1071    coinFlushBufferFlag = action;
    11031072#endif
    11041073}
    11051074// Sets current parameter option
    1106 void
    1107 CbcOrClpParam::setCurrentOption ( int value , bool printIt)
    1108 {
    1109      if (printIt && value != currentKeyWord_)
    1110           std::cout << "Option for " << name_ << " changed from "
    1111                     << definedKeyWords_[currentKeyWord_] << " to "
    1112                     << definedKeyWords_[value] << std::endl;
     1075void CbcOrClpParam::setCurrentOption(int value, bool printIt)
     1076{
     1077  if (printIt && value != currentKeyWord_)
     1078    std::cout << "Option for " << name_ << " changed from "
     1079              << definedKeyWords_[currentKeyWord_] << " to "
     1080              << definedKeyWords_[value] << std::endl;
    11131081
    11141082#if FLUSH_PRINT_BUFFER > 2
    1115      if (name_=="bufferedMode")
    1116        coinFlushBufferFlag=value;
    1117 #endif
    1118      currentKeyWord_ = value;
     1083  if (name_ == "bufferedMode")
     1084    coinFlushBufferFlag = value;
     1085#endif
     1086  currentKeyWord_ = value;
    11191087}
    11201088// Sets current parameter option and returns printable string
    11211089const char *
    1122 CbcOrClpParam::setCurrentOptionWithMessage ( int value )
    1123 {
    1124      if (value != currentKeyWord_) {
    1125          char current[100];
    1126         char newString[100];
    1127          if (currentKeyWord_>=0&&(fakeKeyWord_<=0||currentKeyWord_<fakeKeyWord_))
    1128            strcpy(current,definedKeyWords_[currentKeyWord_].c_str());
    1129          else if (currentKeyWord_<0)
    1130            sprintf(current,"minus%d",-currentKeyWord_-1000);
    1131         else
    1132            sprintf(current,"plus%d",currentKeyWord_-1000);
    1133          if (value>=0&&(fakeKeyWord_<=0||value<fakeKeyWord_) )
    1134            strcpy(newString,definedKeyWords_[value].c_str());
    1135          else if (value<0)
    1136            sprintf(newString,"minus%d",-value-1000);
    1137         else
    1138            sprintf(newString,"plus%d",value-1000);
    1139         sprintf(printArray, "Option for %s changed from %s to %s",
    1140                 name_.c_str(), current, newString);
     1090CbcOrClpParam::setCurrentOptionWithMessage(int value)
     1091{
     1092  if (value != currentKeyWord_) {
     1093    char current[100];
     1094    char newString[100];
     1095    if (currentKeyWord_ >= 0 && (fakeKeyWord_ <= 0 || currentKeyWord_ < fakeKeyWord_))
     1096      strcpy(current, definedKeyWords_[currentKeyWord_].c_str());
     1097    else if (currentKeyWord_ < 0)
     1098      sprintf(current, "minus%d", -currentKeyWord_ - 1000);
     1099    else
     1100      sprintf(current, "plus%d", currentKeyWord_ - 1000);
     1101    if (value >= 0 && (fakeKeyWord_ <= 0 || value < fakeKeyWord_))
     1102      strcpy(newString, definedKeyWords_[value].c_str());
     1103    else if (value < 0)
     1104      sprintf(newString, "minus%d", -value - 1000);
     1105    else
     1106      sprintf(newString, "plus%d", value - 1000);
     1107    sprintf(printArray, "Option for %s changed from %s to %s",
     1108      name_.c_str(), current, newString);
    11411109#if FLUSH_PRINT_BUFFER > 2
    1142          if (name_=="bufferedMode")
    1143            coinFlushBufferFlag=value;
    1144 #endif
    1145         currentKeyWord_ = value;
    1146      } else {
    1147           printArray[0] = '\0';
    1148      }
    1149      return printArray;
     1110    if (name_ == "bufferedMode")
     1111      coinFlushBufferFlag = value;
     1112#endif
     1113    currentKeyWord_ = value;
     1114  } else {
     1115    printArray[0] = '\0';
     1116  }
     1117  return printArray;
    11501118}
    11511119// Sets current parameter option using string with message
    11521120const char *
    1153 CbcOrClpParam::setCurrentOptionWithMessage ( const std::string value )
    1154 {
    1155      int action = parameterOption(value);
    1156      char current[100];
    1157      printArray[0] = '\0';
    1158      if (action >= 0) {
     1121CbcOrClpParam::setCurrentOptionWithMessage(const std::string value)
     1122{
     1123  int action = parameterOption(value);
     1124  char current[100];
     1125  printArray[0] = '\0';
     1126  if (action >= 0) {
    11591127#if FLUSH_PRINT_BUFFER > 2
    1160        if (name_=="bufferedMode")
    1161          coinFlushBufferFlag=action;
    1162 #endif
    1163          if (action == currentKeyWord_)
    1164            return NULL;
    1165          if (currentKeyWord_>=0&&(fakeKeyWord_<=0||currentKeyWord_<fakeKeyWord_))
    1166            strcpy(current,definedKeyWords_[currentKeyWord_].c_str());
    1167          else if (currentKeyWord_<0)
    1168            sprintf(current,"minus%d",-currentKeyWord_-1000);
    1169          else
    1170            sprintf(current,"plus%d",currentKeyWord_-1000);
    1171          sprintf(printArray, "Option for %s changed from %s to %s",
    1172                  name_.c_str(), current, value.c_str());
    1173           currentKeyWord_ = action;
    1174      } else {
    1175          sprintf(printArray, "Option for %s given illegal value %s",
    1176                  name_.c_str(), value.c_str());
    1177      }
    1178      return printArray;
    1179 }
    1180 void
    1181 CbcOrClpParam::setIntValue ( int value )
    1182 {
    1183      if (value < lowerIntValue_ || value > upperIntValue_) {
    1184           std::cout << value << " was provided for " << name_ <<
    1185                     " - valid range is " << lowerIntValue_ << " to " <<
    1186                     upperIntValue_ << std::endl;
    1187      } else {
    1188           intValue_ = value;
    1189      }
     1128    if (name_ == "bufferedMode")
     1129      coinFlushBufferFlag = action;
     1130#endif
     1131    if (action == currentKeyWord_)
     1132      return NULL;
     1133    if (currentKeyWord_ >= 0 && (fakeKeyWord_ <= 0 || currentKeyWord_ < fakeKeyWord_))
     1134      strcpy(current, definedKeyWords_[currentKeyWord_].c_str());
     1135    else if (currentKeyWord_ < 0)
     1136      sprintf(current, "minus%d", -currentKeyWord_ - 1000);
     1137    else
     1138      sprintf(current, "plus%d", currentKeyWord_ - 1000);
     1139    sprintf(printArray, "Option for %s changed from %s to %s",
     1140      name_.c_str(), current, value.c_str());
     1141    currentKeyWord_ = action;
     1142  } else {
     1143    sprintf(printArray, "Option for %s given illegal value %s",
     1144      name_.c_str(), value.c_str());
     1145  }
     1146  return printArray;
     1147}
     1148void CbcOrClpParam::setIntValue(int value)
     1149{
     1150  if (value < lowerIntValue_ || value > upperIntValue_) {
     1151    std::cout << value << " was provided for " << name_ << " - valid range is " << lowerIntValue_ << " to " << upperIntValue_ << std::endl;
     1152  } else {
     1153    intValue_ = value;
     1154  }
    11901155}
    11911156const char *
    1192 CbcOrClpParam::setIntValueWithMessage ( int value )
    1193 {
    1194      printArray[0] = '\0';
    1195      if (value < lowerIntValue_ || value > upperIntValue_) {
    1196           sprintf(printArray, "%d was provided for %s - valid range is %d to %d",
    1197                value,name_.c_str(),lowerIntValue_,upperIntValue_);
    1198      } else {
    1199          if (value==intValue_)
    1200            return NULL;
    1201           sprintf(printArray, "%s was changed from %d to %d",
    1202                   name_.c_str(), intValue_, value);
    1203           intValue_ = value;
    1204      }
    1205      return printArray;
    1206 }
    1207 void
    1208 CbcOrClpParam::setDoubleValue ( double value )
    1209 {
    1210      if (value < lowerDoubleValue_ || value > upperDoubleValue_) {
    1211           std::cout << value << " was provided for " << name_ <<
    1212                     " - valid range is " << lowerDoubleValue_ << " to " <<
    1213                     upperDoubleValue_ << std::endl;
    1214      } else {
    1215           doubleValue_ = value;
    1216      }
     1157CbcOrClpParam::setIntValueWithMessage(int value)
     1158{
     1159  printArray[0] = '\0';
     1160  if (value < lowerIntValue_ || value > upperIntValue_) {
     1161    sprintf(printArray, "%d was provided for %s - valid range is %d to %d",
     1162      value, name_.c_str(), lowerIntValue_, upperIntValue_);
     1163  } else {
     1164    if (value == intValue_)
     1165      return NULL;
     1166    sprintf(printArray, "%s was changed from %d to %d",
     1167      name_.c_str(), intValue_, value);
     1168    intValue_ = value;
     1169  }
     1170  return printArray;
     1171}
     1172void CbcOrClpParam::setDoubleValue(double value)
     1173{
     1174  if (value < lowerDoubleValue_ || value > upperDoubleValue_) {
     1175    std::cout << value << " was provided for " << name_ << " - valid range is " << lowerDoubleValue_ << " to " << upperDoubleValue_ << std::endl;
     1176  } else {
     1177    doubleValue_ = value;
     1178  }
    12171179}
    12181180const char *
    1219 CbcOrClpParam::setDoubleValueWithMessage ( double value )
    1220 {
    1221      printArray[0] = '\0';
    1222      if (value < lowerDoubleValue_ || value > upperDoubleValue_) {
    1223           sprintf(printArray, "%g was provided for %s - valid range is %g to %g",
    1224                value,name_.c_str(),lowerDoubleValue_,upperDoubleValue_);
    1225      } else {
    1226          if (value==doubleValue_)
    1227            return NULL;
    1228           sprintf(printArray, "%s was changed from %g to %g",
    1229                   name_.c_str(), doubleValue_, value);
    1230           doubleValue_ = value;
    1231      }
    1232      return printArray;
    1233 }
    1234 void
    1235 CbcOrClpParam::setStringValue ( std::string value )
    1236 {
    1237      stringValue_ = value;
     1181CbcOrClpParam::setDoubleValueWithMessage(double value)
     1182{
     1183  printArray[0] = '\0';
     1184  if (value < lowerDoubleValue_ || value > upperDoubleValue_) {
     1185    sprintf(printArray, "%g was provided for %s - valid range is %g to %g",
     1186      value, name_.c_str(), lowerDoubleValue_, upperDoubleValue_);
     1187  } else {
     1188    if (value == doubleValue_)
     1189      return NULL;
     1190    sprintf(printArray, "%s was changed from %g to %g",
     1191      name_.c_str(), doubleValue_, value);
     1192    doubleValue_ = value;
     1193  }
     1194  return printArray;
     1195}
     1196void CbcOrClpParam::setStringValue(std::string value)
     1197{
     1198  stringValue_ = value;
    12381199}
    12391200static char line[1000];
    1240 static char * where = NULL;
     1201static char *where = NULL;
    12411202extern int CbcOrClpRead_mode;
    12421203int CbcOrClpEnvironmentIndex = -1;
    12431204// Alternative to environment
    1244 char * alternativeEnvironment = NULL;
     1205char *alternativeEnvironment = NULL;
    12451206static size_t fillEnv()
    12461207{
    12471208#if defined(_MSC_VER) || defined(__MSVCRT__)
    1248      return 0;
     1209  return 0;
    12491210#else
    1250      // Don't think it will work on Windows
    1251      char * environ;
    1252      if (!alternativeEnvironment)
    1253        environ = getenv("CBC_CLP_ENVIRONMENT");
    1254      else
    1255        environ = alternativeEnvironment;
    1256      size_t length = 0;
    1257      if (environ) {
    1258           length = strlen(environ);
    1259           if (CbcOrClpEnvironmentIndex < static_cast<int>(length)) {
    1260                // find next non blank
    1261                char * whereEnv = environ + CbcOrClpEnvironmentIndex;
    1262                // munch white space
    1263                while (*whereEnv == ' ' || *whereEnv == '\t' || *whereEnv < ' ')
    1264                     whereEnv++;
    1265                // copy
    1266                char * put = line;
    1267                while ( *whereEnv != '\0' ) {
    1268                     if ( *whereEnv == ' ' || *whereEnv == '\t' || *whereEnv < ' ' ) {
    1269                          break;
    1270                     }
    1271                     *put = *whereEnv;
    1272                     put++;
    1273                     assert (put - line < 1000);
    1274                     whereEnv++;
    1275                }
    1276                CbcOrClpEnvironmentIndex = static_cast<int>(whereEnv - environ);
    1277                *put = '\0';
    1278                length = strlen(line);
    1279           } else {
    1280                length = 0;
    1281           }
    1282      }
    1283      if (!length) {
    1284           CbcOrClpEnvironmentIndex = -1;
    1285           if (alternativeEnvironment) {
    1286             delete [] alternativeEnvironment;
    1287             alternativeEnvironment = NULL;
    1288           }
    1289      }
    1290      return length;
    1291 #endif
    1292 }
    1293 extern FILE * CbcOrClpReadCommand;
     1211  // Don't think it will work on Windows
     1212  char *environ;
     1213  if (!alternativeEnvironment)
     1214    environ = getenv("CBC_CLP_ENVIRONMENT");
     1215  else
     1216    environ = alternativeEnvironment;
     1217  size_t length = 0;
     1218  if (environ) {
     1219    length = strlen(environ);
     1220    if (CbcOrClpEnvironmentIndex < static_cast< int >(length)) {
     1221      // find next non blank
     1222      char *whereEnv = environ + CbcOrClpEnvironmentIndex;
     1223      // munch white space
     1224      while (*whereEnv == ' ' || *whereEnv == '\t' || *whereEnv < ' ')
     1225        whereEnv++;
     1226      // copy
     1227      char *put = line;
     1228      while (*whereEnv != '\0') {
     1229        if (*whereEnv == ' ' || *whereEnv == '\t' || *whereEnv < ' ') {
     1230          break;
     1231        }
     1232        *put = *whereEnv;
     1233        put++;
     1234        assert(put - line < 1000);
     1235        whereEnv++;
     1236      }
     1237      CbcOrClpEnvironmentIndex = static_cast< int >(whereEnv - environ);
     1238      *put = '\0';
     1239      length = strlen(line);
     1240    } else {
     1241      length = 0;
     1242    }
     1243  }
     1244  if (!length) {
     1245    CbcOrClpEnvironmentIndex = -1;
     1246    if (alternativeEnvironment) {
     1247      delete[] alternativeEnvironment;
     1248      alternativeEnvironment = NULL;
     1249    }
     1250  }
     1251  return length;
     1252#endif
     1253}
     1254extern FILE *CbcOrClpReadCommand;
    12941255// Simple read stuff
    12951256std::string
    12961257CoinReadNextField()
    12971258{
    1298      std::string field;
    1299      if (!where) {
    1300           // need new line
     1259  std::string field;
     1260  if (!where) {
     1261    // need new line
    13011262#ifdef COIN_HAS_READLINE
    1302           if (CbcOrClpReadCommand == stdin) {
    1303                // Get a line from the user.
    1304                where = readline (coin_prompt);
     1263    if (CbcOrClpReadCommand == stdin) {
     1264      // Get a line from the user.
     1265      where = readline(coin_prompt);
    13051266
    1306                // If the line has any text in it, save it on the history.
    1307                if (where) {
    1308                     if ( *where)
    1309                          add_history (where);
    1310                     strcpy(line, where);
    1311                     free(where);
    1312                }
    1313           } else {
    1314                where = fgets(line, 1000, CbcOrClpReadCommand);
    1315           }
     1267      // If the line has any text in it, save it on the history.
     1268      if (where) {
     1269        if (*where)
     1270          add_history(where);
     1271        strcpy(line, where);
     1272        free(where);
     1273      }
     1274    } else {
     1275      where = fgets(line, 1000, CbcOrClpReadCommand);
     1276    }
    13161277#else
    1317           if (CbcOrClpReadCommand == stdin) {
    1318                fputs(coin_prompt,stdout);
    1319                fflush(stdout);
    1320           }
    1321           where = fgets(line, 1000, CbcOrClpReadCommand);
    1322 #endif
    1323           if (!where)
    1324                return field; // EOF
    1325           where = line;
    1326           // clean image
    1327           char * lastNonBlank = line - 1;
    1328           while ( *where != '\0' ) {
    1329                if ( *where != '\t' && *where < ' ' ) {
    1330                     break;
    1331                } else if ( *where != '\t' && *where != ' ') {
    1332                     lastNonBlank = where;
    1333                }
    1334                where++;
    1335           }
    1336           where = line;
    1337           *(lastNonBlank + 1) = '\0';
    1338      }
    1339      // munch white space
    1340      while (*where == ' ' || *where == '\t')
    1341           where++;
    1342      char * saveWhere = where;
    1343      while (*where != ' ' && *where != '\t' && *where != '\0')
    1344           where++;
    1345      if (where != saveWhere) {
    1346           char save = *where;
    1347           *where = '\0';
    1348           //convert to string
    1349           field = saveWhere;
    1350           *where = save;
    1351      } else {
    1352           where = NULL;
    1353           field = "EOL";
    1354      }
    1355      return field;
     1278    if (CbcOrClpReadCommand == stdin) {
     1279      fputs(coin_prompt, stdout);
     1280      fflush(stdout);
     1281    }
     1282    where = fgets(line, 1000, CbcOrClpReadCommand);
     1283#endif
     1284    if (!where)
     1285      return field; // EOF
     1286    where = line;
     1287    // clean image
     1288    char *lastNonBlank = line - 1;
     1289    while (*where != '\0') {
     1290      if (*where != '\t' && *where < ' ') {
     1291        break;
     1292      } else if (*where != '\t' && *where != ' ') {
     1293        lastNonBlank = where;
     1294      }
     1295      where++;
     1296    }
     1297    where = line;
     1298    *(lastNonBlank + 1) = '\0';
     1299  }
     1300  // munch white space
     1301  while (*where == ' ' || *where == '\t')
     1302    where++;
     1303  char *saveWhere = where;
     1304  while (*where != ' ' && *where != '\t' && *where != '\0')
     1305    where++;
     1306  if (where != saveWhere) {
     1307    char save = *where;
     1308    *where = '\0';
     1309    //convert to string
     1310    field = saveWhere;
     1311    *where = save;
     1312  } else {
     1313    where = NULL;
     1314    field = "EOL";
     1315  }
     1316  return field;
    13561317}
    13571318
     
    13591320CoinReadGetCommand(int argc, const char *argv[])
    13601321{
    1361      std::string field = "EOL";
    1362      // say no =
    1363      afterEquals = "";
    1364      while (field == "EOL") {
    1365           if (CbcOrClpRead_mode > 0) {
    1366                if ((CbcOrClpRead_mode < argc && argv[CbcOrClpRead_mode]) ||
    1367                          CbcOrClpEnvironmentIndex >= 0) {
    1368                     if (CbcOrClpEnvironmentIndex < 0) {
    1369                          field = argv[CbcOrClpRead_mode++];
    1370                     } else {
    1371                          if (fillEnv()) {
    1372                               field = line;
    1373                          } else {
    1374                               // not there
    1375                               continue;
    1376                          }
    1377                     }
    1378                     if (field == "-") {
    1379                          std::cout << "Switching to line mode" << std::endl;
    1380                          CbcOrClpRead_mode = -1;
    1381                          field = CoinReadNextField();
    1382                     } else if (field[0] != '-') {
    1383                          if (CbcOrClpRead_mode != 2) {
    1384                               // now allow std::cout<<"skipping non-command "<<field<<std::endl;
    1385                               // field="EOL"; // skip
    1386                          } else if (CbcOrClpEnvironmentIndex < 0) {
    1387                               // special dispensation - taken as -import name
    1388                               CbcOrClpRead_mode--;
    1389                               field = "import";
    1390                          }
    1391                     } else {
    1392                          if (field != "--") {
    1393                               // take off -
    1394                               field = field.substr(1);
    1395                          } else {
    1396                               // special dispensation - taken as -import --
    1397                               CbcOrClpRead_mode--;
    1398                               field = "import";
    1399                          }
    1400                     }
    1401                } else {
    1402                     field = "";
    1403                }
     1322  std::string field = "EOL";
     1323  // say no =
     1324  afterEquals = "";
     1325  while (field == "EOL") {
     1326    if (CbcOrClpRead_mode > 0) {
     1327      if ((CbcOrClpRead_mode < argc && argv[CbcOrClpRead_mode]) || CbcOrClpEnvironmentIndex >= 0) {
     1328        if (CbcOrClpEnvironmentIndex < 0) {
     1329          field = argv[CbcOrClpRead_mode++];
     1330        } else {
     1331          if (fillEnv()) {
     1332            field = line;
    14041333          } else {
    1405                field = CoinReadNextField();
     1334            // not there
     1335            continue;
    14061336          }
    1407      }
    1408      // if = then modify and save
    1409      std::string::size_type found = field.find('=');
    1410      if (found != std::string::npos) {
    1411           afterEquals = field.substr(found + 1);
    1412           field = field.substr(0, found);
    1413      }
    1414      //std::cout<<field<<std::endl;
    1415      return field;
     1337        }
     1338        if (field == "-") {
     1339          std::cout << "Switching to line mode" << std::endl;
     1340          CbcOrClpRead_mode = -1;
     1341          field = CoinReadNextField();
     1342        } else if (field[0] != '-') {
     1343          if (CbcOrClpRead_mode != 2) {
     1344            // now allow std::cout<<"skipping non-command "<<field<<std::endl;
     1345            // field="EOL"; // skip
     1346          } else if (CbcOrClpEnvironmentIndex < 0) {
     1347            // special dispensation - taken as -import name
     1348            CbcOrClpRead_mode--;
     1349            field = "import";
     1350          }
     1351        } else {
     1352          if (field != "--") {
     1353            // take off -
     1354            field = field.substr(1);
     1355          } else {
     1356            // special dispensation - taken as -import --
     1357            CbcOrClpRead_mode--;
     1358            field = "import";
     1359          }
     1360        }
     1361      } else {
     1362        field = "";
     1363      }
     1364    } else {
     1365      field = CoinReadNextField();
     1366    }
     1367  }
     1368  // if = then modify and save
     1369  std::string::size_type found = field.find('=');
     1370  if (found != std::string::npos) {
     1371    afterEquals = field.substr(found + 1);
     1372    field = field.substr(0, found);
     1373  }
     1374  //std::cout<<field<<std::endl;
     1375  return field;
    14161376}
    14171377std::string
    14181378CoinReadGetString(int argc, const char *argv[])
    14191379{
    1420      std::string field = "EOL";
    1421      if (afterEquals == "") {
    1422           if (CbcOrClpRead_mode > 0) {
    1423                if (CbcOrClpRead_mode < argc || CbcOrClpEnvironmentIndex >= 0) {
    1424                     if (CbcOrClpEnvironmentIndex < 0) {
    1425                          if (argv[CbcOrClpRead_mode][0] != '-') {
    1426                               field = argv[CbcOrClpRead_mode++];
    1427                          } else if (!strcmp(argv[CbcOrClpRead_mode], "--")) {
    1428                               CbcOrClpRead_mode++;
    1429                               // -- means import from stdin
    1430                               field = "-";
    1431                          }
    1432                     } else {
    1433                          fillEnv();
    1434                          field = line;
    1435                     }
    1436                }
    1437           } else {
    1438                field = CoinReadNextField();
     1380  std::string field = "EOL";
     1381  if (afterEquals == "") {
     1382    if (CbcOrClpRead_mode > 0) {
     1383      if (CbcOrClpRead_mode < argc || CbcOrClpEnvironmentIndex >= 0) {
     1384        if (CbcOrClpEnvironmentIndex < 0) {
     1385          if (argv[CbcOrClpRead_mode][0] != '-') {
     1386            field = argv[CbcOrClpRead_mode++];
     1387          } else if (!strcmp(argv[CbcOrClpRead_mode], "--")) {
     1388            CbcOrClpRead_mode++;
     1389            // -- means import from stdin
     1390            field = "-";
    14391391          }
    1440      } else {
    1441           field = afterEquals;
    1442           afterEquals = "";
    1443      }
    1444      //std::cout<<field<<std::endl;
    1445      return field;
     1392        } else {
     1393          fillEnv();
     1394          field = line;
     1395        }
     1396      }
     1397    } else {
     1398      field = CoinReadNextField();
     1399    }
     1400  } else {
     1401    field = afterEquals;
     1402    afterEquals = "";
     1403  }
     1404  //std::cout<<field<<std::endl;
     1405  return field;
    14461406}
    14471407// valid 0 - okay, 1 bad, 2 not there
    1448 int
    1449 CoinReadGetIntField(int argc, const char *argv[], int * valid)
    1450 {
    1451      std::string field = "EOL";
    1452      if (afterEquals == "") {
    1453           if (CbcOrClpRead_mode > 0) {
    1454                if (CbcOrClpRead_mode < argc || CbcOrClpEnvironmentIndex >= 0) {
    1455                     if (CbcOrClpEnvironmentIndex < 0) {
    1456                          // may be negative value so do not check for -
    1457                          field = argv[CbcOrClpRead_mode++];
    1458                     } else {
    1459                          fillEnv();
    1460                          field = line;
    1461                     }
    1462                }
    1463           } else {
    1464                field = CoinReadNextField();
    1465           }
    1466      } else {
    1467           field = afterEquals;
    1468           afterEquals = "";
    1469      }
    1470      long int value = 0;
    1471      //std::cout<<field<<std::endl;
    1472      if (field != "EOL") {
    1473           const char * start = field.c_str();
    1474           char * endPointer = NULL;
    1475           // check valid
    1476           value =  strtol(start, &endPointer, 10);
    1477           if (*endPointer == '\0') {
    1478                *valid = 0;
    1479           } else {
    1480                *valid = 1;
    1481                std::cout << "String of " << field;
    1482           }
    1483      } else {
    1484           *valid = 2;
    1485      }
    1486      return static_cast<int>(value);
     1408int CoinReadGetIntField(int argc, const char *argv[], int *valid)
     1409{
     1410  std::string field = "EOL";
     1411  if (afterEquals == "") {
     1412    if (CbcOrClpRead_mode > 0) {
     1413      if (CbcOrClpRead_mode < argc || CbcOrClpEnvironmentIndex >= 0) {
     1414        if (CbcOrClpEnvironmentIndex < 0) {
     1415          // may be negative value so do not check for -
     1416          field = argv[CbcOrClpRead_mode++];
     1417        } else {
     1418          fillEnv();
     1419          field = line;
     1420        }
     1421      }
     1422    } else {
     1423      field = CoinReadNextField();
     1424    }
     1425  } else {
     1426    field = afterEquals;
     1427    afterEquals = "";
     1428  }
     1429  long int value = 0;
     1430  //std::cout<<field<<std::endl;
     1431  if (field != "EOL") {
     1432    const char *start = field.c_str();
     1433    char *endPointer = NULL;
     1434    // check valid
     1435    value = strtol(start, &endPointer, 10);
     1436    if (*endPointer == '\0') {
     1437      *valid = 0;
     1438    } else {
     1439      *valid = 1;
     1440      std::cout << "String of " << field;
     1441    }
     1442  } else {
     1443    *valid = 2;
     1444  }
     1445  return static_cast< int >(value);
    14871446}
    14881447double
    1489 CoinReadGetDoubleField(int argc, const char *argv[], int * valid)
    1490 {
    1491      std::string field = "EOL";
    1492      if (afterEquals == "") {
    1493           if (CbcOrClpRead_mode > 0) {
    1494                if (CbcOrClpRead_mode < argc || CbcOrClpEnvironmentIndex >= 0) {
    1495                     if (CbcOrClpEnvironmentIndex < 0) {
    1496                          // may be negative value so do not check for -
    1497                          field = argv[CbcOrClpRead_mode++];
    1498                     } else {
    1499                          fillEnv();
    1500                          field = line;
    1501                     }
    1502                }
    1503           } else {
    1504                field = CoinReadNextField();
    1505           }
    1506      } else {
    1507           field = afterEquals;
    1508           afterEquals = "";
    1509      }
    1510      double value = 0.0;
    1511      //std::cout<<field<<std::endl;
    1512      if (field != "EOL") {
    1513           const char * start = field.c_str();
    1514           char * endPointer = NULL;
    1515           // check valid
    1516           value = strtod(start, &endPointer);
    1517           if (*endPointer == '\0') {
    1518                *valid = 0;
    1519           } else {
    1520                *valid = 1;
    1521                std::cout << "String of " << field;
    1522           }
    1523      } else {
    1524           *valid = 2;
    1525      }
    1526      return value;
     1448CoinReadGetDoubleField(int argc, const char *argv[], int *valid)
     1449{
     1450  std::string field = "EOL";
     1451  if (afterEquals == "") {
     1452    if (CbcOrClpRead_mode > 0) {
     1453      if (CbcOrClpRead_mode < argc || CbcOrClpEnvironmentIndex >= 0) {
     1454        if (CbcOrClpEnvironmentIndex < 0) {
     1455          // may be negative value so do not check for -
     1456          field = argv[CbcOrClpRead_mode++];
     1457        } else {
     1458          fillEnv();
     1459          field = line;
     1460        }
     1461      }
     1462    } else {
     1463      field = CoinReadNextField();
     1464    }
     1465  } else {
     1466    field = afterEquals;
     1467    afterEquals = "";
     1468  }
     1469  double value = 0.0;
     1470  //std::cout<<field<<std::endl;
     1471  if (field != "EOL") {
     1472    const char *start = field.c_str();
     1473    char *endPointer = NULL;
     1474    // check valid
     1475    value = strtod(start, &endPointer);
     1476    if (*endPointer == '\0') {
     1477      *valid = 0;
     1478    } else {
     1479      *valid = 1;
     1480      std::cout << "String of " << field;
     1481    }
     1482  } else {
     1483    *valid = 2;
     1484  }
     1485  return value;
    15271486}
    15281487/*
     
    15301489  class CbcOrClpParam for details. Pulled from C..Main() for clarity.
    15311490*/
    1532 void
    1533 establishParams (int &numberParameters, CbcOrClpParam *const parameters)
    1534 {
    1535      numberParameters = 0;
    1536      parameters[numberParameters++] =
    1537           CbcOrClpParam("?", "For help", CBC_PARAM_GENERALQUERY, 7, 0);
    1538      parameters[numberParameters++] =
    1539           CbcOrClpParam("???", "For help", CBC_PARAM_FULLGENERALQUERY, 7, 0);
    1540      parameters[numberParameters++] =
    1541           CbcOrClpParam("-", "From stdin",
    1542                         CLP_PARAM_ACTION_STDIN, 3, 0);
    1543 #if defined(ABC_INHERIT)||ABOCA_LITE
    1544       parameters[numberParameters++] =
    1545           CbcOrClpParam("abc", "Whether to visit Aboca",
    1546                         "off", CLP_PARAM_STR_ABCWANTED, 7, 0);
    1547      parameters[numberParameters-1].append("one");
    1548      parameters[numberParameters-1].append("two");
    1549      parameters[numberParameters-1].append("three");
    1550      parameters[numberParameters-1].append("four");
    1551      parameters[numberParameters-1].append("five");
    1552      parameters[numberParameters-1].append("six");
    1553      parameters[numberParameters-1].append("seven");
    1554      parameters[numberParameters-1].append("eight");
    1555      parameters[numberParameters-1].append("on");
    1556      parameters[numberParameters-1].append("decide");
    1557      parameters[numberParameters-1].setFakeKeyWord(10);
    1558      parameters[numberParameters-1].setLonghelp
    1559      (
    1560           "Decide whether to use A Basic Optimization Code (Accelerated?) \
    1561 and whether to try going parallel!"
    1562      );
    1563 #endif
    1564      parameters[numberParameters++] =
    1565           CbcOrClpParam("allC!ommands", "Whether to print less used commands",
    1566                         "no", CLP_PARAM_STR_ALLCOMMANDS);
    1567      parameters[numberParameters-1].append("more");
    1568      parameters[numberParameters-1].append("all");
    1569      parameters[numberParameters-1].setLonghelp
    1570      (
    1571           "For the sake of your sanity, only the more useful and simple commands \
    1572 are printed out on ?."
    1573      );
    1574 #ifdef COIN_HAS_CBC
    1575      parameters[numberParameters++] =
    1576           CbcOrClpParam("allow!ableGap", "Stop when gap between best possible and \
     1491void establishParams(int &numberParameters, CbcOrClpParam *const parameters)
     1492{
     1493  numberParameters = 0;
     1494  parameters[numberParameters++] = CbcOrClpParam("?", "For help", CBC_PARAM_GENERALQUERY, 7, 0);
     1495  parameters[numberParameters++] = CbcOrClpParam("???", "For help", CBC_PARAM_FULLGENERALQUERY, 7, 0);
     1496  parameters[numberParameters++] = CbcOrClpParam("-", "From stdin",
     1497    CLP_PARAM_ACTION_STDIN, 3, 0);
     1498#if defined(ABC_INHERIT) || ABOCA_LITE
     1499  parameters[numberParameters++] = CbcOrClpParam("abc", "Whether to visit Aboca",
     1500    "off", CLP_PARAM_STR_ABCWANTED, 7, 0);
     1501  parameters[numberParameters - 1].append("one");
     1502  parameters[numberParameters - 1].append("two");
     1503  parameters[numberParameters - 1].append("three");
     1504  parameters[numberParameters - 1].append("four");
     1505  parameters[numberParameters - 1].append("five");
     1506  parameters[numberParameters - 1].append("six");
     1507  parameters[numberParameters - 1].append("seven");
     1508  parameters[numberParameters - 1].append("eight");
     1509  parameters[numberParameters - 1].append("on");
     1510  parameters[numberParameters - 1].append("decide");
     1511  parameters[numberParameters - 1].setFakeKeyWord(10);
     1512  parameters[numberParameters - 1].setLonghelp(
     1513    "Decide whether to use A Basic Optimization Code (Accelerated?) \
     1514and whether to try going parallel!");
     1515#endif
     1516  parameters[numberParameters++] = CbcOrClpParam("allC!ommands", "Whether to print less used commands",
     1517    "no", CLP_PARAM_STR_ALLCOMMANDS);
     1518  parameters[numberParameters - 1].append("more");
     1519  parameters[numberParameters - 1].append("all");
     1520  parameters[numberParameters - 1].setLonghelp(
     1521    "For the sake of your sanity, only the more useful and simple commands \
     1522are printed out on ?.");
     1523#ifdef COIN_HAS_CBC
     1524  parameters[numberParameters++] = CbcOrClpParam("allow!ableGap", "Stop when gap between best possible and \
    15771525best less than this",
    1578                         0.0, 1.0e20, CBC_PARAM_DBL_ALLOWABLEGAP);
    1579      parameters[numberParameters-1].setDoubleValue(0.0);
    1580      parameters[numberParameters-1].setLonghelp
    1581      (
    1582           "If the gap between best solution and best possible solution is less than this \
    1583 then the search will be terminated.  Also see ratioGap."
    1584      );
     1526    0.0, 1.0e20, CBC_PARAM_DBL_ALLOWABLEGAP);
     1527  parameters[numberParameters - 1].setDoubleValue(0.0);
     1528  parameters[numberParameters - 1].setLonghelp(
     1529    "If the gap between best solution and best possible solution is less than this \
     1530then the search will be terminated.  Also see ratioGap.");
    15851531#endif
    15861532#ifdef COIN_HAS_CLP
    1587      parameters[numberParameters++] =
    1588           CbcOrClpParam("allS!lack", "Set basis back to all slack and reset solution",
    1589                         CLP_PARAM_ACTION_ALLSLACK, 3);
    1590      parameters[numberParameters-1].setLonghelp
    1591      (
    1592           "Mainly useful for tuning purposes.  Normally the first dual or primal will be using an all slack \
    1593 basis anyway."
    1594      );
    1595 #endif
    1596 #ifdef COIN_HAS_CBC
    1597      parameters[numberParameters++] =
    1598           CbcOrClpParam("artif!icialCost", "Costs >= this treated as artificials in feasibility pump",
    1599                         0.0, 1.0e100, CBC_PARAM_DBL_ARTIFICIALCOST, 1);
    1600      parameters[numberParameters-1].setDoubleValue(0.0);
    1601      parameters[numberParameters-1].setLonghelp
    1602      (
    1603           "0.0 off - otherwise variables with costs >= this are treated as artificials and fixed to lower bound in feasibility pump"
    1604      );
     1533  parameters[numberParameters++] = CbcOrClpParam("allS!lack", "Set basis back to all slack and reset solution",
     1534    CLP_PARAM_ACTION_ALLSLACK, 3);
     1535  parameters[numberParameters - 1].setLonghelp(
     1536    "Mainly useful for tuning purposes.  Normally the first dual or primal will be using an all slack \
     1537basis anyway.");
     1538#endif
     1539#ifdef COIN_HAS_CBC
     1540  parameters[numberParameters++] = CbcOrClpParam("artif!icialCost", "Costs >= this treated as artificials in feasibility pump",
     1541    0.0, 1.0e100, CBC_PARAM_DBL_ARTIFICIALCOST, 1);
     1542  parameters[numberParameters - 1].setDoubleValue(0.0);
     1543  parameters[numberParameters - 1].setLonghelp(
     1544    "0.0 off - otherwise variables with costs >= this are treated as artificials and fixed to lower bound in feasibility pump");
    16051545#endif
    16061546#ifdef COIN_HAS_CLP
    1607      parameters[numberParameters++] =
    1608           CbcOrClpParam("auto!Scale", "Whether to scale objective, rhs and bounds of problem if they look odd",
    1609                         "off", CLP_PARAM_STR_AUTOSCALE, 7, 0);
    1610      parameters[numberParameters-1].append("on");
    1611      parameters[numberParameters-1].setLonghelp
    1612      (
    1613           "If you think you may get odd objective values or large equality rows etc then\
     1547  parameters[numberParameters++] = CbcOrClpParam("auto!Scale", "Whether to scale objective, rhs and bounds of problem if they look odd",
     1548    "off", CLP_PARAM_STR_AUTOSCALE, 7, 0);
     1549  parameters[numberParameters - 1].append("on");
     1550  parameters[numberParameters - 1].setLonghelp(
     1551    "If you think you may get odd objective values or large equality rows etc then\
    16141552 it may be worth setting this true.  It is still experimental and you may prefer\
    1615  to use objective!Scale and rhs!Scale."
    1616      );
    1617      parameters[numberParameters++] =
    1618           CbcOrClpParam("barr!ier", "Solve using primal dual predictor corrector algorithm",
    1619                         CLP_PARAM_ACTION_BARRIER);
    1620      parameters[numberParameters-1].setLonghelp
    1621      (
    1622           "This command solves the current model using the  primal dual predictor \
     1553 to use objective!Scale and rhs!Scale.");
     1554  parameters[numberParameters++] = CbcOrClpParam("barr!ier", "Solve using primal dual predictor corrector algorithm",
     1555    CLP_PARAM_ACTION_BARRIER);
     1556  parameters[numberParameters - 1].setLonghelp(
     1557    "This command solves the current model using the  primal dual predictor \
    16231558corrector algorithm.  You may want to link in an alternative \
    16241559ordering and factorization.  It will also solve models \
    16251560with quadratic objectives."
    16261561
    1627      );
    1628      parameters[numberParameters++] =
    1629           CbcOrClpParam("basisI!n", "Import basis from bas file",
    1630                         CLP_PARAM_ACTION_BASISIN, 3);
    1631      parameters[numberParameters-1].setLonghelp
    1632      (
    1633           "This will read an MPS format basis file from the given file name.  It will use the default\
     1562  );
     1563  parameters[numberParameters++] = CbcOrClpParam("basisI!n", "Import basis from bas file",
     1564    CLP_PARAM_ACTION_BASISIN, 3);
     1565  parameters[numberParameters - 1].setLonghelp(
     1566    "This will read an MPS format basis file from the given file name.  It will use the default\
    16341567 directory given by 'directory'.  A name of '$' will use the previous value for the name.  This\
    16351568 is initialized to '', i.e. it must be set.  If you have libz then it can read compressed\
    1636  files 'xxxxxxxx.gz' or xxxxxxxx.bz2."
    1637      );
    1638      parameters[numberParameters++] =
    1639           CbcOrClpParam("basisO!ut", "Export basis as bas file",
    1640                         CLP_PARAM_ACTION_BASISOUT);
    1641      parameters[numberParameters-1].setLonghelp
    1642      (
    1643           "This will write an MPS format basis file to the given file name.  It will use the default\
     1569 files 'xxxxxxxx.gz' or xxxxxxxx.bz2.");
     1570  parameters[numberParameters++] = CbcOrClpParam("basisO!ut", "Export basis as bas file",
     1571    CLP_PARAM_ACTION_BASISOUT);
     1572  parameters[numberParameters - 1].setLonghelp(
     1573    "This will write an MPS format basis file to the given file name.  It will use the default\
    16441574 directory given by 'directory'.  A name of '$' will use the previous value for the name.  This\
    1645  is initialized to 'default.bas'."
    1646      );
    1647      parameters[numberParameters++] =
    1648           CbcOrClpParam("biasLU", "Whether factorization biased towards U",
    1649                         "UU", CLP_PARAM_STR_BIASLU, 2, 0);
    1650      parameters[numberParameters-1].append("UX");
    1651      parameters[numberParameters-1].append("LX");
    1652      parameters[numberParameters-1].append("LL");
    1653      parameters[numberParameters-1].setCurrentOption("LX");
    1654 #endif
    1655 #ifdef COIN_HAS_CBC
    1656      parameters[numberParameters++] =
    1657           CbcOrClpParam("branch!AndCut", "Do Branch and Cut",
    1658                         CBC_PARAM_ACTION_BAB);
    1659      parameters[numberParameters-1].setLonghelp
    1660      (
    1661           "This does branch and cut.  There are many parameters which can affect the performance.  \
     1575 is initialized to 'default.bas'.");
     1576  parameters[numberParameters++] = CbcOrClpParam("biasLU", "Whether factorization biased towards U",
     1577    "UU", CLP_PARAM_STR_BIASLU, 2, 0);
     1578  parameters[numberParameters - 1].append("UX");
     1579  parameters[numberParameters - 1].append("LX");
     1580  parameters[numberParameters - 1].append("LL");
     1581  parameters[numberParameters - 1].setCurrentOption("LX");
     1582#endif
     1583#ifdef COIN_HAS_CBC
     1584  parameters[numberParameters++] = CbcOrClpParam("branch!AndCut", "Do Branch and Cut",
     1585    CBC_PARAM_ACTION_BAB);
     1586  parameters[numberParameters - 1].setLonghelp(
     1587    "This does branch and cut.  There are many parameters which can affect the performance.  \
    16621588First just try with default settings and look carefully at the log file.  Did cuts help?  Did they take too long?  \
    16631589Look at output to see which cuts were effective and then do some tuning.  You will see that the \
     
    16731599See whether strong branching did a good job - or did it just take a lot of iterations.  Adjust the strongBranching \
    16741600and trustPseudoCosts parameters.  If cuts did a good job, then you may wish to \
    1675 have more rounds of cuts - see passC!uts and passT!ree."
    1676      );
    1677 #endif
    1678      parameters[numberParameters++] =
    1679           CbcOrClpParam("bscale", "Whether to scale in barrier (and ordering speed)",
    1680                         "off", CLP_PARAM_STR_BARRIERSCALE, 7, 0);
    1681      parameters[numberParameters-1].append("on");
    1682      parameters[numberParameters-1].append("off1");
    1683      parameters[numberParameters-1].append("on1");
    1684      parameters[numberParameters-1].append("off2");
    1685      parameters[numberParameters-1].append("on2");
     1601have more rounds of cuts - see passC!uts and passT!ree.");
     1602#endif
     1603  parameters[numberParameters++] = CbcOrClpParam("bscale", "Whether to scale in barrier (and ordering speed)",
     1604    "off", CLP_PARAM_STR_BARRIERSCALE, 7, 0);
     1605  parameters[numberParameters - 1].append("on");
     1606  parameters[numberParameters - 1].append("off1");
     1607  parameters[numberParameters - 1].append("on1");
     1608  parameters[numberParameters - 1].append("off2");
     1609  parameters[numberParameters - 1].append("on2");
    16861610#if FLUSH_PRINT_BUFFER > 2
    1687      parameters[numberParameters++] =
    1688           CbcOrClpParam("buff!eredMode", "Whether to flush print buffer",
    1689                         "on", CLP_PARAM_STR_BUFFER_MODE);
    1690      parameters[numberParameters-1].append("off");
    1691      parameters[numberParameters-1].setLonghelp
    1692      (
    1693           "Default is on, off switches on unbuffered output"
    1694      );
    1695      parameters[numberParameters-1].setIntValue(0);
    1696 #endif
    1697      parameters[numberParameters++] =
    1698           CbcOrClpParam("chol!esky", "Which cholesky algorithm",
    1699                         "native", CLP_PARAM_STR_CHOLESKY, 7);
    1700      parameters[numberParameters-1].append("dense");
    1701      //#ifdef FOREIGN_BARRIER
     1611  parameters[numberParameters++] = CbcOrClpParam("buff!eredMode", "Whether to flush print buffer",
     1612    "on", CLP_PARAM_STR_BUFFER_MODE);
     1613  parameters[numberParameters - 1].append("off");
     1614  parameters[numberParameters - 1].setLonghelp(
     1615    "Default is on, off switches on unbuffered output");
     1616  parameters[numberParameters - 1].setIntValue(0);
     1617#endif
     1618  parameters[numberParameters++] = CbcOrClpParam("chol!esky", "Which cholesky algorithm",
     1619    "native", CLP_PARAM_STR_CHOLESKY, 7);
     1620  parameters[numberParameters - 1].append("dense");
     1621  //#ifdef FOREIGN_BARRIER
    17021622#ifdef COIN_HAS_WSMP
    1703      parameters[numberParameters-1].append("fudge!Long");
    1704      parameters[numberParameters-1].append("wssmp");
     1623  parameters[numberParameters - 1].append("fudge!Long");
     1624  parameters[numberParameters - 1].append("wssmp");
    17051625#else
    1706      parameters[numberParameters-1].append("fudge!Long_dummy");
    1707      parameters[numberParameters-1].append("wssmp_dummy");
     1626  parameters[numberParameters - 1].append("fudge!Long_dummy");
     1627  parameters[numberParameters - 1].append("wssmp_dummy");
    17081628#endif
    17091629#if defined(COIN_HAS_AMD) || defined(COIN_HAS_CHOLMOD) || defined(COIN_HAS_GLPK)
    1710      parameters[numberParameters-1].append("Uni!versityOfFlorida");
     1630  parameters[numberParameters - 1].append("Uni!versityOfFlorida");
    17111631#else
    1712      parameters[numberParameters-1].append("Uni!versityOfFlorida_dummy");
     1632  parameters[numberParameters - 1].append("Uni!versityOfFlorida_dummy");
    17131633#endif
    17141634#ifdef TAUCS_BARRIER
    1715      parameters[numberParameters-1].append("Taucs");
     1635  parameters[numberParameters - 1].append("Taucs");
    17161636#else
    1717      parameters[numberParameters-1].append("Taucs_dummy");
     1637  parameters[numberParameters - 1].append("Taucs_dummy");
    17181638#endif
    17191639#ifdef COIN_HAS_MUMPS
    1720      parameters[numberParameters-1].append("Mumps");
     1640  parameters[numberParameters - 1].append("Mumps");
    17211641#else
    1722      parameters[numberParameters-1].append("Mumps_dummy");
     1642  parameters[numberParameters - 1].append("Mumps_dummy");
    17231643#endif
    17241644#ifdef PARDISO_BARRIER
    1725      parameters[numberParameters-1].append("Pardiso");
     1645  parameters[numberParameters - 1].append("Pardiso");
    17261646#else
    1727      parameters[numberParameters-1].append("Pardiso_dummy");
    1728 #endif
    1729      parameters[numberParameters-1].setLonghelp
    1730      (
    1731           "For a barrier code to be effective it needs a good Cholesky ordering and factorization.  \
     1647  parameters[numberParameters - 1].append("Pardiso_dummy");
     1648#endif
     1649  parameters[numberParameters - 1].setLonghelp(
     1650    "For a barrier code to be effective it needs a good Cholesky ordering and factorization.  \
    17321651The native ordering and factorization is not state of the art, although acceptable.  \
    17331652You may want to link in one from another source.  See Makefile.locations for some \
    1734 possibilities."
    1735      );
    1736      //#endif
    1737 #ifdef COIN_HAS_CBC
    1738      parameters[numberParameters++] =
    1739           CbcOrClpParam("clique!Cuts", "Whether to use Clique cuts",
    1740                         "off", CBC_PARAM_STR_CLIQUECUTS);
    1741      parameters[numberParameters-1].append("on");
    1742      parameters[numberParameters-1].append("root");
    1743      parameters[numberParameters-1].append("ifmove");
    1744      parameters[numberParameters-1].append("forceOn");
    1745      parameters[numberParameters-1].append("onglobal");
    1746      parameters[numberParameters-1].setLonghelp
    1747      (
    1748           "This switches on clique cuts (either at root or in entire tree) \
    1749 See branchAndCut for information on options."
    1750      );
    1751      parameters[numberParameters++] =
    1752           CbcOrClpParam("combine!Solutions", "Whether to use combine solution heuristic",
    1753                         "off", CBC_PARAM_STR_COMBINE);
    1754      parameters[numberParameters-1].append("on");
    1755      parameters[numberParameters-1].append("both");
    1756      parameters[numberParameters-1].append("before");
    1757      parameters[numberParameters-1].append("onquick");
    1758      parameters[numberParameters-1].append("bothquick");
    1759      parameters[numberParameters-1].append("beforequick");
    1760      parameters[numberParameters-1].setLonghelp
    1761      (
    1762           "This switches on a heuristic which does branch and cut on the problem given by just \
     1653possibilities.");
     1654  //#endif
     1655#ifdef COIN_HAS_CBC
     1656  parameters[numberParameters++] = CbcOrClpParam("clique!Cuts", "Whether to use Clique cuts",
     1657    "off", CBC_PARAM_STR_CLIQUECUTS);
     1658  parameters[numberParameters - 1].append("on");
     1659  parameters[numberParameters - 1].append("root");
     1660  parameters[numberParameters - 1].append("ifmove");
     1661  parameters[numberParameters - 1].append("forceOn");
     1662  parameters[numberParameters - 1].append("onglobal");
     1663  parameters[numberParameters - 1].setLonghelp(
     1664    "This switches on clique cuts (either at root or in entire tree) \
     1665See branchAndCut for information on options.");
     1666  parameters[numberParameters++] = CbcOrClpParam("combine!Solutions", "Whether to use combine solution heuristic",
     1667    "off", CBC_PARAM_STR_COMBINE);
     1668  parameters[numberParameters - 1].append("on");
     1669  parameters[numberParameters - 1].append("both");
     1670  parameters[numberParameters - 1].append("before");
     1671  parameters[numberParameters - 1].append("onquick");
     1672  parameters[numberParameters - 1].append("bothquick");
     1673  parameters[numberParameters - 1].append("beforequick");
     1674  parameters[numberParameters - 1].setLonghelp(
     1675    "This switches on a heuristic which does branch and cut on the problem given by just \
    17631676using variables which have appeared in one or more solutions. \
    17641677It obviously only tries after two or more solutions. \
    1765 See Rounding for meaning of on,both,before"
    1766      );
    1767      parameters[numberParameters++] =
    1768           CbcOrClpParam("combine2!Solutions", "Whether to use crossover solution heuristic",
    1769                         "off", CBC_PARAM_STR_CROSSOVER2);
    1770      parameters[numberParameters-1].append("on");
    1771      parameters[numberParameters-1].append("both");
    1772      parameters[numberParameters-1].append("before");
    1773      parameters[numberParameters-1].setLonghelp
    1774      (
    1775           "This switches on a heuristic which does branch and cut on the problem given by \
     1678See Rounding for meaning of on,both,before");
     1679  parameters[numberParameters++] = CbcOrClpParam("combine2!Solutions", "Whether to use crossover solution heuristic",
     1680    "off", CBC_PARAM_STR_CROSSOVER2);
     1681  parameters[numberParameters - 1].append("on");
     1682  parameters[numberParameters - 1].append("both");
     1683  parameters[numberParameters - 1].append("before");
     1684  parameters[numberParameters - 1].setLonghelp(
     1685    "This switches on a heuristic which does branch and cut on the problem given by \
    17761686fixing variables which have same value in two or more solutions. \
    17771687It obviously only tries after two or more solutions. \
    1778 See Rounding for meaning of on,both,before"
    1779      );
    1780      parameters[numberParameters++] =
    1781           CbcOrClpParam("constraint!fromCutoff", "Whether to use cutoff as constraint",
    1782                         "off", CBC_PARAM_STR_CUTOFF_CONSTRAINT);
    1783      parameters[numberParameters-1].append("on");
    1784      parameters[numberParameters-1].append("variable");
    1785      parameters[numberParameters-1].append("forcevariable");
    1786      parameters[numberParameters-1].append("conflict");
    1787      parameters[numberParameters-1].setLonghelp
    1788      (
    1789           "This adds the objective as a constraint with best solution as RHS"
    1790      );
    1791      parameters[numberParameters++] =
    1792           CbcOrClpParam("cost!Strategy", "How to use costs as priorities",
    1793                         "off", CBC_PARAM_STR_COSTSTRATEGY);
    1794      parameters[numberParameters-1].append("pri!orities");
    1795      parameters[numberParameters-1].append("column!Order?");
    1796      parameters[numberParameters-1].append("01f!irst?");
    1797      parameters[numberParameters-1].append("01l!ast?");
    1798      parameters[numberParameters-1].append("length!?");
    1799      parameters[numberParameters-1].append("singletons");
    1800      parameters[numberParameters-1].append("nonzero");
    1801      parameters[numberParameters-1].append("general!Force?");
    1802      parameters[numberParameters-1].setLonghelp
    1803      (
    1804           "This orders the variables in order of their absolute costs - with largest cost ones being branched on \
     1688See Rounding for meaning of on,both,before");
     1689  parameters[numberParameters++] = CbcOrClpParam("constraint!fromCutoff", "Whether to use cutoff as constraint",
     1690    "off", CBC_PARAM_STR_CUTOFF_CONSTRAINT);
     1691  parameters[numberParameters - 1].append("on");
     1692  parameters[numberParameters - 1].append("variable");
     1693  parameters[numberParameters - 1].append("forcevariable");
     1694  parameters[numberParameters - 1].append("conflict");
     1695  parameters[numberParameters - 1].setLonghelp(
     1696    "This adds the objective as a constraint with best solution as RHS");
     1697  parameters[numberParameters++] = CbcOrClpParam("cost!Strategy", "How to use costs as priorities",
     1698    "off", CBC_PARAM_STR_COSTSTRATEGY);
     1699  parameters[numberParameters - 1].append("pri!orities");
     1700  parameters[numberParameters - 1].append("column!Order?");
     1701  parameters[numberParameters - 1].append("01f!irst?");
     1702  parameters[numberParameters - 1].append("01l!ast?");
     1703  parameters[numberParameters - 1].append("length!?");
     1704  parameters[numberParameters - 1].append("singletons");
     1705  parameters[numberParameters - 1].append("nonzero");
     1706  parameters[numberParameters - 1].append("general!Force?");
     1707  parameters[numberParameters - 1].setLonghelp(
     1708    "This orders the variables in order of their absolute costs - with largest cost ones being branched on \
    18051709first.  This primitive strategy can be surprsingly effective.  The column order\
    1806  option is obviously not on costs but easy to code here."
    1807      );
    1808      parameters[numberParameters++] =
    1809           CbcOrClpParam("cplex!Use", "Whether to use Cplex!",
    1810                         "off", CBC_PARAM_STR_CPX);
    1811      parameters[numberParameters-1].append("on");
    1812      parameters[numberParameters-1].setLonghelp
    1813      (
    1814           " If the user has Cplex, but wants to use some of Cbc's heuristics \
     1710 option is obviously not on costs but easy to code here.");
     1711  parameters[numberParameters++] = CbcOrClpParam("cplex!Use", "Whether to use Cplex!",
     1712    "off", CBC_PARAM_STR_CPX);
     1713  parameters[numberParameters - 1].append("on");
     1714  parameters[numberParameters - 1].setLonghelp(
     1715    " If the user has Cplex, but wants to use some of Cbc's heuristics \
    18151716then you can!  If this is on, then Cbc will get to the root node and then \
    18161717hand over to Cplex.  If heuristics find a solution this can be significantly \
     
    18181719they are genuine constraints.  It is also probable that you want to switch \
    18191720off preprocessing, although for difficult problems it is worth trying \
    1820 both."
    1821      );
    1822 #endif
    1823      parameters[numberParameters++] =
    1824           CbcOrClpParam("cpp!Generate", "Generates C++ code",
    1825                         -1, 50000, CLP_PARAM_INT_CPP, 1);
    1826      parameters[numberParameters-1].setLonghelp
    1827      (
    1828           "Once you like what the stand-alone solver does then this allows \
     1721both.");
     1722#endif
     1723  parameters[numberParameters++] = CbcOrClpParam("cpp!Generate", "Generates C++ code",
     1724    -1, 50000, CLP_PARAM_INT_CPP, 1);
     1725  parameters[numberParameters - 1].setLonghelp(
     1726    "Once you like what the stand-alone solver does then this allows \
    18291727you to generate user_driver.cpp which approximates the code.  \
    183017280 gives simplest driver, 1 generates saves and restores, 2 \
     
    183217304 bit in cbc generates size dependent code rather than computed values.  \
    18331731This is now deprecated as you can call stand-alone solver - see \
    1834 Cbc/examples/driver4.cpp."
    1835      );
     1732Cbc/examples/driver4.cpp.");
    18361733#ifdef COIN_HAS_CLP
    1837      parameters[numberParameters++] =
    1838           CbcOrClpParam("crash", "Whether to create basis for problem",
    1839                         "off", CLP_PARAM_STR_CRASH);
    1840      parameters[numberParameters-1].append("on");
    1841      parameters[numberParameters-1].append("so!low_halim");
    1842      parameters[numberParameters-1].append("lots");
     1734  parameters[numberParameters++] = CbcOrClpParam("crash", "Whether to create basis for problem",
     1735    "off", CLP_PARAM_STR_CRASH);
     1736  parameters[numberParameters - 1].append("on");
     1737  parameters[numberParameters - 1].append("so!low_halim");
     1738  parameters[numberParameters - 1].append("lots");
    18431739#ifdef CLP_INHERIT_MODE
    1844      parameters[numberParameters-1].append("dual");
    1845      parameters[numberParameters-1].append("dw");
    1846      parameters[numberParameters-1].append("idiot");
     1740  parameters[numberParameters - 1].append("dual");
     1741  parameters[numberParameters - 1].append("dw");
     1742  parameters[numberParameters - 1].append("idiot");
    18471743#else
    1848      parameters[numberParameters-1].append("idiot1");
    1849      parameters[numberParameters-1].append("idiot2");
    1850      parameters[numberParameters-1].append("idiot3");
    1851      parameters[numberParameters-1].append("idiot4");
    1852      parameters[numberParameters-1].append("idiot5");
    1853      parameters[numberParameters-1].append("idiot6");
    1854      parameters[numberParameters-1].append("idiot7");
    1855 #endif
    1856      parameters[numberParameters-1].setLonghelp
    1857      (
    1858           "If crash is set on and there is an all slack basis then Clp will flip or put structural\
     1744  parameters[numberParameters - 1].append("idiot1");
     1745  parameters[numberParameters - 1].append("idiot2");
     1746  parameters[numberParameters - 1].append("idiot3");
     1747  parameters[numberParameters - 1].append("idiot4");
     1748  parameters[numberParameters - 1].append("idiot5");
     1749  parameters[numberParameters - 1].append("idiot6");
     1750  parameters[numberParameters - 1].append("idiot7");
     1751#endif
     1752  parameters[numberParameters - 1].setLonghelp(
     1753    "If crash is set on and there is an all slack basis then Clp will flip or put structural\
    18591754 variables into basis with the aim of getting dual feasible.  On the whole dual seems to be\
    18601755 better without it and there are alternative types of 'crash' for primal e.g. 'idiot' or 'sprint'. \
    18611756I have also added a variant due to Solow and Halim which is as on but just flip.");
    1862      parameters[numberParameters++] =
    1863           CbcOrClpParam("cross!over", "Whether to get a basic solution after barrier",
    1864                         "on", CLP_PARAM_STR_CROSSOVER);
    1865      parameters[numberParameters-1].append("off");
    1866      parameters[numberParameters-1].append("maybe");
    1867      parameters[numberParameters-1].append("presolve");
    1868      parameters[numberParameters-1].setLonghelp
    1869      (
    1870           "Interior point algorithms do not obtain a basic solution (and \
     1757  parameters[numberParameters++] = CbcOrClpParam("cross!over", "Whether to get a basic solution after barrier",
     1758    "on", CLP_PARAM_STR_CROSSOVER);
     1759  parameters[numberParameters - 1].append("off");
     1760  parameters[numberParameters - 1].append("maybe");
     1761  parameters[numberParameters - 1].append("presolve");
     1762  parameters[numberParameters - 1].setLonghelp(
     1763    "Interior point algorithms do not obtain a basic solution (and \
    18711764the feasibility criterion is a bit suspect (JJF)).  This option will crossover \
    18721765to a basic solution suitable for ranging or branch and cut.  With the current state \
    18731766of quadratic it may be a good idea to switch off crossover for quadratic (and maybe \
    1874 presolve as well) - the option maybe does this."
    1875      );
    1876 #endif
    1877 #ifdef COIN_HAS_CBC
    1878      parameters[numberParameters++] =
    1879           CbcOrClpParam("csv!Statistics", "Create one line of statistics",
    1880                         CLP_PARAM_ACTION_CSVSTATISTICS, 2, 1);
    1881      parameters[numberParameters-1].setLonghelp
    1882      (
    1883           "This appends statistics to given file name.  It will use the default\
     1767presolve as well) - the option maybe does this.");
     1768#endif
     1769#ifdef COIN_HAS_CBC
     1770  parameters[numberParameters++] = CbcOrClpParam("csv!Statistics", "Create one line of statistics",
     1771    CLP_PARAM_ACTION_CSVSTATISTICS, 2, 1);
     1772  parameters[numberParameters - 1].setLonghelp(
     1773    "This appends statistics to given file name.  It will use the default\
    18841774 directory given by 'directory'.  A name of '$' will use the previous value for the name.  This\
    1885  is initialized to '', i.e. it must be set.  Adds header if file empty or does not exist."
    1886      );
    1887      parameters[numberParameters++] =
    1888           CbcOrClpParam("cutD!epth", "Depth in tree at which to do cuts",
    1889                         -1, 999999, CBC_PARAM_INT_CUTDEPTH);
    1890      parameters[numberParameters-1].setLonghelp
    1891      (
    1892           "Cut generators may be - off, on only at root, on if they look possible \
     1775 is initialized to '', i.e. it must be set.  Adds header if file empty or does not exist.");
     1776  parameters[numberParameters++] = CbcOrClpParam("cutD!epth", "Depth in tree at which to do cuts",
     1777    -1, 999999, CBC_PARAM_INT_CUTDEPTH);
     1778  parameters[numberParameters - 1].setLonghelp(
     1779    "Cut generators may be - off, on only at root, on if they look possible \
    18931780and on.  If they are done every node then that is that, but it may be worth doing them \
    18941781every so often.  The original method was every so many nodes but it is more logical \
    18951782to do it whenever depth in tree is a multiple of K.  This option does that and defaults \
    1896 to -1 (off -> code decides)."
    1897      );
    1898      parameters[numberParameters-1].setIntValue(-1);
    1899      parameters[numberParameters++] =
    1900           CbcOrClpParam("cutL!ength", "Length of a cut",
    1901                         -1, COIN_INT_MAX, CBC_PARAM_INT_CUTLENGTH);
    1902      parameters[numberParameters-1].setLonghelp
    1903      (
    1904           "At present this only applies to Gomory cuts. -1 (default) leaves as is. \
     1783to -1 (off -> code decides).");
     1784  parameters[numberParameters - 1].setIntValue(-1);
     1785  parameters[numberParameters++] = CbcOrClpParam("cutL!ength", "Length of a cut",
     1786    -1, COIN_INT_MAX, CBC_PARAM_INT_CUTLENGTH);
     1787  parameters[numberParameters - 1].setLonghelp(
     1788    "At present this only applies to Gomory cuts. -1 (default) leaves as is. \
    19051789Any value >0 says that all cuts <= this length can be generated both at \
    19061790root node and in tree. 0 says to use some dynamic lengths.  If value >=10,000,000 \
    19071791then the length in tree is value%10000000 - so 10000100 means unlimited length \
    1908 at root and 100 in tree."
    1909      );
    1910      parameters[numberParameters-1].setIntValue(-1);
    1911      parameters[numberParameters++] =
    1912           CbcOrClpParam("cuto!ff", "All solutions must be better than this",
    1913                         -1.0e60, 1.0e60, CBC_PARAM_DBL_CUTOFF);
    1914      parameters[numberParameters-1].setDoubleValue(1.0e50);
    1915      parameters[numberParameters-1].setLonghelp
    1916      (
    1917           "All solutions must be better than this value (in a minimization sense).  \
     1792at root and 100 in tree.");
     1793  parameters[numberParameters - 1].setIntValue(-1);
     1794  parameters[numberParameters++] = CbcOrClpParam("cuto!ff", "All solutions must be better than this",
     1795    -1.0e60, 1.0e60, CBC_PARAM_DBL_CUTOFF);
     1796  parameters[numberParameters - 1].setDoubleValue(1.0e50);
     1797  parameters[numberParameters - 1].setLonghelp(
     1798    "All solutions must be better than this value (in a minimization sense).  \
    19181799This is also set by code whenever it obtains a solution and is set to value of \
    1919 objective for solution minus cutoff increment."
    1920      );
    1921      parameters[numberParameters++] =
    1922           CbcOrClpParam("cuts!OnOff", "Switches all cuts on or off",
    1923                         "off", CBC_PARAM_STR_CUTSSTRATEGY);
    1924      parameters[numberParameters-1].append("on");
    1925      parameters[numberParameters-1].append("root");
    1926      parameters[numberParameters-1].append("ifmove");
    1927      parameters[numberParameters-1].append("forceOn");
    1928      parameters[numberParameters-1].setLonghelp
    1929      (
    1930           "This can be used to switch on or off all cuts (apart from Reduce and Split).  Then you can do \
     1800objective for solution minus cutoff increment.");
     1801  parameters[numberParameters++] = CbcOrClpParam("cuts!OnOff", "Switches all cuts on or off",
     1802    "off", CBC_PARAM_STR_CUTSSTRATEGY);
     1803  parameters[numberParameters - 1].append("on");
     1804  parameters[numberParameters - 1].append("root");
     1805  parameters[numberParameters - 1].append("ifmove");
     1806  parameters[numberParameters - 1].append("forceOn");
     1807  parameters[numberParameters - 1].setLonghelp(
     1808    "This can be used to switch on or off all cuts (apart from Reduce and Split).  Then you can do \
    19311809individual ones off or on \
    1932 See branchAndCut for information on options."
    1933      );
    1934      parameters[numberParameters++] =
    1935           CbcOrClpParam("debug!In", "read valid solution from file",
    1936                         CLP_PARAM_ACTION_DEBUG, 7, 1);
    1937      parameters[numberParameters-1].setLonghelp
    1938      (
    1939           "This will read a solution file from the given file name.  It will use the default\
     1810See branchAndCut for information on options.");
     1811  parameters[numberParameters++] = CbcOrClpParam("debug!In", "read valid solution from file",
     1812    CLP_PARAM_ACTION_DEBUG, 7, 1);
     1813  parameters[numberParameters - 1].setLonghelp(
     1814    "This will read a solution file from the given file name.  It will use the default\
    19401815 directory given by 'directory'.  A name of '$' will use the previous value for the name.  This\
    19411816 is initialized to '', i.e. it must be set.\n\n\
     
    19431818The idea is that if you suspect a bad cut generator \
    19441819you can do a good run with debug set to 'create' and then switch on the cuts you suspect and \
    1945 re-run with debug set to 'debug.file'  The create case has same effect as saveSolution."
    1946      );
     1820re-run with debug set to 'debug.file'  The create case has same effect as saveSolution.");
    19471821#endif
    19481822#ifdef COIN_HAS_CLP
    1949      parameters[numberParameters++] =
    1950           CbcOrClpParam("decomp!ose", "Whether to try decomposition",
    1951                         -COIN_INT_MAX, COIN_INT_MAX, CLP_PARAM_INT_DECOMPOSE_BLOCKS, 1);
    1952      parameters[numberParameters-1].setLonghelp
    1953      (
    1954           "0 - off, 1 choose blocks >1 use as blocks \
     1823  parameters[numberParameters++] = CbcOrClpParam("decomp!ose", "Whether to try decomposition",
     1824    -COIN_INT_MAX, COIN_INT_MAX, CLP_PARAM_INT_DECOMPOSE_BLOCKS, 1);
     1825  parameters[numberParameters - 1].setLonghelp(
     1826    "0 - off, 1 choose blocks >1 use as blocks \
    19551827Dantzig Wolfe if primal, Benders if dual \
    1956 - uses sprint pass for number of passes"
    1957      );
    1958      parameters[numberParameters-1].setIntValue(0);
    1959 #if CLP_MULTIPLE_FACTORIZATIONS >0
    1960      parameters[numberParameters++] =
    1961           CbcOrClpParam("dense!Threshold", "Whether to use dense factorization",
    1962                         -1, 10000, CBC_PARAM_INT_DENSE, 1);
    1963      parameters[numberParameters-1].setLonghelp
    1964      (
    1965           "If processed problem <= this use dense factorization"
    1966      );
    1967      parameters[numberParameters-1].setIntValue(-1);
    1968 #endif
    1969 #endif
    1970 #ifdef COIN_HAS_CBC
    1971      parameters[numberParameters++] =
    1972           CbcOrClpParam("depth!MiniBab", "Depth at which to try mini BAB",
    1973                         -COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_DEPTHMINIBAB);
    1974      parameters[numberParameters-1].setIntValue(-1);
    1975      parameters[numberParameters-1].setLonghelp
    1976      (
    1977           "Rather a complicated parameter but can be useful. -1 means off for large problems but on as if -12 for problems where rows+columns<500, -2 \
    1978 means use Cplex if it is linked in.  Otherwise if negative then go into depth first complete search fast branch and bound when depth>= -value-2 (so -3 will use this at depth>=1).  This mode is only switched on after 500 nodes.  If you really want to switch it off for small problems then set this to -999.  If >=0 the value doesn't matter very much.  The code will do approximately 100 nodes of fast branch and bound every now and then at depth>=5.  The actual logic is too twisted to describe here."
    1979      );
    1980      parameters[numberParameters++] =
    1981           CbcOrClpParam("dextra3", "Extra double parameter 3",
    1982                         -1.0e100, 1.0e100, CBC_PARAM_DBL_DEXTRA3, 0);
    1983      parameters[numberParameters-1].setDoubleValue(0.0);
    1984      parameters[numberParameters++] =
    1985           CbcOrClpParam("dextra4", "Extra double parameter 4",
    1986                         -1.0e100, 1.0e100, CBC_PARAM_DBL_DEXTRA4, 0);
    1987      parameters[numberParameters-1].setDoubleValue(0.0);
    1988      parameters[numberParameters++] =
    1989           CbcOrClpParam("dextra5", "Extra double parameter 5",
    1990                         -1.0e100, 1.0e100, CBC_PARAM_DBL_DEXTRA5, 0);
    1991      parameters[numberParameters-1].setDoubleValue(0.0);
    1992      parameters[numberParameters++] =
    1993           CbcOrClpParam("Dins", "Whether to try Distance Induced Neighborhood Search",
    1994                         "off", CBC_PARAM_STR_DINS);
    1995      parameters[numberParameters-1].append("on");
    1996      parameters[numberParameters-1].append("both");
    1997      parameters[numberParameters-1].append("before");
    1998      parameters[numberParameters-1].append("often");
    1999      parameters[numberParameters-1].setLonghelp
    2000      (
    2001           "This switches on Distance induced neighborhood Search. \
    2002 See Rounding for meaning of on,both,before"
    2003      );
    2004 #endif
    2005      parameters[numberParameters++] =
    2006           CbcOrClpParam("direction", "Minimize or Maximize",
    2007                         "min!imize", CLP_PARAM_STR_DIRECTION);
    2008      parameters[numberParameters-1].append("max!imize");
    2009      parameters[numberParameters-1].append("zero");
    2010      parameters[numberParameters-1].setLonghelp
    2011      (
    2012           "The default is minimize - use 'direction maximize' for maximization.\n\
    2013 You can also use the parameters 'maximize' or 'minimize'."
    2014      );
    2015      parameters[numberParameters++] =
    2016           CbcOrClpParam("directory", "Set Default directory for import etc.",
    2017                         CLP_PARAM_ACTION_DIRECTORY);
    2018      parameters[numberParameters-1].setLonghelp
    2019      (
    2020           "This sets the directory which import, export, saveModel, restoreModel etc will use.\
    2021   It is initialized to './'"
    2022      );
    2023      parameters[numberParameters++] =
    2024           CbcOrClpParam("dirSample", "Set directory where the COIN-OR sample problems are.",
    2025                         CLP_PARAM_ACTION_DIRSAMPLE, 7, 1);
    2026      parameters[numberParameters-1].setLonghelp
    2027      (
    2028           "This sets the directory where the COIN-OR sample problems reside. It is\
     1828- uses sprint pass for number of passes");
     1829  parameters[numberParameters - 1].setIntValue(0);
     1830#if CLP_MULTIPLE_FACTORIZATIONS > 0
     1831  parameters[numberParameters++] = CbcOrClpParam("dense!Threshold", "Whether to use dense factorization",
     1832    -1, 10000, CBC_PARAM_INT_DENSE, 1);
     1833  parameters[numberParameters - 1].setLonghelp(
     1834    "If processed problem <= this use dense factorization");
     1835  parameters[numberParameters - 1].setIntValue(-1);
     1836#endif
     1837#endif
     1838#ifdef COIN_HAS_CBC
     1839  parameters[numberParameters++] = CbcOrClpParam("depth!MiniBab", "Depth at which to try mini BAB",
     1840    -COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_DEPTHMINIBAB);
     1841  parameters[numberParameters - 1].setIntValue(-1);
     1842  parameters[numberParameters - 1].setLonghelp(
     1843    "Rather a complicated parameter but can be useful. -1 means off for large problems but on as if -12 for problems where rows+columns<500, -2 \
     1844means use Cplex if it is linked in.  Otherwise if negative then go into depth first complete search fast branch and bound when depth>= -value-2 (so -3 will use this at depth>=1).  This mode is only switched on after 500 nodes.  If you really want to switch it off for small problems then set this to -999.  If >=0 the value doesn't matter very much.  The code will do approximately 100 nodes of fast branch and bound every now and then at depth>=5.  The actual logic is too twisted to describe here.");
     1845  parameters[numberParameters++] = CbcOrClpParam("dextra3", "Extra double parameter 3",
     1846    -1.0e100, 1.0e100, CBC_PARAM_DBL_DEXTRA3, 0);
     1847  parameters[numberParameters - 1].setDoubleValue(0.0);
     1848  parameters[numberParameters++] = CbcOrClpParam("dextra4", "Extra double parameter 4",
     1849    -1.0e100, 1.0e100, CBC_PARAM_DBL_DEXTRA4, 0);
     1850  parameters[numberParameters - 1].setDoubleValue(0.0);
     1851  parameters[numberParameters++] = CbcOrClpParam("dextra5", "Extra double parameter 5",
     1852    -1.0e100, 1.0e100, CBC_PARAM_DBL_DEXTRA5, 0);
     1853  parameters[numberParameters - 1].setDoubleValue(0.0);
     1854  parameters[numberParameters++] = CbcOrClpParam("Dins", "Whether to try Distance Induced Neighborhood Search",
     1855    "off", CBC_PARAM_STR_DINS);
     1856  parameters[numberParameters - 1].append("on");
     1857  parameters[numberParameters - 1].append("both");
     1858  parameters[numberParameters - 1].append("before");
     1859  parameters[numberParameters - 1].append("often");
     1860  parameters[numberParameters - 1].setLonghelp(
     1861    "This switches on Distance induced neighborhood Search. \
     1862See Rounding for meaning of on,both,before");
     1863#endif
     1864  parameters[numberParameters++] = CbcOrClpParam("direction", "Minimize or Maximize",
     1865    "min!imize", CLP_PARAM_STR_DIRECTION);
     1866  parameters[numberParameters - 1].append("max!imize");
     1867  parameters[numberParameters - 1].append("zero");
     1868  parameters[numberParameters - 1].setLonghelp(
     1869    "The default is minimize - use 'direction maximize' for maximization.\n\
     1870You can also use the parameters 'maximize' or 'minimize'.");
     1871  parameters[numberParameters++] = CbcOrClpParam("directory", "Set Default directory for import etc.",
     1872    CLP_PARAM_ACTION_DIRECTORY);
     1873  parameters[numberParameters - 1].setLonghelp(
     1874    "This sets the directory which import, export, saveModel, restoreModel etc will use.\
     1875  It is initialized to './'");
     1876  parameters[numberParameters++] = CbcOrClpParam("dirSample", "Set directory where the COIN-OR sample problems are.",
     1877    CLP_PARAM_ACTION_DIRSAMPLE, 7, 1);
     1878  parameters[numberParameters - 1].setLonghelp(
     1879    "This sets the directory where the COIN-OR sample problems reside. It is\
    20291880 used only when -unitTest is passed to clp. clp will pick up the test problems\
    20301881 from this directory.\
    2031  It is initialized to '../../Data/Sample'"
    2032      );
    2033      parameters[numberParameters++] =
    2034           CbcOrClpParam("dirNetlib", "Set directory where the netlib problems are.",
    2035                         CLP_PARAM_ACTION_DIRNETLIB, 7, 1);
    2036      parameters[numberParameters-1].setLonghelp
    2037      (
    2038           "This sets the directory where the netlib problems reside. One can get\
     1882 It is initialized to '../../Data/Sample'");
     1883  parameters[numberParameters++] = CbcOrClpParam("dirNetlib", "Set directory where the netlib problems are.",
     1884    CLP_PARAM_ACTION_DIRNETLIB, 7, 1);
     1885  parameters[numberParameters - 1].setLonghelp(
     1886    "This sets the directory where the netlib problems reside. One can get\
    20391887 the netlib problems from COIN-OR or from the main netlib site. This\
    20401888 parameter is used only when -netlib is passed to clp. clp will pick up the\
    20411889 netlib problems from this directory. If clp is built without zlib support\
    20421890 then the problems must be uncompressed.\
    2043  It is initialized to '../../Data/Netlib'"
    2044      );
    2045      parameters[numberParameters++] =
    2046           CbcOrClpParam("dirMiplib", "Set directory where the miplib 2003 problems are.",
    2047                         CBC_PARAM_ACTION_DIRMIPLIB, 7, 1);
    2048      parameters[numberParameters-1].setLonghelp
    2049      (
    2050           "This sets the directory where the miplib 2003 problems reside. One can\
     1891 It is initialized to '../../Data/Netlib'");
     1892  parameters[numberParameters++] = CbcOrClpParam("dirMiplib", "Set directory where the miplib 2003 problems are.",
     1893    CBC_PARAM_ACTION_DIRMIPLIB, 7, 1);
     1894  parameters[numberParameters - 1].setLonghelp(
     1895    "This sets the directory where the miplib 2003 problems reside. One can\
    20511896 get the miplib problems from COIN-OR or from the main miplib site. This\
    20521897 parameter is used only when -miplib is passed to cbc. cbc will pick up the\
    20531898 miplib problems from this directory. If cbc is built without zlib support\
    20541899 then the problems must be uncompressed.\
    2055  It is initialized to '../../Data/miplib3'"
    2056      );
    2057 #ifdef COIN_HAS_CBC
    2058      parameters[numberParameters++] =
    2059           CbcOrClpParam("diveO!pt", "Diving options",
    2060                         -1, 200000, CBC_PARAM_INT_DIVEOPT, 1);
    2061      parameters[numberParameters-1].setLonghelp
    2062      (
    2063           "If >2 && <20 then modify diving options - \
     1900 It is initialized to '../../Data/miplib3'");
     1901#ifdef COIN_HAS_CBC
     1902  parameters[numberParameters++] = CbcOrClpParam("diveO!pt", "Diving options",
     1903    -1, 200000, CBC_PARAM_INT_DIVEOPT, 1);
     1904  parameters[numberParameters - 1].setLonghelp(
     1905    "If >2 && <20 then modify diving options - \
    20641906         \n\t3 only at root and if no solution,  \
    20651907         \n\t4 only at root and if this heuristic has not got solution, \
     
    20681910         \n\t7 run up to 2 times if solution found 4 otherwise, \
    20691911         \n\t>10 All only at root (DivingC normal as value-10), \
    2070          \n\t>20 All with value-20)."
    2071      );
    2072      parameters[numberParameters-1].setIntValue(-1);
    2073      parameters[numberParameters++] =
    2074           CbcOrClpParam("diveS!olves", "Diving solve option",
    2075                         -1, 200000, CBC_PARAM_INT_DIVEOPTSOLVES, 1);
    2076      parameters[numberParameters-1].setLonghelp
    2077      (
    2078           "If >0 then do up to this many solves.  Last digit is ignored \
     1912         \n\t>20 All with value-20).");
     1913  parameters[numberParameters - 1].setIntValue(-1);
     1914  parameters[numberParameters++] = CbcOrClpParam("diveS!olves", "Diving solve option",
     1915    -1, 200000, CBC_PARAM_INT_DIVEOPTSOLVES, 1);
     1916  parameters[numberParameters - 1].setLonghelp(
     1917    "If >0 then do up to this many solves.  Last digit is ignored \
    20791918and used for extra options - \
    20801919         \n\t1-3 allow fixing of satisfied integers (but not at bound) \
    20811920         \n\t1 switch off above for that dive if goes infeasible \
    2082          \n\t2 switch off above permanently if goes infeasible"
    2083      );
    2084      parameters[numberParameters-1].setIntValue(100);
    2085      parameters[numberParameters++] =
    2086           CbcOrClpParam("DivingS!ome", "Whether to try Diving heuristics",
    2087                         "off", CBC_PARAM_STR_DIVINGS);
    2088      parameters[numberParameters-1].append("on");
    2089      parameters[numberParameters-1].append("both");
    2090      parameters[numberParameters-1].append("before");
    2091      parameters[numberParameters-1].setLonghelp
    2092      (
    2093           "This switches on a random diving heuristic at various times. \
     1921         \n\t2 switch off above permanently if goes infeasible");
     1922  parameters[numberParameters - 1].setIntValue(100);
     1923  parameters[numberParameters++] = CbcOrClpParam("DivingS!ome", "Whether to try Diving heuristics",
     1924    "off", CBC_PARAM_STR_DIVINGS);
     1925  parameters[numberParameters - 1].append("on");
     1926  parameters[numberParameters - 1].append("both");
     1927  parameters[numberParameters - 1].append("before");
     1928  parameters[numberParameters - 1].setLonghelp(
     1929    "This switches on a random diving heuristic at various times. \
    20941930C - Coefficient, F - Fractional, G - Guided, L - LineSearch, P - PseudoCost, V - VectorLength. \
    20951931You may prefer to use individual on/off \
    2096 See Rounding for meaning of on,both,before"
    2097      );
    2098      parameters[numberParameters++] =
    2099           CbcOrClpParam("DivingC!oefficient", "Whether to try DiveCoefficient",
    2100                         "off", CBC_PARAM_STR_DIVINGC);
    2101      parameters[numberParameters-1].append("on");
    2102      parameters[numberParameters-1].append("both");
    2103      parameters[numberParameters-1].append("before");
    2104      parameters[numberParameters++] =
    2105           CbcOrClpParam("DivingF!ractional", "Whether to try DiveFractional",
    2106                         "off", CBC_PARAM_STR_DIVINGF);
    2107      parameters[numberParameters-1].append("on");
    2108      parameters[numberParameters-1].append("both");
    2109      parameters[numberParameters-1].append("before");
    2110      parameters[numberParameters++] =
    2111           CbcOrClpParam("DivingG!uided", "Whether to try DiveGuided",
    2112                         "off", CBC_PARAM_STR_DIVINGG);
    2113      parameters[numberParameters-1].append("on");
    2114      parameters[numberParameters-1].append("both");
    2115      parameters[numberParameters-1].append("before");
    2116      parameters[numberParameters++] =
    2117           CbcOrClpParam("DivingL!ineSearch", "Whether to try DiveLineSearch",
    2118                         "off", CBC_PARAM_STR_DIVINGL);
    2119      parameters[numberParameters-1].append("on");
    2120      parameters[numberParameters-1].append("both");
    2121      parameters[numberParameters-1].append("before");
    2122      parameters[numberParameters++] =
    2123           CbcOrClpParam("DivingP!seudoCost", "Whether to try DivePseudoCost",
    2124                         "off", CBC_PARAM_STR_DIVINGP);
    2125      parameters[numberParameters-1].append("on");
    2126      parameters[numberParameters-1].append("both");
    2127      parameters[numberParameters-1].append("before");
    2128      parameters[numberParameters++] =
    2129           CbcOrClpParam("DivingV!ectorLength", "Whether to try DiveVectorLength",
    2130                         "off", CBC_PARAM_STR_DIVINGV);
    2131      parameters[numberParameters-1].append("on");
    2132      parameters[numberParameters-1].append("both");
    2133      parameters[numberParameters-1].append("before");
    2134      parameters[numberParameters++] =
    2135           CbcOrClpParam("doH!euristic", "Do heuristics before any preprocessing",
    2136                         CBC_PARAM_ACTION_DOHEURISTIC, 3);
    2137      parameters[numberParameters-1].setLonghelp
    2138      (
    2139           "Normally heuristics are done in branch and bound.  It may be useful to do them outside. \
     1932See Rounding for meaning of on,both,before");
     1933  parameters[numberParameters++] = CbcOrClpParam("DivingC!oefficient", "Whether to try DiveCoefficient",
     1934    "off", CBC_PARAM_STR_DIVINGC);
     1935  parameters[numberParameters - 1].append("on");
     1936  parameters[numberParameters - 1].append("both");
     1937  parameters[numberParameters - 1].append("before");
     1938  parameters[numberParameters++] = CbcOrClpParam("DivingF!ractional", "Whether to try DiveFractional",
     1939    "off", CBC_PARAM_STR_DIVINGF);
     1940  parameters[numberParameters - 1].append("on");
     1941  parameters[numberParameters - 1].append("both");
     1942  parameters[numberParameters - 1].append("before");
     1943  parameters[numberParameters++] = CbcOrClpParam("DivingG!uided", "Whether to try DiveGuided",
     1944    "off", CBC_PARAM_STR_DIVINGG);
     1945  parameters[numberParameters - 1].append("on");
     1946  parameters[numberParameters - 1].append("both");
     1947  parameters[numberParameters - 1].append("before");
     1948  parameters[numberParameters++] = CbcOrClpParam("DivingL!ineSearch", "Whether to try DiveLineSearch",
     1949    "off", CBC_PARAM_STR_DIVINGL);
     1950  parameters[numberParameters - 1].append("on");
     1951  parameters[numberParameters - 1].append("both");
     1952  parameters[numberParameters - 1].append("before");
     1953  parameters[numberParameters++] = CbcOrClpParam("DivingP!seudoCost", "Whether to try DivePseudoCost",
     1954    "off", CBC_PARAM_STR_DIVINGP);
     1955  parameters[numberParameters - 1].append("on");
     1956  parameters[numberParameters - 1].append("both");
     1957  parameters[numberParameters - 1].append("before");
     1958  parameters[numberParameters++] = CbcOrClpParam("DivingV!ectorLength", "Whether to try DiveVectorLength",
     1959    "off", CBC_PARAM_STR_DIVINGV);
     1960  parameters[numberParameters - 1].append("on");
     1961  parameters[numberParameters - 1].append("both");
     1962  parameters[numberParameters - 1].append("before");
     1963  parameters[numberParameters++] = CbcOrClpParam("doH!euristic", "Do heuristics before any preprocessing",
     1964    CBC_PARAM_ACTION_DOHEURISTIC, 3);
     1965  parameters[numberParameters - 1].setLonghelp(
     1966    "Normally heuristics are done in branch and bound.  It may be useful to do them outside. \
    21401967Only those heuristics with 'both' or 'before' set will run.  \
    2141 Doing this may also set cutoff, which can help with preprocessing."
    2142      );
     1968Doing this may also set cutoff, which can help with preprocessing.");
    21431969#endif
    21441970#ifdef COIN_HAS_CLP
    2145      parameters[numberParameters++] =
    2146           CbcOrClpParam("dualB!ound", "Initially algorithm acts as if no \
     1971  parameters[numberParameters++] = CbcOrClpParam("dualB!ound", "Initially algorithm acts as if no \
    21471972gap between bounds exceeds this value",
    2148                         1.0e-20, 1.0e12, CLP_PARAM_DBL_DUALBOUND);
    2149      parameters[numberParameters-1].setLonghelp
    2150      (
    2151           "The dual algorithm in Clp is a single phase algorithm as opposed to a two phase\
     1973    1.0e-20, 1.0e12, CLP_PARAM_DBL_DUALBOUND);
     1974  parameters[numberParameters - 1].setLonghelp(
     1975    "The dual algorithm in Clp is a single phase algorithm as opposed to a two phase\
    21521976 algorithm where you first get feasible then optimal.  If a problem has both upper and\
    21531977 lower bounds then it is trivial to get dual feasible by setting non basic variables\
     
    21571981 primal algorithm.  Too high a value may mean more iterations, while too low a bound means\
    21581982 the code may go all the way and then have to increase the bounds.  OSL had a heuristic to\
    2159  adjust bounds, maybe we need that here."
    2160      );
    2161      parameters[numberParameters++] =
    2162           CbcOrClpParam("dualize", "Solves dual reformulation",
    2163                         0, 4, CLP_PARAM_INT_DUALIZE, 1);
    2164      parameters[numberParameters-1].setLonghelp
    2165      (
    2166           "Don't even think about it."
    2167      );
    2168      parameters[numberParameters++] =
    2169           CbcOrClpParam("dualP!ivot", "Dual pivot choice algorithm",
    2170                         "auto!matic", CLP_PARAM_STR_DUALPIVOT, 7, 1);
    2171      parameters[numberParameters-1].append("dant!zig");
    2172      parameters[numberParameters-1].append("partial");
    2173      parameters[numberParameters-1].append("steep!est");
    2174      parameters[numberParameters-1].append("PEsteep!est");
    2175      parameters[numberParameters-1].append("PEdantzig");
    2176      parameters[numberParameters-1].setLonghelp
    2177      (
    2178           "Clp can use any pivot selection algorithm which the user codes as long as it\
     1983 adjust bounds, maybe we need that here.");
     1984  parameters[numberParameters++] = CbcOrClpParam("dualize", "Solves dual reformulation",
     1985    0, 4, CLP_PARAM_INT_DUALIZE, 1);
     1986  parameters[numberParameters - 1].setLonghelp(
     1987    "Don't even think about it.");
     1988  parameters[numberParameters++] = CbcOrClpParam("dualP!ivot", "Dual pivot choice algorithm",
     1989    "auto!matic", CLP_PARAM_STR_DUALPIVOT, 7, 1);
     1990  parameters[numberParameters - 1].append("dant!zig");
     1991  parameters[numberParameters - 1].append("partial");
     1992  parameters[numberParameters - 1].append("steep!est");
     1993  parameters[numberParameters - 1].append("PEsteep!est");
     1994  parameters[numberParameters - 1].append("PEdantzig");
     1995  parameters[numberParameters - 1].setLonghelp(
     1996    "Clp can use any pivot selection algorithm which the user codes as long as it\
    21791997 implements the features in the abstract pivot base class.  The Dantzig method is implemented\
    21801998 to show a simple method but its use is deprecated.  Steepest is the method of choice and there\
     
    21832001 about the factorization. \n\
    21842002** NEWS - the Positive Edge criterion has been added. \
    2185 This selects incoming variables to try and avoid degenerate moves. See definition of psi."
    2186      );
    2187      parameters[numberParameters++] =
    2188           CbcOrClpParam("dualS!implex", "Do dual simplex algorithm",
    2189                         CLP_PARAM_ACTION_DUALSIMPLEX);
    2190      parameters[numberParameters-1].setLonghelp
    2191      (
    2192           "This command solves the continuous relaxation of the current model using the dual steepest edge algorithm.\
     2003This selects incoming variables to try and avoid degenerate moves. See definition of psi.");
     2004  parameters[numberParameters++] = CbcOrClpParam("dualS!implex", "Do dual simplex algorithm",
     2005    CLP_PARAM_ACTION_DUALSIMPLEX);
     2006  parameters[numberParameters - 1].setLonghelp(
     2007    "This command solves the continuous relaxation of the current model using the dual steepest edge algorithm.\
    21932008The time and iterations may be affected by settings such as presolve, scaling, crash\
    2194  and also by dual pivot method, fake bound on variables and dual and primal tolerances."
    2195      );
    2196 #endif
    2197      parameters[numberParameters++] =
    2198           CbcOrClpParam("dualT!olerance", "For an optimal solution \
     2009 and also by dual pivot method, fake bound on variables and dual and primal tolerances.");
     2010#endif
     2011  parameters[numberParameters++] = CbcOrClpParam("dualT!olerance", "For an optimal solution \
    21992012no dual infeasibility may exceed this value",
    2200                         1.0e-20, 1.0e12, CLP_PARAM_DBL_DUALTOLERANCE);
    2201      parameters[numberParameters-1].setLonghelp
    2202      (
    2203           "Normally the default tolerance is fine, but you may want to increase it a\
     2013    1.0e-20, 1.0e12, CLP_PARAM_DBL_DUALTOLERANCE);
     2014  parameters[numberParameters - 1].setLonghelp(
     2015    "Normally the default tolerance is fine, but you may want to increase it a\
    22042016 bit if a dual run seems to be having a hard time.  One method which can be faster is \
    22052017to use a large tolerance e.g. 1.0e-4 and dual and then clean up problem using primal and the \
    2206 correct tolerance (remembering to switch off presolve for this final short clean up phase)."
    2207      );
    2208 #ifdef COIN_HAS_CBC
    2209      parameters[numberParameters++] =
    2210           CbcOrClpParam("dw!Heuristic", "Whether to try DW heuristic",
    2211                         "off", CBC_PARAM_STR_DW);
    2212      parameters[numberParameters-1].append("on");
    2213      parameters[numberParameters-1].append("both");
    2214      parameters[numberParameters-1].append("before");
    2215      parameters[numberParameters-1].setLonghelp
    2216      (
    2217       "See Rounding for meaning of on,both,before"
    2218      );
     2018correct tolerance (remembering to switch off presolve for this final short clean up phase).");
     2019#ifdef COIN_HAS_CBC
     2020  parameters[numberParameters++] = CbcOrClpParam("dw!Heuristic", "Whether to try DW heuristic",
     2021    "off", CBC_PARAM_STR_DW);
     2022  parameters[numberParameters - 1].append("on");
     2023  parameters[numberParameters - 1].append("both");
     2024  parameters[numberParameters - 1].append("before");
     2025  parameters[numberParameters - 1].setLonghelp(
     2026    "See Rounding for meaning of on,both,before");
    22192027#endif
    22202028#ifdef COIN_HAS_CLP
    2221      parameters[numberParameters++] =
    2222           CbcOrClpParam("either!Simplex", "Do dual or primal simplex algorithm",
    2223                         CLP_PARAM_ACTION_EITHERSIMPLEX);
    2224      parameters[numberParameters-1].setLonghelp
    2225      (
    2226           "This command solves the continuous relaxation of the current model using the dual or primal algorithm,\
    2227  based on a dubious analysis of model."
    2228      );
    2229 #endif
    2230      parameters[numberParameters++] =
    2231           CbcOrClpParam("end", "Stops clp execution",
    2232                         CLP_PARAM_ACTION_EXIT);
    2233      parameters[numberParameters-1].setLonghelp
    2234      (
    2235           "This stops execution ; end, exit, quit and stop are synonyms"
    2236      );
    2237      parameters[numberParameters++] =
    2238           CbcOrClpParam("environ!ment", "Read commands from environment",
    2239                         CLP_PARAM_ACTION_ENVIRONMENT, 7, 0);
    2240      parameters[numberParameters-1].setLonghelp
    2241      (
    2242           "This starts reading from environment variable CBC_CLP_ENVIRONMENT."
    2243      );
    2244      parameters[numberParameters++] =
    2245           CbcOrClpParam("error!sAllowed", "Whether to allow import errors",
    2246                         "off", CLP_PARAM_STR_ERRORSALLOWED, 3);
    2247      parameters[numberParameters-1].append("on");
    2248      parameters[numberParameters-1].setLonghelp
    2249      (
    2250           "The default is not to use any model which had errors when reading the mps file.\
     2029  parameters[numberParameters++] = CbcOrClpParam("either!Simplex", "Do dual or primal simplex algorithm",
     2030    CLP_PARAM_ACTION_EITHERSIMPLEX);
     2031  parameters[numberParameters - 1].setLonghelp(
     2032    "This command solves the continuous relaxation of the current model using the dual or primal algorithm,\
     2033 based on a dubious analysis of model.");
     2034#endif
     2035  parameters[numberParameters++] = CbcOrClpParam("end", "Stops clp execution",
     2036    CLP_PARAM_ACTION_EXIT);
     2037  parameters[numberParameters - 1].setLonghelp(
     2038    "This stops execution ; end, exit, quit and stop are synonyms");
     2039  parameters[numberParameters++] = CbcOrClpParam("environ!ment", "Read commands from environment",
     2040    CLP_PARAM_ACTION_ENVIRONMENT, 7, 0);
     2041  parameters[numberParameters - 1].setLonghelp(
     2042    "This starts reading from environment variable CBC_CLP_ENVIRONMENT.");
     2043  parameters[numberParameters++] = CbcOrClpParam("error!sAllowed", "Whether to allow import errors",
     2044    "off", CLP_PARAM_STR_ERRORSALLOWED, 3);
     2045  parameters[numberParameters - 1].append("on");
     2046  parameters[numberParameters - 1].setLonghelp(
     2047    "The default is not to use any model which had errors when reading the mps file.\
    22512048  Setting this to 'on' will allow all errors from which the code can recover\
    22522049 simply by ignoring the error.  There are some errors from which the code can not recover \
    2253 e.g. no ENDATA.  This has to be set before import i.e. -errorsAllowed on -import xxxxxx.mps."
    2254      );
    2255      parameters[numberParameters++] =
    2256           CbcOrClpParam("exit", "Stops clp execution",
    2257                         CLP_PARAM_ACTION_EXIT);
    2258      parameters[numberParameters-1].setLonghelp
    2259      (
    2260           "This stops the execution of Clp, end, exit, quit and stop are synonyms"
    2261      );
    2262 #ifdef COIN_HAS_CBC
    2263      parameters[numberParameters++] =
    2264           CbcOrClpParam("exper!iment", "Whether to use testing features",
    2265                         -1, 200000, CBC_PARAM_INT_EXPERIMENT, 0);
    2266      parameters[numberParameters-1].setLonghelp
    2267      (
    2268           "Defines how adventurous you want to be in using new ideas. \
    2269 0 then no new ideas, 1 fairly sensible, 2 a bit dubious, 3 you are on your own!"
    2270      );
    2271      parameters[numberParameters-1].setIntValue(0);
    2272      parameters[numberParameters++] =
    2273           CbcOrClpParam("expensive!Strong", "Whether to do even more strong branching",
    2274                         0, COIN_INT_MAX, CBC_PARAM_INT_STRONG_STRATEGY, 0);
    2275      parameters[numberParameters-1].setLonghelp
    2276      (
    2277       "Strategy for extra strong branching \n\
     2050e.g. no ENDATA.  This has to be set before import i.e. -errorsAllowed on -import xxxxxx.mps.");
     2051  parameters[numberParameters++] = CbcOrClpParam("exit", "Stops clp execution",
     2052    CLP_PARAM_ACTION_EXIT);
     2053  parameters[numberParameters - 1].setLonghelp(
     2054    "This stops the execution of Clp, end, exit, quit and stop are synonyms");
     2055#ifdef COIN_HAS_CBC
     2056  parameters[numberParameters++] = CbcOrClpParam("exper!iment", "Whether to use testing features",
     2057    -1, 200000, CBC_PARAM_INT_EXPERIMENT, 0);
     2058  parameters[numberParameters - 1].setLonghelp(
     2059    "Defines how adventurous you want to be in using new ideas. \
     20600 then no new ideas, 1 fairly sensible, 2 a bit dubious, 3 you are on your own!");
     2061  parameters[numberParameters - 1].setIntValue(0);
     2062  parameters[numberParameters++] = CbcOrClpParam("expensive!Strong", "Whether to do even more strong branching",
     2063    0, COIN_INT_MAX, CBC_PARAM_INT_STRONG_STRATEGY, 0);
     2064  parameters[numberParameters - 1].setLonghelp(
     2065    "Strategy for extra strong branching \n\
    22782066\n\t0 - normal\n\
    22792067\n\twhen to do all fractional\n\
     
    22842072\n\twhen to do all including satisfied\n\
    22852073\n\t10 - root node etc.\n\
    2286 \n\tIf >=100 then do when depth <= strategy/100 (otherwise 5)"
    2287      );
    2288      parameters[numberParameters-1].setIntValue(0);
    2289 #endif
    2290      parameters[numberParameters++] =
    2291           CbcOrClpParam("export", "Export model as mps file",
    2292                         CLP_PARAM_ACTION_EXPORT);
    2293      parameters[numberParameters-1].setLonghelp
    2294      (
    2295           "This will write an MPS format file to the given file name.  It will use the default\
     2074\n\tIf >=100 then do when depth <= strategy/100 (otherwise 5)");
     2075  parameters[numberParameters - 1].setIntValue(0);
     2076#endif
     2077  parameters[numberParameters++] = CbcOrClpParam("export", "Export model as mps file",
     2078    CLP_PARAM_ACTION_EXPORT);
     2079  parameters[numberParameters - 1].setLonghelp(
     2080    "This will write an MPS format file to the given file name.  It will use the default\
    22962081 directory given by 'directory'.  A name of '$' will use the previous value for the name.  This\
    22972082 is initialized to 'default.mps'.  \
    2298 It can be useful to get rid of the original names and go over to using Rnnnnnnn and Cnnnnnnn.  This can be done by setting 'keepnames' off before importing mps file."
    2299      );
    2300 #ifdef COIN_HAS_CBC
    2301      parameters[numberParameters++] =
    2302           CbcOrClpParam("extra1", "Extra integer parameter 1",
    2303                         -COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_EXTRA1, 0);
    2304      parameters[numberParameters-1].setIntValue(-1);
    2305      parameters[numberParameters++] =
    2306           CbcOrClpParam("extra2", "Extra integer parameter 2",
    2307                         -100, COIN_INT_MAX, CBC_PARAM_INT_EXTRA2, 0);
    2308      parameters[numberParameters-1].setIntValue(-1);
    2309      parameters[numberParameters++] =
    2310           CbcOrClpParam("extra3", "Extra integer parameter 3",
    2311                         -1, COIN_INT_MAX, CBC_PARAM_INT_EXTRA3, 0);
    2312      parameters[numberParameters-1].setIntValue(-1);
    2313      parameters[numberParameters++] =
    2314           CbcOrClpParam("extra4", "Extra integer parameter 4",
    2315                         -1, COIN_INT_MAX, CBC_PARAM_INT_EXTRA4, 0);
    2316      parameters[numberParameters-1].setIntValue(-1);
    2317      parameters[numberParameters-1].setLonghelp
    2318      (
    2319           "This switches on yet more special options!! \
     2083It can be useful to get rid of the original names and go over to using Rnnnnnnn and Cnnnnnnn.  This can be done by setting 'keepnames' off before importing mps file.");
     2084#ifdef COIN_HAS_CBC
     2085  parameters[numberParameters++] = CbcOrClpParam("extra1", "Extra integer parameter 1",
     2086    -COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_EXTRA1, 0);
     2087  parameters[numberParameters - 1].setIntValue(-1);
     2088  parameters[numberParameters++] = CbcOrClpParam("extra2", "Extra integer parameter 2",
     2089    -100, COIN_INT_MAX, CBC_PARAM_INT_EXTRA2, 0);
     2090  parameters[numberParameters - 1].setIntValue(-1);
     2091  parameters[numberParameters++] = CbcOrClpParam("extra3", "Extra integer parameter 3",
     2092    -1, COIN_INT_MAX, CBC_PARAM_INT_EXTRA3, 0);
     2093  parameters[numberParameters - 1].setIntValue(-1);
     2094  parameters[numberParameters++] = CbcOrClpParam("extra4", "Extra integer parameter 4",
     2095    -1, COIN_INT_MAX, CBC_PARAM_INT_EXTRA4, 0);
     2096  parameters[numberParameters - 1].setIntValue(-1);
     2097  parameters[numberParameters - 1].setLonghelp(
     2098    "This switches on yet more special options!! \
    23202099The bottom digit is a strategy when to used shadow price stuff e.g. 3 \
    23212100means use until a solution is found.  The next two digits say what sort \
     
    23242103\n\t2,4,6000 - switches on experimental methods of stopping cuts\n\
    23252104\n\t8000 - increase minimum drop gradually\n\
    2326 \n\t16000 - switches on alternate gomory criterion"
    2327      );
    2328      parameters[numberParameters++] =
    2329        CbcOrClpParam("extraV!ariables", "Allow creation of extra integer variables",
    2330                      -COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_EXTRA_VARIABLES, 0);
    2331      parameters[numberParameters-1].setIntValue(0);
    2332      parameters[numberParameters-1].setLonghelp
    2333      (
    2334           "This switches on creation of extra integer variables \
    2335 to gather all variables with same cost."
    2336      );
     2105\n\t16000 - switches on alternate gomory criterion");
     2106  parameters[numberParameters++] = CbcOrClpParam("extraV!ariables", "Allow creation of extra integer variables",
     2107    -COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_EXTRA_VARIABLES, 0);
     2108  parameters[numberParameters - 1].setIntValue(0);
     2109  parameters[numberParameters - 1].setLonghelp(
     2110    "This switches on creation of extra integer variables \
     2111to gather all variables with same cost.");
    23372112#endif
    23382113#ifdef COIN_HAS_CLP
    2339      parameters[numberParameters++] =
    2340           CbcOrClpParam("fact!orization", "Which factorization to use",
    2341                         "normal", CLP_PARAM_STR_FACTORIZATION);
    2342      parameters[numberParameters-1].append("dense");
    2343      parameters[numberParameters-1].append("simple");
    2344      parameters[numberParameters-1].append("osl");
    2345      parameters[numberParameters-1].setLonghelp
    2346      (
     2114  parameters[numberParameters++] = CbcOrClpParam("fact!orization", "Which factorization to use",
     2115    "normal", CLP_PARAM_STR_FACTORIZATION);
     2116  parameters[numberParameters - 1].append("dense");
     2117  parameters[numberParameters - 1].append("simple");
     2118  parameters[numberParameters - 1].append("osl");
     2119  parameters[numberParameters - 1].setLonghelp(
    23472120#ifndef ABC_INHERIT
    2348           "The default is to use the normal CoinFactorization, but \
     2121    "The default is to use the normal CoinFactorization, but \
    23492122other choices are a dense one, osl's or one designed for small problems."
    23502123#else
    2351           "Normally the default is to use the normal CoinFactorization, but \
     2124    "Normally the default is to use the normal CoinFactorization, but \
    23522125other choices are a dense one, osl's or one designed for small problems. \
    23532126However if at Aboca then the default is CoinAbcFactorization and other choices are \
    23542127a dense one, one designed for small problems or if enabled a long factorization."
    23552128#endif
    2356      );
    2357      parameters[numberParameters++] =
    2358           CbcOrClpParam("fakeB!ound", "All bounds <= this value - DEBUG",
    2359                         1.0, 1.0e15, CLP_PARAM_ACTION_FAKEBOUND, 0);
    2360 #ifdef COIN_HAS_CBC
    2361      parameters[numberParameters++] =
    2362           CbcOrClpParam("feas!ibilityPump", "Whether to try Feasibility Pump",
    2363                         "off", CBC_PARAM_STR_FPUMP);
    2364      parameters[numberParameters-1].append("on");
    2365      parameters[numberParameters-1].append("both");
    2366      parameters[numberParameters-1].append("before");
    2367      parameters[numberParameters-1].setLonghelp
    2368      (
    2369           "This switches on feasibility pump heuristic at root. This is due to Fischetti, Lodi and Glover \
     2129  );
     2130  parameters[numberParameters++] = CbcOrClpParam("fakeB!ound", "All bounds <= this value - DEBUG",
     2131    1.0, 1.0e15, CLP_PARAM_ACTION_FAKEBOUND, 0);
     2132#ifdef COIN_HAS_CBC
     2133  parameters[numberParameters++] = CbcOrClpParam("feas!ibilityPump", "Whether to try Feasibility Pump",
     2134    "off", CBC_PARAM_STR_FPUMP);
     2135  parameters[numberParameters - 1].append("on");
     2136  parameters[numberParameters - 1].append("both");
     2137  parameters[numberParameters - 1].append("before");
     2138  parameters[numberParameters - 1].setLonghelp(
     2139    "This switches on feasibility pump heuristic at root. This is due to Fischetti, Lodi and Glover \
    23702140and uses a sequence of Lps to try and get an integer feasible solution. \
    23712141Some fine tuning is available by passFeasibilityPump and also pumpTune. \
    2372 See Rounding for meaning of on,both,before"
    2373      );
    2374      parameters[numberParameters++] =
    2375           CbcOrClpParam("fix!OnDj", "Try heuristic based on fixing variables with \
     2142See Rounding for meaning of on,both,before");
     2143  parameters[numberParameters++] = CbcOrClpParam("fix!OnDj", "Try heuristic based on fixing variables with \
    23762144reduced costs greater than this",
    2377                         -1.0e20, 1.0e20, CBC_PARAM_DBL_DJFIX, 1);
    2378      parameters[numberParameters-1].setLonghelp
    2379      (
    2380           "If this is set integer variables with reduced costs greater than this will be fixed \
    2381 before branch and bound - use with extreme caution!"
    2382      );
    2383      parameters[numberParameters++] =
    2384           CbcOrClpParam("flow!CoverCuts", "Whether to use Flow Cover cuts",
    2385                         "off", CBC_PARAM_STR_FLOWCUTS);
    2386      parameters[numberParameters-1].append("on");
    2387      parameters[numberParameters-1].append("root");
    2388      parameters[numberParameters-1].append("ifmove");
    2389      parameters[numberParameters-1].append("forceOn");
    2390      parameters[numberParameters-1].append("onglobal");
    2391      parameters[numberParameters-1].setFakeKeyWord(3);
    2392      parameters[numberParameters-1].setLonghelp
    2393      (
    2394           "This switches on flow cover cuts (either at root or in entire tree) \
     2145    -1.0e20, 1.0e20, CBC_PARAM_DBL_DJFIX, 1);
     2146  parameters[numberParameters - 1].setLonghelp(
     2147    "If this is set integer variables with reduced costs greater than this will be fixed \
     2148before branch and bound - use with extreme caution!");
     2149  parameters[numberParameters++] = CbcOrClpParam("flow!CoverCuts", "Whether to use Flow Cover cuts",
     2150    "off", CBC_PARAM_STR_FLOWCUTS);
     2151  parameters[numberParameters - 1].append("on");
     2152  parameters[numberParameters - 1].append("root");
     2153  parameters[numberParameters - 1].append("ifmove");
     2154  parameters[numberParameters - 1].append("forceOn");
     2155  parameters[numberParameters - 1].append("onglobal");
     2156  parameters[numberParameters - 1].setFakeKeyWord(3);
     2157  parameters[numberParameters - 1].setLonghelp(
     2158    "This switches on flow cover cuts (either at root or in entire tree) \
    23952159See branchAndCut for information on options. \
    2396 Can also enter testing values by plusnn (==ifmove)"
    2397      );
    2398      parameters[numberParameters++] =
    2399           CbcOrClpParam("force!Solution", "Whether to use given solution as crash for BAB",
    2400                         -1, 20000000, CLP_PARAM_INT_USESOLUTION);
    2401      parameters[numberParameters-1].setIntValue(-1);
    2402      parameters[numberParameters-1].setLonghelp
    2403      (
    2404           "-1 off.  If 1 then tries to branch to solution given by AMPL or priorities file. \
     2160Can also enter testing values by plusnn (==ifmove)");
     2161  parameters[numberParameters++] = CbcOrClpParam("force!Solution", "Whether to use given solution as crash for BAB",
     2162    -1, 20000000, CLP_PARAM_INT_USESOLUTION);
     2163  parameters[numberParameters - 1].setIntValue(-1);
     2164  parameters[numberParameters - 1].setLonghelp(
     2165    "-1 off.  If 1 then tries to branch to solution given by AMPL or priorities file. \
    24052166If 0 then just tries to set as best solution \
    2406 If >1 then also does that many nodes on fixed problem."
    2407      );
    2408      parameters[numberParameters++] =
    2409           CbcOrClpParam("fraction!forBAB", "Fraction in feasibility pump",
    2410                         1.0e-5, 1.1, CBC_PARAM_DBL_SMALLBAB, 1);
    2411      parameters[numberParameters-1].setDoubleValue(0.5);
    2412      parameters[numberParameters-1].setLonghelp
    2413      (
    2414           "After a pass in feasibility pump, variables which have not moved \
     2167If >1 then also does that many nodes on fixed problem.");
     2168  parameters[numberParameters++] = CbcOrClpParam("fraction!forBAB", "Fraction in feasibility pump",
     2169    1.0e-5, 1.1, CBC_PARAM_DBL_SMALLBAB, 1);
     2170  parameters[numberParameters - 1].setDoubleValue(0.5);
     2171  parameters[numberParameters - 1].setLonghelp(
     2172    "After a pass in feasibility pump, variables which have not moved \
    24152173about are fixed and if the preprocessed model is small enough a few nodes \
    2416 of branch and bound are done on reduced problem.  Small problem has to be less than this fraction of original."
    2417      );
    2418 #endif
    2419      parameters[numberParameters++] =
    2420           CbcOrClpParam("gamma!(Delta)", "Whether to regularize barrier",
    2421                         "off", CLP_PARAM_STR_GAMMA, 7, 1);
    2422      parameters[numberParameters-1].append("on");
    2423      parameters[numberParameters-1].append("gamma");
    2424      parameters[numberParameters-1].append("delta");
    2425      parameters[numberParameters-1].append("onstrong");
    2426      parameters[numberParameters-1].append("gammastrong");
    2427      parameters[numberParameters-1].append("deltastrong");
    2428 #endif
    2429 #ifdef COIN_HAS_CBC
    2430       parameters[numberParameters++] =
    2431           CbcOrClpParam("GMI!Cuts", "Whether to use alternative Gomory cuts",
    2432                         "off", CBC_PARAM_STR_GMICUTS);
    2433      parameters[numberParameters-1].append("on");
    2434      parameters[numberParameters-1].append("root");
    2435      parameters[numberParameters-1].append("ifmove");
    2436      parameters[numberParameters-1].append("forceOn");
    2437      parameters[numberParameters-1].append("endonly");
    2438      parameters[numberParameters-1].append("long");
    2439      parameters[numberParameters-1].append("longroot");
    2440      parameters[numberParameters-1].append("longifmove");
    2441      parameters[numberParameters-1].append("forceLongOn");
    2442      parameters[numberParameters-1].append("longendonly");
    2443      parameters[numberParameters-1].setLonghelp
    2444      (
    2445           "This switches on an alternative Gomory cut generator (either at root or in entire tree) \
     2174of branch and bound are done on reduced problem.  Small problem has to be less than this fraction of original.");
     2175#endif
     2176  parameters[numberParameters++] = CbcOrClpParam("gamma!(Delta)", "Whether to regularize barrier",
     2177    "off", CLP_PARAM_STR_GAMMA, 7, 1);
     2178  parameters[numberParameters - 1].append("on");
     2179  parameters[numberParameters - 1].append("gamma");
     2180  parameters[numberParameters - 1].append("delta");
     2181  parameters[numberParameters - 1].append("onstrong");
     2182  parameters[numberParameters - 1].append("gammastrong");
     2183  parameters[numberParameters - 1].append("deltastrong");
     2184#endif
     2185#ifdef COIN_HAS_CBC
     2186  parameters[numberParameters++] = CbcOrClpParam("GMI!Cuts", "Whether to use alternative Gomory cuts",
     2187    "off", CBC_PARAM_STR_GMICUTS);
     2188  parameters[numberParameters - 1].append("on");
     2189  parameters[numberParameters - 1].append("root");
     2190  parameters[numberParameters - 1].append("ifmove");
     2191  parameters[numberParameters - 1].append("forceOn");
     2192  parameters[numberParameters - 1].append("endonly");
     2193  parameters[numberParameters - 1].append("long");
     2194  parameters[numberParameters - 1].append("longroot");
     2195  parameters[numberParameters - 1].append("longifmove");
     2196  parameters[numberParameters - 1].append("forceLongOn");
     2197  parameters[numberParameters - 1].append("longendonly");
     2198  parameters[numberParameters - 1].setLonghelp(
     2199    "This switches on an alternative Gomory cut generator (either at root or in entire tree) \
    24462200This version is by Giacomo Nannicini and may be more robust \
    2447 See branchAndCut for information on options."
    2448      );
    2449      parameters[numberParameters++] =
    2450           CbcOrClpParam("gomory!Cuts", "Whether to use Gomory cuts",
    2451                         "off", CBC_PARAM_STR_GOMORYCUTS);
    2452      parameters[numberParameters-1].append("on");
    2453      parameters[numberParameters-1].append("root");
    2454      parameters[numberParameters-1].append("ifmove");
    2455      parameters[numberParameters-1].append("forceOn");
    2456      parameters[numberParameters-1].append("onglobal");
    2457      parameters[numberParameters-1].append("forceandglobal");
    2458      parameters[numberParameters-1].append("forceLongOn");
    2459      parameters[numberParameters-1].append("long");
    2460      parameters[numberParameters-1].setLonghelp
    2461      (
    2462           "The original cuts - beware of imitations!  Having gone out of favor, they are now more \
     2201See branchAndCut for information on options.");
     2202  parameters[numberParameters++] = CbcOrClpParam("gomory!Cuts", "Whether to use Gomory cuts",
     2203    "off", CBC_PARAM_STR_GOMORYCUTS);
     2204  parameters[numberParameters - 1].append("on");
     2205  parameters[numberParameters - 1].append("root");
     2206  parameters[numberParameters - 1].append("ifmove");
     2207  parameters[numberParameters - 1].append("forceOn");
     2208  parameters[numberParameters - 1].append("onglobal");
     2209  parameters[numberParameters - 1].append("forceandglobal");
     2210  parameters[numberParameters - 1].append("forceLongOn");
     2211  parameters[numberParameters - 1].append("long");
     2212  parameters[numberParameters - 1].setLonghelp(
     2213    "The original cuts - beware of imitations!  Having gone out of favor, they are now more \
    24632214fashionable as LP solvers are more robust and they interact well with other cuts.  They will almost always \
    24642215give cuts (although in this executable they are limited as to number of variables in cut).  \
    24652216However the cuts may be dense so it is worth experimenting (Long allows any length). \
    2466 See branchAndCut for information on options."
    2467      );
    2468      parameters[numberParameters++] =
    2469           CbcOrClpParam("greedy!Heuristic", "Whether to use a greedy heuristic",
    2470                         "off", CBC_PARAM_STR_GREEDY);
    2471      parameters[numberParameters-1].append("on");
    2472      parameters[numberParameters-1].append("both");
    2473      parameters[numberParameters-1].append("before");
    2474      //parameters[numberParameters-1].append("root");
    2475      parameters[numberParameters-1].setLonghelp
    2476      (
    2477           "Switches on a greedy heuristic which will try and obtain a solution.  It may just fix a \
     2217See branchAndCut for information on options.");
     2218  parameters[numberParameters++] = CbcOrClpParam("greedy!Heuristic", "Whether to use a greedy heuristic",
     2219    "off", CBC_PARAM_STR_GREEDY);
     2220  parameters[numberParameters - 1].append("on");
     2221  parameters[numberParameters - 1].append("both");
     2222  parameters[numberParameters - 1].append("before");
     2223  //parameters[numberParameters-1].append("root");
     2224  parameters[numberParameters - 1].setLonghelp(
     2225    "Switches on a greedy heuristic which will try and obtain a solution.  It may just fix a \
    24782226percentage of variables and then try a small branch and cut run. \
    2479 See Rounding for meaning of on,both,before"
    2480      );
    2481 #endif
    2482      parameters[numberParameters++] =
    2483           CbcOrClpParam("gsolu!tion", "Puts glpk solution to file",
    2484                         CLP_PARAM_ACTION_GMPL_SOLUTION);
    2485      parameters[numberParameters-1].setLonghelp
    2486      (
    2487           "Will write a glpk solution file to the given file name.  It will use the default\
     2227See Rounding for meaning of on,both,before");
     2228#endif
     2229  parameters[numberParameters++] = CbcOrClpParam("gsolu!tion", "Puts glpk solution to file",
     2230    CLP_PARAM_ACTION_GMPL_SOLUTION);
     2231  parameters[numberParameters - 1].setLonghelp(
     2232    "Will write a glpk solution file to the given file name.  It will use the default\
    24882233 directory given by 'directory'.  A name of '$' will use the previous value for the name.  This\
    24892234 is initialized to 'stdout' (this defaults to ordinary solution if stdout). \
    2490 If problem created from gmpl model - will do any reports."
    2491      );
    2492      parameters[numberParameters++] =
    2493           CbcOrClpParam("guess", "Guesses at good parameters",
    2494                         CLP_PARAM_ACTION_GUESS, 7);
    2495      parameters[numberParameters-1].setLonghelp
    2496      (
    2497           "This looks at model statistics and does an initial solve \
    2498 setting some parameters which may help you to think of possibilities."
    2499      );
    2500 #ifdef COIN_HAS_CBC
    2501      parameters[numberParameters++] =
    2502           CbcOrClpParam("heur!isticsOnOff", "Switches most heuristics on or off",
    2503                         "off", CBC_PARAM_STR_HEURISTICSTRATEGY);
    2504      parameters[numberParameters-1].append("on");
    2505      parameters[numberParameters-1].setLonghelp
    2506      (
    2507           "This can be used to switch on or off all heuristics.  Then you can do \
     2235If problem created from gmpl model - will do any reports.");
     2236  parameters[numberParameters++] = CbcOrClpParam("guess", "Guesses at good parameters",
     2237    CLP_PARAM_ACTION_GUESS, 7);
     2238  parameters[numberParameters - 1].setLonghelp(
     2239    "This looks at model statistics and does an initial solve \
     2240setting some parameters which may help you to think of possibilities.");
     2241#ifdef COIN_HAS_CBC
     2242  parameters[numberParameters++] = CbcOrClpParam("heur!isticsOnOff", "Switches most heuristics on or off",
     2243    "off", CBC_PARAM_STR_HEURISTICSTRATEGY);
     2244  parameters[numberParameters - 1].append("on");
     2245  parameters[numberParameters - 1].setLonghelp(
     2246    "This can be used to switch on or off all heuristics.  Then you can do \
    25082247individual ones off or on.  CbcTreeLocal is not included as it dramatically \
    2509 alters search."
    2510      );
    2511 #endif
    2512      parameters[numberParameters++] =
    2513           CbcOrClpParam("help", "Print out version, non-standard options and some help",
    2514                         CLP_PARAM_ACTION_HELP, 3);
    2515      parameters[numberParameters-1].setLonghelp
    2516      (
    2517           "This prints out some help to get user started.  If you have printed this then \
    2518 you should be past that stage:-)"
    2519      );
    2520 #ifdef COIN_HAS_CBC
    2521      parameters[numberParameters++] =
    2522           CbcOrClpParam("hOp!tions", "Heuristic options",
    2523                         -9999999, 9999999, CBC_PARAM_INT_HOPTIONS, 1);
    2524      parameters[numberParameters-1].setLonghelp
    2525      (
    2526           "1 says stop heuristic immediately allowable gap reached. \
     2248alters search.");
     2249#endif
     2250  parameters[numberParameters++] = CbcOrClpParam("help", "Print out version, non-standard options and some help",
     2251    CLP_PARAM_ACTION_HELP, 3);
     2252  parameters[numberParameters - 1].setLonghelp(
     2253    "This prints out some help to get user started.  If you have printed this then \
     2254you should be past that stage:-)");
     2255#ifdef COIN_HAS_CBC
     2256  parameters[numberParameters++] = CbcOrClpParam("hOp!tions", "Heuristic options",
     2257    -9999999, 9999999, CBC_PARAM_INT_HOPTIONS, 1);
     2258  parameters[numberParameters - 1].setLonghelp(
     2259    "1 says stop heuristic immediately allowable gap reached. \
    25272260Others are for feasibility pump - \
    252822612 says do exact number of passes given, \
    252922624 only applies if initial cutoff given and says relax after 50 passes, \
    2530 while 8 will adapt cutoff rhs after first solution if it looks as if code is stalling."
    2531      );
    2532      parameters[numberParameters-1].setIntValue(0);
    2533      parameters[numberParameters++] =
    2534           CbcOrClpParam("hot!StartMaxIts", "Maximum iterations on hot start",
    2535                         0, COIN_INT_MAX, CBC_PARAM_INT_MAXHOTITS);
     2263while 8 will adapt cutoff rhs after first solution if it looks as if code is stalling.");
     2264  parameters[numberParameters - 1].setIntValue(0);
     2265  parameters[numberParameters++] = CbcOrClpParam("hot!StartMaxIts", "Maximum iterations on hot start",
     2266    0, COIN_INT_MAX, CBC_PARAM_INT_MAXHOTITS);
    25362267#endif
    25372268#ifdef COIN_HAS_CLP
    2538      parameters[numberParameters++] =
    2539           CbcOrClpParam("idiot!Crash", "Whether to try idiot crash",
    2540                         -1, 99999999, CLP_PARAM_INT_IDIOT);
    2541      parameters[numberParameters-1].setLonghelp
    2542      (
    2543           "This is a type of 'crash' which works well on some homogeneous problems.\
     2269  parameters[numberParameters++] = CbcOrClpParam("idiot!Crash", "Whether to try idiot crash",
     2270    -1, 99999999, CLP_PARAM_INT_IDIOT);
     2271  parameters[numberParameters - 1].setLonghelp(
     2272    "This is a type of 'crash' which works well on some homogeneous problems.\
    25442273 It works best on problems with unit elements and rhs but will do something to any model.  It should only be\
    25452274 used before primal.  It can be set to -1 when the code decides for itself whether to use it,\
    2546  0 to switch off or n > 0 to do n passes."
    2547      );
    2548 #endif
    2549      parameters[numberParameters++] =
    2550           CbcOrClpParam("import", "Import model from mps file",
    2551                         CLP_PARAM_ACTION_IMPORT, 3);
    2552      parameters[numberParameters-1].setLonghelp
    2553      (
    2554           "This will read an MPS format file from the given file name.  It will use the default\
     2275 0 to switch off or n > 0 to do n passes.");
     2276#endif
     2277  parameters[numberParameters++] = CbcOrClpParam("import", "Import model from mps file",
     2278    CLP_PARAM_ACTION_IMPORT, 3);
     2279  parameters[numberParameters - 1].setLonghelp(
     2280    "This will read an MPS format file from the given file name.  It will use the default\
    25552281 directory given by 'directory'.  A name of '$' will use the previous value for the name.  This\
    25562282 is initialized to '', i.e. it must be set.  If you have libgz then it can read compressed\
    25572283 files 'xxxxxxxx.gz' or 'xxxxxxxx.bz2'.  \
    2558 If 'keepnames' is off, then names are dropped -> Rnnnnnnn and Cnnnnnnn."
    2559      );
    2560 #ifdef COIN_HAS_CBC
    2561      parameters[numberParameters++] =
    2562           CbcOrClpParam("inc!rement", "A valid solution must be at least this \
     2284If 'keepnames' is off, then names are dropped -> Rnnnnnnn and Cnnnnnnn.");
     2285#ifdef COIN_HAS_CBC
     2286  parameters[numberParameters++] = CbcOrClpParam("inc!rement", "A valid solution must be at least this \
    25632287much better than last integer solution",
    2564                         -1.0e20, 1.0e20, CBC_PARAM_DBL_INCREMENT);
    2565      parameters[numberParameters-1].setLonghelp
    2566      (
    2567           "Whenever a solution is found the bound on solutions is set to solution (in a minimization\
     2288    -1.0e20, 1.0e20, CBC_PARAM_DBL_INCREMENT);
     2289  parameters[numberParameters - 1].setLonghelp(
     2290    "Whenever a solution is found the bound on solutions is set to solution (in a minimization\
    25682291sense) plus this.  If it is not set then the code will try and work one out e.g. if \
    25692292all objective coefficients are multiples of 0.01 and only integer variables have entries in \
    2570 objective then this can be set to 0.01.  Be careful if you set this negative!"
    2571      );
    2572      parameters[numberParameters++] =
    2573           CbcOrClpParam("inf!easibilityWeight", "Each integer infeasibility is expected \
     2293objective then this can be set to 0.01.  Be careful if you set this negative!");
     2294  parameters[numberParameters++] = CbcOrClpParam("inf!easibilityWeight", "Each integer infeasibility is expected \
    25742295to cost this much",
    2575                         0.0, 1.0e20, CBC_PARAM_DBL_INFEASIBILITYWEIGHT, 1);
    2576      parameters[numberParameters-1].setLonghelp
    2577      (
    2578           "A primitive way of deciding which node to explore next.  Satisfying each integer infeasibility is \
    2579 expected to cost this much."
    2580      );
    2581      parameters[numberParameters++] =
    2582           CbcOrClpParam("initialS!olve", "Solve to continuous",
    2583                         CLP_PARAM_ACTION_SOLVECONTINUOUS);
    2584      parameters[numberParameters-1].setLonghelp
    2585      (
    2586           "This just solves the problem to continuous - without adding any cuts"
    2587      );
    2588      parameters[numberParameters++] =
    2589           CbcOrClpParam("integerT!olerance", "For an optimal solution \
     2296    0.0, 1.0e20, CBC_PARAM_DBL_INFEASIBILITYWEIGHT, 1);
     2297  parameters[numberParameters - 1].setLonghelp(
     2298    "A primitive way of deciding which node to explore next.  Satisfying each integer infeasibility is \
     2299expected to cost this much.");
     2300  parameters[numberParameters++] = CbcOrClpParam("initialS!olve", "Solve to continuous",
     2301    CLP_PARAM_ACTION_SOLVECONTINUOUS);
     2302  parameters[numberParameters - 1].setLonghelp(
     2303    "This just solves the problem to continuous - without adding any cuts");
     2304  parameters[numberParameters++] = CbcOrClpParam("integerT!olerance", "For an optimal solution \
    25902305no integer variable may be this away from an integer value",
    2591                         1.0e-20, 0.5, CBC_PARAM_DBL_INTEGERTOLERANCE);
    2592      parameters[numberParameters-1].setLonghelp
    2593      (
    2594           "Beware of setting this smaller than the primal tolerance."
    2595      );
     2306    1.0e-20, 0.5, CBC_PARAM_DBL_INTEGERTOLERANCE);
     2307  parameters[numberParameters - 1].setLonghelp(
     2308    "Beware of setting this smaller than the primal tolerance.");
    25962309#endif
    25972310#ifdef COIN_HAS_CLP
    2598      parameters[numberParameters++] =
    2599           CbcOrClpParam("keepN!ames", "Whether to keep names from import",
    2600                         "on", CLP_PARAM_STR_KEEPNAMES);
    2601      parameters[numberParameters-1].append("off");
    2602      parameters[numberParameters-1].setLonghelp
    2603      (
    2604           "It saves space to get rid of names so if you need to you can set this to off.  \
    2605 This needs to be set before the import of model - so -keepnames off -import xxxxx.mps."
    2606      );
    2607      parameters[numberParameters++] =
    2608           CbcOrClpParam("KKT", "Whether to use KKT factorization",
    2609                         "off", CLP_PARAM_STR_KKT, 7, 1);
    2610      parameters[numberParameters-1].append("on");
    2611 #endif
    2612 #ifdef COIN_HAS_CBC
    2613      parameters[numberParameters++] =
    2614           CbcOrClpParam("knapsack!Cuts", "Whether to use Knapsack cuts",
    2615                         "off", CBC_PARAM_STR_KNAPSACKCUTS);
    2616      parameters[numberParameters-1].append("on");
    2617      parameters[numberParameters-1].append("root");
    2618      parameters[numberParameters-1].append("ifmove");
    2619      parameters[numberParameters-1].append("forceOn");
    2620      parameters[numberParameters-1].append("onglobal");
    2621      parameters[numberParameters-1].append("forceandglobal");
    2622      parameters[numberParameters-1].setLonghelp
    2623      (
    2624           "This switches on knapsack cuts (either at root or in entire tree) \
    2625 See branchAndCut for information on options."
    2626      );
    2627      parameters[numberParameters++] =
    2628           CbcOrClpParam("lagomory!Cuts", "Whether to use Lagrangean Gomory cuts",
    2629                         "off", CBC_PARAM_STR_LAGOMORYCUTS);
    2630      parameters[numberParameters-1].append("endonlyroot");
    2631      parameters[numberParameters-1].append("endcleanroot");
    2632      parameters[numberParameters-1].append("root");
    2633      parameters[numberParameters-1].append("endonly");
    2634      parameters[numberParameters-1].append("endclean");
    2635      parameters[numberParameters-1].append("endboth");
    2636      parameters[numberParameters-1].append("onlyaswell");
    2637      parameters[numberParameters-1].append("cleanaswell");
    2638      parameters[numberParameters-1].append("bothaswell");
    2639      parameters[numberParameters-1].append("onlyinstead");
    2640      parameters[numberParameters-1].append("cleaninstead");
    2641      parameters[numberParameters-1].append("bothinstead");
    2642      parameters[numberParameters-1].append("onlyaswellroot");
    2643      parameters[numberParameters-1].append("cleanaswellroot");
    2644      parameters[numberParameters-1].append("bothaswellroot");
    2645      parameters[numberParameters-1].setLonghelp
    2646      (
    2647           "This is a gross simplification of 'A Relax-and-Cut Framework for Gomory's Mixed-Integer Cuts' \
     2311  parameters[numberParameters++] = CbcOrClpParam("keepN!ames", "Whether to keep names from import",
     2312    "on", CLP_PARAM_STR_KEEPNAMES);
     2313  parameters[numberParameters - 1].append("off");
     2314  parameters[numberParameters - 1].setLonghelp(
     2315    "It saves space to get rid of names so if you need to you can set this to off.  \
     2316This needs to be set before the import of model - so -keepnames off -import xxxxx.mps.");
     2317  parameters[numberParameters++] = CbcOrClpParam("KKT", "Whether to use KKT factorization",
     2318    "off", CLP_PARAM_STR_KKT, 7, 1);
     2319  parameters[numberParameters - 1].append("on");
     2320#endif
     2321#ifdef COIN_HAS_CBC
     2322  parameters[numberParameters++] = CbcOrClpParam("knapsack!Cuts", "Whether to use Knapsack cuts",
     2323    "off", CBC_PARAM_STR_KNAPSACKCUTS);
     2324  parameters[numberParameters - 1].append("on");
     2325  parameters[numberParameters - 1].append("root");
     2326  parameters[numberParameters - 1].append("ifmove");
     2327  parameters[numberParameters - 1].append("forceOn");
     2328  parameters[numberParameters - 1].append("onglobal");
     2329  parameters[numberParameters - 1].append("forceandglobal");
     2330  parameters[numberParameters - 1].setLonghelp(
     2331    "This switches on knapsack cuts (either at root or in entire tree) \
     2332See branchAndCut for information on options.");
     2333  parameters[numberParameters++] = CbcOrClpParam("lagomory!Cuts", "Whether to use Lagrangean Gomory cuts",
     2334    "off", CBC_PARAM_STR_LAGOMORYCUTS);
     2335  parameters[numberParameters - 1].append("endonlyroot");
     2336  parameters[numberParameters - 1].append("endcleanroot");
     2337  parameters[numberParameters - 1].append("root");
     2338  parameters[numberParameters - 1].append("endonly");
     2339  parameters[numberParameters - 1].append("endclean");
     2340  parameters[numberParameters - 1].append("endboth");
     2341  parameters[numberParameters - 1].append("onlyaswell");
     2342  parameters[numberParameters - 1].append("cleanaswell");
     2343  parameters[numberParameters - 1].append("bothaswell");
     2344  parameters[numberParameters - 1].append("onlyinstead");
     2345  parameters[numberParameters - 1].append("cleaninstead");
     2346  parameters[numberParameters - 1].append("bothinstead");
     2347  parameters[numberParameters - 1].append("onlyaswellroot");
     2348  parameters[numberParameters - 1].append("cleanaswellroot");
     2349  parameters[numberParameters - 1].append("bothaswellroot");
     2350  parameters[numberParameters - 1].setLonghelp(
     2351    "This is a gross simplification of 'A Relax-and-Cut Framework for Gomory's Mixed-Integer Cuts' \
    26482352by Matteo Fischetti & Domenico Salvagnin.  This simplification \
    26492353just uses original constraints while modifying objective using other cuts. \
     
    26532357'End' is recommended which waits until other cuts have finished and then \
    26542358does a few passes. \
    2655 The length options for gomory cuts are used."
    2656      );
    2657      parameters[numberParameters++] =
    2658           CbcOrClpParam("latwomir!Cuts", "Whether to use Lagrangean TwoMir cuts",
    2659                         "off", CBC_PARAM_STR_LATWOMIRCUTS);
    2660      parameters[numberParameters-1].append("endonlyroot");
    2661      parameters[numberParameters-1].append("endcleanroot");
    2662      parameters[numberParameters-1].append("endbothroot");
    2663      parameters[numberParameters-1].append("endonly");
    2664      parameters[numberParameters-1].append("endclean");
    2665      parameters[numberParameters-1].append("endboth");
    2666      parameters[numberParameters-1].append("onlyaswell");
    2667      parameters[numberParameters-1].append("cleanaswell");
    2668      parameters[numberParameters-1].append("bothaswell");
    2669      parameters[numberParameters-1].append("onlyinstead");
    2670      parameters[numberParameters-1].append("cleaninstead");
    2671      parameters[numberParameters-1].append("bothinstead");
    2672      parameters[numberParameters-1].setLonghelp
    2673      (
    2674           "This is a lagrangean relaxation for TwoMir cuts.  See \
    2675 lagomoryCuts for description of options."
    2676      );
    2677      parameters[numberParameters++] =
    2678           CbcOrClpParam("lift!AndProjectCuts", "Whether to use Lift and Project cuts",
    2679                         "off", CBC_PARAM_STR_LANDPCUTS);
    2680      parameters[numberParameters-1].append("on");
    2681      parameters[numberParameters-1].append("root");
    2682      parameters[numberParameters-1].append("ifmove");
    2683      parameters[numberParameters-1].append("forceOn");
    2684      parameters[numberParameters-1].setLonghelp
    2685      (
    2686           "Lift and project cuts. \
     2359The length options for gomory cuts are used.");
     2360  parameters[numberParameters++] = CbcOrClpParam("latwomir!Cuts", "Whether to use Lagrangean TwoMir cuts",
     2361    "off", CBC_PARAM_STR_LATWOMIRCUTS);
     2362  parameters[numberParameters - 1].append("endonlyroot");
     2363  parameters[numberParameters - 1].append("endcleanroot");
     2364  parameters[numberParameters - 1].append("endbothroot");
     2365  parameters[numberParameters - 1].append("endonly");
     2366  parameters[numberParameters - 1].append("endclean");
     2367  parameters[numberParameters - 1].append("endboth");
     2368  parameters[numberParameters - 1].append("onlyaswell");
     2369  parameters[numberParameters - 1].append("cleanaswell");
     2370  parameters[numberParameters - 1].append("bothaswell");
     2371  parameters[numberParameters - 1].append("onlyinstead");
     2372  parameters[numberParameters - 1].append("cleaninstead");
     2373  parameters[numberParameters - 1].append("bothinstead");
     2374  parameters[numberParameters - 1].setLonghelp(
     2375    "This is a lagrangean relaxation for TwoMir cuts.  See \
     2376lagomoryCuts for description of options.");
     2377  parameters[numberParameters++] = CbcOrClpParam("lift!AndProjectCuts", "Whether to use Lift and Project cuts",
     2378    "off", CBC_PARAM_STR_LANDPCUTS);
     2379  parameters[numberParameters - 1].append("on");
     2380  parameters[numberParameters - 1].append("root");
     2381  parameters[numberParameters - 1].append("ifmove");
     2382  parameters[numberParameters - 1].append("forceOn");
     2383  parameters[numberParameters - 1].setLonghelp(
     2384    "Lift and project cuts. \
    26872385May be slow \
    2688 See branchAndCut for information on options."
    2689      );
    2690      parameters[numberParameters++] =
    2691           CbcOrClpParam("local!TreeSearch", "Whether to use local treesearch",
    2692                         "off", CBC_PARAM_STR_LOCALTREE);
    2693      parameters[numberParameters-1].append("on");
    2694      parameters[numberParameters-1].setLonghelp
    2695      (
    2696           "This switches on a local search algorithm when a solution is found.  This is from \
     2386See branchAndCut for information on options.");
     2387  parameters[numberParameters++] = CbcOrClpParam("local!TreeSearch", "Whether to use local treesearch",
     2388    "off", CBC_PARAM_STR_LOCALTREE);
     2389  parameters[numberParameters - 1].append("on");
     2390  parameters[numberParameters - 1].setLonghelp(
     2391    "This switches on a local search algorithm when a solution is found.  This is from \
    26972392Fischetti and Lodi and is not really a heuristic although it can be used as one. \
    26982393When used from Coin solve it has limited functionality.  It is not switched on when \
    2699 heuristics are switched on."
    2700      );
     2394heuristics are switched on.");
    27012395#endif
    27022396#ifndef COIN_HAS_CBC
    2703      parameters[numberParameters++] =
    2704           CbcOrClpParam("log!Level", "Level of detail in Solver output",
    2705                         -1, 999999, CLP_PARAM_INT_SOLVERLOGLEVEL);
     2397  parameters[numberParameters++] = CbcOrClpParam("log!Level", "Level of detail in Solver output",
     2398    -1, 999999, CLP_PARAM_INT_SOLVERLOGLEVEL);
    27062399#else
    2707      parameters[numberParameters++] =
    2708           CbcOrClpParam("log!Level", "Level of detail in Coin branch and Cut output",
    2709                         -63, 63, CLP_PARAM_INT_LOGLEVEL);
    2710      parameters[numberParameters-1].setIntValue(1);
    2711 #endif
    2712      parameters[numberParameters-1].setLonghelp
    2713      (
    2714           "If 0 then there should be no output in normal circumstances.  1 is probably the best\
    2715  value for most uses, while 2 and 3 give more information."
    2716      );
    2717      parameters[numberParameters++] =
    2718           CbcOrClpParam("max!imize", "Set optimization direction to maximize",
    2719                         CLP_PARAM_ACTION_MAXIMIZE, 7);
    2720      parameters[numberParameters-1].setLonghelp
    2721      (
    2722           "The default is minimize - use 'maximize' for maximization.\n\
    2723 You can also use the parameters 'direction maximize'."
    2724      );
     2400  parameters[numberParameters++] = CbcOrClpParam("log!Level", "Level of detail in Coin branch and Cut output",
     2401    -63, 63, CLP_PARAM_INT_LOGLEVEL);
     2402  parameters[numberParameters - 1].setIntValue(1);
     2403#endif
     2404  parameters[numberParameters - 1].setLonghelp(
     2405    "If 0 then there should be no output in normal circumstances.  1 is probably the best\
     2406 value for most uses, while 2 and 3 give more information.");
     2407  parameters[numberParameters++] = CbcOrClpParam("max!imize", "Set optimization direction to maximize",
     2408    CLP_PARAM_ACTION_MAXIMIZE, 7);
     2409  parameters[numberParameters - 1].setLonghelp(
     2410    "The default is minimize - use 'maximize' for maximization.\n\
     2411You can also use the parameters 'direction maximize'.");
    27252412#ifdef COIN_HAS_CLP
    2726      parameters[numberParameters++] =
    2727           CbcOrClpParam("maxF!actor", "Maximum number of iterations between \
     2413  parameters[numberParameters++] = CbcOrClpParam("maxF!actor", "Maximum number of iterations between \
    27282414refactorizations",
    2729                         1, 999999, CLP_PARAM_INT_MAXFACTOR);
    2730      parameters[numberParameters-1].setLonghelp
    2731      (
    2732           "If this is at its initial value of 200 then in this executable clp will guess at a\
     2415    1, 999999, CLP_PARAM_INT_MAXFACTOR);
     2416  parameters[numberParameters - 1].setLonghelp(
     2417    "If this is at its initial value of 200 then in this executable clp will guess at a\
    27332418 value to use.  Otherwise the user can set a value.  The code may decide to re-factorize\
    2734  earlier for accuracy."
    2735      );
    2736      parameters[numberParameters++] =
    2737           CbcOrClpParam("maxIt!erations", "Maximum number of iterations before \
     2419 earlier for accuracy.");
     2420  parameters[numberParameters++] = CbcOrClpParam("maxIt!erations", "Maximum number of iterations before \
    27382421stopping",
    2739                         0, 2147483647, CLP_PARAM_INT_MAXITERATION);
    2740      parameters[numberParameters-1].setLonghelp
    2741      (
    2742           "This can be used for testing purposes.  The corresponding library call\n\
     2422    0, 2147483647, CLP_PARAM_INT_MAXITERATION);
     2423  parameters[numberParameters - 1].setLonghelp(
     2424    "This can be used for testing purposes.  The corresponding library call\n\
    27432425      \tsetMaximumIterations(value)\n can be useful.  If the code stops on\
    2744  seconds or by an interrupt this will be treated as stopping on maximum iterations.  This is ignored in branchAndCut - use maxN!odes."
    2745      );
    2746 #endif
    2747 #ifdef COIN_HAS_CBC
    2748      parameters[numberParameters++] =
    2749           CbcOrClpParam("maxN!odes", "Maximum number of nodes to do",
    2750                         -1, 2147483647, CBC_PARAM_INT_MAXNODES);
    2751      parameters[numberParameters-1].setLonghelp
    2752      (
    2753           "This is a repeatable way to limit search.  Normally using time is easier \
    2754 but then the results may not be repeatable."
    2755      );
    2756      parameters[numberParameters++] =
    2757           CbcOrClpParam("maxSaved!Solutions", "Maximum number of solutions to save",
    2758                         0, 2147483647, CBC_PARAM_INT_MAXSAVEDSOLS);
    2759      parameters[numberParameters-1].setLonghelp
    2760      (
    2761           "Number of solutions to save."
    2762      );
    2763      parameters[numberParameters++] =
    2764           CbcOrClpParam("maxSo!lutions", "Maximum number of solutions to get",
    2765                         1, 2147483647, CBC_PARAM_INT_MAXSOLS);
    2766      parameters[numberParameters-1].setLonghelp
    2767      (
    2768           "You may want to stop after (say) two solutions or an hour.  \
    2769 This is checked every node in tree, so it is possible to get more solutions from heuristics."
    2770      );
    2771 #endif
    2772      parameters[numberParameters++] =
    2773           CbcOrClpParam("min!imize", "Set optimization direction to minimize",
    2774                         CLP_PARAM_ACTION_MINIMIZE, 7);
    2775      parameters[numberParameters-1].setLonghelp
    2776      (
    2777           "The default is minimize - use 'maximize' for maximization.\n\
     2426 seconds or by an interrupt this will be treated as stopping on maximum iterations.  This is ignored in branchAndCut - use maxN!odes.");
     2427#endif
     2428#ifdef COIN_HAS_CBC
     2429  parameters[numberParameters++] = CbcOrClpParam("maxN!odes", "Maximum number of nodes to do",
     2430    -1, 2147483647, CBC_PARAM_INT_MAXNODES);
     2431  parameters[numberParameters - 1].setLonghelp(
     2432    "This is a repeatable way to limit search.  Normally using time is easier \
     2433but then the results may not be repeatable.");
     2434  parameters[numberParameters++] = CbcOrClpParam("maxSaved!Solutions", "Maximum number of solutions to save",
     2435    0, 2147483647, CBC_PARAM_INT_MAXSAVEDSOLS);
     2436  parameters[numberParameters - 1].setLonghelp(
     2437    "Number of solutions to save.");
     2438  parameters[numberParameters++] = CbcOrClpParam("maxSo!lutions", "Maximum number of solutions to get",
     2439    1, 2147483647, CBC_PARAM_INT_MAXSOLS);
     2440  parameters[numberParameters - 1].setLonghelp(
     2441    "You may want to stop after (say) two solutions or an hour.  \
     2442This is checked every node in tree, so it is possible to get more solutions from heuristics.");
     2443#endif
     2444  parameters[numberParameters++] = CbcOrClpParam("min!imize", "Set optimization direction to minimize",
     2445    CLP_PARAM_ACTION_MINIMIZE, 7);
     2446  parameters[numberParameters - 1].setLonghelp(
     2447    "The default is minimize - use 'maximize' for maximization.\n\
    27782448This should only be necessary if you have previously set maximization \
    2779 You can also use the parameters 'direction minimize'."
    2780      );
    2781 #ifdef COIN_HAS_CBC
    2782      parameters[numberParameters++] =
    2783           CbcOrClpParam("mipO!ptions", "Dubious options for mip",
    2784                         0, COIN_INT_MAX, CBC_PARAM_INT_MIPOPTIONS, 0);
    2785      parameters[numberParameters++] =
    2786           CbcOrClpParam("more!MipOptions", "More dubious options for mip",
    2787                         -1, COIN_INT_MAX, CBC_PARAM_INT_MOREMIPOPTIONS, 0);
    2788      parameters[numberParameters++] =
    2789           CbcOrClpParam("more2!MipOptions", "More more dubious options for mip",
    2790                         -1, COIN_INT_MAX, CBC_PARAM_INT_MOREMOREMIPOPTIONS, 0);
    2791      parameters[numberParameters-1].setIntValue(0);
    2792      parameters[numberParameters++] =
    2793           CbcOrClpParam("mixed!IntegerRoundingCuts", "Whether to use Mixed Integer Rounding cuts",
    2794                         "off", CBC_PARAM_STR_MIXEDCUTS);
    2795      parameters[numberParameters-1].append("on");
    2796      parameters[numberParameters-1].append("root");
    2797      parameters[numberParameters-1].append("ifmove");
    2798      parameters[numberParameters-1].append("forceOn");
    2799      parameters[numberParameters-1].append("onglobal");
    2800      parameters[numberParameters-1].setLonghelp
    2801      (
    2802           "This switches on mixed integer rounding cuts (either at root or in entire tree) \
    2803 See branchAndCut for information on options."
    2804      );
    2805 #endif
    2806      parameters[numberParameters++] =
    2807           CbcOrClpParam("mess!ages", "Controls if Clpnnnn is printed",
    2808                         "off", CLP_PARAM_STR_MESSAGES);
    2809      parameters[numberParameters-1].append("on");
    2810      parameters[numberParameters-1].setLonghelp
    2811      ("The default behavior is to put out messages such as:\n\
     2449You can also use the parameters 'direction minimize'.");
     2450#ifdef COIN_HAS_CBC
     2451  parameters[numberParameters++] = CbcOrClpParam("mipO!ptions", "Dubious options for mip",
     2452    0, COIN_INT_MAX, CBC_PARAM_INT_MIPOPTIONS, 0);
     2453  parameters[numberParameters++] = CbcOrClpParam("more!MipOptions", "More dubious options for mip",
     2454    -1, COIN_INT_MAX, CBC_PARAM_INT_MOREMIPOPTIONS, 0);
     2455  parameters[numberParameters++] = CbcOrClpParam("more2!MipOptions", "More more dubious options for mip",
     2456    -1, COIN_INT_MAX, CBC_PARAM_INT_MOREMOREMIPOPTIONS, 0);
     2457  parameters[numberParameters - 1].setIntValue(0);
     2458  parameters[numberParameters++] = CbcOrClpParam("mixed!IntegerRoundingCuts", "Whether to use Mixed Integer Rounding cuts",
     2459    "off", CBC_PARAM_STR_MIXEDCUTS);
     2460  parameters[numberParameters - 1].append("on");
     2461  parameters[numberParameters - 1].append("root");
     2462  parameters[numberParameters - 1].append("ifmove");
     2463  parameters[numberParameters - 1].append("forceOn");
     2464  parameters[numberParameters - 1].append("onglobal");
     2465  parameters[numberParameters - 1].setLonghelp(
     2466    "This switches on mixed integer rounding cuts (either at root or in entire tree) \
     2467See branchAndCut for information on options.");
     2468#endif
     2469  parameters[numberParameters++] = CbcOrClpParam("mess!ages", "Controls if Clpnnnn is printed",
     2470    "off", CLP_PARAM_STR_MESSAGES);
     2471  parameters[numberParameters - 1].append("on");
     2472  parameters[numberParameters - 1].setLonghelp("The default behavior is to put out messages such as:\n\
    28122473   Clp0005 2261  Objective 109.024 Primal infeas 944413 (758)\n\
    28132474but this program turns this off to make it look more friendly.  It can be useful\
    28142475 to turn them back on if you want to be able to 'grep' for particular messages or if\
    2815  you intend to override the behavior of a particular message.  This only affects Clp not Cbc."
    2816      );
    2817      parameters[numberParameters++] =
    2818           CbcOrClpParam("miplib", "Do some of miplib test set",
    2819                         CBC_PARAM_ACTION_MIPLIB, 3, 1);
    2820 #ifdef COIN_HAS_CBC
    2821       parameters[numberParameters++] =
    2822           CbcOrClpParam("mips!tart", "reads an initial feasible solution from file",
    2823                         CBC_PARAM_ACTION_MIPSTART);
    2824      parameters[numberParameters-1].setLonghelp
    2825      ("\
     2476 you intend to override the behavior of a particular message.  This only affects Clp not Cbc.");
     2477  parameters[numberParameters++] = CbcOrClpParam("miplib", "Do some of miplib test set",
     2478    CBC_PARAM_ACTION_MIPLIB, 3, 1);
     2479#ifdef COIN_HAS_CBC
     2480  parameters[numberParameters++] = CbcOrClpParam("mips!tart", "reads an initial feasible solution from file",
     2481    CBC_PARAM_ACTION_MIPSTART);
     2482  parameters[numberParameters - 1].setLonghelp("\
    28262483The MIPStart allows one to enter an initial integer feasible solution \
    28272484to CBC. Values of the main decision variables which are active (have \
     
    28602517");
    28612518#endif
    2862      parameters[numberParameters++] =
    2863           CbcOrClpParam("moreS!pecialOptions", "Yet more dubious options for Simplex - see ClpSimplex.hpp",
    2864                         0, COIN_INT_MAX, CLP_PARAM_INT_MORESPECIALOPTIONS, 0);
    2865 #ifdef COIN_HAS_CBC
    2866      parameters[numberParameters++] =
    2867           CbcOrClpParam("moreT!une", "Yet more dubious ideas for feasibility pump",
    2868                         0, 100000000, CBC_PARAM_INT_FPUMPTUNE2, 0);
    2869      parameters[numberParameters-1].setLonghelp
    2870      (
    2871           "Yet more ideas for Feasibility Pump \n\
     2519  parameters[numberParameters++] = CbcOrClpParam("moreS!pecialOptions", "Yet more dubious options for Simplex - see ClpSimplex.hpp",
     2520    0, COIN_INT_MAX, CLP_PARAM_INT_MORESPECIALOPTIONS, 0);
     2521#ifdef COIN_HAS_CBC
     2522  parameters[numberParameters++] = CbcOrClpParam("moreT!une", "Yet more dubious ideas for feasibility pump",
     2523    0, 100000000, CBC_PARAM_INT_FPUMPTUNE2, 0);
     2524  parameters[numberParameters - 1].setLonghelp(
     2525    "Yet more ideas for Feasibility Pump \n\
    28722526\t/100000 == 1 use box constraints and original obj in cleanup\n\
    28732527\t/1000 == 1 Pump will run twice if no solution found\n\
     
    28762530\t/100 == 1,3.. exact 1.0 for objective values\n\
    28772531\t/100 == 2,3.. allow more iterations per pass\n\
    2878 \t n fix if value of variable same for last n iterations."
    2879      );
    2880      parameters[numberParameters-1].setIntValue(0);
    2881      parameters[numberParameters++] =
    2882           CbcOrClpParam("multiple!RootPasses", "Do multiple root passes to collect cuts and solutions",
    2883                         0, 100000000, CBC_PARAM_INT_MULTIPLEROOTS, 0);
    2884      parameters[numberParameters-1].setIntValue(0);
    2885      parameters[numberParameters-1].setLonghelp
    2886      (
    2887           "Do (in parallel if threads enabled) the root phase this number of times \
     2532\t n fix if value of variable same for last n iterations.");
     2533  parameters[numberParameters - 1].setIntValue(0);
     2534  parameters[numberParameters++] = CbcOrClpParam("multiple!RootPasses", "Do multiple root passes to collect cuts and solutions",
     2535    0, 100000000, CBC_PARAM_INT_MULTIPLEROOTS, 0);
     2536  parameters[numberParameters - 1].setIntValue(0);
     2537  parameters[numberParameters - 1].setLonghelp(
     2538    "Do (in parallel if threads enabled) the root phase this number of times \
    28882539 and collect all solutions and cuts generated.  The actual format is aabbcc \
    28892540where aa is number of extra passes, if bb is non zero \
     
    28932544and Andrea Tramontani). \
    28942545The solvers do not interact with each other.  However if extra passes are specified \
    2895 then cuts are collected and used in later passes - so there is interaction there."
    2896      );
    2897      parameters[numberParameters++] =
    2898           CbcOrClpParam("naive!Heuristics", "Whether to try some stupid heuristic",
    2899                         "off", CBC_PARAM_STR_NAIVE, 7, 1);
    2900      parameters[numberParameters-1].append("on");
    2901      parameters[numberParameters-1].append("both");
    2902      parameters[numberParameters-1].append("before");
    2903      parameters[numberParameters-1].setLonghelp
    2904      (
    2905           "Really silly stuff e.g. fix all integers with costs to zero!. \
    2906 Doh option does heuristic before preprocessing"     );
     2546then cuts are collected and used in later passes - so there is interaction there.");
     2547  parameters[numberParameters++] = CbcOrClpParam("naive!Heuristics", "Whether to try some stupid heuristic",
     2548    "off", CBC_PARAM_STR_NAIVE, 7, 1);
     2549  parameters[numberParameters - 1].append("on");
     2550  parameters[numberParameters - 1].append("both");
     2551  parameters[numberParameters - 1].append("before");
     2552  parameters[numberParameters - 1].setLonghelp(
     2553    "Really silly stuff e.g. fix all integers with costs to zero!. \
     2554Doh option does heuristic before preprocessing");
    29072555#endif
    29082556#ifdef COIN_HAS_CLP
    2909      parameters[numberParameters++] =
    2910           CbcOrClpParam("netlib", "Solve entire netlib test set",
    2911                         CLP_PARAM_ACTION_NETLIB_EITHER, 3, 1);
    2912      parameters[numberParameters-1].setLonghelp
    2913      (
    2914           "This exercises the unit test for clp and then solves the netlib test set using dual or primal.\
    2915 The user can set options before e.g. clp -presolve off -netlib"
    2916      );
    2917      parameters[numberParameters++] =
    2918           CbcOrClpParam("netlibB!arrier", "Solve entire netlib test set with barrier",
    2919                         CLP_PARAM_ACTION_NETLIB_BARRIER, 3, 1);
    2920      parameters[numberParameters-1].setLonghelp
    2921      (
    2922           "This exercises the unit test for clp and then solves the netlib test set using barrier.\
    2923 The user can set options before e.g. clp -kkt on -netlib"
    2924      );
    2925      parameters[numberParameters++] =
    2926           CbcOrClpParam("netlibD!ual", "Solve entire netlib test set (dual)",
    2927                         CLP_PARAM_ACTION_NETLIB_DUAL, 3, 1);
    2928      parameters[numberParameters-1].setLonghelp
    2929      (
    2930           "This exercises the unit test for clp and then solves the netlib test set using dual.\
    2931 The user can set options before e.g. clp -presolve off -netlib"
    2932      );
    2933      parameters[numberParameters++] =
    2934           CbcOrClpParam("netlibP!rimal", "Solve entire netlib test set (primal)",
    2935                         CLP_PARAM_ACTION_NETLIB_PRIMAL, 3, 1);
    2936      parameters[numberParameters-1].setLonghelp
    2937      (
    2938           "This exercises the unit test for clp and then solves the netlib test set using primal.\
    2939 The user can set options before e.g. clp -presolve off -netlibp"
    2940      );
    2941      parameters[numberParameters++] =
    2942           CbcOrClpParam("netlibT!une", "Solve entire netlib test set with 'best' algorithm",
    2943                         CLP_PARAM_ACTION_NETLIB_TUNE, 3, 1);
    2944      parameters[numberParameters-1].setLonghelp
    2945      (
    2946           "This exercises the unit test for clp and then solves the netlib test set using whatever \
     2557  parameters[numberParameters++] = CbcOrClpParam("netlib", "Solve entire netlib test set",
     2558    CLP_PARAM_ACTION_NETLIB_EITHER, 3, 1);
     2559  parameters[numberParameters - 1].setLonghelp(
     2560    "This exercises the unit test for clp and then solves the netlib test set using dual or primal.\
     2561The user can set options before e.g. clp -presolve off -netlib");
     2562  parameters[numberParameters++] = CbcOrClpParam("netlibB!arrier", "Solve entire netlib test set with barrier",
     2563    CLP_PARAM_ACTION_NETLIB_BARRIER, 3, 1);
     2564  parameters[numberParameters - 1].setLonghelp(
     2565    "This exercises the unit test for clp and then solves the netlib test set using barrier.\
     2566The user can set options before e.g. clp -kkt on -netlib");
     2567  parameters[numberParameters++] = CbcOrClpParam("netlibD!ual", "Solve entire netlib test set (dual)",
     2568    CLP_PARAM_ACTION_NETLIB_DUAL, 3, 1);
     2569  parameters[numberParameters - 1].setLonghelp(
     2570    "This exercises the unit test for clp and then solves the netlib test set using dual.\
     2571The user can set options before e.g. clp -presolve off -netlib");
     2572  parameters[numberParameters++] = CbcOrClpParam("netlibP!rimal", "Solve entire netlib test set (primal)",
     2573    CLP_PARAM_ACTION_NETLIB_PRIMAL, 3, 1);
     2574  parameters[numberParameters - 1].setLonghelp(
     2575    "This exercises the unit test for clp and then solves the netlib test set using primal.\
     2576The user can set options before e.g. clp -presolve off -netlibp");
     2577  parameters[numberParameters++] = CbcOrClpParam("netlibT!une", "Solve entire netlib test set with 'best' algorithm",
     2578    CLP_PARAM_ACTION_NETLIB_TUNE, 3, 1);
     2579  parameters[numberParameters - 1].setLonghelp(
     2580    "This exercises the unit test for clp and then solves the netlib test set using whatever \
    29472581works best.  I know this is cheating but it also stresses the code better by doing a \
    29482582mixture of stuff.  The best algorithm was chosen on a Linux ThinkPad using native cholesky \
    2949 with University of Florida ordering."
    2950      );
    2951      parameters[numberParameters++] =
    2952           CbcOrClpParam("network", "Tries to make network matrix",
    2953                         CLP_PARAM_ACTION_NETWORK, 7, 0);
    2954      parameters[numberParameters-1].setLonghelp
    2955      (
    2956           "Clp will go faster if the matrix can be converted to a network.  The matrix\
     2583with University of Florida ordering.");
     2584  parameters[numberParameters++] = CbcOrClpParam("network", "Tries to make network matrix",
     2585    CLP_PARAM_ACTION_NETWORK, 7, 0);
     2586  parameters[numberParameters - 1].setLonghelp(
     2587    "Clp will go faster if the matrix can be converted to a network.  The matrix\
    29572588 operations may be a bit faster with more efficient storage, but the main advantage\
    29582589 comes from using a network factorization.  It will probably not be as fast as a \
    2959 specialized network code."
    2960      );
    2961 #ifdef COIN_HAS_CBC
    2962      parameters[numberParameters++] =
    2963           CbcOrClpParam("nextB!estSolution", "Prints next best saved solution to file",
    2964                         CLP_PARAM_ACTION_NEXTBESTSOLUTION);
    2965      parameters[numberParameters-1].setLonghelp
    2966      (
    2967           "To write best solution, just use solution.  This prints next best (if exists) \
     2590specialized network code.");
     2591#ifdef COIN_HAS_CBC
     2592  parameters[numberParameters++] = CbcOrClpParam("nextB!estSolution", "Prints next best saved solution to file",
     2593    CLP_PARAM_ACTION_NEXTBESTSOLUTION);
     2594  parameters[numberParameters - 1].setLonghelp(
     2595    "To write best solution, just use solution.  This prints next best (if exists) \
    29682596 and then deletes it. \
    29692597 This will write a primitive solution file to the given file name.  It will use the default\
    29702598 directory given by 'directory'.  A name of '$' will use the previous value for the name.  This\
    2971  is initialized to 'stdout'.  The amount of output can be varied using printi!ngOptions or printMask."
    2972      );
    2973      parameters[numberParameters++] =
    2974           CbcOrClpParam("node!Strategy", "What strategy to use to select nodes",
    2975                         "hybrid", CBC_PARAM_STR_NODESTRATEGY);
    2976      parameters[numberParameters-1].append("fewest");
    2977      parameters[numberParameters-1].append("depth");
    2978      parameters[numberParameters-1].append("upfewest");
    2979      parameters[numberParameters-1].append("downfewest");
    2980      parameters[numberParameters-1].append("updepth");
    2981      parameters[numberParameters-1].append("downdepth");
    2982      parameters[numberParameters-1].setLonghelp
    2983      (
    2984           "Normally before a solution the code will choose node with fewest infeasibilities. \
     2599 is initialized to 'stdout'.  The amount of output can be varied using printi!ngOptions or printMask.");
     2600  parameters[numberParameters++] = CbcOrClpParam("node!Strategy", "What strategy to use to select nodes",
     2601    "hybrid", CBC_PARAM_STR_NODESTRATEGY);
     2602  parameters[numberParameters - 1].append("fewest");
     2603  parameters[numberParameters - 1].append("depth");
     2604  parameters[numberParameters - 1].append("upfewest");
     2605  parameters[numberParameters - 1].append("downfewest");
     2606  parameters[numberParameters - 1].append("updepth");
     2607  parameters[numberParameters - 1].append("downdepth");
     2608  parameters[numberParameters - 1].setLonghelp(
     2609    "Normally before a solution the code will choose node with fewest infeasibilities. \
    29852610You can choose depth as the criterion.  You can also say if up or down branch must \
    29862611be done first (the up down choice will carry on after solution). \
    2987 Default has now been changed to hybrid which is breadth first on small depth nodes then fewest."
    2988      );
    2989      parameters[numberParameters++] =
    2990           CbcOrClpParam("numberA!nalyze", "Number of analysis iterations",
    2991                         -COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_NUMBERANALYZE, 0);
    2992      parameters[numberParameters-1].setLonghelp
    2993      (
    2994           "This says how many iterations to spend at root node analyzing problem. \
    2995 This is a first try and will hopefully become more sophisticated."
    2996      );
    2997 #endif
    2998      parameters[numberParameters++] =
    2999           CbcOrClpParam("objective!Scale", "Scale factor to apply to objective",
    3000                         -1.0e20, 1.0e20, CLP_PARAM_DBL_OBJSCALE, 1);
    3001      parameters[numberParameters-1].setLonghelp
    3002      (
    3003           "If the objective function has some very large values, you may wish to scale them\
    3004  internally by this amount.  It can also be set by autoscale.  It is applied after scaling.  You are unlikely to need this."
    3005      );
    3006      parameters[numberParameters-1].setDoubleValue(1.0);
     2612Default has now been changed to hybrid which is breadth first on small depth nodes then fewest.");
     2613  parameters[numberParameters++] = CbcOrClpParam("numberA!nalyze", "Number of analysis iterations",
     2614    -COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_NUMBERANALYZE, 0);
     2615  parameters[numberParameters - 1].setLonghelp(
     2616    "This says how many iterations to spend at root node analyzing problem. \
     2617This is a first try and will hopefully become more sophisticated.");
     2618#endif
     2619  parameters[numberParameters++] = CbcOrClpParam("objective!Scale", "Scale factor to apply to objective",
     2620    -1.0e20, 1.0e20, CLP_PARAM_DBL_OBJSCALE, 1);
     2621  parameters[numberParameters - 1].setLonghelp(
     2622    "If the objective function has some very large values, you may wish to scale them\
     2623 internally by this amount.  It can also be set by autoscale.  It is applied after scaling.  You are unlikely to need this.");
     2624  parameters[numberParameters - 1].setDoubleValue(1.0);
    30072625#endif
    30082626#ifdef COIN_HAS_CBC
    30092627#ifdef COIN_HAS_NTY
    3010      parameters[numberParameters++] =
    3011           CbcOrClpParam("Orbit!alBranching", "Whether to try orbital branching",
    3012                         "off", CBC_PARAM_STR_ORBITAL);
    3013      parameters[numberParameters-1].append("on");
    3014      parameters[numberParameters-1].append("strong");
    3015      parameters[numberParameters-1].append("force");
    3016      parameters[numberParameters-1].append("simple");
    3017      parameters[numberParameters-1].setLonghelp
    3018      (
    3019           "This switches on Orbital branching. \
     2628  parameters[numberParameters++] = CbcOrClpParam("Orbit!alBranching", "Whether to try orbital branching",
     2629    "off", CBC_PARAM_STR_ORBITAL);
     2630  parameters[numberParameters - 1].append("on");
     2631  parameters[numberParameters - 1].append("strong");
     2632  parameters[numberParameters - 1].append("force");
     2633  parameters[numberParameters - 1].append("simple");
     2634  parameters[numberParameters - 1].setLonghelp(
     2635    "This switches on Orbital branching. \
    30202636On just adds orbital, strong tries extra fixing in strong branching");
    30212637#endif
    3022      parameters[numberParameters++] =
    3023           CbcOrClpParam("PrepN!ames", "If column names will be kept in pre-processed model",
    3024                         "off", CBC_PARAM_STR_PREPROCNAMES);
    3025      parameters[numberParameters-1].append("on");
    3026      parameters[numberParameters-1].setLonghelp
    3027      (
    3028            "Normally the preprocessed model has column names replaced by new names C0000...\
     2638  parameters[numberParameters++] = CbcOrClpParam("PrepN!ames", "If column names will be kept in pre-processed model",
     2639    "off", CBC_PARAM_STR_PREPROCNAMES);
     2640  parameters[numberParameters - 1].append("on");
     2641  parameters[numberParameters - 1].setLonghelp(
     2642    "Normally the preprocessed model has column names replaced by new names C0000...\
    30292643Setting this option to on keeps original names in variables which still exist in the preprocessed problem");
    30302644
    3031      parameters[numberParameters++] =
    3032           CbcOrClpParam("outDup!licates", "takes duplicate rows etc out of integer model",
    3033                         CLP_PARAM_ACTION_OUTDUPROWS, 7, 0);
    3034 #endif
    3035      parameters[numberParameters++] =
    3036           CbcOrClpParam("output!Format", "Which output format to use",
    3037                         1, 6, CLP_PARAM_INT_OUTPUTFORMAT);
    3038      parameters[numberParameters-1].setLonghelp
    3039      (
    3040           "Normally export will be done using normal representation for numbers and two values\
     2645  parameters[numberParameters++] = CbcOrClpParam("outDup!licates", "takes duplicate rows etc out of integer model",
     2646    CLP_PARAM_ACTION_OUTDUPROWS, 7, 0);
     2647#endif
     2648  parameters[numberParameters++] = CbcOrClpParam("output!Format", "Which output format to use",
     2649    1, 6, CLP_PARAM_INT_OUTPUTFORMAT);
     2650  parameters[numberParameters - 1].setLonghelp(
     2651    "Normally export will be done using normal representation for numbers and two values\
    30412652 per line.  You may want to do just one per line (for grep or suchlike) and you may wish\
    30422653 to save with absolute accuracy using a coded version of the IEEE value. A value of 2 is normal.\
    30432654 otherwise odd values gives one value per line, even two.  Values 1,2 give normal format, 3,4\
    30442655 gives greater precision, while 5,6 give IEEE values.  When used for exporting a basis 1 does not save \
    3045 values, 2 saves values, 3 with greater accuracy and 4 in IEEE."
    3046      );
     2656values, 2 saves values, 3 with greater accuracy and 4 in IEEE.");
    30472657#ifdef COIN_HAS_CLP
    3048      parameters[numberParameters++] =
    3049           CbcOrClpParam("para!metrics", "Import data from file and do parametrics",
    3050                         CLP_PARAM_ACTION_PARAMETRICS, 3);
    3051      parameters[numberParameters-1].setLonghelp
    3052      (
    3053           "This will read a file with parametric data from the given file name \
     2658  parameters[numberParameters++] = CbcOrClpParam("para!metrics", "Import data from file and do parametrics",
     2659    CLP_PARAM_ACTION_PARAMETRICS, 3);
     2660  parameters[numberParameters - 1].setLonghelp(
     2661    "This will read a file with parametric data from the given file name \
    30542662and then do parametrics.  It will use the default\
    30552663 directory given by 'directory'.  A name of '$' will use the previous value for the name.  This\
     
    30692677headings - name, number, objective(change), lower(change), upper(change). \
    30702678 Exactly one of name and number must be given for either section and \
    3071 missing ones have value 0.0."
    3072      );
    3073 #endif
    3074 #ifdef COIN_HAS_CBC
    3075      parameters[numberParameters++] =
    3076           CbcOrClpParam("passC!uts", "Number of cut passes at root node",
    3077                         -9999999, 9999999, CBC_PARAM_INT_CUTPASS);
    3078      parameters[numberParameters-1].setLonghelp
    3079      (
    3080           "The default is 100 passes if less than 500 columns, 100 passes (but \
    3081 stop if drop small if less than 5000 columns, 20 otherwise"
    3082      );
    3083      parameters[numberParameters++] =
    3084           CbcOrClpParam("passF!easibilityPump", "How many passes in feasibility pump",
    3085                         0, 10000, CBC_PARAM_INT_FPUMPITS);
    3086      parameters[numberParameters-1].setLonghelp
    3087      (
    3088           "This fine tunes Feasibility Pump by doing more or fewer passes."
    3089      );
    3090      parameters[numberParameters-1].setIntValue(20);
     2679missing ones have value 0.0.");
     2680#endif
     2681#ifdef COIN_HAS_CBC
     2682  parameters[numberParameters++] = CbcOrClpParam("passC!uts", "Number of cut passes at root node",
     2683    -9999999, 9999999, CBC_PARAM_INT_CUTPASS);
     2684  parameters[numberParameters - 1].setLonghelp(
     2685    "The default is 100 passes if less than 500 columns, 100 passes (but \
     2686stop if drop small if less than 5000 columns, 20 otherwise");
     2687  parameters[numberParameters++] = CbcOrClpParam("passF!easibilityPump", "How many passes in feasibility pump",
     2688    0, 10000, CBC_PARAM_INT_FPUMPITS);
     2689  parameters[numberParameters - 1].setLonghelp(
     2690    "This fine tunes Feasibility Pump by doing more or fewer passes.");
     2691  parameters[numberParameters - 1].setIntValue(20);
    30912692#endif
    30922693#ifdef COIN_HAS_CLP
    3093      parameters[numberParameters++] =
    3094           CbcOrClpParam("passP!resolve", "How many passes in presolve",
    3095                         -200, 100, CLP_PARAM_INT_PRESOLVEPASS, 1);
    3096      parameters[numberParameters-1].setLonghelp
    3097      (
    3098           "Normally Presolve does 10 passes but you may want to do less to make it\
     2694  parameters[numberParameters++] = CbcOrClpParam("passP!resolve", "How many passes in presolve",
     2695    -200, 100, CLP_PARAM_INT_PRESOLVEPASS, 1);
     2696  parameters[numberParameters - 1].setLonghelp(
     2697    "Normally Presolve does 10 passes but you may want to do less to make it\
    30992698 more lightweight or do more if improvements are still being made.  As Presolve will return\
    3100  if nothing is being taken out, you should not normally need to use this fine tuning."
    3101      );
    3102 #endif
    3103 #ifdef COIN_HAS_CBC
    3104      parameters[numberParameters++] =
    3105           CbcOrClpParam("passT!reeCuts", "Number of cut passes in tree",
    3106                         -9999999, 9999999, CBC_PARAM_INT_CUTPASSINTREE);
    3107      parameters[numberParameters-1].setLonghelp
    3108      (
    3109           "The default is one pass"
    3110      );
     2699 if nothing is being taken out, you should not normally need to use this fine tuning.");
     2700#endif
     2701#ifdef COIN_HAS_CBC
     2702  parameters[numberParameters++] = CbcOrClpParam("passT!reeCuts", "Number of cut passes in tree",
     2703    -9999999, 9999999, CBC_PARAM_INT_CUTPASSINTREE);
     2704  parameters[numberParameters - 1].setLonghelp(
     2705    "The default is one pass");
    31112706#endif
    31122707#ifdef COIN_HAS_CLP
    3113      parameters[numberParameters++] =
    3114           CbcOrClpParam("pertV!alue", "Method of perturbation",
    3115                         -5000, 102, CLP_PARAM_INT_PERTVALUE, 1);
    3116      parameters[numberParameters++] =
    3117           CbcOrClpParam("perturb!ation", "Whether to perturb problem",
    3118                         "on", CLP_PARAM_STR_PERTURBATION);
    3119      parameters[numberParameters-1].append("off");
    3120      parameters[numberParameters-1].setLonghelp
    3121      (
    3122           "Perturbation helps to stop cycling, but Clp uses other measures for this.\
     2708  parameters[numberParameters++] = CbcOrClpParam("pertV!alue", "Method of perturbation",
     2709    -5000, 102, CLP_PARAM_INT_PERTVALUE, 1);
     2710  parameters[numberParameters++] = CbcOrClpParam("perturb!ation", "Whether to perturb problem",
     2711    "on", CLP_PARAM_STR_PERTURBATION);
     2712  parameters[numberParameters - 1].append("off");
     2713  parameters[numberParameters - 1].setLonghelp(
     2714    "Perturbation helps to stop cycling, but Clp uses other measures for this.\
    31232715  However large problems and especially ones with unit elements and unit rhs or costs\
    31242716 benefit from perturbation.  Normally Clp tries to be intelligent, but you can switch this off.\
    3125   The Clp library has this off by default.  This program has it on by default."
    3126      );
    3127      parameters[numberParameters++] =
    3128           CbcOrClpParam("PFI", "Whether to use Product Form of Inverse in simplex",
    3129                         "off", CLP_PARAM_STR_PFI, 7, 0);
    3130      parameters[numberParameters-1].append("on");
    3131      parameters[numberParameters-1].setLonghelp
    3132      (
    3133           "By default clp uses Forrest-Tomlin L-U update.  If you are masochistic you can switch it off."
    3134      );
    3135 #endif
    3136 #ifdef COIN_HAS_CBC
    3137      parameters[numberParameters++] =
    3138           CbcOrClpParam("pivotAndC!omplement", "Whether to try Pivot and Complement heuristic",
    3139                         "off", CBC_PARAM_STR_PIVOTANDCOMPLEMENT);
    3140      parameters[numberParameters-1].append("on");
    3141      parameters[numberParameters-1].append("both");
    3142      parameters[numberParameters-1].append("before");
    3143      parameters[numberParameters-1].setLonghelp
    3144      (
    3145           "stuff needed. \
    3146 Doh option does heuristic before preprocessing"     );
    3147      parameters[numberParameters++] =
    3148           CbcOrClpParam("pivotAndF!ix", "Whether to try Pivot and Fix heuristic",
    3149                         "off", CBC_PARAM_STR_PIVOTANDFIX);
    3150      parameters[numberParameters-1].append("on");
    3151      parameters[numberParameters-1].append("both");
    3152      parameters[numberParameters-1].append("before");
    3153      parameters[numberParameters-1].setLonghelp
    3154      (
    3155           "stuff needed. \
    3156 Doh option does heuristic before preprocessing"     );
     2717  The Clp library has this off by default.  This program has it on by default.");
     2718  parameters[numberParameters++] = CbcOrClpParam("PFI", "Whether to use Product Form of Inverse in simplex",
     2719    "off", CLP_PARAM_STR_PFI, 7, 0);
     2720  parameters[numberParameters - 1].append("on");
     2721  parameters[numberParameters - 1].setLonghelp(
     2722    "By default clp uses Forrest-Tomlin L-U update.  If you are masochistic you can switch it off.");
     2723#endif
     2724#ifdef COIN_HAS_CBC
     2725  parameters[numberParameters++] = CbcOrClpParam("pivotAndC!omplement", "Whether to try Pivot and Complement heuristic",
     2726    "off", CBC_PARAM_STR_PIVOTANDCOMPLEMENT);
     2727  parameters[numberParameters - 1].append("on");
     2728  parameters[numberParameters - 1].append("both");
     2729  parameters[numberParameters - 1].append("before");
     2730  parameters[numberParameters - 1].setLonghelp(
     2731    "stuff needed. \
     2732Doh option does heuristic before preprocessing");
     2733  parameters[numberParameters++] = CbcOrClpParam("pivotAndF!ix", "Whether to try Pivot and Fix heuristic",
     2734    "off", CBC_PARAM_STR_PIVOTANDFIX);
     2735  parameters[numberParameters - 1].append("on");
     2736  parameters[numberParameters - 1].append("both");
     2737  parameters[numberParameters - 1].append("before");
     2738  parameters[numberParameters - 1].setLonghelp(
     2739    "stuff needed. \
     2740Doh option does heuristic before preprocessing");
    31572741#endif
    31582742#ifdef COIN_HAS_CLP
    3159      parameters[numberParameters++] =
    3160           CbcOrClpParam("plus!Minus", "Tries to make +- 1 matrix",
    3161                         CLP_PARAM_ACTION_PLUSMINUS, 7, 0);
    3162      parameters[numberParameters-1].setLonghelp
    3163      (
    3164           "Clp will go slightly faster if the matrix can be converted so that the elements are\
     2743  parameters[numberParameters++] = CbcOrClpParam("plus!Minus", "Tries to make +- 1 matrix",
     2744    CLP_PARAM_ACTION_PLUSMINUS, 7, 0);
     2745  parameters[numberParameters - 1].setLonghelp(
     2746    "Clp will go slightly faster if the matrix can be converted so that the elements are\
    31652747 not stored and are known to be unit.  The main advantage is memory use.  Clp may automatically\
    3166  see if it can convert the problem so you should not need to use this."
    3167      );
    3168      parameters[numberParameters++] =
    3169           CbcOrClpParam("pO!ptions", "Dubious print options",
    3170                         0, COIN_INT_MAX, CLP_PARAM_INT_PRINTOPTIONS, 1);
    3171      parameters[numberParameters-1].setIntValue(0);
    3172      parameters[numberParameters-1].setLonghelp
    3173      (
    3174           "If this is > 0 then presolve will give more information and branch and cut will give statistics"
    3175      );
    3176      parameters[numberParameters++] =
    3177           CbcOrClpParam("preO!pt", "Presolve options",
    3178                         0, COIN_INT_MAX, CLP_PARAM_INT_PRESOLVEOPTIONS, 0);
    3179 #endif
    3180      parameters[numberParameters++] =
    3181           CbcOrClpParam("presolve", "Whether to presolve problem",
    3182                         "on", CLP_PARAM_STR_PRESOLVE);
    3183      parameters[numberParameters-1].append("off");
    3184      parameters[numberParameters-1].append("more");
    3185      parameters[numberParameters-1].append("file");
    3186      parameters[numberParameters-1].setLonghelp
    3187      (
    3188           "Presolve analyzes the model to find such things as redundant equations, equations\
     2748 see if it can convert the problem so you should not need to use this.");
     2749  parameters[numberParameters++] = CbcOrClpParam("pO!ptions", "Dubious print options",
     2750    0, COIN_INT_MAX, CLP_PARAM_INT_PRINTOPTIONS, 1);
     2751  parameters[numberParameters - 1].setIntValue(0);
     2752  parameters[numberParameters - 1].setLonghelp(
     2753    "If this is > 0 then presolve will give more information and branch and cut will give statistics");
     2754  parameters[numberParameters++] = CbcOrClpParam("preO!pt", "Presolve options",
     2755    0, COIN_INT_MAX, CLP_PARAM_INT_PRESOLVEOPTIONS, 0);
     2756#endif
     2757  parameters[numberParameters++] = CbcOrClpParam("presolve", "Whether to presolve problem",
     2758    "on", CLP_PARAM_STR_PRESOLVE);
     2759  parameters[numberParameters - 1].append("off");
     2760  parameters[numberParameters - 1].append("more");
     2761  parameters[numberParameters - 1].append("file");
     2762  parameters[numberParameters - 1].setLonghelp(
     2763    "Presolve analyzes the model to find such things as redundant equations, equations\
    31892764 which fix some variables, equations which can be transformed into bounds etc etc.  For the\
    31902765 initial solve of any problem this is worth doing unless you know that it will have no effect.  \
    31912766on will normally do 5 passes while using 'more' will do 10.  If the problem is very large you may need \
    3192 to write the original to file using 'file'."
    3193      );
    3194 #ifdef COIN_HAS_CBC
    3195      parameters[numberParameters++] =
    3196           CbcOrClpParam("preprocess", "Whether to use integer preprocessing",
    3197                         "off", CBC_PARAM_STR_PREPROCESS);
    3198      parameters[numberParameters-1].append("on");
    3199      parameters[numberParameters-1].append("save");
    3200      parameters[numberParameters-1].append("equal");
    3201      parameters[numberParameters-1].append("sos");
    3202      parameters[numberParameters-1].append("trysos");
    3203      parameters[numberParameters-1].append("equalall");
    3204      parameters[numberParameters-1].append("strategy");
    3205      parameters[numberParameters-1].append("aggregate");
    3206      parameters[numberParameters-1].append("forcesos");
    3207      parameters[numberParameters-1].append("stop!aftersaving");
    3208      parameters[numberParameters-1].setLonghelp
    3209      (
    3210           "This tries to reduce size of model in a similar way to presolve and \
     2767to write the original to file using 'file'.");
     2768#ifdef COIN_HAS_CBC
     2769  parameters[numberParameters++] = CbcOrClpParam("preprocess", "Whether to use integer preprocessing",
     2770    "off", CBC_PARAM_STR_PREPROCESS);
     2771  parameters[numberParameters - 1].append("on");
     2772  parameters[numberParameters - 1].append("save");
     2773  parameters[numberParameters - 1].append("equal");
     2774  parameters[numberParameters - 1].append("sos");
     2775  parameters[numberParameters - 1].append("trysos");
     2776  parameters[numberParameters - 1].append("equalall");
     2777  parameters[numberParameters - 1].append("strategy");
     2778  parameters[numberParameters - 1].append("aggregate");
     2779  parameters[numberParameters - 1].append("forcesos");
     2780  parameters[numberParameters - 1].append("stop!aftersaving");
     2781  parameters[numberParameters - 1].setLonghelp(
     2782    "This tries to reduce size of model in a similar way to presolve and \
    32112783it also tries to strengthen the model - this can be very useful and is worth trying. \
    32122784 Save option saves on file presolved.mps.  equal will turn <= cliques into \
     
    32142786and no overlaps.  trysos is same but allows any number extra.  equalall will turn all \
    32152787valid inequalities into equalities with integer slacks.  strategy is as \
    3216 on but uses CbcStrategy."
    3217      );
     2788on but uses CbcStrategy.");
    32182789#endif
    32192790#ifdef COIN_HAS_CLP
    3220      parameters[numberParameters++] =
    3221           CbcOrClpParam("preT!olerance", "Tolerance to use in presolve",
    3222                         1.0e-20, 1.0e12, CLP_PARAM_DBL_PRESOLVETOLERANCE);
    3223      parameters[numberParameters-1].setLonghelp
    3224      (
    3225           "The default is 1.0e-8 - you may wish to try 1.0e-7 if presolve says the problem is \
    3226 infeasible and you have awkward numbers and you are sure the problem is really feasible."
    3227      );
    3228      parameters[numberParameters++] =
    3229           CbcOrClpParam("primalP!ivot", "Primal pivot choice algorithm",
    3230                         "auto!matic", CLP_PARAM_STR_PRIMALPIVOT, 7, 1);
    3231      parameters[numberParameters-1].append("exa!ct");
    3232      parameters[numberParameters-1].append("dant!zig");
    3233      parameters[numberParameters-1].append("part!ial");
    3234      parameters[numberParameters-1].append("steep!est");
    3235      parameters[numberParameters-1].append("change");
    3236      parameters[numberParameters-1].append("sprint");
    3237      parameters[numberParameters-1].append("PEsteep!est");
    3238      parameters[numberParameters-1].append("PEdantzig");
    3239      parameters[numberParameters-1].setLonghelp
    3240      (
    3241           "Clp can use any pivot selection algorithm which the user codes as long as it\
     2791  parameters[numberParameters++] = CbcOrClpParam("preT!olerance", "Tolerance to use in presolve",
     2792    1.0e-20, 1.0e12, CLP_PARAM_DBL_PRESOLVETOLERANCE);
     2793  parameters[numberParameters - 1].setLonghelp(
     2794    "The default is 1.0e-8 - you may wish to try 1.0e-7 if presolve says the problem is \
     2795infeasible and you have awkward numbers and you are sure the problem is really feasible.");
     2796  parameters[numberParameters++] = CbcOrClpParam("primalP!ivot", "Primal pivot choice algorithm",
     2797    "auto!matic", CLP_PARAM_STR_PRIMALPIVOT, 7, 1);
     2798  parameters[numberParameters - 1].append("exa!ct");
     2799  parameters[numberParameters - 1].append("dant!zig");
     2800  parameters[numberParameters - 1].append("part!ial");
     2801  parameters[numberParameters - 1].append("steep!est");
     2802  parameters[numberParameters - 1].append("change");
     2803  parameters[numberParameters - 1].append("sprint");
     2804  parameters[numberParameters - 1].append("PEsteep!est");
     2805  parameters[numberParameters - 1].append("PEdantzig");
     2806  parameters[numberParameters - 1].setLonghelp(
     2807    "Clp can use any pivot selection algorithm which the user codes as long as it\
    32422808 implements the features in the abstract pivot base class.  The Dantzig method is implemented\
    32432809 to show a simple method but its use is deprecated.  Exact devex is the method of choice and there\
     
    32492815donated by Jeremy Omer.  See \
    32502816Towhidi, M., Desrosiers, J., Soumis, F., The positive edge criterion within COIN-OR’s CLP. and \
    3251 Omer, J., Towhidi, M., Soumis, F., The positive edge pricing rule for the dual simplex."
    3252      );
    3253      parameters[numberParameters++] =
    3254           CbcOrClpParam("primalS!implex", "Do primal simplex algorithm",
    3255                         CLP_PARAM_ACTION_PRIMALSIMPLEX);
    3256      parameters[numberParameters-1].setLonghelp
    3257      (
    3258           "This command solves the continuous relaxation of the current model using the primal algorithm.\
     2817Omer, J., Towhidi, M., Soumis, F., The positive edge pricing rule for the dual simplex.");
     2818  parameters[numberParameters++] = CbcOrClpParam("primalS!implex", "Do primal simplex algorithm",
     2819    CLP_PARAM_ACTION_PRIMALSIMPLEX);
     2820  parameters[numberParameters - 1].setLonghelp(
     2821    "This command solves the continuous relaxation of the current model using the primal algorithm.\
    32592822  The default is to use exact devex.\
    32602823 The time and iterations may be affected by settings such as presolve, scaling, crash\
    3261  and also by column selection  method, infeasibility weight and dual and primal tolerances."
    3262      );
    3263 #endif
    3264      parameters[numberParameters++] =
    3265           CbcOrClpParam("primalT!olerance", "For an optimal solution \
     2824 and also by column selection  method, infeasibility weight and dual and primal tolerances.");
     2825#endif
     2826  parameters[numberParameters++] = CbcOrClpParam("primalT!olerance", "For an optimal solution \
    32662827no primal infeasibility may exceed this value",
    3267                         1.0e-20, 1.0e12, CLP_PARAM_DBL_PRIMALTOLERANCE);
    3268      parameters[numberParameters-1].setLonghelp
    3269      (
    3270           "Normally the default tolerance is fine, but you may want to increase it a\
    3271  bit if a primal run seems to be having a hard time"
    3272      );
     2828    1.0e-20, 1.0e12, CLP_PARAM_DBL_PRIMALTOLERANCE);
     2829  parameters[numberParameters - 1].setLonghelp(
     2830    "Normally the default tolerance is fine, but you may want to increase it a\
     2831 bit if a primal run seems to be having a hard time");
    32732832#ifdef COIN_HAS_CLP
    3274      parameters[numberParameters++] =
    3275           CbcOrClpParam("primalW!eight", "Initially algorithm acts as if it \
     2833  parameters[numberParameters++] = CbcOrClpParam("primalW!eight", "Initially algorithm acts as if it \
    32762834costs this much to be infeasible",
    3277                         1.0e-20, 1.0e20, CLP_PARAM_DBL_PRIMALWEIGHT);
    3278      parameters[numberParameters-1].setLonghelp
    3279      (
    3280           "The primal algorithm in Clp is a single phase algorithm as opposed to a two phase\
     2835    1.0e-20, 1.0e20, CLP_PARAM_DBL_PRIMALWEIGHT);
     2836  parameters[numberParameters - 1].setLonghelp(
     2837    "The primal algorithm in Clp is a single phase algorithm as opposed to a two phase\
    32812838 algorithm where you first get feasible then optimal.  So Clp is minimizing this weight times\
    32822839 the sum of primal infeasibilities plus the true objective function (in minimization sense).\
     
    32842841 the code may go all the way and then have to increase the weight in order to get feasible.\
    32852842  OSL had a heuristic to\
    3286  adjust bounds, maybe we need that here."
    3287      );
    3288      parameters[numberParameters++] =
    3289           CbcOrClpParam("psi", "Two-dimension pricing factor for Positive edge",
    3290                         -1.1, 1.1, CLP_PARAM_DBL_PSI);
    3291      parameters[numberParameters-1].setDoubleValue(-0.5);
    3292      parameters[numberParameters-1].setLonghelp
    3293      (
    3294           "The Positive Edge criterion has been added to \
     2843 adjust bounds, maybe we need that here.");
     2844  parameters[numberParameters++] = CbcOrClpParam("psi", "Two-dimension pricing factor for Positive edge",
     2845    -1.1, 1.1, CLP_PARAM_DBL_PSI);
     2846  parameters[numberParameters - 1].setDoubleValue(-0.5);
     2847  parameters[numberParameters - 1].setLonghelp(
     2848    "The Positive Edge criterion has been added to \
    32952849select incoming variables to try and avoid degenerate moves. \
    32962850Variables not in promising set have their infeasibility weight multiplied by psi \
     
    33032857Code donated by Jeremy Omer.  See \
    33042858Towhidi, M., Desrosiers, J., Soumis, F., The positive edge criterion within COIN-OR’s CLP. and \
    3305 Omer, J., Towhidi, M., Soumis, F., The positive edge pricing rule for the dual simplex."
    3306      );
    3307 #endif
    3308      parameters[numberParameters++] =
    3309           CbcOrClpParam("printi!ngOptions", "Print options",
    3310                         "normal", CLP_PARAM_STR_INTPRINT, 3);
    3311      parameters[numberParameters-1].append("integer");
    3312      parameters[numberParameters-1].append("special");
    3313      parameters[numberParameters-1].append("rows");
    3314      parameters[numberParameters-1].append("all");
    3315      parameters[numberParameters-1].append("csv");
    3316      parameters[numberParameters-1].append("bound!ranging");
    3317      parameters[numberParameters-1].append("rhs!ranging");
    3318      parameters[numberParameters-1].append("objective!ranging");
    3319      parameters[numberParameters-1].append("stats");
    3320      parameters[numberParameters-1].append("boundsint");
    3321      parameters[numberParameters-1].append("boundsall");
    3322      parameters[numberParameters-1].setLonghelp
    3323      (
    3324           "This changes the amount and format of printing a solution:\nnormal - nonzero column variables \n\
     2859Omer, J., Towhidi, M., Soumis, F., The positive edge pricing rule for the dual simplex.");
     2860#endif
     2861  parameters[numberParameters++] = CbcOrClpParam("printi!ngOptions", "Print options",
     2862    "normal", CLP_PARAM_STR_INTPRINT, 3);
     2863  parameters[numberParameters - 1].append("integer");
     2864  parameters[numberParameters - 1].append("special");
     2865  parameters[numberParameters - 1].append("rows");
     2866  parameters[numberParameters - 1].append("all");
     2867  parameters[numberParameters - 1].append("csv");
     2868  parameters[numberParameters - 1].append("bound!ranging");
     2869  parameters[numberParameters - 1].append("rhs!ranging");
     2870  parameters[numberParameters - 1].append("objective!ranging");
     2871  parameters[numberParameters - 1].append("stats");
     2872  parameters[numberParameters - 1].append("boundsint");
     2873  parameters[numberParameters - 1].append("boundsall");
     2874  parameters[numberParameters - 1].setLonghelp(
     2875    "This changes the amount and format of printing a solution:\nnormal - nonzero column variables \n\
    33252876integer - nonzero integer column variables\n\
    33262877special - in format suitable for OsiRowCutDebugger\n\
     
    33282879all - all column variables and row activities.\n\
    33292880\nFor non-integer problems 'integer' and 'special' act like 'normal'.  \
    3330 Also see printMask for controlling output."
    3331      );
    3332      parameters[numberParameters++] =
    3333           CbcOrClpParam("printM!ask", "Control printing of solution on a  mask",
    3334                         CLP_PARAM_ACTION_PRINTMASK, 3);
    3335      parameters[numberParameters-1].setLonghelp
    3336      (
    3337           "If set then only those names which match mask are printed in a solution. \
     2881Also see printMask for controlling output.");
     2882  parameters[numberParameters++] = CbcOrClpParam("printM!ask", "Control printing of solution on a  mask",
     2883    CLP_PARAM_ACTION_PRINTMASK, 3);
     2884  parameters[numberParameters - 1].setLonghelp(
     2885    "If set then only those names which match mask are printed in a solution. \
    33382886'?' matches any character and '*' matches any set of characters. \
    33392887 The default is '' i.e. unset so all variables are printed. \
    3340 This is only active if model has names."
    3341      );
    3342 #ifdef COIN_HAS_CBC
    3343      parameters[numberParameters++] =
    3344           CbcOrClpParam("prio!rityIn", "Import priorities etc from file",
    3345                         CBC_PARAM_ACTION_PRIORITYIN, 3);
    3346      parameters[numberParameters-1].setLonghelp
    3347      (
    3348           "This will read a file with priorities from the given file name.  It will use the default\
     2888This is only active if model has names.");
     2889#ifdef COIN_HAS_CBC
     2890  parameters[numberParameters++] = CbcOrClpParam("prio!rityIn", "Import priorities etc from file",
     2891    CBC_PARAM_ACTION_PRIORITYIN, 3);
     2892  parameters[numberParameters - 1].setLonghelp(
     2893    "This will read a file with priorities from the given file name.  It will use the default\
    33492894 directory given by 'directory'.  A name of '$' will use the previous value for the name.  This\
    33502895 is initialized to '', i.e. it must be set.  This can not read from compressed files. \
    33512896File is in csv format with allowed headings - name, number, priority, direction, up, down, solution.  Exactly one of\
    3352  name and number must be given."
    3353      );
    3354      parameters[numberParameters++] =
    3355           CbcOrClpParam("probing!Cuts", "Whether to use Probing cuts",
    3356                         "off", CBC_PARAM_STR_PROBINGCUTS);
    3357      parameters[numberParameters-1].append("on");
    3358      parameters[numberParameters-1].append("root");
    3359      parameters[numberParameters-1].append("ifmove");
    3360      parameters[numberParameters-1].append("forceOn");
    3361      parameters[numberParameters-1].append("onglobal");
    3362      parameters[numberParameters-1].append("forceonglobal");
    3363      parameters[numberParameters-1].append("forceOnBut");
    3364      parameters[numberParameters-1].append("forceOnStrong");
    3365      parameters[numberParameters-1].append("forceOnButStrong");
    3366      parameters[numberParameters-1].append("strongRoot");
    3367      parameters[numberParameters-1].setLonghelp
    3368      (
    3369           "This switches on probing cuts (either at root or in entire tree) \
     2897 name and number must be given.");
     2898  parameters[numberParameters++] = CbcOrClpParam("probing!Cuts", "Whether to use Probing cuts",
     2899    "off", CBC_PARAM_STR_PROBINGCUTS);
     2900  parameters[numberParameters - 1].append("on");
     2901  parameters[numberParameters - 1].append("root");
     2902  parameters[numberParameters - 1].append("ifmove");
     2903  parameters[numberParameters - 1].append("forceOn");
     2904  parameters[numberParameters - 1].append("onglobal");
     2905  parameters[numberParameters - 1].append("forceonglobal");
     2906  parameters[numberParameters - 1].append("forceOnBut");
     2907  parameters[numberParameters - 1].append("forceOnStrong");
     2908  parameters[numberParameters - 1].append("forceOnButStrong");
     2909  parameters[numberParameters - 1].append("strongRoot");
     2910  parameters[numberParameters - 1].setLonghelp(
     2911    "This switches on probing cuts (either at root or in entire tree) \
    33702912See branchAndCut for information on options. \
    3371 but strong options do more probing"
    3372      );
    3373      parameters[numberParameters++] =
    3374           CbcOrClpParam("proximity!Search", "Whether to do proximity search heuristic",
    3375                         "off", CBC_PARAM_STR_PROXIMITY);
    3376      parameters[numberParameters-1].append("on");
    3377      parameters[numberParameters-1].append("both");
    3378      parameters[numberParameters-1].append("before");
    3379      parameters[numberParameters-1].append("10");
    3380      parameters[numberParameters-1].append("100");
    3381      parameters[numberParameters-1].append("300");
    3382      // but allow numbers after this (returning 1)
    3383      parameters[numberParameters-1].setFakeKeyWord(1);
    3384      parameters[numberParameters-1].setLonghelp
    3385      (
    3386           "This switches on a heuristic which looks for a solution close \
     2913but strong options do more probing");
     2914  parameters[numberParameters++] = CbcOrClpParam("proximity!Search", "Whether to do proximity search heuristic",
     2915    "off", CBC_PARAM_STR_PROXIMITY);
     2916  parameters[numberParameters - 1].append("on");
     2917  parameters[numberParameters - 1].append("both");
     2918  parameters[numberParameters - 1].append("before");
     2919  parameters[numberParameters - 1].append("10");
     2920  parameters[numberParameters - 1].append("100");
     2921  parameters[numberParameters - 1].append("300");
     2922  // but allow numbers after this (returning 1)
     2923  parameters[numberParameters - 1].setFakeKeyWord(1);
     2924  parameters[numberParameters - 1].setLonghelp(
     2925    "This switches on a heuristic which looks for a solution close \
    33872926to incumbent solution (Fischetti and Monaci). \
    33882927See Rounding for meaning of on,both,before. \
    3389 Can also set different maxNode settings by plusnnnn (and are 'on'(on==30))."
    3390      );
    3391      parameters[numberParameters++] =
    3392           CbcOrClpParam("pumpC!utoff", "Fake cutoff for use in feasibility pump",
    3393                         -1.0e100, 1.0e100, CBC_PARAM_DBL_FAKECUTOFF);
    3394      parameters[numberParameters-1].setDoubleValue(0.0);
    3395      parameters[numberParameters-1].setLonghelp
    3396      (
    3397           "0.0 off - otherwise add a constraint forcing objective below this value\
    3398  in feasibility pump"
    3399      );
    3400      parameters[numberParameters++] =
    3401           CbcOrClpParam("pumpI!ncrement", "Fake increment for use in feasibility pump",
    3402                         -1.0e100, 1.0e100, CBC_PARAM_DBL_FAKEINCREMENT, 1);
    3403      parameters[numberParameters-1].setDoubleValue(0.0);
    3404      parameters[numberParameters-1].setLonghelp
    3405      (
    3406           "0.0 off - otherwise use as absolute increment to cutoff \
    3407 when solution found in feasibility pump"
    3408      );
    3409      parameters[numberParameters++] =
    3410           CbcOrClpParam("pumpT!une", "Dubious ideas for feasibility pump",
    3411                         0, 100000000, CBC_PARAM_INT_FPUMPTUNE);
    3412      parameters[numberParameters-1].setLonghelp
    3413      (
    3414           "This fine tunes Feasibility Pump \n\
     2928Can also set different maxNode settings by plusnnnn (and are 'on'(on==30)).");
     2929  parameters[numberParameters++] = CbcOrClpParam("pumpC!utoff", "Fake cutoff for use in feasibility pump",
     2930    -1.0e100, 1.0e100, CBC_PARAM_DBL_FAKECUTOFF);
     2931  parameters[numberParameters - 1].setDoubleValue(0.0);
     2932  parameters[numberParameters - 1].setLonghelp(
     2933    "0.0 off - otherwise add a constraint forcing objective below this value\
     2934 in feasibility pump");
     2935  parameters[numberParameters++] = CbcOrClpParam("pumpI!ncrement", "Fake increment for use in feasibility pump",
     2936    -1.0e100, 1.0e100, CBC_PARAM_DBL_FAKEINCREMENT, 1);
     2937  parameters[numberParameters - 1].setDoubleValue(0.0);
     2938  parameters[numberParameters - 1].setLonghelp(
     2939    "0.0 off - otherwise use as absolute increment to cutoff \
     2940when solution found in feasibility pump");
     2941  parameters[numberParameters++] = CbcOrClpParam("pumpT!une", "Dubious ideas for feasibility pump",
     2942    0, 100000000, CBC_PARAM_INT_FPUMPTUNE);
     2943  parameters[numberParameters - 1].setLonghelp(
     2944    "This fine tunes Feasibility Pump \n\
    34152945\t>=10000000 use as objective weight switch\n\
    34162946\t>=1000000 use as accumulate switch\n\
     
    34202950\t1 == fix ints at bounds, 2 fix all integral ints, 3 and continuous at bounds. \
    34212951If accumulate is on then after a major pass, variables which have not moved \
    3422 are fixed and a small branch and bound is tried."
    3423      );
    3424      parameters[numberParameters-1].setIntValue(0);
    3425 #endif
    3426      parameters[numberParameters++] =
    3427           CbcOrClpParam("quit", "Stops clp execution",
    3428                         CLP_PARAM_ACTION_EXIT);
    3429      parameters[numberParameters-1].setLonghelp
    3430      (
    3431           "This stops the execution of Clp, end, exit, quit and stop are synonyms"
    3432      );
    3433 #ifdef COIN_HAS_CBC
    3434      parameters[numberParameters++] =
    3435           CbcOrClpParam("randomC!bcSeed", "Random seed for Cbc",
    3436                         -1, COIN_INT_MAX, CBC_PARAM_INT_RANDOMSEED);
    3437      parameters[numberParameters-1].setLonghelp
    3438      (
    3439           "This sets a random seed for Cbc \
    3440 - 0 says use time of day, -1 is as now."
    3441      );
    3442      parameters[numberParameters-1].setIntValue(-1);
    3443      parameters[numberParameters++] =
    3444           CbcOrClpParam("randomi!zedRounding", "Whether to try randomized rounding heuristic",
    3445                         "off", CBC_PARAM_STR_RANDROUND);
    3446      parameters[numberParameters-1].append("on");
    3447      parameters[numberParameters-1].append("both");
    3448      parameters[numberParameters-1].append("before");
    3449      parameters[numberParameters-1].setLonghelp
    3450      (
    3451           "stuff needed. \
    3452 Doh option does heuristic before preprocessing"     );
     2952are fixed and a small branch and bound is tried.");
     2953  parameters[numberParameters - 1].setIntValue(0);
     2954#endif
     2955  parameters[numberParameters++] = CbcOrClpParam("quit", "Stops clp execution",
     2956    CLP_PARAM_ACTION_EXIT);
     2957  parameters[numberParameters - 1].setLonghelp(
     2958    "This stops the execution of Clp, end, exit, quit and stop are synonyms");
     2959#ifdef COIN_HAS_CBC
     2960  parameters[numberParameters++] = CbcOrClpParam("randomC!bcSeed", "Random seed for Cbc",
     2961    -1, COIN_INT_MAX, CBC_PARAM_INT_RANDOMSEED);
     2962  parameters[numberParameters - 1].setLonghelp(
     2963    "This sets a random seed for Cbc \
     2964- 0 says use time of day, -1 is as now.");
     2965  parameters[numberParameters - 1].setIntValue(-1);
     2966  parameters[numberParameters++] = CbcOrClpParam("randomi!zedRounding", "Whether to try randomized rounding heuristic",
     2967    "off", CBC_PARAM_STR_RANDROUND);
     2968  parameters[numberParameters - 1].append("on");
     2969  parameters[numberParameters - 1].append("both");
     2970  parameters[numberParameters - 1].append("before");
     2971  parameters[numberParameters - 1].setLonghelp(
     2972    "stuff needed. \
     2973Doh option does heuristic before preprocessing");
    34532974#endif
    34542975#ifdef COIN_HAS_CLP
    3455      parameters[numberParameters++] =
    3456           CbcOrClpParam("randomS!eed", "Random seed for Clp",
    3457                         0, COIN_INT_MAX, CLP_PARAM_INT_RANDOMSEED);
    3458      parameters[numberParameters-1].setLonghelp
    3459      (
    3460           "This sets a random seed for Clp \
    3461 - 0 says use time of day."
    3462      );
    3463      parameters[numberParameters-1].setIntValue(1234567);
    3464 #endif
    3465 #ifdef COIN_HAS_CBC
    3466      parameters[numberParameters++] =
    3467           CbcOrClpParam("ratio!Gap", "Stop when gap between best possible and \
     2976  parameters[numberParameters++] = CbcOrClpParam("randomS!eed", "Random seed for Clp",
     2977    0, COIN_INT_MAX, CLP_PARAM_INT_RANDOMSEED);
     2978  parameters[numberParameters - 1].setLonghelp(
     2979    "This sets a random seed for Clp \
     2980- 0 says use time of day.");
     2981  parameters[numberParameters - 1].setIntValue(1234567);
     2982#endif
     2983#ifdef COIN_HAS_CBC
     2984  parameters[numberParameters++] = CbcOrClpParam("ratio!Gap", "Stop when gap between best possible and \
    34682985best less than this fraction of larger of two",
    3469                         0.0, 1.0e20, CBC_PARAM_DBL_GAPRATIO);
    3470      parameters[numberParameters-1].setDoubleValue(0.0);
    3471      parameters[numberParameters-1].setLonghelp
    3472      (
    3473           "If the gap between best solution and best possible solution is less than this fraction \
     2986    0.0, 1.0e20, CBC_PARAM_DBL_GAPRATIO);
     2987  parameters[numberParameters - 1].setDoubleValue(0.0);
     2988  parameters[numberParameters - 1].setLonghelp(
     2989    "If the gap between best solution and best possible solution is less than this fraction \
    34742990of the objective value at the root node then the search will terminate.  See 'allowableGap' for a \
    3475 way of using absolute value rather than fraction."
    3476      );
    3477 #endif
    3478      parameters[numberParameters++] =
    3479           CbcOrClpParam("restoreS!olution", "reads solution from file",
    3480                         CLP_PARAM_ACTION_RESTORESOL);
    3481      parameters[numberParameters-1].setLonghelp
    3482      (
    3483           "This will read a binary solution file from the given file name.  It will use the default\
     2991way of using absolute value rather than fraction.");
     2992#endif
     2993  parameters[numberParameters++] = CbcOrClpParam("restoreS!olution", "reads solution from file",
     2994    CLP_PARAM_ACTION_RESTORESOL);
     2995  parameters[numberParameters - 1].setLonghelp(
     2996    "This will read a binary solution file from the given file name.  It will use the default\
    34842997 directory given by 'directory'.  A name of '$' will use the previous value for the name.  This\
    3485  is initialized to 'solution.file'.  This reads in a file from saveSolution"
    3486      );
    3487 #ifdef COIN_HAS_CBC
    3488      parameters[numberParameters++] =
    3489           CbcOrClpParam("readSt!ored", "Import stored cuts from file",
    3490                         CLP_PARAM_ACTION_STOREDFILE, 3, 0);
     2998 is initialized to 'solution.file'.  This reads in a file from saveSolution");
     2999#ifdef COIN_HAS_CBC
     3000  parameters[numberParameters++] = CbcOrClpParam("readSt!ored", "Import stored cuts from file",
     3001    CLP_PARAM_ACTION_STOREDFILE, 3, 0);
    34913002#endif
    34923003#ifdef COIN_HAS_CLP
    3493      parameters[numberParameters++] =
    3494           CbcOrClpParam("reallyO!bjectiveScale", "Scale factor to apply to objective in place",
    3495                         -1.0e20, 1.0e20, CLP_PARAM_DBL_OBJSCALE2, 0);
    3496      parameters[numberParameters-1].setLonghelp
    3497      (
    3498           "You can set this to -1.0 to test maximization or other to stress code"
    3499      );
    3500      parameters[numberParameters-1].setDoubleValue(1.0);
    3501      parameters[numberParameters++] =
    3502           CbcOrClpParam("reallyS!cale", "Scales model in place",
    3503                         CLP_PARAM_ACTION_REALLY_SCALE, 7, 0);
    3504 #endif
    3505 #ifdef COIN_HAS_CBC
    3506      parameters[numberParameters++] =
    3507           CbcOrClpParam("reduce!AndSplitCuts", "Whether to use Reduce-and-Split cuts",
    3508                         "off", CBC_PARAM_STR_REDSPLITCUTS);
    3509      parameters[numberParameters-1].append("on");
    3510      parameters[numberParameters-1].append("root");
    3511      parameters[numberParameters-1].append("ifmove");
    3512      parameters[numberParameters-1].append("forceOn");
    3513      parameters[numberParameters-1].setLonghelp
    3514      (
    3515           "This switches on reduce and split  cuts (either at root or in entire tree). \
     3004  parameters[numberParameters++] = CbcOrClpParam("reallyO!bjectiveScale", "Scale factor to apply to o