/home/coin/SVN-release/OS-2.0.1/Couenne/src/main/BonNlpHeuristic.hpp

Go to the documentation of this file.
00001 /* $Id: BonNlpHeuristic.hpp 154 2009-06-16 18:52:53Z pbelotti $ */
00002 // (C) Copyright International Business Machines Corporation 2007
00003 // All Rights Reserved.
00004 // This code is published under the Common Public License.
00005 //
00006 // Authors :
00007 // Pierre Bonami, International Business Machines Corporation
00008 //
00009 // Date : 04/09/2007
00010 
00011 #ifndef BonIpoptHeuristic_HPP
00012 #define BonIpoptHeuristic_HPP
00013 #include "CbcHeuristic.hpp"
00014 #include "BonOsiTMINLPInterface.hpp"
00015 #include "CouenneProblem.hpp"
00016 namespace Bonmin{
00020   const double maxNlpInf_0 = 1e-5;
00021 
00022   class NlpSolveHeuristic : public CbcHeuristic{
00023 public:
00025     NlpSolveHeuristic();
00027     NlpSolveHeuristic(CbcModel & mip, OsiSolverInterface &nlp, bool cloneNlp = false, CouenneProblem * couenne = NULL);
00029     NlpSolveHeuristic(const NlpSolveHeuristic &other);
00030     
00032     virtual ~NlpSolveHeuristic();
00033     
00035     virtual CbcHeuristic * clone() const;
00036     
00038     NlpSolveHeuristic & operator=(const NlpSolveHeuristic &rhs);
00039     
00041     void setNlp(OsiSolverInterface &nlp, bool cloneNlp = true);
00042     
00044     void setCouenneProblem(CouenneProblem *);
00046     virtual void resetModel(CbcModel * model){}
00052     virtual int solution( double & objectiveValue, double * newSolution);
00054     void setMaxNlpInf(double value){
00055       maxNlpInf_ = value;}
00057     void setNumberSolvePerLevel(int value){
00058       numberSolvePerLevel_ = value;}
00059 private:
00061     OsiSolverInterface * nlp_;
00063     bool hasCloned_;
00065     double maxNlpInf_;
00067     int numberSolvePerLevel_;
00069     CouenneProblem * couenne_;
00070   };
00071 }/* Ends namespace Bonmin. */
00072 
00073 #endif
00074 

Generated on Thu Oct 8 03:02:57 2009 by  doxygen 1.4.7