source: stable/2.9/Cbc/src/CbcFathom.cpp @ 2223

Last change on this file since 2223 was 1573, checked in by lou, 9 years ago

Change to EPL license notice.

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