OS  2.10.2
OSCouenneSolver.h
Go to the documentation of this file.
1 /* $Id: OSCouenneSolver.h 5284 2017-12-08 13:52:50Z stefan $ */
15 #ifndef COUENNESOLVER_H
16 #define COUENNESOLVER_H
17 
18 #include "OSConfig.h"
19 #include "OSDefaultSolver.h"
20 #include "OSBonminSolver.h"
21 #include "OSIpoptSolver.h"
22 #include "OSrLWriter.h"
23 #include "OSInstance.h"
24 #include "OSParameters.h"
25 #include "OSiLReader.h"
26 #include "OSExpressionTree.h"
27 #include "OSnLNode.h"
28 #include "OSDataStructures.h"
29 #include "OSFileUtil.h"
30 #include "OSErrorClass.h"
31 #include "OSResult.h"
32 #include "OSOption.h"
33 
34 #ifdef OS_HAS_CPPAD
35 # include <cppad/cppad.hpp>
36 #endif
37 
38 
39 //Couenne stuff
40 namespace Couenne
41 {
42 class CouenneProblem;
43 class expression;
44 }
45 #include "BonCbc.hpp"
46 #include "BonCouenneSetup.hpp"
47 #include "CouenneBab.hpp"
48 
49 #include <vector>
50 #include <map>
51 
52 
53 
68 {
69 public:
70 
72  CouenneSolver();
73 
76 
79  virtual void solve() throw (ErrorClass) ;
80 
85  virtual void buildSolverInstance() throw(ErrorClass);
86 
91  virtual void setSolverOptions() throw(ErrorClass);
92 
98  void dataEchoCheck();
99 
104  void writeResult();
105 
111 
117 
119 
121 
123 
124  //SmartPtr<Bonmin::IpoptSolver> app_ ;
125 
126  // this is a Bonmin BonCbc object;
128 
130 
133 
134 private:
135  OSrLWriter *osrlwriter;
136 
137  Couenne::CouenneSetup couenneSetup;
138  std::string couenneErrorMsg;
139 
140  Couenne::expression* createCouenneExpression(OSnLNode* node);
141 };
142 
143 
144 #endif /*COUENNESOLVER_H*/
OSConfig.h
OSExpressionTree.h
OSDataStructures.h
OSIpoptSolver.h
OSiLReader
Used to read an OSiL string.
Definition: OSiLReader.h:37
OSErrorClass.h
CouenneSolver::writeResult
void writeResult()
use this to write the solution information to an OSResult object
CouenneSolver
The CouenneSolver class solves problems using Ipopt.
Definition: OSCouenneSolver.h:67
OSoLReader
Used to read an OSoL string.
Definition: OSoLReader.h:37
OSrLWriter.h
OSrLWriter
Take an OSResult object and write a string that validates against OSrL.
Definition: OSrLWriter.h:30
Couenne::CouenneBab
CouenneSolver::m_osilreader
OSiLReader * m_osilreader
m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed
Definition: OSCouenneSolver.h:110
OSResult.h
OSInstance.h
This file defines the OSInstance class along with its supporting classes.
OSOption.h
Couenne::CouenneSetup
Couenne
OSFileUtil.h
BonCouenneSetup.hpp
CouenneSolver::CouenneSolver
CouenneSolver()
the CouenneSolver class constructor
CouenneSolver::buildSolverInstance
virtual void buildSolverInstance()
buildSolverInstance is a virtual function – the actual solvers will implement their own buildSolver...
OSiLReader.h
CouenneSolver::setSolverOptions
virtual void setSolverOptions()
The implementation of the virtual functions.
CouenneSolver::~CouenneSolver
~CouenneSolver()
the IpoptSolver class destructor
OSDefaultSolver.h
Ipopt::SmartPtr< BonminProblem >
OSnLNode
The OSnLNode Class for nonlinear expressions.
Definition: OSnLNode.h:179
CouenneBab.hpp
ErrorClass
used for throwing exceptions.
Definition: OSErrorClass.h:31
Bonmin::TMINLP::SolverReturn
SolverReturn
OSBonminSolver.h
CouenneSolver::status
Bonmin::TMINLP::SolverReturn status
Definition: OSCouenneSolver.h:129
CouenneSolver::tminlp
Ipopt::SmartPtr< BonminProblem > tminlp
Definition: OSCouenneSolver.h:120
CouenneSolver::obj_body
Couenne::expression * obj_body
Definition: OSCouenneSolver.h:132
CouenneSolver::couenne
Couenne::CouenneProblem * couenne
Definition: OSCouenneSolver.h:118
CouenneSolver::m_osolreader
OSoLReader * m_osolreader
m_osolreader is an OSoLReader object used to create an osoption from an osol string if needed
Definition: OSCouenneSolver.h:116
CouenneSolver::dataEchoCheck
void dataEchoCheck()
use this for debugging, print out the instance that the solver thinks it has and compare this with th...
BonCbc.hpp
Couenne::CouenneProblem
CouenneSolver::con_body
Couenne::expression * con_body
Definition: OSCouenneSolver.h:131
DefaultSolver
The Default Solver Class.
Definition: OSDefaultSolver.h:35
CouenneSolver::app_
Ipopt::SmartPtr< Bonmin::TNLPSolver > app_
Definition: OSCouenneSolver.h:122
CouenneSolver::bb
Couenne::CouenneBab bb
Definition: OSCouenneSolver.h:127
Couenne::expression
OSParameters.h
CouenneSolver::solve
virtual void solve()
solve results in an instance being read into the Couenne data structrues and optimized
OSnLNode.h
This file defines the OSnLNode class along with its derived classes.