This is unlike the other heuristics in that it is very very compute intensive.
More...
|
| CbcHeuristicDW () |
|
| CbcHeuristicDW (CbcModel &model, int keepContinuous=0) |
|
| CbcHeuristicDW (CbcModel &model, int callBack(CbcHeuristicDW *currentHeuristic, CbcModel *thisModel, int whereFrom), int keepContinuous=0) |
|
| CbcHeuristicDW (const CbcHeuristicDW &) |
|
| ~CbcHeuristicDW () |
|
virtual CbcHeuristic * | clone () const |
| Clone.
|
|
CbcHeuristicDW & | operator= (const CbcHeuristicDW &rhs) |
| Assignment operator.
|
|
virtual void | generateCpp (FILE *fp) |
| Create C++ lines to get to current state.
|
|
virtual void | resetModel (CbcModel *model) |
| Resets stuff if model changes.
|
|
virtual void | setModel (CbcModel *model) |
| update model (This is needed if cliques update matrix etc)
|
|
virtual int | solution (double &objectiveValue, double *newSolution) |
| returns 0 if no solution, 1 if valid solution.
|
|
int | numberBlocks () const |
| Return number of blocks <=0 - no usable structure.
|
|
void | passInSolution (const double *solution) |
| Pass in a solution.
|
|
void | passInContinuousSolution (const double *solution) |
| Pass in continuous solution.
|
|
void | setProposalActions (int fullDWEverySoOften) |
| DW Proposal actions fullDWEverySoOften - 0 - off k - every k times solution gets better.
|
|
double | objectiveValueWhen (int whichDW) const |
| Objective value when whichDw created.
|
|
int | numberColumnsDW (int whichDW) const |
| Number of columns in DW.
|
|
OsiSolverInterface * | solver () const |
| Solver.
|
|
OsiSolverInterface * | DWModel (int whichDW) const |
| DW model (user must delete)
|
|
double | bestObjective () const |
| Best objective value.
|
|
const double * | bestSolution () const |
| Best solution found so far.
|
|
const double * | continuousSolution () const |
| Continuous solution.
|
|
const double * | fixedDj () const |
| Reduced costs of fixed solution.
|
|
const double * | objectiveDW () const |
| Objective at which DW updated.
|
|
int | numberDWTimes () const |
| Number of times we have added to DW model.
|
|
const int * | numberColumnsDW () const |
| Number of columns in DW.
|
|
void | setNumberPasses (int value) |
| Set number of passes.
|
|
void | setNumberBadPasses (int value) |
| Set number of passes without better solution.
|
|
void | setNumberNeeded (int value) |
| Set number free integers needed (Base value)
|
|
int | getNumberNeeded () const |
| Get number free integers needed (Base value)
|
|
void | setCurrentNumberNeeded (int value) |
| Set number free integers needed (Current value)
|
|
int | getCurrentNumberNeeded () const |
| Get number free integers needed (Current value)
|
|
void | setNumberNodes (int value) |
| Set number nodes (could be done in callback) (Base value)
|
|
int | getNumberNodes () const |
| Get number nodes (could be done in callback) (Base value)
|
|
void | setCurrentNumberNodes (int value) |
| Set number nodes (could be done in callback) (Current value)
|
|
int | getCurrentNumberNodes () const |
| Get number nodes (could be done in callback) (Current value)
|
|
void | setTargetObjective (double value) |
| Set target objective.
|
|
void | setHowOften (int value) |
| Sets how often to do it.
|
|
const int * | whichRowBlock () const |
| Block for every row.
|
|
const int * | whichColumnBlock () const |
| Block for every column.
|
|
double * | initialLower () const |
| Initial Lower bounds.
|
|
double * | initialUpper () const |
| Initial Upper bounds.
|
|
int * | intArrays () const |
| Local integer arrays (each numberBlocks_ long)
|
|
double * | doubleArrays () const |
| Local double arrays (each numberBlocks_ long)
|
|
int | phase () const |
| Phase of solution.
|
|
int | pass () const |
| Pass number.
|
|
const int * | columnsInBlock () const |
| Which columns are in block.
|
|
const int * | startColumnBlock () const |
| Starts for columnsInBlock.
|
|
const int * | intsInBlock () const |
| Number of integer variables in each block.
|
|
double | objectiveValue (const double *solution) |
| Objective value (could also check validity)
|
|
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 solution values if good, sets objective value This is called after cuts have been added - so can not add cuts
|
|
| CbcHeuristic () |
|
| CbcHeuristic (CbcModel &model) |
|
| CbcHeuristic (const CbcHeuristic &) |
|
virtual | ~CbcHeuristic () |
|
CbcHeuristic & | operator= (const CbcHeuristic &rhs) |
| Assignment operator.
|
|
virtual int | solution2 (double &, double *, OsiCuts &) |
| returns 0 if no solution, 1 if valid solution, -1 if just returning an estimate of best possible solution with better objective value than one passed in Sets solution values if good, sets objective value (only if nonzero code) This is called at same time as cut generators - so can add cuts Default is do nothing
|
|
virtual void | validate () |
| Validate model i.e. sets when_ to 0 if necessary (may be NULL)
|
|
void | setWhen (int value) |
| Sets "when" flag - 0 off, 1 at root, 2 other than root, 3 always.
|
|
int | when () const |
| Gets "when" flag - 0 off, 1 at root, 2 other than root, 3 always.
|
|
void | setNumberNodes (int value) |
| Sets number of nodes in subtree (default 200)
|
|
int | numberNodes () const |
| Gets number of nodes in a subtree (default 200)
|
|
void | setSwitches (int value) |
| Switches (does not apply equally to all heuristics) 1 bit - stop once allowable gap on objective reached 2 bit - always do given number of passes 4 bit - weaken cutoff by 5% every 50 passes? 8 bit - if has cutoff and suminf bobbling for 20 passes then first try halving distance to best possible then try keep halving distance to known cutoff 16 bit - needs new solution to run 1024 bit - stop all heuristics on max time.
|
|
int | switches () const |
| Switches (does not apply equally to all heuristics) 1 bit - stop once allowable gap on objective reached 2 bit - always do given number of passes 4 bit - weaken cutoff by 5% every 50 passes? 8 bit - if has cutoff and suminf bobbling for 20 passes then first try halving distance to best possible then try keep halving distance to known cutoff 16 bit - needs new solution to run 1024 bit - stop all heuristics on max time 65536 bit and above used for temporary communication.
|
|
bool | exitNow (double bestObjective) const |
| Whether to exit at once on gap.
|
|
void | setFeasibilityPumpOptions (int value) |
| Sets feasibility pump options (-1 is off)
|
|
int | feasibilityPumpOptions () const |
| Gets feasibility pump options (-1 is off)
|
|
void | setModelOnly (CbcModel *model) |
| Just set model - do not do anything else.
|
|
void | setFractionSmall (double value) |
| Sets fraction of new(rows+columns)/old(rows+columns) before doing small branch and bound (default 1.0)
|
|
double | fractionSmall () const |
| Gets fraction of new(rows+columns)/old(rows+columns) before doing small branch and bound (default 1.0)
|
|
int | numberSolutionsFound () const |
| Get how many solutions the heuristic thought it got.
|
|
void | incrementNumberSolutionsFound () |
| Increment how many solutions the heuristic thought it got.
|
|
int | smallBranchAndBound (OsiSolverInterface *solver, int numberNodes, double *newSolution, double &newSolutionValue, double cutoff, std::string name) const |
| Do mini branch and bound - return 0 not finished - no solution 1 not finished - solution 2 finished - no solution 3 finished - solution (could add global cut if finished) -1 returned on size -2 time or user event.
|
|
void | generateCpp (FILE *fp, const char *heuristic) |
| Create C++ lines to get to current state - does work for base class.
|
|
virtual bool | canDealWithOdd () const |
| Returns true if can deal with "odd" problems e.g. sos type 2.
|
|
const char * | heuristicName () const |
| return name of heuristic
|
|
void | setHeuristicName (const char *name) |
| set name of heuristic
|
|
void | setSeed (int value) |
| Set random number generator seed.
|
|
int | getSeed () const |
| Get random number generator seed.
|
|
void | setDecayFactor (double value) |
| Sets decay factor (for howOften) on failure.
|
|
void | setInputSolution (const double *solution, double objValue) |
| Set input solution.
|
|
void | setWhereFrom (int value) |
|
int | whereFrom () const |
|
void | setShallowDepth (int value) |
| Upto this depth we call the tree shallow and the heuristic can be called multiple times.
|
|
void | setHowOftenShallow (int value) |
| How often to invoke the heuristics in the shallow part of the tree.
|
|
void | setMinDistanceToRun (int value) |
| How "far" should this node be from every other where the heuristic was run in order to allow the heuristic to run in this node, too.
|
|
virtual bool | shouldHeurRun (int whereFrom) |
| Check whether the heuristic should run at all 0 - before cuts at root node (or from doHeuristics) 1 - during cuts at root 2 - after root node cuts 3 - after cuts at other nodes 4 - during cuts at other nodes 8 added if previous heuristic in loop found solution.
|
|
bool | shouldHeurRun_randomChoice () |
| Check whether the heuristic should run this time.
|
|
void | debugNodes () |
|
void | printDistanceToNodes () |
|
int | numRuns () const |
| how many times the heuristic has actually run
|
|
int | numCouldRun () const |
| How many times the heuristic could run.
|
|
double | trueObjValue (double value) const |
| Return objective function value with sign corrected.
|
|
bool | isHeuristicInteger (const OsiSolverInterface *solver, int iColumn) |
| Is it integer for heuristics?
|
|
OsiSolverInterface * | cloneBut (int type) |
| Clone, but ...
|
|
|
double | targetObjective_ |
| Target objective.
|
|
double | bestObjective_ |
| Best objective value.
|
|
double | lastObjective_ |
| Objective value last time.
|
|
heuristicCallBack | functionPointer_ |
| Call back whereFrom - 0 - after blocks found but before data setup 1 - after blocks sorted but before used 2 - just before normal branch and bound 3 - after DW has been updated 4 - if better solution found 5 - every time a block might be used next few for adjustment of nNeeded etc 6 - complete search done - no solution 7 - stopped on nodes - no improvement 8 - improving (same as 4 but after nNeeded changed Pointers to local data given by following pointers.
|
|
int * | intArray_ |
| Local integer arrays (each numberBlocks_ long)
|
|
double * | doubleArray_ |
| Local double arrays (each numberBlocks_ long)
|
|
OsiSolverInterface * | solver_ |
| Base solver.
|
|
OsiSolverInterface * | dwSolver_ |
| DW solver.
|
|
double * | bestSolution_ |
| Best solution found so far.
|
|
double * | continuousSolution_ |
| Continuous solution.
|
|
double * | fixedDj_ |
| Reduced costs of fixed solution.
|
|
double * | saveLower_ |
| Original lower bounds.
|
|
double * | saveUpper_ |
| Original Upper bounds.
|
|
double * | random_ |
| random numbers for master rows
|
|
double * | weights_ |
| Weights for each proposal.
|
|
double * | objectiveDW_ |
| Objective at which DW updated.
|
|
int * | numberColumnsDW_ |
| Number of columns in each DW.
|
|
int * | whichRowBlock_ |
| Block for every row.
|
|
int * | whichColumnBlock_ |
| Block for every column.
|
|
int * | dwBlock_ |
| Block number for each proposal.
|
|
int * | backwardRow_ |
| Points back to master rows.
|
|
int * | rowsInBlock_ |
| Which rows are in blocke.
|
|
int * | columnsInBlock_ |
| Which columns are in block.
|
|
int * | startRowBlock_ |
| Starts for rowsInBlock.
|
|
int * | startColumnBlock_ |
| Starts for columnsInBlock.
|
|
int * | intsInBlock_ |
| Number of integer variables in each block.
|
|
unsigned int * | fingerPrint_ |
| Bits set for 1 integers in each block.
|
|
unsigned short * | affinity_ |
| Affinity each block has for other (will be triangular?)
|
|
int | fullDWEverySoOften_ |
| DW Proposal actions fullDWEverySoOften - 0 - off k - every k times solution gets better.
|
|
int | numberPasses_ |
| Number of passes.
|
|
int | howOften_ |
| How often to do (code can change)
|
|
int | maximumDW_ |
| Current maximum number of DW proposals.
|
|
int | numberDW_ |
| Number of DW proposals.
|
|
int | numberDWTimes_ |
| Number of times we have added to DW model.
|
|
int | sizeFingerPrint_ |
| Number of unsigned ints needed for each block of fingerPrint.
|
|
int | numberMasterColumns_ |
| Number of columns in master.
|
|
int | numberMasterRows_ |
| Number of rows in master.
|
|
int | numberBlocks_ |
| Number of blocks.
|
|
int | keepContinuous_ |
| Action on decomposition - 1 keep continuous, 0 don't.
|
|
int | phase_ |
| Phase of solution.
|
|
int | pass_ |
| Pass number.
|
|
int | nNeededBase_ |
| Base number of integers needed.
|
|
int | nNodesBase_ |
| Base number of nodes needed.
|
|
int | nNeeded_ |
| Base number of integers needed.
|
|
int | nNodes_ |
| Base number of nodes needed.
|
|
int | numberBadPasses_ |
| Number of passes without better solution.
|
|
int | solveState_ |
|
CbcModel * | model_ |
| Model.
|
|
int | when_ |
| When flag - 0 off, 1 at root, 2 other than root, 3 always.
|
|
int | numberNodes_ |
| Number of nodes in any sub tree.
|
|
int | feasibilityPumpOptions_ |
| Feasibility pump options , -1 is off >=0 for feasibility pump itself -2 quick proximity search -3 longer proximity search.
|
|
double | fractionSmall_ |
| Fraction of new(rows+columns)/old(rows+columns) before doing small branch and bound.
|
|
CoinThreadRandom | randomNumberGenerator_ |
| Thread specific random number generator.
|
|
std::string | heuristicName_ |
| Name for printing.
|
|
int | howOften_ |
| How often to do (code can change)
|
|
double | decayFactor_ |
| How much to increase how often.
|
|
int | switches_ |
| Switches (does not apply equally to all heuristics) 1 bit - stop once allowable gap on objective reached 2 bit - always do given number of passes 4 bit - weaken cutoff by 5% every 50 passes? 8 bit - if has cutoff and suminf bobbling for 20 passes then first try halving distance to best possible then try keep halving distance to known cutoff 16 bit - needs new solution to run 1024 bit - stop all heuristics on max time.
|
|
int | whereFrom_ |
|
int | shallowDepth_ |
| Upto this depth we call the tree shallow and the heuristic can be called multiple times.
|
|
int | howOftenShallow_ |
| How often to invoke the heuristics in the shallow part of the tree.
|
|
int | numInvocationsInShallow_ |
| How many invocations happened within the same node when in a shallow part of the tree.
|
|
int | numInvocationsInDeep_ |
| How many invocations happened when in the deep part of the tree.
|
|
int | lastRunDeep_ |
| After how many deep invocations was the heuristic run last time.
|
|
int | numRuns_ |
| how many times the heuristic has actually run
|
|
int | minDistanceToRun_ |
| How "far" should this node be from every other where the heuristic was run in order to allow the heuristic to run in this node, too.
|
|
CbcHeuristicNodeList | runNodes_ |
| The description of the nodes where this heuristic has been applied.
|
|
int | numCouldRun_ |
| How many times the heuristic could run.
|
|
int | numberSolutionsFound_ |
| How many solutions the heuristic thought it got.
|
|
int | numberNodesDone_ |
| How many nodes the heuristic did this go.
|
|
double * | inputSolution_ |
|
This is unlike the other heuristics in that it is very very compute intensive.
It tries to find a DW structure and use that
Definition at line 16 of file CbcHeuristicDW.hpp.