source: trunk/Cbc/src/CbcFathom.cpp @ 1995

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