OS 2.10.2
Loading...
Searching...
No Matches
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
30
38{
39
40public:
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
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
117private:
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
Implements a solve method for the Coin solvers.
Definition: OSCoinSolver.h:38
virtual void setSolverOptions()
The implementation of the corresponding virtual function.
virtual void buildSolverInstance()
The implementation of the corresponding virtual function.
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 dataEchoCheck()
Print out problem parameters.
void writeResult(OsiSolverInterface *solver)
virtual void solve()
The implementation of the corresponding virtual function.
std::string getCoinSolverType(std::string osol_)
Get the solver type, e.g.
bool setCoinPackedMatrix()
Create a CoinPackedMatrix.
The Default Solver Class.
used for throwing exceptions.
Definition: OSErrorClass.h:32
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