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:
136 
138  std::string couenneErrorMsg;
139 
141 };
142 
143 
144 #endif /*COUENNESOLVER_H*/
~CouenneSolver()
the IpoptSolver class destructor
void writeResult()
use this to write the solution information to an OSResult object
This file defines the OSnLNode class along with its derived classes.
Couenne::CouenneBab bb
The CouenneSolver class solves problems using Ipopt.
virtual void solve()
solve results in an instance being read into the Couenne data structrues and optimized ...
OSrLWriter * osrlwriter
Couenne::CouenneProblem * couenne
Take an OSResult object and write a string that validates against OSrL.
Definition: OSrLWriter.h:30
Ipopt::SmartPtr< BonminProblem > tminlp
Couenne::expression * createCouenneExpression(OSnLNode *node)
Couenne::expression * obj_body
Used to read an OSiL string.
Definition: OSiLReader.h:37
virtual void setSolverOptions()
The implementation of the virtual functions.
SolverReturn
Return statuses of algorithm.
Definition: BonTMINLP.hpp:64
Ipopt::SmartPtr< Bonmin::TNLPSolver > app_
OSiLReader * m_osilreader
m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed ...
Class for MINLP problems with symbolic information.
The Default Solver Class.
Couenne::CouenneSetup couenneSetup
Used to read an OSoL string.
Definition: OSoLReader.h:37
std::string couenneErrorMsg
CouenneSolver()
the CouenneSolver class constructor
Couenne::expression * con_body
Expression base class.
The OSnLNode Class for nonlinear expressions.
Definition: OSnLNode.h:179
virtual void buildSolverInstance()
buildSolverInstance is a virtual function – the actual solvers will implement their own buildSolverIn...
Bonmin::TMINLP::SolverReturn status
void dataEchoCheck()
use this for debugging, print out the instance that the solver thinks it has and compare this with th...
OSoLReader * m_osolreader
m_osolreader is an OSoLReader object used to create an osoption from an osol string if needed ...
used for throwing exceptions.
Definition: OSErrorClass.h:31