My Project
OSCouenneSolver.h
Go to the documentation of this file.
1/* $Id$ */
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
40namespace Couenne
41{
42class CouenneProblem;
43class 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{
69public:
70
73
76
79 virtual void solve();
80
85 virtual void buildSolverInstance();
86
91 virtual void setSolverOptions();
92
99
104 void writeResult();
105
111
117
118 Couenne::CouenneProblem *couenne;
119
120 Ipopt::SmartPtr<BonminProblem> tminlp;
121
122 Ipopt::SmartPtr<Bonmin::TNLPSolver> app_ ;
123
124 //SmartPtr<Bonmin::IpoptSolver> app_ ;
125
126 // this is a Bonmin BonCbc object;
127 Couenne::CouenneBab bb;
128
129 Bonmin::TMINLP::SolverReturn status;
130
131 Couenne::expression *con_body;
132 Couenne::expression *obj_body;
133
134private:
136
137 Couenne::CouenneSetup couenneSetup;
138 std::string couenneErrorMsg;
139
140 Couenne::expression* createCouenneExpression(OSnLNode* node);
141};
142
143
144#endif /*COUENNESOLVER_H*/
This file defines the OSnLNode class along with its derived classes.
The CouenneSolver class solves problems using Ipopt.
Bonmin::TMINLP::SolverReturn status
virtual void solve()
solve results in an instance being read into the Couenne data structrues and optimized
virtual void buildSolverInstance()
buildSolverInstance is a virtual function – the actual solvers will implement their own buildSolverIn...
virtual void setSolverOptions()
The implementation of the virtual functions.
void writeResult()
use this to write the solution information to an OSResult object
void dataEchoCheck()
use this for debugging, print out the instance that the solver thinks it has and compare this with th...
~CouenneSolver()
the IpoptSolver class destructor
Couenne::expression * obj_body
Couenne::CouenneBab bb
OSoLReader * m_osolreader
m_osolreader is an OSoLReader object used to create an osoption from an osol string if needed
Ipopt::SmartPtr< Bonmin::TNLPSolver > app_
CouenneSolver()
the CouenneSolver class constructor
Couenne::CouenneProblem * couenne
Couenne::expression * con_body
OSiLReader * m_osilreader
m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed
Ipopt::SmartPtr< BonminProblem > tminlp
OSrLWriter * osrlwriter
Couenne::expression * createCouenneExpression(OSnLNode *node)
std::string couenneErrorMsg
Couenne::CouenneSetup couenneSetup
The Default Solver Class.
Used to read an OSiL string.
Definition OSiLReader.h:38
The OSnLNode Class for nonlinear expressions.
Definition OSnLNode.h:180
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