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

Last change on this file since 1293 was 1293, checked in by EdwinStraver, 10 years ago
File size: 1.8 KB
Line 
1// Edwin 11/10/2009-- carved out of CbcBranchActual
2#ifndef CbcFollowOn_H
3#define CbcFollowOn_H
4
5#include "CbcBranchBase.hpp"
6#include "CoinPackedMatrix.hpp"
7
8/** Define a follow on class.
9    The idea of this is that in air-crew scheduling problems crew may fly in on flight A
10    and out on flight B or on some other flight.  A useful branch is one which on one side
11    fixes all which go out on flight B to 0, while the other branch fixes all those that do NOT
12    go out on flight B to 0.
13
14    This branching rule should be in addition to normal rules and have a high priority.
15*/
16
17class CbcFollowOn : public CbcObject {
18
19public:
20
21    // Default Constructor
22    CbcFollowOn ();
23
24    /** Useful constructor
25    */
26    CbcFollowOn (CbcModel * model);
27
28    // Copy constructor
29    CbcFollowOn ( const CbcFollowOn &);
30
31    /// Clone
32    virtual CbcObject * clone() const;
33
34    // Assignment operator
35    CbcFollowOn & operator=( const CbcFollowOn& rhs);
36
37    // Destructor
38    ~CbcFollowOn ();
39
40    /// Infeasibility - large is 0.5
41    virtual double infeasibility(const OsiBranchingInformation * info,
42                                 int &preferredWay) const;
43
44    using CbcObject::feasibleRegion ;
45    /// This looks at solution and sets bounds to contain solution
46    virtual void feasibleRegion();
47
48    /// Creates a branching object
49    virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ;
50    /// As some computation is needed in more than one place - returns row
51    virtual int gutsOfFollowOn(int & otherRow, int & preferredWay) const;
52
53protected:
54    /// data
55    /// Matrix
56    CoinPackedMatrix matrix_;
57    /// Matrix by row
58    CoinPackedMatrix matrixByRow_;
59    /// Possible rhs (if 0 then not possible)
60    int * rhs_;
61};
62
63#endif
Note: See TracBrowser for help on using the repository browser.