Bonmin 1.8.9
Loading...
Searching...
No Matches
BonHeuristicDiveMIP.hpp
Go to the documentation of this file.
1// Copyright (C) 2007, International Business Machines Corporation and others.
2// All Rights Reserved.
3// This code is published under the Eclipse Public License.
4//
5// Authors :
6// Joao P. Goncalves, International Business Machines Corporation
7//
8// Date : November 12, 2007
9
10#ifndef BonHeuristicDiveMIP_HPP
11#define BonHeuristicDiveMIP_HPP
13#include "BonBonminSetup.hpp"
14#include "CbcHeuristic.hpp"
15#include "CbcStrategy.hpp"
16namespace Bonmin
17{
18 class SubMipSolver;
19 class HeuristicDiveMIP : public CbcHeuristic
20 {
21 public:
22#if 0
25#endif
26
29
32
35
38
40 virtual CbcHeuristic * clone() const = 0;
41
43 void Initialize(BonminSetup * setup);
44
46 virtual void resetModel(CbcModel * model){
47 setModel(model);
48 }
49
51 virtual void setSetup(BonminSetup * setup){
52 setup_ = setup;
53 // Initialize(setup_->options());
54 }
55
57 virtual int solution(double &solutionValue, double *betterSolution);
58
60 virtual void setInternalVariables(TMINLP2TNLP* minlp) = 0;
61
63
66 const vector<int> & integerColumns,
67 const double* newSolution,
68 int& bestColumn,
69 int& bestRound) = 0;
70
71 protected:
74
75 private:
77 int howOften_;
79 SubMipSolver * mip_;
80
81 };
82}
83#endif
virtual void selectVariableToBranch(TMINLP2TNLP *minlp, const vector< int > &integerColumns, const double *newSolution, int &bestColumn, int &bestRound)=0
Selects the next variable to branch on.
~HeuristicDiveMIP()
Destructor.
HeuristicDiveMIP(const HeuristicDiveMIP &copy)
Copy constructor.
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
virtual int solution(double &solutionValue, double *betterSolution)
Performs heuristic.
virtual void setInternalVariables(TMINLP2TNLP *minlp)=0
sets internal variables
HeuristicDiveMIP(BonminSetup *setup)
Constructor with setup.
void Initialize(BonminSetup *setup)
Initialize method.
HeuristicDiveMIP & operator=(const HeuristicDiveMIP &rhs)
Assignment operator.
virtual void setSetup(BonminSetup *setup)
Change setup used for heuristic.
virtual CbcHeuristic * clone() const =0
Clone.
BonminSetup * setup_
Setup to use for local searches (will make copies).
A very simple class to provide a common interface for solving MIPs with Cplex and Cbc.
This is an adapter class that converts a TMINLP to a TNLP to be solved by Ipopt.
A small wrap around std::vector to give easy access to array for interfacing with fortran code.
Definition BonTypes.hpp:9
(C) Copyright International Business Machines Corporation 2007