1.1 --- a/lemon/soplex.cc Tue Apr 14 10:54:42 2009 +0200
1.2 +++ b/lemon/soplex.cc Tue Apr 14 10:40:33 2009 +0100
1.3 @@ -20,6 +20,7 @@
1.4 #include <lemon/soplex.h>
1.5
1.6 #include <soplex.h>
1.7 +#include <spxout.h>
1.8
1.9
1.10 ///\file
1.11 @@ -28,6 +29,7 @@
1.12
1.13 SoplexLp::SoplexLp() {
1.14 soplex = new soplex::SoPlex;
1.15 + messageLevel(MESSAGE_NOTHING);
1.16 }
1.17
1.18 SoplexLp::~SoplexLp() {
1.19 @@ -47,6 +49,7 @@
1.20 _row_names = lp._row_names;
1.21 _row_names_ref = lp._row_names_ref;
1.22
1.23 + messageLevel(MESSAGE_NOTHING);
1.24 }
1.25
1.26 void SoplexLp::_clear_temporals() {
1.27 @@ -271,6 +274,8 @@
1.28 SoplexLp::SolveExitStatus SoplexLp::_solve() {
1.29
1.30 _clear_temporals();
1.31 +
1.32 + _applyMessageLevel();
1.33
1.34 soplex::SPxSolver::Status status = soplex->solve();
1.35
1.36 @@ -419,5 +424,29 @@
1.37 _clear_temporals();
1.38 }
1.39
1.40 + void SoplexLp::_messageLevel(MessageLevel level) {
1.41 + switch (level) {
1.42 + case MESSAGE_NOTHING:
1.43 + _message_level = -1;
1.44 + break;
1.45 + case MESSAGE_ERROR:
1.46 + _message_level = soplex::SPxOut::ERROR;
1.47 + break;
1.48 + case MESSAGE_WARNING:
1.49 + _message_level = soplex::SPxOut::WARNING;
1.50 + break;
1.51 + case MESSAGE_NORMAL:
1.52 + _message_level = soplex::SPxOut::INFO2;
1.53 + break;
1.54 + case MESSAGE_VERBOSE:
1.55 + _message_level = soplex::SPxOut::DEBUG;
1.56 + break;
1.57 + }
1.58 + }
1.59 +
1.60 + void SoplexLp::_applyMessageLevel() {
1.61 + soplex::Param::setVerbose(_message_level);
1.62 + }
1.63 +
1.64 } //namespace lemon
1.65