COIN-OR::LEMON - Graph Library

Ticket #9: 0cad57c38b52.patch

File 0cad57c38b52.patch, 18.6 KB (added by Balazs Dezso, 16 years ago)

Unified message handling

  • lemon/cbc.cc

    # HG changeset patch
    # User Balazs Dezso <deba@inf.elte.hu>
    # Date 1239311347 -7200
    # Node ID 0cad57c38b5257a63834d4ba4bcd6f44006c61f7
    # Parent  d61d725c3959cbf22c4e0a04e22f5d7d2349ac76
    Unified message handling for LP and MIP solvers (#9)
    
    diff -r d61d725c3959 -r 0cad57c38b52 lemon/cbc.cc
    a b  
    5555    _prob->setProblemName("LEMON");
    5656    _osi_solver = 0;
    5757    _cbc_model = 0;
    58     messageLevel(MESSAGE_NO_OUTPUT);
     58    messageLevel(MESSAGE_NOTHING);
    5959  }
    6060
    6161  CbcMip::CbcMip(const CbcMip& other) {
    6262    _prob = new CoinModel(*other._prob);
     63    _prob->setProblemName("LEMON");
    6364    _osi_solver = 0;
    6465    _cbc_model = 0;
    65     messageLevel(MESSAGE_NO_OUTPUT);
     66    messageLevel(MESSAGE_NOTHING);
    6667  }
    6768
    6869  CbcMip::~CbcMip() {
     
    272273    }
    273274    _cbc_model= new CbcModel(*_osi_solver);
    274275
    275     switch (_message_level) {
    276     case MESSAGE_NO_OUTPUT:
    277       _osi_solver->messageHandler()->setLogLevel(0);
    278       _cbc_model->setLogLevel(0);
    279       break;
    280     case MESSAGE_ERROR_MESSAGE:
    281       _osi_solver->messageHandler()->setLogLevel(1);
    282       _cbc_model->setLogLevel(1);
    283       break;
    284     case MESSAGE_NORMAL_OUTPUT:
    285       _osi_solver->messageHandler()->setLogLevel(2);
    286       _cbc_model->setLogLevel(2);
    287       break;
    288     case MESSAGE_FULL_OUTPUT:
    289       _osi_solver->messageHandler()->setLogLevel(3);
    290       _cbc_model->setLogLevel(3);
    291       break;
    292     }
     276    _osi_solver->messageHandler()->setLogLevel(_message_level);
     277    _cbc_model->setLogLevel(_message_level);
    293278
    294279    _cbc_model->initialSolve();
    295280    _cbc_model->solver()->setHintParam(OsiDoReducePrint, true, OsiHintTry);
     
    455440    cols.clear();
    456441  }
    457442
    458   void CbcMip::messageLevel(MessageLevel m) {
    459     _message_level = m;
     443  void CbcMip::_messageLevel(MessageLevel level) {
     444    switch (level) {
     445    case MESSAGE_NOTHING:
     446      _message_level = 0;
     447      break;
     448    case MESSAGE_ERROR:
     449      _message_level = 1;
     450      break;
     451    case MESSAGE_WARNING:
     452      _message_level = 1;
     453      break;
     454    case MESSAGE_NORMAL:
     455      _message_level = 2;
     456      break;
     457    case MESSAGE_VERBOSE:
     458      _message_level = 3;
     459      break;
     460    }
    460461  }
    461462
    462463} //END OF NAMESPACE LEMON
  • lemon/cbc.h

    diff -r d61d725c3959 -r 0cad57c38b52 lemon/cbc.h
    a b  
    115115
    116116    virtual void _clear();
    117117
    118   public:
     118    virtual void _messageLevel(MessageLevel level);
     119    void _applyMessageLevel();
    119120
    120     ///Enum for \c messageLevel() parameter
    121     enum MessageLevel {
    122       /// no output (default value)
    123       MESSAGE_NO_OUTPUT = 0,
    124       /// error messages only
    125       MESSAGE_ERROR_MESSAGE = 1,
    126       /// normal output
    127       MESSAGE_NORMAL_OUTPUT = 2,
    128       /// full output (includes informational messages)
    129       MESSAGE_FULL_OUTPUT = 3
    130     };
     121    int _message_level;
    131122
    132   private:
    133 
    134     MessageLevel _message_level;
    135 
    136   public:
    137 
    138     ///Set the verbosity of the messages
    139 
    140     ///Set the verbosity of the messages
    141     ///
    142     ///\param m is the level of the messages output by the solver routines.
    143     void messageLevel(MessageLevel m);
    144 
     123   
    145124
    146125  };
    147126
  • lemon/clp.cc

    diff -r d61d725c3959 -r 0cad57c38b52 lemon/clp.cc
    a b  
    2424  ClpLp::ClpLp() {
    2525    _prob = new ClpSimplex();
    2626    _init_temporals();
    27     messageLevel(MESSAGE_NO_OUTPUT);
     27    messageLevel(MESSAGE_NOTHING);
    2828  }
    2929
    3030  ClpLp::ClpLp(const ClpLp& other) {
     
    3232    rows = other.rows;
    3333    cols = other.cols;
    3434    _init_temporals();
    35     messageLevel(MESSAGE_NO_OUTPUT);
     35    messageLevel(MESSAGE_NOTHING);
    3636  }
    3737
    3838  ClpLp::~ClpLp() {
     
    430430    _clear_temporals();
    431431  }
    432432
    433   void ClpLp::messageLevel(MessageLevel m) {
    434     _prob->setLogLevel(static_cast<int>(m));
     433  void ClpLp::_messageLevel(MessageLevel level) {
     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    }
    435451  }
    436452
    437453} //END OF NAMESPACE LEMON
  • lemon/clp.h

    diff -r d61d725c3959 -r 0cad57c38b52 lemon/clp.h
    a b  
    136136
    137137    virtual void _clear();
    138138
     139    virtual void _messageLevel(MessageLevel);
     140   
    139141  public:
    140142
    141143    ///Solves LP with primal simplex method.
     
    153155    ///Returns the variable identifier understood by CLP.
    154156    int clpCol(Col c) const { return cols(id(c)); }
    155157
    156     ///Enum for \c messageLevel() parameter
    157     enum MessageLevel {
    158       /// no output (default value)
    159       MESSAGE_NO_OUTPUT = 0,
    160       /// print final solution
    161       MESSAGE_FINAL_SOLUTION = 1,
    162       /// print factorization
    163       MESSAGE_FACTORIZATION = 2,
    164       /// normal output
    165       MESSAGE_NORMAL_OUTPUT = 3,
    166       /// verbose output
    167       MESSAGE_VERBOSE_OUTPUT = 4
    168     };
    169     ///Set the verbosity of the messages
    170 
    171     ///Set the verbosity of the messages
    172     ///
    173     ///\param m is the level of the messages output by the solver routines.
    174     void messageLevel(MessageLevel m);
    175 
    176158  };
    177159
    178160} //END OF NAMESPACE LEMON
  • lemon/cplex.cc

    diff -r d61d725c3959 -r 0cad57c38b52 lemon/cplex.cc
    a b  
    7272  CplexBase::CplexBase() : LpBase() {
    7373    int status;
    7474    _prob = CPXcreateprob(cplexEnv(), &status, "Cplex problem");
    75     messageLevel(MESSAGE_NO_OUTPUT);
     75    messageLevel(MESSAGE_NOTHING);
    7676  }
    7777
    7878  CplexBase::CplexBase(const CplexEnv& env)
    7979    : LpBase(), _env(env) {
    8080    int status;
    8181    _prob = CPXcreateprob(cplexEnv(), &status, "Cplex problem");
    82     messageLevel(MESSAGE_NO_OUTPUT);
     82    messageLevel(MESSAGE_NOTHING);
    8383  }
    8484
    8585  CplexBase::CplexBase(const CplexBase& cplex)
     
    8888    _prob = CPXcloneprob(cplexEnv(), cplex._prob, &status);
    8989    rows = cplex.rows;
    9090    cols = cplex.cols;
    91     messageLevel(MESSAGE_NO_OUTPUT);
     91    messageLevel(MESSAGE_NOTHING);
    9292  }
    9393
    9494  CplexBase::~CplexBase() {
     
    441441    cols.clear();
    442442  }
    443443
    444   void CplexBase::messageLevel(MessageLevel m) {
    445     _message_level = m;
     444  void CplexBase::_messageLevel(MessageLevel level) {
     445    switch (level) {
     446    case MESSAGE_NOTHING:
     447      _message_enabled = false;
     448      break;
     449    case MESSAGE_ERROR:
     450    case MESSAGE_WARNING:
     451    case MESSAGE_NORMAL:
     452    case MESSAGE_VERBOSE:
     453      _message_enabled = true;
     454      break;
     455    }
    446456  }
    447457
    448   void CplexBase::setMessageLevel() {
    449     switch (_message_level) {
    450     case MESSAGE_NO_OUTPUT:
    451       CPXsetintparam(cplexEnv(), CPX_PARAM_SCRIND, CPX_OFF);
    452       break;
    453     case MESSAGE_NORMAL_OUTPUT:
    454       CPXsetintparam(cplexEnv(), CPX_PARAM_SCRIND, CPX_ON);
    455       break;
    456     }
     458  void CplexBase::_applyMessageLevel() {
     459    CPXsetintparam(cplexEnv(), CPX_PARAM_SCRIND,
     460                   _message_enabled ? CPX_ON : CPX_OFF);
    457461  }
    458462
    459463  // CplexLp members
     
    525529
    526530  CplexLp::SolveExitStatus CplexLp::_solve() {
    527531    _clear_temporals();
    528     setMessageLevel();
     532    _applyMessageLevel();
    529533    return convertStatus(CPXlpopt(cplexEnv(), _prob));
    530534  }
    531535
    532536  CplexLp::SolveExitStatus CplexLp::solvePrimal() {
    533537    _clear_temporals();
    534     setMessageLevel();
     538    _applyMessageLevel();
    535539    return convertStatus(CPXprimopt(cplexEnv(), _prob));
    536540  }
    537541
    538542  CplexLp::SolveExitStatus CplexLp::solveDual() {
    539543    _clear_temporals();
    540     setMessageLevel();
     544    _applyMessageLevel();
    541545    return convertStatus(CPXdualopt(cplexEnv(), _prob));
    542546  }
    543547
    544548  CplexLp::SolveExitStatus CplexLp::solveBarrier() {
    545549    _clear_temporals();
    546     setMessageLevel();
     550    _applyMessageLevel();
    547551    return convertStatus(CPXbaropt(cplexEnv(), _prob));
    548552  }
    549553
     
    885889
    886890  CplexMip::SolveExitStatus CplexMip::_solve() {
    887891    int status;
    888     setMessageLevel();
     892    _applyMessageLevel();
    889893    status = CPXmipopt (cplexEnv(), _prob);
    890894    if (status==0)
    891895      return SOLVED;
  • lemon/cplex.h

    diff -r d61d725c3959 -r 0cad57c38b52 lemon/cplex.h
    a b  
    144144
    145145    virtual void _clear();
    146146
    147   public:
     147    virtual void _messageLevel(MessageLevel level);
     148    void _applyMessageLevel();
    148149
    149     ///Enum for \c messageLevel() parameter
    150     enum MessageLevel {
    151       /// no output (default value)
    152       MESSAGE_NO_OUTPUT,
    153       /// normal output
    154       MESSAGE_NORMAL_OUTPUT,
    155     };
    156 
    157   protected:
    158 
    159     MessageLevel _message_level;
    160 
    161     void setMessageLevel();
     150    bool _message_enabled;
    162151
    163152  public:
    164153
    165     ///Set the verbosity of the messages
    166 
    167     ///Set the verbosity of the messages
    168     ///
    169     ///\param m is the level of the messages output by the solver routines.
    170     void messageLevel(MessageLevel m);
    171 
    172154    /// Returns the used \c CplexEnv instance
    173155    const CplexEnv& env() const { return _env; }
    174156
  • lemon/glpk.cc

    diff -r d61d725c3959 -r 0cad57c38b52 lemon/glpk.cc
    a b  
    3131  GlpkBase::GlpkBase() : LpBase() {
    3232    lp = glp_create_prob();
    3333    glp_create_index(lp);
    34     messageLevel(MESSAGE_NO_OUTPUT);
     34    messageLevel(MESSAGE_NOTHING);
    3535  }
    3636
    3737  GlpkBase::GlpkBase(const GlpkBase &other) : LpBase() {
     
    4040    glp_create_index(lp);
    4141    rows = other.rows;
    4242    cols = other.cols;
    43     messageLevel(MESSAGE_NO_OUTPUT);
     43    messageLevel(MESSAGE_NOTHING);
    4444  }
    4545
    4646  GlpkBase::~GlpkBase() {
     
    528528    glp_free_env();
    529529  }
    530530
    531   void GlpkBase::messageLevel(MessageLevel m) {
    532     _message_level = m;
     531  void GlpkBase::_messageLevel(MessageLevel level) {
     532    switch (level) {
     533    case MESSAGE_NOTHING:
     534      _message_level = GLP_MSG_OFF;
     535      break;
     536    case MESSAGE_ERROR:
     537      _message_level = GLP_MSG_ERR;
     538      break;
     539    case MESSAGE_WARNING:
     540      _message_level = GLP_MSG_ERR;
     541      break;
     542    case MESSAGE_NORMAL:
     543      _message_level = GLP_MSG_ON;
     544      break;
     545    case MESSAGE_VERBOSE:
     546      _message_level = GLP_MSG_ALL;
     547      break;
     548    }
    533549  }
    534550
    535551  GlpkBase::FreeEnvHelper GlpkBase::freeEnvHelper;
     
    566582    glp_smcp smcp;
    567583    glp_init_smcp(&smcp);
    568584
    569     switch (_message_level) {
    570     case MESSAGE_NO_OUTPUT:
    571       smcp.msg_lev = GLP_MSG_OFF;
    572       break;
    573     case MESSAGE_ERROR_MESSAGE:
    574       smcp.msg_lev = GLP_MSG_ERR;
    575       break;
    576     case MESSAGE_NORMAL_OUTPUT:
    577       smcp.msg_lev = GLP_MSG_ON;
    578       break;
    579     case MESSAGE_FULL_OUTPUT:
    580       smcp.msg_lev = GLP_MSG_ALL;
    581       break;
    582     }
     585    smcp.msg_lev = _message_level;
    583586    smcp.presolve = _presolve;
    584587
    585588    // If the basis is not valid we get an error return value.
     
    608611    glp_smcp smcp;
    609612    glp_init_smcp(&smcp);
    610613
    611     switch (_message_level) {
    612     case MESSAGE_NO_OUTPUT:
    613       smcp.msg_lev = GLP_MSG_OFF;
    614       break;
    615     case MESSAGE_ERROR_MESSAGE:
    616       smcp.msg_lev = GLP_MSG_ERR;
    617       break;
    618     case MESSAGE_NORMAL_OUTPUT:
    619       smcp.msg_lev = GLP_MSG_ON;
    620       break;
    621     case MESSAGE_FULL_OUTPUT:
    622       smcp.msg_lev = GLP_MSG_ALL;
    623       break;
    624     }
     614    smcp.msg_lev = _message_level;
    625615    smcp.meth = GLP_DUAL;
    626616    smcp.presolve = _presolve;
    627617
     
    898888    glp_smcp smcp;
    899889    glp_init_smcp(&smcp);
    900890
    901     switch (_message_level) {
    902     case MESSAGE_NO_OUTPUT:
    903       smcp.msg_lev = GLP_MSG_OFF;
    904       break;
    905     case MESSAGE_ERROR_MESSAGE:
    906       smcp.msg_lev = GLP_MSG_ERR;
    907       break;
    908     case MESSAGE_NORMAL_OUTPUT:
    909       smcp.msg_lev = GLP_MSG_ON;
    910       break;
    911     case MESSAGE_FULL_OUTPUT:
    912       smcp.msg_lev = GLP_MSG_ALL;
    913       break;
    914     }
     891    smcp.msg_lev = _message_level;
    915892    smcp.meth = GLP_DUAL;
    916893
    917894    // If the basis is not valid we get an error return value.
     
    936913    glp_iocp iocp;
    937914    glp_init_iocp(&iocp);
    938915
    939     switch (_message_level) {
    940     case MESSAGE_NO_OUTPUT:
    941       iocp.msg_lev = GLP_MSG_OFF;
    942       break;
    943     case MESSAGE_ERROR_MESSAGE:
    944       iocp.msg_lev = GLP_MSG_ERR;
    945       break;
    946     case MESSAGE_NORMAL_OUTPUT:
    947       iocp.msg_lev = GLP_MSG_ON;
    948       break;
    949     case MESSAGE_FULL_OUTPUT:
    950       iocp.msg_lev = GLP_MSG_ALL;
    951       break;
    952     }
     916    iocp.msg_lev = _message_level;
    953917
    954918    if (glp_intopt(lp, &iocp) != 0) return UNSOLVED;
    955919    return SOLVED;
  • lemon/glpk.h

    diff -r d61d725c3959 -r 0cad57c38b52 lemon/glpk.h
    a b  
    100100
    101101    virtual void _clear();
    102102
     103    virtual void _messageLevel(MessageLevel level);
     104
    103105  private:
    104106
    105107    static void freeEnv();
     
    111113    };
    112114   
    113115    static FreeEnvHelper freeEnvHelper;
     116
     117  protected:
     118   
     119    int _message_level;
    114120   
    115121  public:
    116122
    117     ///Enum for \c messageLevel() parameter
    118     enum MessageLevel {
    119       /// no output (default value)
    120       MESSAGE_NO_OUTPUT = 0,
    121       /// error messages only
    122       MESSAGE_ERROR_MESSAGE = 1,
    123       /// normal output
    124       MESSAGE_NORMAL_OUTPUT = 2,
    125       /// full output (includes informational messages)
    126       MESSAGE_FULL_OUTPUT = 3
    127     };
    128 
    129   protected:
    130 
    131     MessageLevel _message_level;
    132 
    133   public:
    134 
    135     ///Set the verbosity of the messages
    136 
    137     ///Set the verbosity of the messages
    138     ///
    139     ///\param m is the level of the messages output by the solver routines.
    140     void messageLevel(MessageLevel m);
    141 
    142123    ///Pointer to the underlying GLPK data structure.
    143124    LPX *lpx() {return lp;}
    144125    ///Const pointer to the underlying GLPK data structure.
  • lemon/lp_base.h

    diff -r d61d725c3959 -r 0cad57c38b52 lemon/lp_base.h
    a b  
    6969      MAX
    7070    };
    7171
     72    ///Enum for \c messageLevel() parameter
     73    enum MessageLevel {
     74      /// no output (default value)
     75      MESSAGE_NOTHING,
     76      /// error messages only
     77      MESSAGE_ERROR,
     78      /// warnings
     79      MESSAGE_WARNING,
     80      /// normal output
     81      MESSAGE_NORMAL,
     82      /// verbose output
     83      MESSAGE_VERBOSE
     84    };
     85   
     86
    7287    ///The floating point type used by the solver
    7388    typedef double Value;
    7489    ///The infinity constant
     
    973988
    974989    virtual const char* _solverName() const = 0;
    975990
     991    virtual void _messageLevel(MessageLevel level) = 0;
     992
    976993    //Own protected stuff
    977994
    978995    //Constant component of the objective function
     
    15271544    ///Clears the problem
    15281545    void clear() { _clear(); }
    15291546
     1547    /// Sets the message level of the solver
     1548    void messageLevel(MessageLevel level) { _messageLevel(level); }
     1549
    15301550    ///@}
    15311551
    15321552  };
  • lemon/lp_skeleton.cc

    diff -r d61d725c3959 -r 0cad57c38b52 lemon/lp_skeleton.cc
    a b  
    8484    row_num = col_num = 0;
    8585  }
    8686
     87  void SkeletonSolverBase::_messageLevel(MessageLevel) {}
     88
    8789  LpSkeleton::SolveExitStatus LpSkeleton::_solve() { return SOLVED; }
    8890
    8991  LpSkeleton::Value LpSkeleton::_getPrimal(int) const { return 0; }
  • lemon/lp_skeleton.h

    diff -r d61d725c3959 -r 0cad57c38b52 lemon/lp_skeleton.h
    a b  
    140140    ///\e
    141141    virtual void _clear();
    142142
     143    ///\e
     144    virtual void _messageLevel(MessageLevel);
    143145  };
    144146
    145147  /// \brief Skeleton class for an LP solver interface
  • lemon/soplex.cc

    diff -r d61d725c3959 -r 0cad57c38b52 lemon/soplex.cc
    a b  
    2929
    3030  SoplexLp::SoplexLp() {
    3131    soplex = new soplex::SoPlex;
    32     messageLevel(MESSAGE_NO_OUTPUT);
     32    messageLevel(MESSAGE_NOTHING);
    3333  }
    3434
    3535  SoplexLp::~SoplexLp() {
     
    4949    _row_names = lp._row_names;
    5050    _row_names_ref = lp._row_names_ref;
    5151
    52     messageLevel(MESSAGE_NO_OUTPUT);
     52    messageLevel(MESSAGE_NOTHING);
    5353  }
    5454
    5555  void SoplexLp::_clear_temporals() {
     
    275275
    276276    _clear_temporals();
    277277   
    278     setMessageLevel();
     278    _applyMessageLevel();
    279279
    280280    soplex::SPxSolver::Status status = soplex->solve();
    281281
     
    424424    _clear_temporals();
    425425  }
    426426
    427   void SoplexLp::messageLevel(MessageLevel m) {
    428     _message_level = m;
    429   }
    430 
    431   void SoplexLp::setMessageLevel() {
    432     switch (_message_level) {
    433     case MESSAGE_NO_OUTPUT:
    434       soplex::Param::setVerbose(-1);
     427  void SoplexLp::_messageLevel(MessageLevel level) {
     428    switch (level) {
     429    case MESSAGE_NOTHING:
     430      _message_level = -1;
    435431      break;
    436     case MESSAGE_ERROR_MESSAGE:
    437       soplex::Param::setVerbose(soplex::SPxOut::ERROR);
     432    case MESSAGE_ERROR:
     433      _message_level = soplex::SPxOut::ERROR;
    438434      break;
    439435    case MESSAGE_WARNING:
    440       soplex::Param::setVerbose(soplex::SPxOut::WARNING);
     436      _message_level = soplex::SPxOut::WARNING;
    441437      break;
    442     case MESSAGE_INFO_01:
    443       soplex::Param::setVerbose(soplex::SPxOut::INFO1);
     438    case MESSAGE_NORMAL:
     439      _message_level = soplex::SPxOut::INFO2;
    444440      break;
    445     case MESSAGE_INFO_02:
    446       soplex::Param::setVerbose(soplex::SPxOut::INFO2);
    447       break;
    448     case MESSAGE_INFO_03:
    449       soplex::Param::setVerbose(soplex::SPxOut::INFO3);
    450       break;
    451     case MESSAGE_DEBUG_INFO:
    452       soplex::Param::setVerbose(soplex::SPxOut::DEBUG);
     441    case MESSAGE_VERBOSE:
     442      _message_level = soplex::SPxOut::DEBUG;
    453443      break;
    454444    }
    455445  }
    456446
     447  void SoplexLp::_applyMessageLevel() {
     448    soplex::Param::setVerbose(_message_level);
     449  }
     450
    457451} //namespace lemon
    458452
  • lemon/soplex.h

    diff -r d61d725c3959 -r 0cad57c38b52 lemon/soplex.h
    a b  
    144144
    145145    virtual void _clear();
    146146
    147   public:
     147    void _messageLevel(MessageLevel m);
     148    void _applyMessageLevel();
    148149
    149     ///Enum for \c messageLevel() parameter
    150     enum MessageLevel {
    151       /// no output (default value)
    152       MESSAGE_NO_OUTPUT,
    153       /// error messages only
    154       MESSAGE_ERROR_MESSAGE,
    155       /// warnings
    156       MESSAGE_WARNING,
    157       /// first level informations
    158       MESSAGE_INFO_01,
    159       /// second level informations
    160       MESSAGE_INFO_02,
    161       /// third level informations
    162       MESSAGE_INFO_03,
    163       /// debug informations
    164       MESSAGE_DEBUG_INFO
    165     };
    166 
    167   protected:
    168 
    169     MessageLevel _message_level;
    170 
    171     void setMessageLevel();
    172 
    173   public:
    174 
    175     ///Set the verbosity of the messages
    176 
    177     ///Set the verbosity of the messages
    178     ///
    179     ///\param m is the level of the messages output by the solver routines.
    180     void messageLevel(MessageLevel m);
     150    int _message_level;
    181151
    182152  };
    183153