6 #ifndef CbcHeuristicFeasibilityPump_H
7 #define CbcHeuristicFeasibilityPump_H
10 #include "OsiClpSolverInterface.hpp"
22 double downValue = 0.5,
bool roundExpensive =
false);
70 int maxAround = 1,
bool fixSatisfied =
false);
301 int numberIntegers,
const int *integerVariable,
304 double downValue = 0.5,
int *flip = 0);
315 class CbcDisasterHandler :
public OsiClpDisasterHandler {
322 virtual void intoSimplex();
324 virtual bool check()
const;
326 virtual void saveInfo();
329 virtual int typeOfDisaster();
336 CbcDisasterHandler(
CbcModel *model = NULL);
338 virtual ~CbcDisasterHandler();
340 CbcDisasterHandler(
const CbcDisasterHandler &);
342 CbcDisasterHandler &operator=(
const CbcDisasterHandler &);
344 virtual ClpDisasterHandler *clone()
const;
double fakeCutoff_
Fake cutoff value.
double weightFactor() const
Get weight factor (default 0.1)
double weightFactor_
Factor for decreasing weight.
int fixOnReducedCosts_
Set whether to fix variables on known solution 0 - do not fix 1 - fix integers on reduced costs 2 - f...
void setAccumulate(int value)
Set use of multiple solutions and solves 0 - do not reuse solves, do not accumulate integer solutions...
void setMaximumRetries(int value)
Set maximum retries (default 1)
double iterationRatio() const
Get iteration to size ratio.
void setArtificialCost(double value)
Set threshold cost for using original cost - even on continuous (default infinity)
CbcHeuristicFPump & operator=(const CbcHeuristicFPump &rhs)
Assignment operator.
int solutionInternal(double &objectiveValue, double *newSolution)
Does real work.
int maximumRetries_
Maximum number of retries if we find a solution.
double initialWeight() const
Get initial weight (default 0.0 == off)
void setInitialWeight(double value)
Set initial weight (default 0.0 == off)
void setMaximumTime(double value)
Set maximum Time (default off) - also sets starttime to current.
void setReducedCostMultiplier(double value)
Set reduced cost multiplier 1.0 as normal <1.0 (x) - pretend gap is x* actual gap - just for fixing.
int fixOnReducedCosts() const
Get reduced cost option.
void setFakeCutoff(double value)
Set fake cutoff (default COIN_DBL_MAX == off)
int accumulate_
Set use of multiple solutions and solves 0 - do not reuse solves, do not accumulate integer solutions...
int maximumPasses_
Maximum number of passes.
CbcHeuristicFPump(const CbcHeuristicFPump &)
double iterationRatio_
If iterationRatio >0 use instead of maximumPasses_ test is iterations > ratio*(2*nrow+ncol)
int accumulate() const
Get accumulation option.
int solutionGeneral(double &objectiveValue, double *newSolution, int maxAround=1, bool fixSatisfied=false)
If general integers then adds variables to turn into binaries round solution.
double startTime_
Start time.
double maximumTime_
Maximum Cpu seconds.
virtual void generateCpp(FILE *fp)
Create C++ lines to get to current state.
double fakeCutoff() const
Get fake cutoff (default 0.0 == off)
double artificialCost_
Threshold cost for using original cost - even on continuous.
CbcHeuristicFPump(CbcModel &model, double downValue=0.5, bool roundExpensive=false)
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...
double relativeIncrement_
If positive carry on after solution expecting gain of at least this times objective.
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
void setAbsoluteIncrement(double value)
Set absolute increment (default 0.0 == off)
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...
double artificialCost() const
Get threshold cost for using original cost - even on continuous (default infinity)
void setMaximumPasses(int value)
Set maximum passes (default 100)
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 absoluteIncrement() const
Get absolute increment (default 0.0 == off)
int rounds(OsiSolverInterface *solver, double *solution, int numberIntegers, const int *integerVariable, int passNumber, double downValue=0.5, int *flip=0)
Rounds solution - down if < downValue If roundExpensive then always to more expnsive.
void setIterationRatio(double value)
Set iteration to size ratio.
double defaultRounding() const
Get default rounding (default 0.5)
double reducedCostMultiplier_
Reduced cost multiplier 1.0 as normal <1.0 (x) - pretend gap is x* actual gap - just for fixing.
int maximumRetries() const
Get maximum retries (default 1)
virtual CbcHeuristic * clone() const
Clone.
double relativeIncrement() const
Get relative increment (default 0.0 == off)
void setDefaultRounding(double value)
Set default rounding (default 0.5)
double absoluteIncrement_
If positive carry on after solution expecting gain of at least this.
int maximumPasses() const
Get maximum passes (default 100)
double defaultRounding_
Default is round up if > this.
double maximumTime() const
Get maximum Time (default 0.0 == time limit off)
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
double initialWeight_
Initial weight for true objective.
bool roundExpensive_
If true round to expensive.
void setRelativeIncrement(double value)
Set relative increment (default 0.0 == off)
void setWeightFactor(double value)
Set weight factor (default 0.1)
double reducedCostMultiplier() const
Get reduced cost multiplier.
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...
Simple Branch and bound class.