[1854] | 1 | /* $Id: CbcHeuristicDiveFractional.hpp 1899 2013-04-09 18:12:08Z forrest $ */ |
---|
[868] | 2 | // Copyright (C) 2008, International Business Machines |
---|
| 3 | // Corporation and others. All Rights Reserved. |
---|
[1573] | 4 | // This code is licensed under the terms of the Eclipse Public License (EPL). |
---|
| 5 | |
---|
[868] | 6 | #ifndef CbcHeuristicDiveFractional_H |
---|
| 7 | #define CbcHeuristicDiveFractional_H |
---|
| 8 | |
---|
[912] | 9 | #include "CbcHeuristicDive.hpp" |
---|
[868] | 10 | |
---|
| 11 | /** DiveFractional class |
---|
| 12 | */ |
---|
| 13 | |
---|
[912] | 14 | class CbcHeuristicDiveFractional : public CbcHeuristicDive { |
---|
[868] | 15 | public: |
---|
| 16 | |
---|
[1286] | 17 | // Default Constructor |
---|
| 18 | CbcHeuristicDiveFractional (); |
---|
[868] | 19 | |
---|
[1286] | 20 | // Constructor with model - assumed before cuts |
---|
| 21 | CbcHeuristicDiveFractional (CbcModel & model); |
---|
[868] | 22 | |
---|
[1286] | 23 | // Copy constructor |
---|
| 24 | CbcHeuristicDiveFractional ( const CbcHeuristicDiveFractional &); |
---|
[868] | 25 | |
---|
[1286] | 26 | // Destructor |
---|
| 27 | ~CbcHeuristicDiveFractional (); |
---|
[868] | 28 | |
---|
[1286] | 29 | /// Clone |
---|
| 30 | virtual CbcHeuristicDiveFractional * clone() const; |
---|
[868] | 31 | |
---|
[1286] | 32 | /// Assignment operator |
---|
| 33 | CbcHeuristicDiveFractional & operator=(const CbcHeuristicDiveFractional& rhs); |
---|
| 34 | |
---|
| 35 | /// Create C++ lines to get to current state |
---|
| 36 | virtual void generateCpp( FILE * fp) ; |
---|
| 37 | |
---|
| 38 | /// Selects the next variable to branch on |
---|
| 39 | /** Returns true if all the fractional variables can be trivially |
---|
| 40 | rounded. Returns false, if there is at least one fractional variable |
---|
| 41 | that is not trivially roundable. In this case, the bestColumn |
---|
| 42 | returned will not be trivially roundable. |
---|
| 43 | */ |
---|
| 44 | virtual bool selectVariableToBranch(OsiSolverInterface* solver, |
---|
| 45 | const double* newSolution, |
---|
| 46 | int& bestColumn, |
---|
| 47 | int& bestRound); |
---|
| 48 | |
---|
[868] | 49 | }; |
---|
| 50 | |
---|
| 51 | #endif |
---|
[1432] | 52 | |
---|