Ignore:
Timestamp:
Jan 11, 2008 5:05:20 PM (13 years ago)
Author:
forrest
Message:

try and make a bit faster

File:
1 edited

Legend:

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

    r841 r854  
    221221};
    222222
     223/** Partial solution class
     224    If user knows a partial solution this tries to get an integer solution
     225    it uses hotstart information
     226 */
     227
     228class CbcHeuristicPartial : public CbcHeuristic {
     229public:
     230
     231  // Default Constructor
     232  CbcHeuristicPartial ();
     233
     234  /** Constructor with model - assumed before cuts
     235      Fixes all variables with priority <= given
     236      and does given number of nodes
     237  */
     238  CbcHeuristicPartial (CbcModel & model, int fixPriority=10000, int numberNodes=200);
     239 
     240  // Copy constructor
     241  CbcHeuristicPartial ( const CbcHeuristicPartial &);
     242   
     243  // Destructor
     244  ~CbcHeuristicPartial ();
     245 
     246  /// Assignment operator
     247  CbcHeuristicPartial & operator=(const CbcHeuristicPartial& rhs);
     248
     249  /// Clone
     250  virtual CbcHeuristic * clone() const;
     251  /// Create C++ lines to get to current state
     252  virtual void generateCpp( FILE * fp) ;
     253
     254  /// Resets stuff if model changes
     255  virtual void resetModel(CbcModel * model);
     256
     257  /// update model (This is needed if cliques update matrix etc)
     258  virtual void setModel(CbcModel * model);
     259 
     260  using CbcHeuristic::solution ;
     261  /** returns 0 if no solution, 1 if valid solution
     262      with better objective value than one passed in
     263      Sets solution values if good, sets objective value (only if good)
     264      This is called after cuts have been added - so can not add cuts
     265  */
     266  virtual int solution(double & objectiveValue,
     267                       double * newSolution);
     268  /// Validate model i.e. sets when_ to 0 if necessary (may be NULL)
     269  virtual void validate();
     270
     271
     272  /// Set priority level
     273  void setFixPriority(int value)
     274  { fixPriority_ = value;}
     275
     276protected:
     277  // Data
     278
     279  // All variables with abs priority <= this will be fixed
     280  int fixPriority_;
     281};
     282
    223283/** heuristic - just picks up any good solution
    224284    found by solver - see OsiBabSolver
Note: See TracChangeset for help on using the changeset viewer.