source: trunk/Cbc/src/CbcFeasibilityBase.hpp @ 2464

Last change on this file since 2464 was 2464, checked in by unxusr, 6 months ago

.clang-format with proposal for formatting code

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