10 #ifndef BonHeuristicDive_HPP 
   11 #define BonHeuristicDive_HPP 
   14 #include "CbcHeuristic.hpp" 
   37     virtual CbcHeuristic * 
clone() 
const = 0;
 
   55     virtual int solution(
double &solutionValue, 
double *betterSolution);
 
   65                                         const double* newSolution,
 
virtual void selectVariableToBranch(TMINLP2TNLP *minlp, const vector< int > &integerColumns, const double *newSolution, int &bestColumn, int &bestRound)=0
Selects the next variable to branch on. 
 
HeuristicDive()
Default constructor. 
 
int howOften_
How often to do (code can change) 
 
virtual int solution(double &solutionValue, double *betterSolution)
Performs heuristic. 
 
bool isNlpFeasible(TMINLP2TNLP *minlp, const double primalTolerance)
checks if the NLP relaxation of the problem is feasible 
 
void adjustPrimalTolerance(TMINLP2TNLP *minlp, double &primalTolerance)
Adjusts the primalTolerance in case some of the constraints are violated. 
 
BonminSetup * setup_
Setup to use for local searches (will make copies). 
 
~HeuristicDive()
Destructor. 
 
virtual void setSetup(BonminSetup *setup)
Change setup used for heuristic. 
 
virtual void resetModel(CbcModel *model)
Resets stuff if model changes. 
 
HeuristicDive & operator=(const HeuristicDive &rhs)
Assignment operator. 
 
virtual CbcHeuristic * clone() const =0
Clone. 
 
virtual void setInternalVariables(TMINLP2TNLP *minlp)=0
sets internal variables 
 
This is an adapter class that converts a TMINLP to a TNLP to be solved by Ipopt. 
 
void setPercentageToFix(double value)
Set percentage of integer variables to fix at bounds. 
 
double percentageToFix_
Percentage of integer variables to fix at bounds.