00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef SepaSepaTMINLP2OsiLP_H
00010 #define SepaSepaTMINLP2OsiLP_H
00011
00012 #include <cmath>
00013 #include <cstdio>
00014 #include "IpSmartPtr.hpp"
00015 #include "IpTNLP.hpp"
00016 #include "BonTypes.hpp"
00017 #include "BonTMINLP2OsiLP.hpp"
00018
00019
00020 namespace Sepa {
00021
00023 class SepaTMINLP2OsiLP: public Bonmin::TMINLP2OsiLP {
00024
00025 public:
00026
00028 SepaTMINLP2OsiLP():
00029 TMINLP2OsiLP(),
00030 num_approx_(0)
00031 {}
00032
00034 SepaTMINLP2OsiLP(const SepaTMINLP2OsiLP & other):
00035 TMINLP2OsiLP(other),
00036 num_approx_(other.num_approx_){
00037 }
00038
00039 TMINLP2OsiLP * clone() const{
00040 return new SepaTMINLP2OsiLP(*this);
00041 }
00042
00044 SepaTMINLP2OsiLP & operator=(const SepaTMINLP2OsiLP& rhs){
00045 if(this != & rhs){
00046 TMINLP2OsiLP::operator=(rhs);
00047 num_approx_ = rhs.num_approx_;
00048 }
00049 return (*this);
00050 }
00051
00052 void set_num_approx(int v){
00053 num_approx_ = v;
00054 }
00055
00057 ~SepaTMINLP2OsiLP(){}
00058
00060 virtual void extract(OsiSolverInterface *si,
00061 const double * x, bool getObj) ;
00062
00064 virtual void get_oas(OsiCuts & cs,
00065 const double * x, bool getObj, bool global) const;
00066
00067 virtual void get_refined_oa(OsiCuts & cs) const;
00069 virtual void get_oa(int iRow, OsiCuts & cs,
00070 const double * x, bool getObj, bool global) const;
00071
00072 void add_outer_description(OsiSolverInterface &si) ;
00073 void add_outer_description_function_values(OsiSolverInterface &si) ;
00074 private:
00075 int num_approx_;
00076 };
00077
00078
00079 }
00080
00081 #endif
00082