source: trunk/Cbc/src/CbcDummyBranchingObject.hpp @ 1899

Last change on this file since 1899 was 1899, checked in by stefan, 6 years ago

fixup svn properties

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1// $Id: CbcDummyBranchingObject.hpp 1899 2013-04-09 18:12:08Z stefan $
2// Copyright (C) 2002, 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// Edwin 11/10/2009-- carved out of CbcBranchActual
7
8#ifndef CbcDummyBranchingObject_H
9#define CbcDummyBranchingObject_H
10
11#include "CbcBranchBase.hpp"
12/** Dummy branching object
13
14  This object specifies a one-way dummy branch.
15  This is so one can carry on branching even when it looks feasible
16*/
17
18class CbcDummyBranchingObject : public CbcBranchingObject {
19
20public:
21
22    /// Default constructor
23    CbcDummyBranchingObject (CbcModel * model = NULL);
24
25    /// Copy constructor
26    CbcDummyBranchingObject ( const CbcDummyBranchingObject &);
27
28    /// Assignment operator
29    CbcDummyBranchingObject & operator= (const CbcDummyBranchingObject& rhs);
30
31    /// Clone
32    virtual CbcBranchingObject * clone() const;
33
34    /// Destructor
35    virtual ~CbcDummyBranchingObject ();
36
37    using CbcBranchingObject::branch ;
38    /** \brief Dummy branch
39    */
40    virtual double branch();
41
42#ifdef JJF_ZERO
43    // No need to override. Default works fine.
44    /** Reset every information so that the branching object appears to point to
45        the previous child. This method does not need to modify anything in any
46        solver. */
47    virtual void previousBranch();
48#endif
49
50    using CbcBranchingObject::print ;
51    /** \brief Print something about branch - only if log level high
52    */
53    virtual void print();
54
55    /** Return the type (an integer identifier) of \c this */
56    virtual CbcBranchObjType type() const {
57        return DummyBranchObj;
58    }
59
60    /** Compare the original object of \c this with the original object of \c
61        brObj. Assumes that there is an ordering of the original objects.
62        This method should be invoked only if \c this and brObj are of the same
63        type.
64        Return negative/0/positive depending on whether \c this is
65        smaller/same/larger than the argument.
66    */
67    virtual int compareOriginalObject(const CbcBranchingObject* brObj) const;
68
69    /** Compare the \c this with \c brObj. \c this and \c brObj must be os the
70        same type and must have the same original object, but they may have
71        different feasible regions.
72        Return the appropriate CbcRangeCompare value (first argument being the
73        sub/superset if that's the case). In case of overlap (and if \c
74        replaceIfOverlap is true) replace the current branching object with one
75        whose feasible region is the overlap.
76     */
77    virtual CbcRangeCompare compareBranchingObject
78    (const CbcBranchingObject* brObj, const bool replaceIfOverlap = false);
79
80};
81
82#endif
83
Note: See TracBrowser for help on using the repository browser.