00001 // (C) Copyright Carnegie Mellon University 2005 00002 // All Rights Reserved. 00003 // This code is published under the Common Public License. 00004 // 00005 // Authors : 00006 // P. Bonami, Carnegie Mellon University 00007 // 00008 // Date : 05/26/2005 00009 00010 #ifndef IpCbcDummyHeuristic_HPP 00011 #define IpCbcDummyHeuristic_HPP 00012 #include "IpoptInterface.hpp" 00013 00014 #include "CbcHeuristic.hpp" 00015 00016 class IpCbcDummyHeuristic : public CbcHeuristic 00017 { 00018 public: 00020 IpCbcDummyHeuristic(IpoptInterface * si = NULL); 00022 IpCbcDummyHeuristic(CbcModel &model, IpoptInterface * si = NULL); 00024 IpCbcDummyHeuristic( const IpCbcDummyHeuristic ©): 00025 CbcHeuristic(copy), 00026 nlp_(copy.nlp_), 00027 knowsSolution(copy.knowsSolution) 00028 {} 00030 void assignInterface(IpoptInterface * si); 00032 virtual int solution(double &solutionValue, double *betterSolution); 00033 virtual int solution(double &solutionValue, double *betterSolution, OsiCuts & cs) 00034 { 00035 return solution(solutionValue, betterSolution); 00036 } 00037 virtual CbcHeuristic * clone()const 00038 { 00039 return new IpCbcDummyHeuristic(*this); 00040 } 00041 virtual void resetModel(CbcModel*) 00042 {} 00043 private: 00045 IpoptInterface * nlp_; 00047 bool knowsSolution; 00048 }; 00049 #endif