source: trunk/Cbc/src/CbcPartialNodeInfo.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: 3.2 KB
Line 
1// $Id: CbcPartialNodeInfo.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/24/09 carved from CbcNode
7
8#ifndef CbcPartialNodeInfo_H
9#define CbcPartialNodeInfo_H
10
11#include <string>
12#include <vector>
13
14#include "CoinWarmStartBasis.hpp"
15#include "CoinSearchTree.hpp"
16#include "CbcBranchBase.hpp"
17#include "CbcNodeInfo.hpp"
18
19class OsiSolverInterface;
20class OsiSolverBranch;
21
22class OsiCuts;
23class OsiRowCut;
24class OsiRowCutDebugger;
25class CoinWarmStartBasis;
26class CbcCountRowCut;
27class CbcModel;
28class CbcNode;
29class CbcSubProblem;
30class CbcGeneralBranchingObject;
31/** \brief Holds information for recreating a subproblem by incremental change
32           from the parent.
33
34  A CbcPartialNodeInfo object contains changes to the bounds and basis, and
35  additional cuts, required to recreate a subproblem by modifying and
36  augmenting the parent subproblem.
37*/
38
39class CbcPartialNodeInfo : public CbcNodeInfo {
40
41public:
42
43    /** \brief Modify model according to information at node
44
45        The routine modifies the model according to bound and basis change
46        information at node and adds any cuts to the addCuts array.
47    */
48    virtual void applyToModel (CbcModel *model, CoinWarmStartBasis *&basis,
49                               CbcCountRowCut **addCuts,
50                               int &currentNumberCuts) const ;
51
52    /// Just apply bounds to one variable - force means overwrite by lower,upper (1=>infeasible)
53    virtual int applyBounds(int iColumn, double & lower, double & upper, int force) ;
54    /** Builds up row basis backwards (until original model).
55        Returns NULL or previous one to apply .
56        Depends on Free being 0 and impossible for cuts
57    */
58    virtual CbcNodeInfo * buildRowBasis(CoinWarmStartBasis & basis ) const ;
59    // Default Constructor
60    CbcPartialNodeInfo ();
61
62    // Constructor from current state
63    CbcPartialNodeInfo (CbcNodeInfo * parent, CbcNode * owner,
64                        int numberChangedBounds, const int * variables,
65                        const double * boundChanges,
66                        const CoinWarmStartDiff *basisDiff) ;
67
68    // Copy constructor
69    CbcPartialNodeInfo ( const CbcPartialNodeInfo &);
70
71    // Destructor
72    ~CbcPartialNodeInfo ();
73
74    /// Clone
75    virtual CbcNodeInfo * clone() const;
76    /// Basis diff information
77    inline const CoinWarmStartDiff *basisDiff() const {
78        return basisDiff_ ;
79    }
80    /// Which variable (top bit if upper bound changing)
81    inline const int * variables() const {
82        return variables_;
83    }
84    // New bound
85    inline const double * newBounds() const {
86        return newBounds_;
87    }
88    /// Number of bound changes
89    inline int numberChangedBounds() const {
90        return numberChangedBounds_;
91    }
92protected:
93    /* Data values */
94
95    /// Basis diff information
96    CoinWarmStartDiff *basisDiff_ ;
97    /// Which variable (top bit if upper bound changing)
98    int * variables_;
99    // New bound
100    double * newBounds_;
101    /// Number of bound changes
102    int numberChangedBounds_;
103private:
104
105    /// Illegal Assignment operator
106    CbcPartialNodeInfo & operator=(const CbcPartialNodeInfo& rhs);
107};
108
109#endif //CbcPartialNodeInfo_H
110
Note: See TracBrowser for help on using the repository browser.