12 #include "CoinHelperFunctions.hpp"
15 using namespace Couenne;
20 objValue_(COIN_DBL_MAX),
25 setHeuristicName(
"InitHeuristic");
28 if (cp.
checkNLP0 (sol, objValue,
true,
false,
true,
true)) {
53 objValue_(other.objValue_),
73 CbcHeuristic::operator=(rhs);
int nVars() const
Total number of variables.
virtual ~InitHeuristic()
Destructor.
bool checkNLP0(const double *solution, double &obj, bool recompute_obj=false, const bool careAboutObj=false, const bool stopAtFirstViol=true, const bool checkAll=false, const double precision=-1) const
And finally a method to get both.
A heuristic that stores the initial solution of the NLP.
InitHeuristic & operator=(const InitHeuristic &rhs)
Assignment operator.
void getAuxs(CouNumber *) const
Get auxiliary variables from original variables.
int nVars_
Size of array sol.
virtual int solution(double &objectiveValue, double *newSolution)
Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise.
CouenneRecordBestSol * getRecordBestSol() const
returns recorded best solution
Class for MINLP problems with symbolic information.
double getModSolVal() const
virtual CbcHeuristic * clone() const
Clone.
int nOrigVars() const
Number of orig. variables.
InitHeuristic()
Default constructor.
double * sol_
point from initial solve
double objValue_
objective function value from initial solve
double * getModSol(const int expectedCard)