OS  2.10.2
OSCoinSolver.h
Go to the documentation of this file.
1 /* $Id: OSCoinSolver.h 5284 2017-12-08 13:52:50Z stefan $ */
15 #ifndef COINSOLVER_H
16 #define COINSOLVER_H
17 
18 #include "OSConfig.h"
19 #include "OSDefaultSolver.h"
20 #include "OSrLWriter.h"
21 #include "OSErrorClass.h"
22 #include "OSiLReader.h"
23 #include "OSoLReader.h"
24 #include "CbcModel.hpp"
25 
26 #include <string>
27 
28 class OsiSolverInterface;
29 class CoinPackedMatrix;
30 
37 class CoinSolver : public DefaultSolver
38 {
39 
40 public:
41 
46 
51 
56  virtual void solve() throw(ErrorClass);
57 
62  virtual void buildSolverInstance() throw(ErrorClass);
63 
68  virtual void setSolverOptions() throw(ErrorClass);
69 
70 
76 
82  std::string getCoinSolverType(std::string osol_);
83 
88  void dataEchoCheck();
89 
94 
95 
96 
102 
108 
109 
111 
112  // use this for when we solve with Cbc --AND-- have integer variables
113  void writeResult(CbcModel *model);
114 
115 
116 
117 private:
118 
119 
120 
121 
122 
126  CoinPackedMatrix *m_CoinPackedMatrix ;
127 
129  OSrLWriter *osrlwriter;
130 
134  const char **cbc_argv;
135 
138  int num_cbc_argv;
139 
140  double cpuTime;
141 
142 };
143 #endif
OSConfig.h
OSiLReader
Used to read an OSiL string.
Definition: OSiLReader.h:38
CoinSolver::osiSolver
OsiSolverInterface * osiSolver
osiSolver is the osi solver object – in this case clp, glpk, cbc, cplex, symphony or dylp
Definition: OSCoinSolver.h:93
OSErrorClass.h
CoinSolver
Implements a solve method for the Coin solvers.
Definition: OSCoinSolver.h:38
OSoLReader
Used to read an OSoL string.
Definition: OSoLReader.h:38
OSrLWriter.h
OSrLWriter
Take an OSResult object and write a string that validates against OSrL.
Definition: OSrLWriter.h:31
CoinSolver::solve
virtual void solve()
The implementation of the corresponding virtual function.
CoinSolver::getCoinSolverType
std::string getCoinSolverType(std::string osol_)
Get the solver type, e.g. clp or glpk.
CoinSolver::m_osilreader
OSiLReader * m_osilreader
m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed
Definition: OSCoinSolver.h:101
CoinSolver::m_osolreader
OSoLReader * m_osolreader
m_osolreader is an OSoLReader object used to create an osoption from an osol string if needed
Definition: OSCoinSolver.h:107
CoinSolver::~CoinSolver
~CoinSolver()
The class destructor.
CoinSolver::CoinSolver
CoinSolver()
The class constructor.
OSoLReader.h
OSiLReader.h
OSDefaultSolver.h
CbcModel
CoinSolver::buildSolverInstance
virtual void buildSolverInstance()
The implementation of the corresponding virtual function.
CbcModel.hpp
CoinSolver::dataEchoCheck
void dataEchoCheck()
Print out problem parameters.
ErrorClass
used for throwing exceptions.
Definition: OSErrorClass.h:32
OsiSolverInterface
CoinPackedMatrix
CoinSolver::writeResult
void writeResult(OsiSolverInterface *solver)
DefaultSolver
The Default Solver Class.
Definition: OSDefaultSolver.h:36
CoinSolver::setSolverOptions
virtual void setSolverOptions()
The implementation of the corresponding virtual function.
CoinSolver::setCoinPackedMatrix
bool setCoinPackedMatrix()
Create a CoinPackedMatrix.