Go to the documentation of this file.
6 #ifndef CbcFathomDynamicProgramming_H
7 #define CbcFathomDynamicProgramming_H
57 virtual int fathom(
double *&newSolution);
78 bool tryColumn(
int numberElements,
const int *rows,
79 const double *coefficients,
double cost,
80 int upper = COIN_INT_MAX);
82 inline const double *
cost()
const
87 inline const int *
back()
const
116 const int *coefficients,
double cost);
123 const int *coefficients,
double cost);
125 int bitPattern(
int numberElements,
const int *rows,
126 const int *coefficients);
128 int bitPattern(
int numberElements,
const int *rows,
129 const double *coefficients);
FathomDynamicProgramming class.
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
int maximumSize() const
Maximum size allowed.
virtual ~CbcFathomDynamicProgramming()
int * back_
Which state produced this cheapest one.
int decodeBitPattern(int bitPattern, int *values, int numberRows)
Fills in original column (dense) from bit pattern - returning number nonzero.
int * startBit_
Start bit for each active row.
int size_
Size of states (power of 2 unless just one constraint)
int bitPattern(int numberElements, const int *rows, const int *coefficients)
Gets bit pattern from original column.
int target_
Target pattern.
int maximumSizeAllowed_
Maximum size allowed.
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
int * numberBits_
Number bits for each active row.
int checkPossible(int allowableSize=0)
Returns type of algorithm and sets up arrays.
int numberActive_
Number of active rows.
CbcFathomDynamicProgramming & operator=(const CbcFathomDynamicProgramming &rhs)
Illegal Assignment operator.
int * lookup_
Some rows may be satisified so we need a lookup.
int bitPattern_
Current bit pattern.
Simple Branch and bound class.
const int * back() const
Returns back array.
int numberNonOne_
Number of Non 1 rhs.
CbcFathomDynamicProgramming()
int * coefficients_
Space for sorted coefficients.
bool addOneColumn1A(int numberElements, const int *rows, const int *coefficients, double cost)
Adds one attempt of one column of type 1, returns true if was used in making any changes.
void gutsOfDelete()
Does deleteions.
virtual int fathom(double *&newSolution)
returns 0 if no fathoming attempted, 1 fully fathomed , 2 incomplete search, 3 incomplete search but ...
void setTarget(int value)
Sets bit pattern for target result.
double * cost_
Space for states.
bool addOneColumn1(int numberElements, const int *rows, const int *coefficients, double cost)
Adds one attempt of one column of type 1, returns true if was used in making any changes.
int * indices_
Space for sorted indices.
bool tryColumn(int numberElements, const int *rows, const double *coefficients, double cost, int upper=COIN_INT_MAX)
Tries a column returns true if was used in making any changes.
bool addOneColumn0(int numberElements, const int *rows, double cost)
Adds one attempt of one column of type 0, returns true if was used in making any changes.
int algorithm_
Current algorithm.
void setMaximumSize(int value)
const double * cost() const
Returns cost array.
int target() const
Gets bit pattern for target result.
int type_
Type - 0 coefficients and rhs all 1, 1 - coefficients > 1 or rhs > 1.
void setAlgorithm(int value)
virtual CbcFathom * clone() const
Clone.