Changeset 2488


Ignore:
Timestamp:
Feb 12, 2019 5:20:57 AM (2 months ago)
Author:
unxusr
Message:

initializations in CbcParam? and more getters and setters in Cbc_C_Interface

Location:
trunk/Cbc/src
Files:
3 edited

Legend:

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

    r2465 r2488  
    3535  , longHelp_()
    3636  , action_(CBC_PARAM_NOTUSED_INVALID)
    37   , currentKeyWord_(-1)
     37  , display_(false)
     38  , intValue_(0)
     39  , doubleValue_(0)
     40  , currentKeyWord_(-1)
     41  , indexNumber_(0)
    3842{
    3943}
     
    5155  , action_(type)
    5256  , currentKeyWord_(-1)
     57  , display_(false)
     58  , intValue_(0)
     59  , doubleValue_(0)
     60  , currentKeyWord_(-1)
     61  , indexNumber_(0)
    5362{
    5463  lowerDoubleValue_ = lower;
     
    6877  , action_(type)
    6978  , currentKeyWord_(-1)
     79  , display_(false)
     80  , intValue_(0)
     81  , doubleValue_(0)
     82  , currentKeyWord_(-1)
     83  , indexNumber_(0)
    7084{
    7185  gutsOfConstructor();
     
    89103  , action_(type)
    90104  , currentKeyWord_(0)
     105  , display_(false)
     106  , intValue_(0)
     107  , doubleValue_(0)
     108  , currentKeyWord_(-1)
     109  , indexNumber_(0)
    91110{
    92111  gutsOfConstructor();
     
    108127  , action_(type)
    109128  , currentKeyWord_(-1)
     129  , display_(false)
     130  , intValue_(0)
     131  , doubleValue_(0)
     132  , currentKeyWord_(-1)
     133  , indexNumber_(0)
    110134{
    111135  gutsOfConstructor();
     
    130154  action_ = rhs.action_;
    131155  currentKeyWord_ = rhs.currentKeyWord_;
     156  display_ = rhs.display_;
     157  intValue_ = rhs.intValue_;
     158  doubleValue_ = rhs.doubleValue_;
     159  indexNumber_ = rhs.indexNumber_;
    132160}
    133161
     
    159187    action_ = rhs.action_;
    160188    currentKeyWord_ = rhs.currentKeyWord_;
     189    display_ = rhs.display_;
     190    intValue_ = rhs.intValue_;
     191    doubleValue_ = rhs.doubleValue_;
     192    indexNumber_ = rhs.indexNumber_;
    161193  }
    162194  return *this;
     
    373405      oldValue = model.getDblParam(CbcModel::CbcCutoffIncrement);
    374406      model.setDblParam(CbcModel::CbcCutoffIncrement, value);
     407      break;
    375408    case CBC_PARAM_DBL_ALLOWABLEGAP:
    376409      oldValue = model.getDblParam(CbcModel::CbcAllowableGap);
  • trunk/Cbc/src/Cbc_C_Interface.cpp

    r2486 r2488  
    17311731}
    17321732
     1733double Cbc_getAllowableGap(Cbc_Model* model)
     1734{
     1735  return model->model_->getAllowableGap();
     1736}
     1737
     1738void Cbc_setAllowableGap(Cbc_Model* model, double allowedGap)
     1739{
     1740  model->model_->setAllowableGap(allowedGap);
     1741}
     1742
     1743double Cbc_getAllowableFractionGap(Cbc_Model* model)
     1744{
     1745  return model->model_->getAllowableFractionGap();
     1746}
     1747
     1748void Cbc_setAllowableFractionGap(Cbc_Model* model, double allowedFracionGap)
     1749{
     1750  model->model_->setAllowableFractionGap(allowedFracionGap);
     1751}
     1752
     1753double Cbc_getCutoff(Cbc_Model* model)
     1754{
     1755  return model->model_->getCutoff();
     1756}
     1757
     1758void Cbc_setCutoff(Cbc_Model* model, double cutoff)
     1759{
     1760  model->model_->setCutoff(cutoff);
     1761}
     1762
     1763double Cbc_getAllowablePercentageGap(Cbc_Model* model)
     1764{
     1765  return model->model_->getAllowablePercentageGap();
     1766}
     1767
     1768void Cbc_setAllowablePercentageGap(Cbc_Model* model,
     1769    double allowedPercentageGap)
     1770{
     1771  model->model_->setAllowablePercentageGap(allowedPercentageGap);
     1772}
     1773
    17331774#if defined(__MWERKS__)
    17341775#pragma export off
  • trunk/Cbc/src/Cbc_C_Interface.h

    r2478 r2488  
    514514Cbc_setParameter(Cbc_Model *model, const char *name, const char *value);
    515515
     516
     517/** returns the allowable gap
     518 */
     519COINLIBAPI double COINLINKAGE
     520Cbc_getAllowableGap(Cbc_Model *model);
     521
     522/** sets the allowable gap
     523 */
     524COINLIBAPI void COINLINKAGE
     525Cbc_setAllowableGap(Cbc_Model *model, double allowedGap);
     526
     527/** returns the allowable fraction gap
     528 */
     529COINLIBAPI double COINLINKAGE
     530Cbc_getAllowableFractionGap(Cbc_Model *model);
     531
     532/** sets the allowable fraction gap
     533 */
     534COINLIBAPI void COINLINKAGE
     535Cbc_setAllowableFractionGap(Cbc_Model *model, double allowedFracionGap);
     536
     537/** returns the allowable percentage gap
     538 */
     539COINLIBAPI double COINLINKAGE
     540Cbc_getAllowablePercentageGap(Cbc_Model *model);
     541
     542/** sets the allowable percentage gap
     543 */
     544COINLIBAPI void COINLINKAGE
     545Cbc_setAllowablePercentageGap(Cbc_Model *model, double allowedPercentageGap);
     546
     547
     548/** returns the cutoff
     549 */
     550COINLIBAPI double COINLINKAGE
     551Cbc_getCutoff(Cbc_Model *model);
     552
     553/** sets the cutoff
     554 */
     555COINLIBAPI void COINLINKAGE
     556Cbc_setCutoff(Cbc_Model *model, double cutoff);
     557
     558
     559
    516560/*@}*/
    517561/**@name Message handling.  Call backs are handled by ONE function */
Note: See TracChangeset for help on using the changeset viewer.