6 #ifndef CbcHeuristicFeasibilityPump_H 7 #define CbcHeuristicFeasibilityPump_H 10 #include "OsiClpSolverInterface.hpp" 23 double downValue = 0.5,
bool roundExpensive =
false);
65 virtual int solution(
double & objectiveValue,
66 double * newSolution);
267 int rounds(OsiSolverInterface * solver,
double * solution,
269 int numberIntegers,
const int * integerVariable,
272 double downValue = 0.5,
int *flip = 0);
281 class CbcDisasterHandler :
public OsiClpDisasterHandler {
287 virtual void intoSimplex();
290 virtual bool check()
const ;
292 virtual void saveInfo();
294 virtual int typeOfDisaster();
303 CbcDisasterHandler(
CbcModel * model = NULL);
305 virtual ~CbcDisasterHandler();
307 CbcDisasterHandler(
const CbcDisasterHandler&);
309 CbcDisasterHandler&
operator=(
const CbcDisasterHandler&);
311 virtual ClpDisasterHandler *
clone()
const;
321 inline CbcModel * cbcModel()
const {
void setDefaultRounding(double value)
Set default rounding (default 0.5)
void setAccumulate(int value)
Set use of multiple solutions and solves 0 - do not reuse solves, do not accumulate integer solutions...
double maximumTime_
Maximum Cpu seconds.
double weightFactor() const
Get weight factor (default 0.1)
int maximumPasses_
Maximum number of passes.
void setRelativeIncrement(double value)
Set relative increment (default 0.0 == off)
void setMaximumRetries(int value)
Set maximum retries (default 1)
double maximumTime() const
Get maximum Time (default 0.0 == time limit off)
double relativeIncrement() const
Get relative increment (default 0.0 == off)
int fixOnReducedCosts_
Set whether to fix variables on known solution 0 - do not fix 1 - fix integers on reduced costs 2 - f...
virtual int solution(double &objectiveValue, double *newSolution)
returns 0 if no solution, 1 if valid solution with better objective value than one passed in Sets sol...
int maximumRetries_
Maximum number of retries if we find a solution.
void setFixOnReducedCosts(int value)
Set whether to fix variables on known solution 0 - do not fix 1 - fix integers on reduced costs 2 - f...
double reducedCostMultiplier() const
Get reduced cost multiplier.
void setWeightFactor(double value)
Set weight factor (default 0.1)
double startTime_
Start time.
void setArtificialCost(double value)
Set threshold cost for using original cost - even on continuous (default infinity) ...
int accumulate() const
Get accumulation option.
double artificialCost_
Threshold cost for using original cost - even on continuous.
double initialWeight() const
Get initial weight (default 0.0 == off)
void setMaximumPasses(int value)
Set maximum passes (default 100)
double iterationRatio() const
Get iteration to size ratio.
void setReducedCostMultiplier(double value)
Set reduced cost multiplier 1.0 as normal <1.0 (x) - pretend gap is x* actual gap - just for fixing...
double artificialCost() const
Get threshold cost for using original cost - even on continuous (default infinity) ...
int accumulate_
Set use of multiple solutions and solves 0 - do not reuse solves, do not accumulate integer solutions...
void setInitialWeight(double value)
Set initial weight (default 0.0 == off)
double reducedCostMultiplier_
Reduced cost multiplier 1.0 as normal <1.0 (x) - pretend gap is x* actual gap - just for fixing...
double weightFactor_
Factor for decreasing weight.
virtual void generateCpp(FILE *fp)
Create C++ lines to get to current state.
double defaultRounding() const
Get default rounding (default 0.5)
void setMaximumTime(double value)
Set maximum Time (default off) - also sets starttime to current.
CbcHeuristicFPump & operator=(const CbcHeuristicFPump &rhs)
Assignment operator.
double relativeIncrement_
If positive carry on after solution expecting gain of at least this times objective.
double initialWeight_
Initial weight for true objective.
double absoluteIncrement_
If positive carry on after solution expecting gain of at least this.
virtual CbcHeuristic * clone() const
Clone.
int maximumRetries() const
Get maximum retries (default 1)
void setAbsoluteIncrement(double value)
Set absolute increment (default 0.0 == off)
double fakeCutoff() const
Get fake cutoff (default 0.0 == off)
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
int fixOnReducedCosts() const
Get reduced cost option.
double fakeCutoff_
Fake cutoff value.
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
virtual int solution(double &objectiveValue, double *newSolution)=0
returns 0 if no solution, 1 if valid solution with better objective value than one passed in Sets sol...
void setIterationRatio(double value)
Set iteration to size ratio.
double iterationRatio_
If iterationRatio >0 use instead of maximumPasses_ test is iterations > ratio*(2*nrow+ncol) ...
double defaultRounding_
Default is round up if > this.
bool roundExpensive_
If true round to expensive.
Simple Branch and bound class.
double absoluteIncrement() const
Get absolute increment (default 0.0 == off)
void setFakeCutoff(double value)
Set fake cutoff (default COIN_DBL_MAX == off)
int maximumPasses() const
Get maximum passes (default 100)