blob: 087d2e760202941af3b176e431a964684c4616b7 (
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
|
// Copyright (C) 2007, International Business Machines
// Corporation and others. All Rights Reserved.
//
// Author: Andreas Waechter 2007-08-20 IBM
//
#ifndef BonStrongBranchingSolver_H
#define BonStrongBranchingSolver_H
#include "BonOsiTMINLPInterface.hpp"
#include "BonRegisteredOptions.hpp"
namespace Bonmin {
/** This class is the base class for a solver that can be used in
* BonOsiSolverInterface to perform the strong branching solves.
*/
class StrongBranchingSolver : public Ipopt::ReferencedObject {
public:
/// Constructor from solver
StrongBranchingSolver (OsiTMINLPInterface * solver);
/// Assignment operator
StrongBranchingSolver & operator= (const StrongBranchingSolver& rhs);
/// Copy constructor
StrongBranchingSolver(const StrongBranchingSolver& rhs);
/// Destructor
virtual ~StrongBranchingSolver ();
/// Called to initialize solver before a bunch of strong branching
/// solves
virtual void markHotStart(OsiTMINLPInterface* tminlp_interface) = 0;
/// Called to solve the current TMINLP (with changed bound information)
virtual TNLPSolver::ReturnStatus solveFromHotStart(OsiTMINLPInterface* tminlp_interface) = 0;
/// Called after all strong branching solves in a node
virtual void unmarkHotStart(OsiTMINLPInterface* tminlp_interface) = 0;
protected:
inline Ipopt::SmartPtr<Ipopt::Journalist>& Jnlst()
{
return jnlst_;
}
inline Ipopt::SmartPtr<Ipopt::OptionsList>& Options()
{
return options_;
}
inline Ipopt::SmartPtr<RegisteredOptions>& RegOptions()
{
return reg_options_;
}
private:
/** Default Constructor, forbiden for some reason.*/
StrongBranchingSolver ();
Ipopt::SmartPtr<Ipopt::Journalist> jnlst_;
Ipopt::SmartPtr<Ipopt::OptionsList> options_;
Ipopt::SmartPtr<Bonmin::RegisteredOptions> reg_options_;
int bb_log_level_;
};
}
#endif
|