COIN-OR::LEMON - Graph Library

Changeset 623:745e182d0139 in lemon for lemon/soplex.cc


Ignore:
Timestamp:
04/08/09 22:49:28 (11 years ago)
Author:
Balazs Dezso <deba@…>
Branch:
default
Phase:
public
Message:

Unified message handling for LP and MIP solvers (#9)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/soplex.cc

    r587 r623  
    2121
    2222#include <soplex.h>
     23#include <spxout.h>
    2324
    2425
     
    2930  SoplexLp::SoplexLp() {
    3031    soplex = new soplex::SoPlex;
     32    messageLevel(MESSAGE_NOTHING);
    3133  }
    3234
     
    4850    _row_names_ref = lp._row_names_ref;
    4951
     52    messageLevel(MESSAGE_NOTHING);
    5053  }
    5154
     
    272275
    273276    _clear_temporals();
     277   
     278    _applyMessageLevel();
    274279
    275280    soplex::SPxSolver::Status status = soplex->solve();
     
    420425  }
    421426
     427  void SoplexLp::_messageLevel(MessageLevel level) {
     428    switch (level) {
     429    case MESSAGE_NOTHING:
     430      _message_level = -1;
     431      break;
     432    case MESSAGE_ERROR:
     433      _message_level = soplex::SPxOut::ERROR;
     434      break;
     435    case MESSAGE_WARNING:
     436      _message_level = soplex::SPxOut::WARNING;
     437      break;
     438    case MESSAGE_NORMAL:
     439      _message_level = soplex::SPxOut::INFO2;
     440      break;
     441    case MESSAGE_VERBOSE:
     442      _message_level = soplex::SPxOut::DEBUG;
     443      break;
     444    }
     445  }
     446
     447  void SoplexLp::_applyMessageLevel() {
     448    soplex::Param::setVerbose(_message_level);
     449  }
     450
    422451} //namespace lemon
    423452
Note: See TracChangeset for help on using the changeset viewer.