source: branches/sandbox/Cbc/src/CbcLongCliqueBranchingObject.hpp @ 1293

Last change on this file since 1293 was 1293, checked in by EdwinStraver, 10 years ago
File size: 3.1 KB
Line 
1// Edwin 11/10/2009-- carved out of CbcBranchActual
2#ifndef CbcLongCliqueBranchingObject_H
3#define CbcLongCliqueBranchingObject_H
4
5#include "CbcBranchBase.hpp"
6#include "CbcClique.hpp"
7
8/** Unordered Clique Branching Object class.
9    These are for cliques which are > 64 members
10    Variable is number of clique.
11 */
12class CbcLongCliqueBranchingObject : public CbcBranchingObject {
13
14public:
15
16    // Default Constructor
17    CbcLongCliqueBranchingObject ();
18
19    // Useful constructor
20    CbcLongCliqueBranchingObject (CbcModel * model,  const CbcClique * clique,
21                                  int way,
22                                  int numberOnDownSide, const int * down,
23                                  int numberOnUpSide, const int * up);
24
25    // Copy constructor
26    CbcLongCliqueBranchingObject ( const CbcLongCliqueBranchingObject &);
27
28    // Assignment operator
29    CbcLongCliqueBranchingObject & operator=( const CbcLongCliqueBranchingObject& rhs);
30
31    /// Clone
32    virtual CbcBranchingObject * clone() const;
33
34    // Destructor
35    virtual ~CbcLongCliqueBranchingObject ();
36
37    using CbcBranchingObject::branch ;
38    /// Does next branch and updates state
39    virtual double branch();
40
41#if 0
42    // No need to override. Default works fine.
43    /** Reset every information so that the branching object appears to point to
44        the previous child. This method does not need to modify anything in any
45        solver. */
46    virtual void previousBranch();
47#endif
48
49    using CbcBranchingObject::print ;
50    /** \brief Print something about branch - only if log level high
51    */
52    virtual void print();
53
54    /** Return the type (an integer identifier) of \c this */
55    virtual int type() const {
56        return 103;
57    }
58
59    /** Compare the original object of \c this with the original object of \c
60        brObj. Assumes that there is an ordering of the original objects.
61        This method should be invoked only if \c this and brObj are of the same
62        type.
63        Return negative/0/positive depending on whether \c this is
64        smaller/same/larger than the argument.
65    */
66    virtual int compareOriginalObject(const CbcBranchingObject* brObj) const;
67
68    /** Compare the \c this with \c brObj. \c this and \c brObj must be os the
69        same type and must have the same original object, but they may have
70        different feasible regions.
71        Return the appropriate CbcRangeCompare value (first argument being the
72        sub/superset if that's the case). In case of overlap (and if \c
73        replaceIfOverlap is true) replace the current branching object with one
74        whose feasible region is the overlap.
75     */
76    virtual CbcRangeCompare compareBranchingObject
77    (const CbcBranchingObject* brObj, const bool replaceIfOverlap = false);
78
79private:
80    /// data
81    const CbcClique * clique_;
82    /// downMask - bit set to fix to weak bounds, not set to leave unfixed
83    unsigned int * downMask_;
84    /// upMask - bit set to fix to weak bounds, not set to leave unfixed
85    unsigned int * upMask_;
86};
87
88#endif
Note: See TracBrowser for help on using the repository browser.