source: stable/2.4/Cbc/src/CbcFeasibilityBase.hpp @ 1271

Last change on this file since 1271 was 1271, checked in by forrest, 10 years ago

Creating new stable branch 2.4 from trunk (rev 1270)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1/* $Id: CbcFeasibilityBase.hpp 1271 2009-11-05 15:57:25Z forrest $ */
2// Copyright (C) 2005, International Business Machines
3// Corporation and others.  All Rights Reserved.
4#ifndef CbcFeasibilityBase_H
5#define CbcFeasibilityBase_H
6
7
8//#############################################################################
9/*  There are cases where the user wants to control how CBC sees the problems feasibility.
10    The user may want to examine the problem and say :
11    a) The default looks OK
12    b) Pretend this problem is Integer feasible
13    c) Pretend this problem is infeasible even though it looks feasible
14   
15    This simple class allows user to do that.
16
17*/
18
19class CbcModel;
20class CbcFeasibilityBase {
21public:
22  // Default Constructor
23  CbcFeasibilityBase () {}
24
25  /**
26     On input mode:
27     0 - called after a solve but before any cuts
28     -1 - called after strong branching
29     Returns :
30     0 - no opinion
31     -1 pretend infeasible
32     1 pretend integer solution
33  */
34  virtual int feasible(CbcModel * , int ) {return 0;}
35
36  virtual ~CbcFeasibilityBase() {}
37
38  // Copy constructor
39  CbcFeasibilityBase ( const CbcFeasibilityBase & )
40  {}
41   
42  // Assignment operator
43  CbcFeasibilityBase & operator=( const CbcFeasibilityBase& )
44  { 
45    return *this;
46  }
47
48  /// Clone
49  virtual CbcFeasibilityBase * clone() const
50  { return new CbcFeasibilityBase(*this);}
51};
52#endif
Note: See TracBrowser for help on using the repository browser.