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