CouenneUserInterface.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef COUENNEUSERINTERFACE_HPP_
00014 #define COUENNEUSERINTERFACE_HPP_
00015
00016
00017 #include "IpOptionsList.hpp"
00018 #include "IpJournalist.hpp"
00019
00020 namespace Bonmin {
00021 class TMINLP;
00022 class Bab;
00023 }
00024
00025 namespace Couenne {
00026
00027 class CouenneProblem;
00028 class CouenneBaB;
00029
00030
00031
00032 class CouenneUserInterface {
00033 protected:
00034 Ipopt::SmartPtr<Ipopt::OptionsList> options;
00035 Ipopt::SmartPtr<Ipopt::Journalist> jnlst;
00036
00037 public:
00038 CouenneUserInterface(Ipopt::SmartPtr<Ipopt::OptionsList> options_, Ipopt::SmartPtr<Ipopt::Journalist> jnlst_)
00039 : options(options_), jnlst(jnlst_)
00040 { }
00041
00042 virtual ~CouenneUserInterface() { }
00043
00047 virtual bool setupJournals() {
00048 Ipopt::SmartPtr<Ipopt::Journal> stdout_jrnl = jnlst->AddFileJournal("console", "stdout", Ipopt::J_ITERSUMMARY);
00049 stdout_jrnl->SetPrintLevel(Ipopt::J_DBG, Ipopt::J_NONE);
00050 return true;
00051 }
00052
00056 virtual CouenneProblem* getCouenneProblem() = 0;
00057
00060 virtual Ipopt::SmartPtr<Bonmin::TMINLP> getTMINLP() = 0;
00061
00065 virtual bool addBabPlugins(Bonmin::Bab& bab) {
00066
00067
00068
00069
00070
00071
00072
00073
00074 return true;
00075 }
00076
00079 virtual bool writeSolution(Bonmin::Bab& bab) {
00080 return true;
00081 }
00082 };
00083
00084 }
00085
00086 #endif