Bonmin  1.7
BonHeuristicDiveMIPVectorLength.hpp
Go to the documentation of this file.
00001 // Copyright (C) 2007, International Business Machines Corporation and others. 
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // Authors :
00006 // Joao P. Goncalves, International Business Machines Corporation
00007 //
00008 // Date : November 12, 2007
00009 
00010 #ifndef BonHeuristicDiveMIPVectorLength_H
00011 #define BonHeuristicDiveMIPVectorLength_H
00012 
00013 #include "BonBonminSetup.hpp"
00014 #include "BonHeuristicDiveMIP.hpp"
00015 
00019 namespace Bonmin
00020 {
00021   class HeuristicDiveMIPVectorLength : public HeuristicDiveMIP {
00022   public:
00024     HeuristicDiveMIPVectorLength ();
00025 
00027     HeuristicDiveMIPVectorLength(BonminSetup * setup);
00028 
00030     HeuristicDiveMIPVectorLength(const HeuristicDiveMIPVectorLength &copy);
00031 
00033     ~HeuristicDiveMIPVectorLength() 
00034     {
00035       delete [] columnLength_;
00036     }
00037 
00039     HeuristicDiveMIPVectorLength & operator=(const HeuristicDiveMIPVectorLength & rhs);
00040 
00042     virtual CbcHeuristic * clone() const;
00043 
00045     virtual void setSetup(BonminSetup * setup){
00046       HeuristicDiveMIP::setSetup(setup);
00047       Initialize(setup->options());
00048     }
00049 
00051     virtual void setInternalVariables(TMINLP2TNLP* minlp);
00052 
00054 
00056     virtual void selectVariableToBranch(TMINLP2TNLP* minlp,
00057                                         const vector<int> & integerColumns,
00058                                         const double* newSolution,
00059                                         int& bestColumn,
00060                                         int& bestRound);
00061 
00063     static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
00064     
00066     void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
00067 
00068   private:
00070     int* columnLength_;
00071 
00072   };
00073 }
00074 #endif