1 | // Edwin 11/10/2009-- carved out of CbcBranchActual |
---|

2 | #ifndef CbcSubProblem_H |
---|

3 | #define CbcSubProblem_H |
---|

4 | |
---|

5 | #ifdef COIN_HAS_CLP |
---|

6 | #include "ClpSimplex.hpp" |
---|

7 | #include "ClpNode.hpp" |
---|

8 | |
---|

9 | /** Defines a general subproblem |
---|

10 | Basis will be made more compact later |
---|

11 | */ |
---|

12 | class CoinWarmStartDiff; |
---|

13 | class CbcSubProblem { |
---|

14 | |
---|

15 | public: |
---|

16 | |
---|

17 | /// Default constructor |
---|

18 | CbcSubProblem (); |
---|

19 | |
---|

20 | /// Constructor from model |
---|

21 | CbcSubProblem (const OsiSolverInterface * solver, |
---|

22 | const double * lowerBefore, |
---|

23 | const double * upperBefore, |
---|

24 | const unsigned char * status, |
---|

25 | int depth); |
---|

26 | |
---|

27 | /// Copy constructor |
---|

28 | CbcSubProblem ( const CbcSubProblem &); |
---|

29 | |
---|

30 | /// Assignment operator |
---|

31 | CbcSubProblem & operator= (const CbcSubProblem& rhs); |
---|

32 | |
---|

33 | /// Destructor |
---|

34 | virtual ~CbcSubProblem (); |
---|

35 | |
---|

36 | /// Apply subproblem (1=bounds, 2=basis, 3=both) |
---|

37 | void apply(OsiSolverInterface * model, int what = 3) const; |
---|

38 | |
---|

39 | public: |
---|

40 | /// Value of objective |
---|

41 | double objectiveValue_; |
---|

42 | /// Sum of infeasibilities |
---|

43 | double sumInfeasibilities_; |
---|

44 | /** Which variable (top bit if upper bound changing) |
---|

45 | next bit if changing on down branch only */ |
---|

46 | int * variables_; |
---|

47 | /// New bound |
---|

48 | double * newBounds_; |
---|

49 | /// Status |
---|

50 | mutable CoinWarmStartBasis * status_; |
---|

51 | /// Depth |
---|

52 | int depth_; |
---|

53 | /// Number of Extra bound changes |
---|

54 | int numberChangedBounds_; |
---|

55 | /// Number of infeasibilities |
---|

56 | int numberInfeasibilities_; |
---|

57 | }; |
---|

58 | |
---|

59 | #endif //COIN_HAS_CLP |
---|

60 | #endif |
---|

61 | |
---|