source: branches/heur/Cbc/src/CbcFathom.cpp @ 885

Last change on this file since 885 was 687, checked in by forrest, 12 years ago

add threaded to trunk

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1// Copyright (C) 2004, International Business Machines
2// Corporation and others.  All Rights Reserved.
3#if defined(_MSC_VER)
4// Turn off compiler warning about long names
5#  pragma warning(disable:4786)
6#endif
7#include <cassert>
8#include <cmath>
9#include <cfloat>
10
11#ifdef COIN_HAS_CLP
12#include "OsiClpSolverInterface.hpp"
13#endif
14#include "CbcModel.hpp"
15#include "CbcMessage.hpp"
16#include "CbcFathom.hpp"
17
18// Default Constructor
19CbcFathom::CbcFathom() 
20  :model_(NULL),
21   possible_(false)
22{
23}
24
25// Constructor from model
26CbcFathom::CbcFathom(CbcModel & model)
27:
28  model_(&model),
29  possible_(false)
30{
31}
32// Resets stuff if model changes
33void 
34CbcFathom::resetModel(CbcModel * model)
35{
36  model_=model;
37}
38
39// Destructor
40CbcFathom::~CbcFathom ()
41{
42}
43
44// update model
45void CbcFathom::setModel(CbcModel * model)
46{
47  model_ = model;
48}
49#ifdef COIN_HAS_CLP
50
51//#############################################################################
52// Constructors, destructors clone and assignment
53//#############################################################################
54
55//-------------------------------------------------------------------
56// Default Constructor
57//-------------------------------------------------------------------
58CbcOsiSolver::CbcOsiSolver ()
59  : OsiClpSolverInterface()
60{
61  cbcModel_ = NULL;
62}
63//-------------------------------------------------------------------
64// Clone
65//-------------------------------------------------------------------
66OsiSolverInterface * 
67CbcOsiSolver::clone(bool copyData) const
68{
69  assert (copyData);
70  return new CbcOsiSolver(*this);
71}
72
73
74//-------------------------------------------------------------------
75// Copy constructor
76//-------------------------------------------------------------------
77CbcOsiSolver::CbcOsiSolver (
78                  const CbcOsiSolver & rhs)
79  : OsiClpSolverInterface(rhs)
80{
81  cbcModel_ = rhs.cbcModel_;
82}
83
84//-------------------------------------------------------------------
85// Destructor
86//-------------------------------------------------------------------
87CbcOsiSolver::~CbcOsiSolver ()
88{
89}
90
91//-------------------------------------------------------------------
92// Assignment operator
93//-------------------------------------------------------------------
94CbcOsiSolver &
95CbcOsiSolver::operator=(const CbcOsiSolver& rhs)
96{
97  if (this != &rhs) { 
98    OsiClpSolverInterface::operator=(rhs);
99    cbcModel_ = rhs.cbcModel_;
100  }
101  return *this;
102}
103#endif
Note: See TracBrowser for help on using the repository browser.