12#ifndef FEASIBILITYPUMP_H
13#define FEASIBILITYPUMP_H
64 const static std::string
me_;
139 bool cycle_(
double find_value);
Define abstract base class for heuristics of various kinds.
Declare important 'types' used in Minotaur.
Definition: Environment.h:28
Feasibility Pump for MINLPs.
Definition: FeasibilityPump.h:41
void saveBounds_(double *LB_copy, double *UB_copy, UInt vars)
A function to save the upper and lower bounds of the problem.
Definition: FeasibilityPump.cpp:388
void convertSol_(SolutionPoolPtr s_pool, ConstSolutionPtr sol)
Function to convert a solution of the cloned problem to that of an original problem.
Definition: FeasibilityPump.cpp:182
DoubleVector random_
A random vector for inner product with the solution.
Definition: FeasibilityPump.h:91
VarVector selectToFlip_(UInt n_to_flip)
A funtion to randomly select "n" binary/integer variable to be flipped.
Definition: FeasibilityPump.cpp:399
void writeStats(std::ostream &out) const
write statistic to the logger
Definition: FeasibilityPump.cpp:482
virtual void constructObj_(ProblemPtr prob, ConstSolutionPtr sol)
Function to construct/update the objective function.
Definition: FeasibilityPump.cpp:133
double intTol_
Tolerance for a number to be considered as an integer.
Definition: FeasibilityPump.h:79
EnvPtr env_
Pointer to the environment.
Definition: FeasibilityPump.h:73
void restoreBounds_(double *LB_copy, double *UB_copy, UInt vars)
A function to restore the upper and lower bounds of the problem.
Definition: FeasibilityPump.cpp:378
VarVector bins_
Binary/integer variables present in the problem.
Definition: FeasibilityPump.h:67
virtual ~FeasibilityPump()
default destructor
Definition: FeasibilityPump.cpp:123
DoubleVector hashVal_
Vector for hash value of solutions.
Definition: FeasibilityPump.h:76
DoubleVector roundedSol_
Vector of rounded solution.
Definition: FeasibilityPump.h:94
bool isFrac_(const double *x)
Function to check the integrality of a variable.
Definition: FeasibilityPump.cpp:311
Timer * timer_
Timer of the heuristic.
Definition: FeasibilityPump.h:100
virtual void implementFP_(const double *x, SolutionPoolPtr s_pool)
Function to implement the Feasibility Pump method.
Definition: FeasibilityPump.cpp:267
FeasibilityPump(EnvPtr env, ProblemPtr p, EnginePtr e)
default constructor
Definition: FeasibilityPump.cpp:43
void solve(NodePtr node, RelaxationPtr rel, SolutionPoolPtr s_pool)
call to the heuristic
Definition: FeasibilityPump.cpp:437
bool cycle_(double find_value)
A search function for detection of cycling.
Definition: FeasibilityPump.cpp:232
FeasPumpStats * stats_
Statistics for the Feasibility Pump heuristic.
Definition: FeasibilityPump.h:97
LoggerPtr logger_
Pointer to the logger.
Definition: FeasibilityPump.h:82
void perturb_(double hash_val, UInt n_to_flip)
A function to perturb the rounded solution in case of cycling.
Definition: FeasibilityPump.cpp:350
virtual bool shouldFP_()
Function to decide whether to use Feasibility Pump.
Definition: FeasibilityPump.cpp:424
ProblemPtr p_
Pointer to the problem being solved.
Definition: FeasibilityPump.h:88
double hash_()
A function to hash the solutions.
Definition: FeasibilityPump.cpp:249
UInt nToFlip_
Number of variables to be flipped if cycling is detected.
Definition: FeasibilityPump.h:85
static const std::string me_
Message name for the heuristic.
Definition: FeasibilityPump.h:64
EnginePtr e_
Pointer to the engine to be used to solve the problem.
Definition: FeasibilityPump.h:70
Definition: Heuristic.h:30
Definition: Relaxation.h:53
Definition: SolutionPool.h:28
Definition: Solution.h:30
Definition: ActiveNodeStore.h:20
unsigned int UInt
Unsigned integer.
Definition: Types.h:30
statistics for Feasibility Pump heuristic
Definition: FeasibilityPump.h:23
double bestObjValue
Total time taken by the heuristic.
Definition: FeasibilityPump.h:28
UInt numCycles
Number of errors in NLP solved.
Definition: FeasibilityPump.h:26
UInt errors
Number of NLPs solved in the heuristic.
Definition: FeasibilityPump.h:25
double time
Number of time the same solution was obtained.
Definition: FeasibilityPump.h:27