/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the HiGHS linear optimization suite */ /* */ /* Written and engineered 2008-2022 at the University of Edinburgh */ /* */ /* Available as open-source under the MIT License */ /* */ /* Authors: Julian Hall, Ivet Galabova, Leona Gottwald and Michael */ /* Feldmeier */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #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 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, char source); bool linesearchRounding(const std::vector& point1, const std::vector& point2, char source); void randomizedRounding(const std::vector& relaxationsol); }; #endif