| 1 |
// Copyright (C) 2006, 2007 International Business Machines |
| 2 |
// Corporation and others. All Rights Reserved. |
| 3 |
// |
| 4 |
// |
| 5 |
#error "BonCurvBranchingSolver not supported anymore" |
| 6 |
#ifndef BonCurvBranchingSolver_H |
| 7 |
#define BonCurvBranchingSolver_H |
| 8 |
|
| 9 |
#include "BonStrongBranchingSolver.hpp" |
| 10 |
#include "BonCurvatureEstimator.hpp" |
| 11 |
|
| 12 |
namespace Bonmin |
| 13 |
{ |
| 14 |
|
| 15 |
/** Implementation of BonChooseVariable for curvature-based braching. |
| 16 |
*/ |
| 17 |
|
| 18 |
class CurvBranchingSolver : public StrongBranchingSolver |
| 19 |
{ |
| 20 |
|
| 21 |
public: |
| 22 |
|
| 23 |
/// Constructor from solver (so we can set up arrays etc) |
| 24 |
CurvBranchingSolver (OsiTMINLPInterface * solver); |
| 25 |
|
| 26 |
/// Copy constructor |
| 27 |
CurvBranchingSolver (const CurvBranchingSolver &); |
| 28 |
|
| 29 |
/// Assignment operator |
| 30 |
CurvBranchingSolver & operator= (const CurvBranchingSolver& rhs); |
| 31 |
|
| 32 |
/// Destructor |
| 33 |
virtual ~CurvBranchingSolver (); |
| 34 |
|
| 35 |
/// Called to initialize solver before a bunch of strong branching |
| 36 |
/// solves |
| 37 |
virtual void markHotStart(OsiTMINLPInterface* tminlp_interface); |
| 38 |
|
| 39 |
/// Called to solve the current TMINLP (with changed bound information) |
| 40 |
virtual TNLPSolver::ReturnStatus solveFromHotStart(OsiTMINLPInterface* tminlp_interface); |
| 41 |
|
| 42 |
/// Called after all strong branching solves in a node |
| 43 |
virtual void unmarkHotStart(OsiTMINLPInterface* tminlp_interface); |
| 44 |
|
| 45 |
private: |
| 46 |
/// Default Constructor |
| 47 |
CurvBranchingSolver (); |
| 48 |
|
| 49 |
SmartPtr<CurvatureEstimator> cur_estimator_; |
| 50 |
|
| 51 |
/** @name Stuff for the curvature estimator */ |
| 52 |
//@{ |
| 53 |
bool new_bounds_; |
| 54 |
bool new_x_; |
| 55 |
bool new_mults_; |
| 56 |
double* orig_d_; |
| 57 |
double* projected_d_; |
| 58 |
Number* x_l_orig_; |
| 59 |
Number* x_u_orig_; |
| 60 |
Number* g_l_orig_; |
| 61 |
Number* g_u_orig_; |
| 62 |
//@} |
| 63 |
|
| 64 |
/** @name Information about the problem */ |
| 65 |
//@{ |
| 66 |
int numCols_; |
| 67 |
int numRows_; |
| 68 |
const double* solution_; |
| 69 |
const double* duals_; |
| 70 |
double obj_value_; |
| 71 |
//@} |
| 72 |
|
| 73 |
}; |
| 74 |
|
| 75 |
} |
| 76 |
|
| 77 |
#endif |