COIN-OR::LEMON - Graph Library

Changeset 1326:85f1c483279e in lemon-0.x


Ignore:
Timestamp:
04/08/05 16:40:37 (19 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1765
Message:

Add presolver() to turn on/off the GLPK presolver

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/demo/lp_demo.cc

    r1322 r1326  
    3939  }
    4040  lp.max();
     41
     42  lp.presolver(true);
     43 
     44  lp.messageLevel(3);
     45
    4146  lp.solve();
    4247
     
    4651int main()
    4752{
    48   LpGlpk lp_glpk;
    49 
    5053  ListGraph g;
    5154  ListGraph::Node s;
    5255  ListGraph::Node t;
    5356 
    54 
    5557  ListGraph::EdgeMap<double> cap(g);
    5658 
  • src/lemon/lp_glpk.cc

    r1321 r1326  
    314314  }
    315315
     316  void LpGlpk::presolver(bool b)
     317  {
     318    lpx_set_int_parm(lp, LPX_K_PRESOL, b);
     319  }
     320
    316321 
    317322} //END OF NAMESPACE LEMON
  • src/lemon/lp_glpk.h

    r1321 r1326  
    2323#include "lp_base.h"
    2424extern "C" {
    25 #include "glpk.h"
     25#include <glpk.h>
    2626}
    2727
     
    7777    ///Set the verbosity of the messages
    7878
     79    ///Set the verbosity of the messages
     80    ///
    7981    ///\param m is the level of the messages output by the solver routines.
    8082    ///The possible values are:
     
    8486    ///- 3 --- full output (includes informational messages)
    8587    void messageLevel(int m);
     88    ///Turns on or off the presolver
     89
     90    ///Turns on (\c b is \c true) or off (\c b is \c false) the presolver
     91    ///
     92    ///The presolver is off by default.
     93    void presolver(bool b);
    8694   
    8795  };
Note: See TracChangeset for help on using the changeset viewer.