68 friend class COPBRANCHRULE;
88 const Sub *
sub()
const {
return sub_; }
124 virtual double value()
const override {
return LP::value() + valueAdd_; }
130 virtual double xVal(
int i)
const override;
143 virtual double reco(
int i)
const override;
175 return (LP::infeasible() || infeasCons_.size());
282 return (orig2lp_[i] == -1);
372 orig2lp_(sub->maxVar()),
373 lp2orig_(sub->maxVar()),
374 infeasCons_(sub->maxCon(),
false)
Implements a branching rule for modifying the lower and the upper bound of a variable.
Implements the branching by adding a constraint to the set of active constraints.
Status of fixed and set variables.
OPTSTAT
The optimization status of the linear program.
METHOD
The solution method for the linear program.
STATUS
The enumeration of the statuses a variable gets from the linear program solver.
The linear program of a subproblem.
virtual void varRealloc(int newSize)
Sets the maximal number of variables to newSize.
virtual double elimVal(int i) const
Returns the value the variable i to which it is fixed or set to.
virtual void loadBasis(Array< LPVARSTAT::STATUS > &lpVarStat, Array< SlackStat::STATUS > &slackStat) override
Loads a new basis for the linear program.
void colRealloc(int newSize)
virtual void removeCons(ArrayBuffer< int > &ind)
Removes all constraints listed in the buffer ind from the linear program.
int trueNnz() const
Returns the number of nonzeros which are currently present in the constraint matrix of the LP-solver.
Array< int > lp2orig_
Original number of a (non-eliminated) variable.
virtual double elimVal(FSVarStat *stat, double lb, double ub) const
Returns the value a variable is fixed or set to.
double uBound(int i) const
We have to redefine the function uBound(i) since variables may have been eliminated.
virtual void addCons(ArrayBuffer< Constraint * > &newCons)
Adds the constraints newCons to the linear program.
void initialize(OptSense sense, int nRow, int maxRow, int nCol, int maxCol, Array< double > &obj, Array< double > &lBound, Array< double > &uBound, Array< Row * > &rows, Array< LPVARSTAT::STATUS > &lpVarStat, Array< SlackStat::STATUS > &slackStat)
void initialize(OptSense sense, int nRow, int maxRow, int nCol, int maxCol, Array< double > &obj, Array< double > &lBound, Array< double > &uBound, Array< Row * > &rows)
virtual int getInfeas(int &infeasCon, int &infeasVar, double *bInvRow) const override
Is called if the last linear program has been solved with the dual simplex method and is infeasible.
virtual void initialize()
This function will pass the linear program of the associated subproblem to the solver.
virtual OPTSTAT optimize(METHOD method) override
Performs the optimization of the linear program with method method.
double lBound(int i) const
We have to redefine the function lBound(i) since variables may have been eliminated.
void constraint2row(ArrayBuffer< Constraint * > &newCons, ArrayBuffer< Row * > &newRows)
Generates the row format of the constraint cons and stores it in rows.
LpSub(Master *master, const Sub *sub)
The constructor.
const Sub * sub_
A pointer to the corresponding subproblem.
virtual double value() const override
Returns the objective function value of the linear program.
const LpSub & operator=(const LpSub &rhs)
virtual double reco(int i) const override
We define the reduced costs of eliminated variables as 0.
virtual void conRealloc(int newSize)
Sets the maximal number of constraints to newSize.
virtual void removeVars(ArrayBuffer< int > &vars)
Removes the variables with names given in vars from the linear program.
virtual LPVARSTAT::STATUS lpVarStat(int i) const override
Returns the status of the variable in the linear program.
bool eliminable(int i) const
Returns true if the function can be eliminated.
virtual void changeUBound(int i, double newUb) override
Sets the upper bound of variable i to newUb.
virtual bool infeasible() const override
virtual double barXVal(int i) const override
We have to redefine the function barXVal(i) since variables may have been eliminated.
double valueAdd_
The constant which has been added to the objective function value due to the elimination of variables...
int trueNCol() const
Returns the number of columns which are passed to the LP-solver.
int nOrigVar_
The number of original variables of the linear program.
Array< int > orig2lp_
After the elimination of variables the internal variables are again numbered consecutively starting w...
bool eliminated(int i) const
Returns true if the variable i is actually eliminated from the LP.
virtual void addVars(ArrayBuffer< Variable * > &vars, ArrayBuffer< FSVarStat * > &fsVarStat, ArrayBuffer< double > &lb, ArrayBuffer< double > &ub)
virtual ~LpSub()
The destructor.
virtual double xVal(int i) const override
We have to redefine the function xVal(i) since variables may have been eliminated.
void rowRealloc(int newSize)
ArrayBuffer< InfeasCon * > * infeasCon()
Returns a pointer to the buffer holding the infeasible constraints.
ArrayBuffer< InfeasCon * > infeasCons_
Buffer storing the infeasible constraints found be the constructor.
virtual void changeLBound(int i, double newLb) override
Sets the lower bound of variable i to newLb.
The master of the optimization.
Implements a branching rule for setting a binary variable to its lower or upper bound.
Implements a branching rule for setting a variable to a certain value.
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
The parameterized class Array implements dynamic arrays of type E.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()