Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

coin.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Logger.h>
36 
37 #include <coin/CoinPackedVector.hpp> // not used here but always necessary when using COIN
38 
39 namespace ogdf {
40 
43 public:
45  static OsiSolverInterface* createCorrectOsiSolverInterface() {
46 #ifdef COIN_OSI_CPX
47  OsiCpxSolverInterface *ret = new OsiCpxSolverInterface(); // CPLEX
48 #elif defined(COIN_OSI_GRB)
49  OsiGrbSolverInterface *ret = new OsiGrbSolverInterface(); // Gurobi
50 #elif defined(COIN_OSI_SYM)
51  OsiSymSolverInterface *ret = new OsiSymSolverInterface(); // Symphony
52  ret->setSymParam(OsiSymVerbosity, -2);
53 #else // COIN_OSI_CLP
54  OsiClpSolverInterface *ret = new OsiClpSolverInterface(); // Coin-OR LP
55 #endif
57  return ret;
58  }
59 
61  static void logging(OsiSolverInterface* osi, bool logMe) {
62  osi->messageHandler()->setLogLevel(logMe ? 1 : 0);
63  }
64 };
65 
66 }
static void logging(OsiSolverInterface *osi, bool logMe)
Enable or disable logging for the given solver interface.
Definition: coin.h:61
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
If you use COIN-OR, you should use this class.
Definition: coin.h:42
static OsiSolverInterface * createCorrectOsiSolverInterface()
Get a new solver.
Definition: coin.h:45
static bool globalStatisticMode()
returns true if we are globally in statistic mode
Definition: Logger.h:247
Contains logging functionality.
static Level globalLogLevel()
gives the global log-level
Definition: Logger.h:224
The namespace for all OGDF objects.