Ignore:
Timestamp:
Apr 10, 2008 1:55:10 PM (11 years ago)
Author:
ladanyi
Message:

Incorporated changes from branches/heur

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcHeuristicDiveCoefficient.hpp

    r868 r912  
    44#define CbcHeuristicDiveCoefficient_H
    55
    6 #include "CbcHeuristic.hpp"
     6#include "CbcHeuristicDive.hpp"
    77
    88/** DiveCoefficient class
    99 */
    1010
    11 class CbcHeuristicDiveCoefficient : public CbcHeuristic {
     11class CbcHeuristicDiveCoefficient : public CbcHeuristicDive {
    1212public:
    1313
     
    3333  virtual void generateCpp( FILE * fp) ;
    3434
    35   /// Resets stuff if model changes
    36   virtual void resetModel(CbcModel * model);
    37 
    38   /// update model (This is needed if cliques update matrix etc)
    39   virtual void setModel(CbcModel * model);
    40  
    41   using CbcHeuristic::solution ;
    42   /** returns 0 if no solution, 1 if valid solution
    43       with better objective value than one passed in
    44       Sets solution values if good, sets objective value (only if good)
    45       This is called after cuts have been added - so can not add cuts
    46       This does Coefficient Diving
    47   */
    48   virtual int solution(double & objectiveValue,
    49                        double * newSolution);
    50 
    51   /// Validate model i.e. sets when_ to 0 if necessary (may be NULL)
    52   virtual void validate();
    53 
    54   /// Set percentage of integer variables to fix at bounds
    55   void setPercentageToFix(double value)
    56   { percentageToFix_ = value; }
    57 
    58   /// Set maximum number of iterations
    59   void setMaxIterations(int value)
    60   { maxIterations_ = value; }
    61 
    62   /// Set maximum time allowed
    63   void setMaxTime(double value)
    64   { maxTime_ = value; }
    65 
    66 protected:
    67   // Data
    68 
    69   // Original matrix by column
    70   CoinPackedMatrix matrix_;
    71 
    72   // Down locks
    73   unsigned short * downLocks_;
    74 
    75   // Up locks
    76   unsigned short * upLocks_;
    77 
    78   // Percentage of integer variables to fix at bounds
    79   double percentageToFix_;
    80 
    81   // Maximum number of iterations
    82   int maxIterations_;
    83 
    84   // Maximum time allowed
    85   double maxTime_;
     35  /// Selects the next variable to branch on
     36  virtual void selectVariableToBranch(OsiSolverInterface* solver,
     37                                      const double* newSolution,
     38                                      int& bestColumn,
     39                                      int& bestRound);
    8640
    8741};
Note: See TracChangeset for help on using the changeset viewer.