Go to the documentation of this file.
6 #ifndef CbcHeuristicDW_H
7 #define CbcHeuristicDW_H
31 int keepContinuous = 0);
81 inline OsiSolverInterface *
solver()
const
86 OsiSolverInterface *
DWModel(
int whichDW)
const;
253 const int *whichBlocks);
void passInContinuousSolution(const double *solution)
Pass in continuous solution.
const int * whichRowBlock() const
Block for every row.
int(* heuristicCallBack)(CbcHeuristicDW *, CbcModel *, int)
unsigned short * affinity_
Affinity each block has for other (will be triangular?)
double * saveUpper_
Original Upper bounds.
void setNumberPasses(int value)
Set number of passes.
int getNumberNeeded() const
Get number free integers needed (Base value)
const int * whichColumnBlock() const
Block for every column.
int phase_
Phase of solution.
int * dwBlock_
Block number for each proposal.
double bestObjective_
Best objective value.
int * backwardRow_
Points back to master rows.
double objectiveValueWhen(int whichDW) const
Objective value when whichDw created.
void setNumberNeeded(int value)
Set number free integers needed (Base value)
int nNodesBase_
Base number of nodes needed.
OsiSolverInterface * solver() const
Solver.
void setNumberBadPasses(int value)
Set number of passes without better solution.
int numberMasterColumns_
Number of columns in master.
int numberBlocks() const
Return number of blocks <=0 - no usable structure.
const int * columnsInBlock() const
Which columns are in block.
double * initialLower() const
Initial Lower bounds.
const int * intsInBlock() const
Number of integer variables in each block.
double * doubleArray_
Local double arrays (each numberBlocks_ long)
This is unlike the other heuristics in that it is very very compute intensive.
OsiSolverInterface * solver_
Base solver.
virtual int solution(double &objectiveValue, double *newSolution)
returns 0 if no solution, 1 if valid solution.
unsigned int * fingerPrint_
Bits set for 1 integers in each block.
int nNodes_
Base number of nodes needed.
int numberBadPasses_
Number of passes without better solution.
int fullDWEverySoOften_
DW Proposal actions fullDWEverySoOften - 0 - off k - every k times solution gets better.
void setTargetObjective(double value)
Set target objective.
void findStructure()
Find structure.
OsiSolverInterface * DWModel(int whichDW) const
DW model (user must delete)
int sizeFingerPrint_
Number of unsigned ints needed for each block of fingerPrint.
double * weights_
Weights for each proposal.
virtual CbcHeuristic * clone() const
Clone.
Simple Branch and bound class.
void setDefaults()
Set default values.
int numberDWTimes_
Number of times we have added to DW model.
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
int * startColumnBlock_
Starts for columnsInBlock.
void passInSolution(const double *solution)
Pass in a solution.
int * intArrays() const
Local integer arrays (each numberBlocks_ long)
void gutsOfDelete()
Guts of delete.
double * bestSolution_
Best solution found so far.
const double * bestSolution() const
Best solution found so far.
const int * startColumnBlock() const
Starts for columnsInBlock.
double * continuousSolution_
Continuous solution.
double * doubleArrays() const
Local double arrays (each numberBlocks_ long)
const double * objectiveDW() const
Objective at which DW updated.
void setNumberNodes(int value)
Set number nodes (could be done in callback) (Base value)
int * startRowBlock_
Starts for rowsInBlock.
int getNumberNodes() const
Get number nodes (could be done in callback) (Base value)
void setupDWStructures()
Set up DW structure.
const int * numberColumnsDW() const
Number of columns in DW.
int * intArray_
Local integer arrays (each numberBlocks_ long)
const double * continuousSolution() const
Continuous solution.
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...
int keepContinuous_
Action on decomposition - 1 keep continuous, 0 don't.
double * fixedDj_
Reduced costs of fixed solution.
double objectiveValue(const double *solution)
Objective value (could also check validity)
int * whichRowBlock_
Block for every row.
void setCurrentNumberNeeded(int value)
Set number free integers needed (Current value)
int maximumDW_
Current maximum number of DW proposals.
virtual void generateCpp(FILE *fp)
Create C++ lines to get to current state.
int numberDW_
Number of DW proposals.
int * intsInBlock_
Number of integer variables in each block.
int numberBlocks_
Number of blocks.
void setProposalActions(int fullDWEverySoOften)
DW Proposal actions fullDWEverySoOften - 0 - off k - every k times solution gets better.
int * whichColumnBlock_
Block for every column.
int addDW(const double *solution, int numberBlocksUsed, const int *whichBlocks)
Add DW proposals.
int * columnsInBlock_
Which columns are in block.
int * numberColumnsDW_
Number of columns in each DW.
int phase() const
Phase of solution.
int getCurrentNumberNodes() const
Get number nodes (could be done in callback) (Current value)
double * random_
random numbers for master rows
double * initialUpper() const
Initial Upper bounds.
void setHowOften(int value)
Sets how often to do it.
CbcHeuristicDW & operator=(const CbcHeuristicDW &rhs)
Assignment operator.
int getCurrentNumberNeeded() const
Get number free integers needed (Current value)
int numberPasses_
Number of passes.
const double * fixedDj() const
Reduced costs of fixed solution.
double * objectiveDW_
Objective at which DW updated.
int numberMasterRows_
Number of rows in master.
void setCurrentNumberNodes(int value)
Set number nodes (could be done in callback) (Current value)
OsiSolverInterface * dwSolver_
DW solver.
int numberDWTimes() const
Number of times we have added to DW model.
double lastObjective_
Objective value last time.
double bestObjective() const
Best objective value.
heuristicCallBack functionPointer_
Call back whereFrom - 0 - after blocks found but before data setup 1 - after blocks sorted but before...
void gutsOfCopy(const CbcHeuristicDW &rhs)
Guts of copy.
int howOften_
How often to do (code can change)
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
int nNeeded_
Base number of integers needed.
double targetObjective_
Target objective.
int * rowsInBlock_
Which rows are in blocke.
int nNeededBase_
Base number of integers needed.
int pass() const
Pass number.
double * saveLower_
Original lower bounds.