Bonmin
1.7
|
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 BonHeuristicDiveVectorLength_H 00011 #define BonHeuristicDiveVectorLength_H 00012 00013 #include "BonBonminSetup.hpp" 00014 #include "BonHeuristicDive.hpp" 00015 00019 namespace Bonmin 00020 { 00021 class HeuristicDiveVectorLength : public HeuristicDive { 00022 public: 00024 HeuristicDiveVectorLength (); 00025 00027 HeuristicDiveVectorLength(BonminSetup * setup); 00028 00030 HeuristicDiveVectorLength(const HeuristicDiveVectorLength ©); 00031 00033 ~HeuristicDiveVectorLength() 00034 { 00035 delete [] columnLength_; 00036 } 00037 00039 HeuristicDiveVectorLength & operator=(const HeuristicDiveVectorLength & rhs); 00040 00042 virtual CbcHeuristic * clone() const; 00043 00045 virtual void setSetup(BonminSetup * setup){ 00046 HeuristicDive::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