Couenne  0.5.8
BonNlpHeuristic.hpp
Go to the documentation of this file.
1 /* $Id: BonNlpHeuristic.hpp 988 2013-08-04 20:59:18Z pbelotti $ */
2 // (C) Copyright International Business Machines Corporation 2007
3 // All Rights Reserved.
4 // This code is published under the Eclipse Public License (EPL).
5 //
6 // Authors :
7 // Pierre Bonami, International Business Machines Corporation
8 //
9 // Date : 04/09/2007
10 
11 #ifndef BonIpoptHeuristic_HPP
12 #define BonIpoptHeuristic_HPP
13 
15 #include "CbcHeuristic.hpp"
17 #include "CouenneProblem.hpp"
18 
19 namespace Couenne {
20 
26  const double maxNlpInf_0 = 1e-5;
27 
29 
30  public:
34  NlpSolveHeuristic(CbcModel & mip, Bonmin::OsiTMINLPInterface &nlp, bool cloneNlp = false, CouenneProblem * couenne = NULL);
37 
39  virtual ~NlpSolveHeuristic();
40 
42  virtual CbcHeuristic * clone() const;
43 
46 
48  void setNlp (Bonmin::OsiTMINLPInterface &nlp, bool cloneNlp = true);
49 
53  virtual void resetModel(CbcModel * model){}
59  virtual int solution( double & objectiveValue, double * newSolution);
61  void setMaxNlpInf(double value){
62  maxNlpInf_ = value;}
64  void setNumberSolvePerLevel(int value){
65  numberSolvePerLevel_ = value;}
66 
69 
70  private:
74  bool hasCloned_;
76  double maxNlpInf_;
78  int numberSolvePerLevel_;
80  CouenneProblem * couenne_;
81  };
82 
83 }
84 
85 #endif
Couenne::NlpSolveHeuristic::NlpSolveHeuristic
NlpSolveHeuristic()
Default constructor.
Couenne::NlpSolveHeuristic::setNlp
void setNlp(Bonmin::OsiTMINLPInterface &nlp, bool cloneNlp=true)
Set the nlp solver.
Bonmin::OsiTMINLPInterface
Couenne::NlpSolveHeuristic::resetModel
virtual void resetModel(CbcModel *model)
Does nothing.
Definition: BonNlpHeuristic.hpp:53
Couenne::NlpSolveHeuristic::registerOptions
static void registerOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions >)
initialize options
CbcHeuristic
Couenne::maxNlpInf_0
const double maxNlpInf_0
A heuristic to call an NlpSolver if all CouenneObjects are close to be satisfied (for other integer o...
Definition: BonNlpHeuristic.hpp:26
Couenne
general include file for different compilers
Definition: CouenneAggrProbing.hpp:24
Couenne::NlpSolveHeuristic::~NlpSolveHeuristic
virtual ~NlpSolveHeuristic()
Destructor.
Couenne::NlpSolveHeuristic::setNumberSolvePerLevel
void setNumberSolvePerLevel(int value)
set number of nlp's solved for each given level of the tree
Definition: BonNlpHeuristic.hpp:64
CbcHeuristic.hpp
CbcModel
Ipopt::SmartPtr< Bonmin::RegisteredOptions >
Couenne::NlpSolveHeuristic::NlpSolveHeuristic
NlpSolveHeuristic(const NlpSolveHeuristic &other)
Copy constructor.
Couenne::NlpSolveHeuristic::solution
virtual int solution(double &objectiveValue, double *newSolution)
Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise.
Couenne::NlpSolveHeuristic::clone
virtual CbcHeuristic * clone() const
Clone.
Couenne::NlpSolveHeuristic::NlpSolveHeuristic
NlpSolveHeuristic(CbcModel &mip, Bonmin::OsiTMINLPInterface &nlp, bool cloneNlp=false, CouenneProblem *couenne=NULL)
Constructor with model and Ipopt problems.
Couenne::NlpSolveHeuristic::setMaxNlpInf
void setMaxNlpInf(double value)
set maxNlpInf.
Definition: BonNlpHeuristic.hpp:61
CouenneProblem.hpp
Couenne::NlpSolveHeuristic::operator=
NlpSolveHeuristic & operator=(const NlpSolveHeuristic &rhs)
Assignment operator.
Couenne::NlpSolveHeuristic
Definition: BonNlpHeuristic.hpp:28
Couenne::CouenneProblem
Class for MINLP problems with symbolic information.
Definition: CouenneProblem.hpp:169
Couenne::NlpSolveHeuristic::setCouenneProblem
void setCouenneProblem(CouenneProblem *)
set the couenne problem to use.
BonOsiTMINLPInterface.hpp