My Project
OSCoinSolver.h
Go to the documentation of this file.
1/* $Id$ */
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
28class OsiSolverInterface;
29class CoinPackedMatrix;
30
38{
39
40public:
41
45 CoinSolver();
46
51
56 virtual void solve();
57
62 virtual void buildSolverInstance();
63
68 virtual void setSolverOptions();
69
70
76
82 std::string getCoinSolverType(std::string osol_);
83
88 void dataEchoCheck();
89
93 OsiSolverInterface *osiSolver;
94
95
96
102
108
109
110 void writeResult(OsiSolverInterface *solver);
111
112 // use this for when we solve with Cbc --AND-- have integer variables
113 void writeResult(CbcModel *model);
114
115
116
117private:
118
119
120
121
122
126 CoinPackedMatrix *m_CoinPackedMatrix ;
127
130
134 const char **cbc_argv;
135
139
140 double cpuTime;
141
142};
143#endif
Implements a solve method for the Coin solvers.
Definition: OSCoinSolver.h:38
const char ** cbc_argv
when Cbc is the solver, these are the arguments sent to Cbc Solve
Definition: OSCoinSolver.h:134
virtual void setSolverOptions()
The implementation of the corresponding virtual function.
virtual void buildSolverInstance()
The implementation of the corresponding virtual function.
int num_cbc_argv
the number of arguments in the argument list to the Cbc Solver
Definition: OSCoinSolver.h:138
CoinPackedMatrix * m_CoinPackedMatrix
m_CoinPackedMatrix is a Coin Packed Matrix ojbect
Definition: OSCoinSolver.h:126
std::string getCoinSolverType(std::string osol_)
Get the solver type, e.g. clp or glpk.
OSiLReader * m_osilreader
m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed
Definition: OSCoinSolver.h:101
OsiSolverInterface * osiSolver
osiSolver is the osi solver object – in this case clp, glpk, cbc, cplex, symphony or dylp
Definition: OSCoinSolver.h:93
CoinSolver()
The class constructor.
~CoinSolver()
The class destructor.
OSoLReader * m_osolreader
m_osolreader is an OSoLReader object used to create an osoption from an osol string if needed
Definition: OSCoinSolver.h:107
void writeResult(OsiSolverInterface *solver)
OSrLWriter * osrlwriter
osrlwriter object used to write osrl from an OSResult object
Definition: OSCoinSolver.h:129
virtual void solve()
The implementation of the corresponding virtual function.
void dataEchoCheck()
Print out problem parameters.
bool setCoinPackedMatrix()
Create a CoinPackedMatrix.
double cpuTime
Definition: OSCoinSolver.h:140
The Default Solver Class.
Used to read an OSiL string.
Definition: OSiLReader.h:38
Used to read an OSoL string.
Definition: OSoLReader.h:38
Take an OSResult object and write a string that validates against OSrL.
Definition: OSrLWriter.h:31