BlisObjectInt.h
Go to the documentation of this file.
1 /*===========================================================================*
2  * This file is part of the Bcps Linear Solver (BLIS). *
3  * *
4  * BLIS is distributed under the Eclipse Public License as part of the *
5  * COIN-OR repository (http://www.coin-or.org). *
6  * *
7  * Authors: *
8  * *
9  * Yan Xu, Lehigh University *
10  * Ted Ralphs, Lehigh University *
11  * *
12  * Conceptual Design: *
13  * *
14  * Yan Xu, Lehigh University *
15  * Ted Ralphs, Lehigh University *
16  * Laszlo Ladanyi, IBM T.J. Watson Research Center *
17  * Matthew Saltzman, Clemson University *
18  * *
19  * *
20  * Copyright (C) 2001-2013, Lehigh University, Yan Xu, and Ted Ralphs. *
21  * All Rights Reserved. *
22  *===========================================================================*/
23 
24 //#############################################################################
25 // This file is modified from from COIN/Cbc
26 //#############################################################################
27 
28 
29 #include "BcpsObject.h"
30 #include "BlisPseudo.h"
31 
32 class BlisModel;
33 
34 //#############################################################################
35 
36 class BlisObjectInt : public BcpsObject {
37 
38 protected:
39 
42 
45 
48 
50  double breakEven_;
51 
54 
55  public:
56 
58  BlisObjectInt();
59 
61  BlisObjectInt(int objectIndex,
62  int iColumn,
63  double lb,
64  double ub,
65  double breakEven = 0.5);
66 
68  virtual ~BlisObjectInt() {}
69 
71  BlisObjectInt( const BlisObjectInt &);
72 
74  virtual BcpsObject * clone() const {
75  return new BlisObjectInt(*this);
76  }
77 
79  BlisObjectInt & operator=( const BlisObjectInt& rhs);
80 
83  virtual double infeasibility(BcpsModel *m, int & preferredWay) const;
84 
91  virtual void feasibleRegion(BcpsModel *m);
92 
95  int direction) const;
96 
111  virtual BcpsBranchObject * preferredNewFeasible(BcpsModel *m) const;
112 
121 
126  virtual void resetBounds(BcpsModel *m);
127 
129  virtual int columnIndex() const { return columnIndex_; }
130 
133  inline double originalLowerBound() const { return originalLower_; }
134  inline void setOriginalLowerBound(double value) { originalLower_=value; }
135  inline double originalUpperBound() const { return originalUpper_; }
136  inline void setOriginalUpperBound(double value) { originalUpper_=value; }
138 
140  inline double breakEven() const { return breakEven_; }
141 
143  inline void setBreakEven(double value) { breakEven_ = value; }
144 
147 };
148 
virtual double infeasibility(BcpsModel *m, int &preferredWay) const
Infeasibility.
BlisPseudocost pseudocost_
Pseudo cost.
Definition: BlisObjectInt.h:53
A class for describing the objects that comprise a BCPS subproblem.
Definition: BcpsObject.h:76
virtual void resetBounds(BcpsModel *m)
Reset original upper and lower bound values from the solver.
void setOriginalLowerBound(double value)
BlisPseudocost & pseudocost()
Access pseudocost.
virtual int columnIndex() const
Column number if single column object, otherwise.
BcpsBranchObject contains the member data required when choosing branching entities and excuting actu...
double originalUpperBound() const
virtual ~BlisObjectInt()
Destructor.
Definition: BlisObjectInt.h:68
virtual BcpsObject * clone() const
Clone an object.
Definition: BlisObjectInt.h:74
virtual BcpsBranchObject * createBranchObject(BcpsModel *m, int direction) const
Creates a branching object.
virtual void feasibleRegion(BcpsModel *m)
Set bounds to contain the current solution.
double breakEven_
Breakeven i.e.
Definition: BlisObjectInt.h:50
double originalLowerBound() const
void setOriginalUpperBound(double value)
double breakEven() const
Breakeven e.g 0.7 -> >= 0.7 go up first.
BlisObjectInt()
Default Constructor.
double originalLower_
Original lower bound.
Definition: BlisObjectInt.h:44
virtual BcpsBranchObject * preferredNewFeasible(BcpsModel *m) const
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new f...
virtual BcpsBranchObject * notPreferredNewFeasible(BcpsModel *m) const
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new f...
double originalUpper_
Original upper bound.
Definition: BlisObjectInt.h:47
BlisObjectInt & operator=(const BlisObjectInt &rhs)
Assignment operator.
void setBreakEven(double value)
Set breakeven e.g 0.7 -> >= 0.7 go up first.
int columnIndex_
Column index in the lp model.
Definition: BlisObjectInt.h:41