source: branches/sandbox/Cbc/src/CbcBranchCut.hpp @ 1305

Last change on this file since 1305 was 1305, checked in by EdwinStraver, 10 years ago

Moved the objects CbcCutBranchingObject?, CbcBranchToFixLots?, and CbcBranchAllDifferent? to new files, out of CbcBranchCut?.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/* $Id: CbcBranchCut.hpp 1305 2009-11-13 22:50:47Z EdwinStraver $ */
2// Copyright (C) 2004, International Business Machines
3// Corporation and others.  All Rights Reserved.
4#ifndef CbcBranchCut_H
5#define CbcBranchCut_H
6
7#include "CbcBranchBase.hpp"
8#include "OsiRowCut.hpp"
9#include "CoinPackedMatrix.hpp"
10#include "CbcCutBranchingObject.hpp"
11
12/** Define a cut branching class.
13    At present empty - all stuff in descendants
14*/
15
16class CbcBranchCut : public CbcObject {
17
18public:
19
20    // Default Constructor
21    CbcBranchCut ();
22
23    /** In to maintain normal methods
24    */
25    CbcBranchCut (CbcModel * model);
26    // Copy constructor
27    CbcBranchCut ( const CbcBranchCut &);
28
29    /// Clone
30    virtual CbcObject * clone() const;
31
32    // Assignment operator
33    CbcBranchCut & operator=( const CbcBranchCut& rhs);
34
35    // Destructor
36    ~CbcBranchCut ();
37
38    /// Infeasibility
39    virtual double infeasibility(const OsiBranchingInformation * info,
40                                 int &preferredWay) const;
41
42    using CbcObject::feasibleRegion ;
43    /** Set bounds to contain the current solution.
44
45      More precisely, for the variable associated with this object, take the
46      value given in the current solution, force it within the current bounds
47      if required, then set the bounds to fix the variable at the integer
48      nearest the solution value.
49
50      At present this will do nothing
51    */
52    virtual void feasibleRegion();
53
54    /** \brief Return true if branch created by object should fix variables
55    */
56    virtual bool boundBranch() const ;
57
58    /// Creates a branching object
59    virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ;
60
61    /** \brief Given a valid solution (with reduced costs, etc.),
62        return a branching object which would give a new feasible
63        point in the good direction.
64
65      The preferred branching object will force the variable to be +/-1 from
66      its current value, depending on the reduced cost and objective sense.  If
67      movement in the direction which improves the objective is impossible due
68      to bounds on the variable, the branching object will move in the other
69      direction.  If no movement is possible, the method returns NULL.
70
71      Only the bounds on this variable are considered when determining if the new
72      point is feasible.
73
74      At present this does nothing
75    */
76    virtual CbcBranchingObject * preferredNewFeasible() const;
77
78    /** \brief Given a valid solution (with reduced costs, etc.),
79        return a branching object which would give a new feasible
80        point in a bad direction.
81
82      As for preferredNewFeasible(), but the preferred branching object will
83      force movement in a direction that degrades the objective.
84
85      At present this does nothing
86    */
87    virtual CbcBranchingObject * notPreferredNewFeasible() const ;
88
89    using CbcObject::resetBounds ;
90    /** Reset original upper and lower bound values from the solver.
91
92      Handy for updating bounds held in this object after bounds held in the
93      solver have been tightened.
94     */
95    virtual void resetBounds();
96
97
98protected:
99    /// data
100
101};
102#endif
Note: See TracBrowser for help on using the repository browser.