lemon/clp.cc
changeset 655 c706534d4740
parent 540 9db62975c32b
child 746 e4554cd6b2bf
child 988 8d281761dea4
equal deleted inserted replaced
2:9e0ddc092b64 3:255a199538de
    22 namespace lemon {
    22 namespace lemon {
    23 
    23 
    24   ClpLp::ClpLp() {
    24   ClpLp::ClpLp() {
    25     _prob = new ClpSimplex();
    25     _prob = new ClpSimplex();
    26     _init_temporals();
    26     _init_temporals();
    27     messageLevel(MESSAGE_NO_OUTPUT);
    27     messageLevel(MESSAGE_NOTHING);
    28   }
    28   }
    29 
    29 
    30   ClpLp::ClpLp(const ClpLp& other) {
    30   ClpLp::ClpLp(const ClpLp& other) {
    31     _prob = new ClpSimplex(*other._prob);
    31     _prob = new ClpSimplex(*other._prob);
    32     rows = other.rows;
    32     rows = other.rows;
    33     cols = other.cols;
    33     cols = other.cols;
    34     _init_temporals();
    34     _init_temporals();
    35     messageLevel(MESSAGE_NO_OUTPUT);
    35     messageLevel(MESSAGE_NOTHING);
    36   }
    36   }
    37 
    37 
    38   ClpLp::~ClpLp() {
    38   ClpLp::~ClpLp() {
    39     delete _prob;
    39     delete _prob;
    40     _clear_temporals();
    40     _clear_temporals();
   428     cols.clear();
   428     cols.clear();
   429     _col_names_ref.clear();
   429     _col_names_ref.clear();
   430     _clear_temporals();
   430     _clear_temporals();
   431   }
   431   }
   432 
   432 
   433   void ClpLp::messageLevel(MessageLevel m) {
   433   void ClpLp::_messageLevel(MessageLevel level) {
   434     _prob->setLogLevel(static_cast<int>(m));
   434     switch (level) {
       
   435     case MESSAGE_NOTHING:
       
   436       _prob->setLogLevel(0);
       
   437       break;
       
   438     case MESSAGE_ERROR:
       
   439       _prob->setLogLevel(1);
       
   440       break;
       
   441     case MESSAGE_WARNING:
       
   442       _prob->setLogLevel(2);
       
   443       break;
       
   444     case MESSAGE_NORMAL:
       
   445       _prob->setLogLevel(3);
       
   446       break;
       
   447     case MESSAGE_VERBOSE:
       
   448       _prob->setLogLevel(4);
       
   449       break;
       
   450     }
   435   }
   451   }
   436 
   452 
   437 } //END OF NAMESPACE LEMON
   453 } //END OF NAMESPACE LEMON