Ignore:
Timestamp:
Nov 21, 2012 4:38:56 AM (7 years ago)
Author:
forrest
Message:

add Proximity heuristic (Fischetti and Monaci) - shouldn't break anything

File:
1 edited

Legend:

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

    r1573 r1802  
    8181    // Type of search 0=normal, 1=BAB
    8282    int swap_;
     83    /// Whether a variable has been in a solution (also when)
     84    int * used_;
     85};
     86
     87/** Proximity Search class
     88 */
     89class CbcHeuristicFPump;
     90class CbcHeuristicProximity : public CbcHeuristic {
     91public:
     92
     93    // Default Constructor
     94    CbcHeuristicProximity ();
     95
     96    /* Constructor with model - assumed before cuts
     97    */
     98    CbcHeuristicProximity (CbcModel & model);
     99
     100    // Copy constructor
     101    CbcHeuristicProximity ( const CbcHeuristicProximity &);
     102
     103    // Destructor
     104    ~CbcHeuristicProximity ();
     105
     106    /// Clone
     107    virtual CbcHeuristic * clone() const;
     108
     109    /// Assignment operator
     110    CbcHeuristicProximity & operator=(const CbcHeuristicProximity& rhs);
     111
     112    /// Create C++ lines to get to current state
     113    virtual void generateCpp( FILE * fp) ;
     114
     115    /// Resets stuff if model changes
     116    virtual void resetModel(CbcModel * model);
     117
     118    /// update model (This is needed if cliques update matrix etc)
     119    virtual void setModel(CbcModel * model);
     120
     121    using CbcHeuristic::solution ;
     122    /** returns 0 if no solution, 1 if valid solution.
     123        Sets solution values if good, sets objective value (only if good)
     124    */
     125    virtual int solution(double & objectiveValue,
     126                         double * newSolution);
     127
     128    /// Used array so we can set
     129    inline int * used() const {
     130        return used_;
     131    }
     132
     133protected:
     134    // Data
     135    // Copy of Feasibility pump
     136    CbcHeuristicFPump * feasibilityPump_;
     137    // Number of solutions so we only do after new solution
     138    int numberSolutions_;
    83139    /// Whether a variable has been in a solution (also when)
    84140    int * used_;
Note: See TracChangeset for help on using the changeset viewer.