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