Blis 0.94
Loading...
Searching...
No Matches
BlisObjectInt.h
Go to the documentation of this file.
1/*===========================================================================*
2 * This file is part of the BiCePS Linear Integer 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-2019, 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
32class BlisModel;
33
34//#############################################################################
35
36class BlisObjectInt : public BcpsObject {
37
38protected:
39
42
45
48
50 double breakEven_;
51
54
55 public:
56
59
61 BlisObjectInt(int objectIndex,
62 int iColumn,
63 double lb,
64 double ub,
65 double breakEven = 0.5);
66
68 virtual ~BlisObjectInt() {}
69
72
74 virtual BcpsObject * clone() const {
75 return new BlisObjectInt(*this);
76 }
77
80
83 virtual double infeasibility(BcpsModel *m, int & preferredWay) const;
84
91 virtual void feasibleRegion(BcpsModel *m);
92
95 int direction) const;
96
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 BcpsObject * clone() const
Clone an object.
void setOriginalUpperBound(double value)
double originalLower_
Original lower bound.
double originalUpperBound() const
BlisPseudocost & pseudocost()
Access pseudocost.
double originalUpper_
Original upper bound.
double originalLowerBound() const
double breakEven_
Breakeven i.e.
double breakEven() const
Breakeven e.g 0.7 -> >= 0.7 go up first.
virtual BcpsBranchObject * notPreferredNewFeasible(BcpsModel *m) const
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new f...
virtual int columnIndex() const
Column number if single column object, otherwise.
BlisObjectInt & operator=(const BlisObjectInt &rhs)
Assignment operator.
BlisObjectInt()
Default Constructor.
virtual ~BlisObjectInt()
Destructor.
BlisObjectInt(int objectIndex, int iColumn, double lb, double ub, double breakEven=0.5)
Useful constructor - passed integer index and model index.
virtual BcpsBranchObject * createBranchObject(BcpsModel *m, int direction) const
Creates a branching object.
BlisPseudocost pseudocost_
Pseudo cost.
void setOriginalLowerBound(double value)
BlisObjectInt(const BlisObjectInt &)
Copy constructor.
void setBreakEven(double value)
Set breakeven e.g 0.7 -> >= 0.7 go up first.
virtual void resetBounds(BcpsModel *m)
Reset original upper and lower bound values from the solver.
virtual double infeasibility(BcpsModel *m, int &preferredWay) const
Infeasibility.
virtual BcpsBranchObject * preferredNewFeasible(BcpsModel *m) const
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new f...
int columnIndex_
Column index in the lp model.
virtual void feasibleRegion(BcpsModel *m)
Set bounds to contain the current solution.