6 #ifndef CbcFathomDynamicProgramming_H
7 #define CbcFathomDynamicProgramming_H
57 virtual int fathom(
double *& newSolution);
75 bool tryColumn(
int numberElements,
const int * rows,
76 const double * coefficients,
double cost,
77 int upper = COIN_INT_MAX);
79 inline const double *
cost()
const {
83 inline const int *
back()
const {
101 bool addOneColumn0(
int numberElements,
const int * rows,
107 bool addOneColumn1(
int numberElements,
const int * rows,
108 const int * coefficients,
double cost);
114 bool addOneColumn1A(
int numberElements,
const int * rows,
115 const int * coefficients,
double cost);
117 int bitPattern(
int numberElements,
const int * rows,
118 const int * coefficients);
120 int bitPattern(
int numberElements,
const int * rows,
121 const double * coefficients);
123 int decodeBitPattern(
int bitPattern,
int * values,
int numberRows);
void setAlgorithm(int value)
int * numberBits_
Number bits for each active row.
virtual ~CbcFathomDynamicProgramming()
void setTarget(int value)
Sets bit pattern for target result.
int * startBit_
Start bit for each active row.
double * cost_
Space for states.
FathomDynamicProgramming class.
int target() const
Gets bit pattern for target result.
int numberActive_
Number of active rows.
int bitPattern_
Current bit pattern.
const double * cost() const
Returns cost array.
int type_
Type - 0 coefficients and rhs all 1, 1 - coefficients > 1 or rhs > 1.
void setMaximumSize(int value)
int target_
Target pattern.
int * indices_
Space for sorted indices.
virtual int fathom(double *&newSolution)
returns 0 if no fathoming attempted, 1 fully fathomed , 2 incomplete search, 3 incomplete search but ...
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
int size_
Size of states (power of 2 unless just one constraint)
CbcFathomDynamicProgramming()
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
int maximumSizeAllowed_
Maximum size allowed.
int algorithm_
Current algorithm.
int * lookup_
Some rows may be satisified so we need a lookup.
const int * back() const
Returns back array.
int * back_
Which state produced this cheapest one.
int numberNonOne_
Number of Non 1 rhs.
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.
virtual CbcFathom * clone() const
Clone.
int * coefficients_
Space for sorted coefficients.
int checkPossible(int allowableSize=0)
Returns type of algorithm and sets up arrays.
Simple Branch and bound class.
int maximumSize() const
Maximum size allowed.