Couenne 0.5.8
Loading...
Searching...
No Matches
CouenneUserInterface.hpp
Go to the documentation of this file.
1// $Id: CouenneUserInterface.hpp 530 2011-03-12 16:52:06Z pbelotti $
2//
3// (C) Copyright XXX 2009
4// All Rights Reserved.
5// This code is published under the Eclipse Public License (EPL).
6//
7// Authors :
8// Pietro Belotti, Lehigh University
9// Stefan Vigerske, Humboldt University
10//
11// Date : 07/18/2009
12
13#ifndef COUENNEUSERINTERFACE_HPP_
14#define COUENNEUSERINTERFACE_HPP_
15
16//#include "CouenneConfig.h"
17#include "IpOptionsList.hpp"
18#include "IpJournalist.hpp"
19
20namespace Bonmin {
21class TMINLP;
22class Bab;
23}
24
25namespace Couenne {
26
27class CouenneProblem;
28class CouenneBaB;
29
30/* abstract base class of an interface for Couenne users
31 */
33protected:
36
37public:
41
43
47 virtual bool setupJournals() {
48 Ipopt::SmartPtr<Ipopt::Journal> stdout_jrnl = jnlst->AddFileJournal("console", "stdout", Ipopt::J_ITERSUMMARY);
49 stdout_jrnl->SetPrintLevel(Ipopt::J_DBG, Ipopt::J_NONE);
50 return true;
51 }
52
57
61
65 virtual bool addBabPlugins(Bonmin::Bab& bab) {
66 // CutGenerator1 myCutGenerator (problem, optionList);
67 // BoundTightener1 myBoundTightener (problem, optionList);
68 // Heuristic myHeuristic (problem, optionList);
69
70 // bab.addCutGenerator (myCutGenerator);
71 // bab.addBoundTightener (myBoundTightener);
72 // bab.addHeuristic (myHeur1);
73 // bab.addJournalist (myJour);
74 return true;
75 }
76
79 virtual bool writeSolution(Bonmin::Bab& bab) {
80 return true;
81 }
82};
83
84}
85
86#endif /*COUENNEUSERINTERFACE_HPP_*/
Class for MINLP problems with symbolic information.
virtual bool addBabPlugins(Bonmin::Bab &bab)
Called after B&B object is setup.
Ipopt::SmartPtr< Ipopt::OptionsList > options
CouenneUserInterface(Ipopt::SmartPtr< Ipopt::OptionsList > options_, Ipopt::SmartPtr< Ipopt::Journalist > jnlst_)
virtual bool writeSolution(Bonmin::Bab &bab)
Called after B&B finished.
virtual Ipopt::SmartPtr< Bonmin::TMINLP > getTMINLP()=0
Should return the problem to solve as TMINLP.
virtual CouenneProblem * getCouenneProblem()=0
Should return the problem to solve in algebraic form.
Ipopt::SmartPtr< Ipopt::Journalist > jnlst
virtual bool setupJournals()
Setup journals for printing.
general include file for different compilers