/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the HiGHS linear optimization suite */ /* */ /* Available as open-source under the MIT License */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef HIGHS_PRIMAL_HEURISTICS_H_ #define HIGHS_PRIMAL_HEURISTICS_H_ #include #include "lp_data/HStruct.h" #include "lp_data/HighsLp.h" #include "util/HighsRandom.h" class HighsMipSolver; class HighsPrimalHeuristics { private: HighsMipSolver& mipsolver; size_t total_repair_lp; size_t total_repair_lp_feasible; size_t total_repair_lp_iterations; size_t lp_iterations; double successObservations; HighsInt numSuccessObservations; double infeasObservations; HighsInt numInfeasObservations; HighsRandom randgen; std::vector intcols; public: HighsPrimalHeuristics(HighsMipSolver& mipsolver); void setupIntCols(); bool solveSubMip(const HighsLp& lp, const HighsBasis& basis, double fixingRate, std::vector colLower, std::vector colUpper, HighsInt maxleaves, HighsInt maxnodes, HighsInt stallnodes); double determineTargetFixingRate(); void rootReducedCost(); void RENS(const std::vector& relaxationsol); void RINS(const std::vector& relaxationsol); void feasibilityPump(); void centralRounding(); void flushStatistics(); bool tryRoundedPoint(const std::vector& point, const int solution_source); bool linesearchRounding(const std::vector& point1, const std::vector& point2, const int solution_source); void randomizedRounding(const std::vector& relaxationsol); }; #endif