Line | |
---|

1 | // Edwin 11/12/2009 carved from CbcBranchBase |
---|

2 | #if defined(_MSC_VER) |
---|

3 | // Turn off compiler warning about long names |
---|

4 | # pragma warning(disable:4786) |
---|

5 | #endif |
---|

6 | #include <cassert> |
---|

7 | #include <cstdlib> |
---|

8 | #include <cmath> |
---|

9 | #include <cfloat> |
---|

10 | |
---|

11 | #include "OsiSolverInterface.hpp" |
---|

12 | #include "OsiSolverBranch.hpp" |
---|

13 | #include "OsiChooseVariable.hpp" |
---|

14 | #include "CbcModel.hpp" |
---|

15 | #include "CbcMessage.hpp" |
---|

16 | #include "CbcBranchBase.hpp" |
---|

17 | |
---|

18 | |
---|

19 | // Default Constructor |
---|

20 | CbcBranchingObject::CbcBranchingObject() |
---|

21 | : OsiBranchingObject() |
---|

22 | { |
---|

23 | model_ = NULL; |
---|

24 | originalCbcObject_ = NULL; |
---|

25 | variable_ = -1; |
---|

26 | way_ = 0; |
---|

27 | } |
---|

28 | |
---|

29 | // Useful constructor |
---|

30 | CbcBranchingObject::CbcBranchingObject (CbcModel * model, int variable, int way , double value) |
---|

31 | : OsiBranchingObject(model->solver(), value) |
---|

32 | { |
---|

33 | model_ = model; |
---|

34 | originalCbcObject_ = NULL; |
---|

35 | variable_ = variable; |
---|

36 | way_ = way; |
---|

37 | } |
---|

38 | |
---|

39 | // Copy constructor |
---|

40 | CbcBranchingObject::CbcBranchingObject ( const CbcBranchingObject & rhs) |
---|

41 | : OsiBranchingObject(rhs) |
---|

42 | { |
---|

43 | model_ = rhs.model_; |
---|

44 | originalCbcObject_ = rhs.originalCbcObject_; |
---|

45 | variable_ = rhs.variable_; |
---|

46 | way_ = rhs.way_; |
---|

47 | value_ = rhs.value_; |
---|

48 | } |
---|

49 | |
---|

50 | // Assignment operator |
---|

51 | CbcBranchingObject & |
---|

52 | CbcBranchingObject::operator=( const CbcBranchingObject & rhs) |
---|

53 | { |
---|

54 | if (this != &rhs) { |
---|

55 | OsiBranchingObject::operator=(rhs); |
---|

56 | model_ = rhs.model_; |
---|

57 | originalCbcObject_ = rhs.originalCbcObject_; |
---|

58 | variable_ = rhs.variable_; |
---|

59 | way_ = rhs.way_; |
---|

60 | } |
---|

61 | return *this; |
---|

62 | } |
---|

63 | |
---|

64 | // Destructor |
---|

65 | CbcBranchingObject::~CbcBranchingObject () |
---|

66 | { |
---|

67 | } |
---|

**Note:** See

TracBrowser
for help on using the repository browser.