My Project
CoinSolver Class Reference

Implements a solve method for the Coin solvers. More...

#include <OSCoinSolver.h>

Inheritance diagram for CoinSolver:
DefaultSolver

Public Member Functions

 CoinSolver ()
 The class constructor.
 
 ~CoinSolver ()
 The class destructor.
 
virtual void solve ()
 The implementation of the corresponding virtual function.
 
virtual void buildSolverInstance ()
 The implementation of the corresponding virtual function.
 
virtual void setSolverOptions ()
 The implementation of the corresponding virtual function.
 
bool setCoinPackedMatrix ()
 Create a CoinPackedMatrix.
 
std::string getCoinSolverType (std::string osol_)
 Get the solver type, e.g. clp or glpk.
 
void dataEchoCheck ()
 Print out problem parameters.
 
void writeResult (OsiSolverInterface *solver)
 
void writeResult (CbcModel *model)
 
- Public Member Functions inherited from DefaultSolver
 DefaultSolver ()
 default constructor.
 
virtual ~DefaultSolver ()=0
 default destructor.
 

Public Attributes

OsiSolverInterface * osiSolver
 osiSolver is the osi solver object – in this case clp, glpk, cbc, cplex, symphony or dylp
 
OSiLReaderm_osilreader
 m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed
 
OSoLReaderm_osolreader
 m_osolreader is an OSoLReader object used to create an osoption from an osol string if needed
 
- Public Attributes inherited from DefaultSolver
std::string osil
 osil holds the problem instance as a std::string
 
std::string osol
 osol holds the options for the solver
 
std::string osrl
 osrl holds the solution or result of the model
 
OSInstanceosinstance
 osinstance holds the problem instance in-memory as an OSInstance object
 
OSOptionosoption
 osoption holds the solver options in-memory as an OSOption object
 
OSResultosresult
 osresult holds the solution or result of the model in-memory as an OSResult object
 
std::string sSolverName
 sSolverName is the name of the Coin solver used, e.g.
 
bool bCallbuildSolverInstance
 bCallbuildSolverInstance is set to true if buildSolverService has been called
 
bool bSetSolverOptions
 bSetSolverOptions is set to true if setSolverOptions has been called, false otherwise
 

Private Attributes

CoinPackedMatrix * m_CoinPackedMatrix
 m_CoinPackedMatrix is a Coin Packed Matrix ojbect
 
OSrLWriterosrlwriter
 osrlwriter object used to write osrl from an OSResult object
 
const char ** cbc_argv
 when Cbc is the solver, these are the arguments sent to Cbc Solve
 
int num_cbc_argv
 the number of arguments in the argument list to the Cbc Solver
 
double cpuTime
 

Detailed Description

Implements a solve method for the Coin solvers.

This class implements a solve method for the Coin solvers It reads an OSInstance object and puts into the Coin OSI format

Definition at line 37 of file OSCoinSolver.h.

Constructor & Destructor Documentation

◆ CoinSolver()

CoinSolver::CoinSolver ( )

The class constructor.

Definition at line 97 of file OSCoinSolver.cpp.

◆ ~CoinSolver()

CoinSolver::~CoinSolver ( )

The class destructor.

Definition at line 109 of file OSCoinSolver.cpp.

Member Function Documentation

◆ solve()

void CoinSolver::solve ( )
virtual

The implementation of the corresponding virtual function.

Returns
void.

Implements DefaultSolver.

Definition at line 1101 of file OSCoinSolver.cpp.

◆ buildSolverInstance()

void CoinSolver::buildSolverInstance ( )
virtual

The implementation of the corresponding virtual function.

Returns
void.

Implements DefaultSolver.

Definition at line 146 of file OSCoinSolver.cpp.

◆ setSolverOptions()

void CoinSolver::setSolverOptions ( )
virtual

The implementation of the corresponding virtual function.

Returns
void.

In this first pass through the options just see if the hintStrength was set

If the hintStrength was set, use it when processing the other options

Implements DefaultSolver.

Definition at line 465 of file OSCoinSolver.cpp.

◆ setCoinPackedMatrix()

bool CoinSolver::setCoinPackedMatrix ( )

Create a CoinPackedMatrix.

Returns
true if a CoinPackedMatrix successfully created.

Definition at line 1054 of file OSCoinSolver.cpp.

◆ getCoinSolverType()

std::string CoinSolver::getCoinSolverType ( std::string osol_)

Get the solver type, e.g. clp or glpk.

Parameters
astring that is an instance of OSoL
Returns
a string which contains the value of clp or glpk.

Definition at line 1268 of file OSCoinSolver.cpp.

◆ dataEchoCheck()

void CoinSolver::dataEchoCheck ( )

Print out problem parameters.

Returns
void

Definition at line 1310 of file OSCoinSolver.cpp.

◆ writeResult() [1/2]

void CoinSolver::writeResult ( OsiSolverInterface * solver)

Definition at line 1359 of file OSCoinSolver.cpp.

◆ writeResult() [2/2]

void CoinSolver::writeResult ( CbcModel * model)

Definition at line 1842 of file OSCoinSolver.cpp.

Member Data Documentation

◆ osiSolver

OsiSolverInterface* CoinSolver::osiSolver

osiSolver is the osi solver object – in this case clp, glpk, cbc, cplex, symphony or dylp

Definition at line 93 of file OSCoinSolver.h.

◆ m_osilreader

OSiLReader* CoinSolver::m_osilreader

m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed

Definition at line 101 of file OSCoinSolver.h.

◆ m_osolreader

OSoLReader* CoinSolver::m_osolreader

m_osolreader is an OSoLReader object used to create an osoption from an osol string if needed

Definition at line 107 of file OSCoinSolver.h.

◆ m_CoinPackedMatrix

CoinPackedMatrix* CoinSolver::m_CoinPackedMatrix
private

m_CoinPackedMatrix is a Coin Packed Matrix ojbect

Definition at line 126 of file OSCoinSolver.h.

◆ osrlwriter

OSrLWriter* CoinSolver::osrlwriter
private

osrlwriter object used to write osrl from an OSResult object

Definition at line 129 of file OSCoinSolver.h.

◆ cbc_argv

const char** CoinSolver::cbc_argv
private

when Cbc is the solver, these are the arguments sent to Cbc Solve

Definition at line 134 of file OSCoinSolver.h.

◆ num_cbc_argv

int CoinSolver::num_cbc_argv
private

the number of arguments in the argument list to the Cbc Solver

Definition at line 138 of file OSCoinSolver.h.

◆ cpuTime

double CoinSolver::cpuTime
private

Definition at line 140 of file OSCoinSolver.h.


The documentation for this class was generated from the following files: