source: trunk/Cbc/src/CbcBranchingObject.cpp @ 1899

Last change on this file since 1899 was 1899, checked in by stefan, 6 years ago

fixup svn properties

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
RevLine 
[1573]1// $Id: CbcBranchingObject.cpp 1899 2013-04-09 18:12:08Z stefan $
2// Copyright (C) 2002, International Business Machines
3// Corporation and others.  All Rights Reserved.
4// This code is licensed under the terms of the Eclipse Public License (EPL).
5
[1357]6// Edwin 11/12/2009 carved from CbcBranchBase
[1573]7
[1357]8#if defined(_MSC_VER)
9// Turn off compiler warning about long names
10#  pragma warning(disable:4786)
11#endif
12#include <cassert>
13#include <cstdlib>
14#include <cmath>
15#include <cfloat>
16
17#include "OsiSolverInterface.hpp"
18#include "OsiSolverBranch.hpp"
19#include "OsiChooseVariable.hpp"
20#include "CbcModel.hpp"
21#include "CbcMessage.hpp"
22#include "CbcBranchBase.hpp"
23
24
25// Default Constructor
26CbcBranchingObject::CbcBranchingObject()
27        : OsiBranchingObject()
28{
29    model_ = NULL;
30    originalCbcObject_ = NULL;
31    variable_ = -1;
32    way_ = 0;
33}
34
35// Useful constructor
36CbcBranchingObject::CbcBranchingObject (CbcModel * model, int variable, int way , double value)
37        : OsiBranchingObject(model->solver(), value)
38{
39    model_ = model;
40    originalCbcObject_ = NULL;
41    variable_ = variable;
42    way_ = way;
43}
44
45// Copy constructor
46CbcBranchingObject::CbcBranchingObject ( const CbcBranchingObject & rhs)
47        : OsiBranchingObject(rhs)
48{
49    model_ = rhs.model_;
50    originalCbcObject_ = rhs.originalCbcObject_;
51    variable_ = rhs.variable_;
52    way_ = rhs.way_;
53    value_ = rhs.value_;
54}
55
56// Assignment operator
57CbcBranchingObject &
58CbcBranchingObject::operator=( const CbcBranchingObject & rhs)
59{
60    if (this != &rhs) {
61        OsiBranchingObject::operator=(rhs);
62        model_ = rhs.model_;
63        originalCbcObject_ = rhs.originalCbcObject_;
64        variable_ = rhs.variable_;
65        way_ = rhs.way_;
66    }
67    return *this;
68}
69
70// Destructor
71CbcBranchingObject::~CbcBranchingObject ()
72{
73}
[1432]74
Note: See TracBrowser for help on using the repository browser.