253 Real objChange = 0.0;
255 MSG_DEBUG(std::cout <<
"DCHANG01 changeLowerStatus(): col " << i
256 <<
"[" << newLower <<
":" << currUpper <<
"] " << stat;)
278 else if(
EQ(newLower, currUpper))
283 objChange =
maxObj(i) * (newLower - oldLower);
286 objChange =
theLCbound[i] * (newLower - oldLower);
291 if(
EQ(newLower, currUpper))
308 if(
NE(newLower, currUpper))
333 MSG_DEBUG(std::cout <<
" -> " << stat << std::endl;)
349 for(
int i = 0; i < newLower.
dim(); ++i)
377 Real objChange = 0.0;
379 MSG_DEBUG(std::cout <<
"DCHANG02 changeUpperStatus(): col " << i
380 <<
"[" << currLower <<
":" << newUpper <<
"] " << stat;)
385 if(newUpper == currLower)
408 else if(
EQ(newUpper, currLower))
413 objChange =
maxObj(i) * (newUpper - oldUpper);
416 objChange =
theUCbound[i] * (newUpper - oldUpper);
432 if(
NE(newUpper, currLower))
457 MSG_DEBUG(std::cout <<
" -> " << stat << std::endl;);
473 for(
int i = 0; i < newUpper.
dim(); ++i)
511 Real objChange = 0.0;
513 MSG_DEBUG(std::cout <<
"DCHANG03 changeLhsStatus() : row " << i
536 else if(
EQ(newLhs, currRhs))
541 objChange =
maxRowObj(i) * (newLhs - oldLhs);
544 objChange =
theURbound[i] * (newLhs - oldLhs);
549 if(
EQ(newLhs, currRhs))
566 if(
NE(newLhs, currRhs))
591 MSG_DEBUG(std::cout <<
" -> " << stat << std::endl;)
607 for(
int i = 0; i <
nRows(); ++i)
633 Real objChange = 0.0;
635 MSG_DEBUG(std::cout <<
"DCHANG04 changeRhsStatus() : row " << i
658 else if(
EQ(newRhs, currLhs))
663 objChange =
maxRowObj(i) * (newRhs - oldRhs);
666 objChange =
theLRbound[i] * (newRhs - oldRhs);
671 if(
EQ(newRhs, currLhs))
688 if(
NE(newRhs, currLhs))
713 MSG_DEBUG(std::cout <<
" -> " << stat << std::endl;)
730 for(
int i = 0; i <
nRows(); ++i)
762 for(
int i =
nRows() - 1; i >= 0; --i)
const VectorBase< R > & rhs() const
Returns right hand side vector.
virtual void addedRows(int n)
virtual void changeRow(int i, const LPRow &newRow, bool scale=false)
Exception class for things that should NEVER happen.This class is derived from the SoPlex exception b...
void addedRows(int n)
inform SPxBasis, that n new rows had been added.
Basis is not known to be dual nor primal feasible.
primal variable is fixed to both bounds
virtual void changeLower(const Vector &newLower, bool scale=false)
primal or dual variable is undefined
const VectorBase< R > & upper() const
Returns upper bound vector.
Desc::Status dualColStatus(int i) const
dual Status for the i'th column variable of the loaded LP.
THREADLOCAL const Real infinity
void removedCols(const int perm[])
inform SPxBasis that columns in perm with negative entry were removed.
Abstract pricer base class.
virtual void reDim()
reset dimensions of vectors according to loaded LP.
Basis is optimal, i.e. dual and primal feasible.
Exception classes for SoPlex.
Status & rowStatus(int i)
R rhsUnscaled(int i) const
Returns unscaled right hand side of row number i.
virtual void changeCol(int n, const LPColBase< Real > &newCol, bool scale=false)
Replaces i 'th column of LP with newCol. scale determines whether the new data should be scaled...
virtual void addedCols(int newcols)
Called after the last n columns have just been added.
Abstract ratio test base class.
virtual void changeUpper(const Vector &newUpper, bool scale=false)
bool NE(Real a, Real b, Real eps=Param::epsilon())
returns true iff |a-b| > eps
void changedCol(int)
inform SPxBasis that a column had been changed.
virtual void addedCols(int n)
virtual void changeCol(int i, const LPCol &newCol, bool scale=false)
void changedElement(int, int)
inform SPxBasis that a matrix entry had been changed.
Desc::Status dualRowStatus(int i) const
dual Status for the i'th row variable of the loaded LP.
void changedRow(int)
inform SPxBasis that a row had been changed.
dual variable is left free, but unset
int nRows() const
Returns number of rows in LP.
void removedCol(int i)
inform SPxBasis that column i had been removed.
virtual void changeRhs(const Vector &newRhs, bool scale=false)
primal variable is set to its upper bound
virtual void changeBounds(const Vector &newLower, const Vector &newUpper, bool scale=false)
virtual void changeLhsStatus(int i, Real newLhs, Real oldLhs=0.0)
SPxSense
Optimization sense.
virtual void doRemoveRow(int i)
virtual void changeRowObj(const Vector &newObj, bool scale=false)
SPxStatus status() const
returns current SPxStatus.
virtual void doRemoveRows(int perm[])
Internal helper method.
void removedRows(const int perm[])
inform SPxBasis that rows in perm with negative entry were removed.
virtual void doRemoveCols(int perm[])
virtual void changeMaxObj(const VectorBase< Real > &newObj, bool scale=false)
Changes objective vector to newObj. scale determines whether the new data should be scaled...
virtual void unInit()
uninitialize data structures.
R upperUnscaled(int i) const
Returns unscaled upper bound of column i.
virtual void changeSense(SPxSense sns)
virtual void changeElement(int i, int j, const Real &val, bool scale=false)
dual variable is set to its upper bound
virtual void changeLhs(const Vector &newLhs, bool scale=false)
primal variable is left free, but unset
virtual void changeLower(const VectorBase< Real > &newLower, bool scale=false)
Changes vector of lower bounds to newLower. scale determines whether the new data should be scaled...
virtual void changeRhs(const VectorBase< Real > &newRhs, bool scale=false)
Changes right hand side vector for constraints to newRhs. scale determines whether the new data shoul...
const VectorBase< R > & lhs() const
Returns left hand side vector.
bool updateNonbasicValue(Real objChange)
DVector theURbound
Upper Row Feasibility bound.
virtual void changeLowerStatus(int i, Real newLower, Real oldLower=0.0)
const VectorBase< R > & maxRowObj() const
R lhsUnscaled(int i) const
Returns unscaled left hand side of row number i.
Status & colStatus(int i)
(In)equality for LPs.Class LPRowBase provides constraints for linear programs in the form where a is...
virtual void changeRow(int n, const LPRowBase< Real > &newRow, bool scale=false)
Replaces i 'th row of LP with newRow. scale determines whether the new data should be scaled...
virtual void changeRhsStatus(int i, Real newRhs, Real oldRhs=0.0)
virtual void changeUpper(const VectorBase< Real > &newUpper, bool scale=false)
Changes vector of upper bounds to newUpper. scale determines whether the new data should be scaled...
virtual void changeMaxObj(const Vector &newObj, bool scale=false)
Debugging, floating point type and parameter definitions.
bool EQ(Real a, Real b, Real eps=Param::epsilon())
returns true iff |a-b| <= eps
virtual void changeObj(const VectorBase< Real > &newObj, bool scale=false)
Changes objective vector to newObj. scale determines whether the new data should be scaled...
DVector theLRbound
Lower Row Feasibility bound.
DVector theUCbound
Upper Column Feasibility bound.
bool isInitialized() const
has the internal data been initialized?
int dim() const
Dimension of vector.
virtual void doRemoveCols(int perm[])
Internal helper method.
Everything should be within this namespace.
virtual void changeRange(const Vector &newLhs, const Vector &newRhs, bool scale=false)
R lowerUnscaled(int i) const
Returns unscaled lower bound of column i.
primal variable is set to its lower bound
bool m_nonbasicValueUpToDate
true, if the stored objValue is up to date
const VectorBase< R > & maxObj() const
Returns objective vector for maximization problem.
DVector theLCbound
Lower Column Feasibility bound.
virtual void changeRowObj(const VectorBase< Real > &newRowObj, bool scale=false)
Changes row objective function vector to newRowObj. scale determines whether the new data should be s...
virtual void changeUpperStatus(int i, Real newUpper, Real oldLower=0.0)
void removedRow(int i)
inform SPxBasis that row i had been removed.
dual variable is set to its lower bound
virtual void changeSense(SPxSense sns)
Changes optimization sense to sns.
Real theShift
sum of all shifts applied to any bound.
virtual void doRemoveCol(int i)
virtual void changeElement(int i, int j, const Real &val, bool scale=false)
Changes LP element (i, j) to val. scale determines whether the new data should be scaled...
virtual void changeLhs(const VectorBase< Real > &newLhs, bool scale=false)
Changes left hand side vector for constraints to newLhs. scale determines whether the new data should...
dual variable has two bounds
virtual void doRemoveRow(int j)
Internal helper method.
virtual void doRemoveRows(int perm[])
virtual void addedRows(int newrows)
Called after the last n rows have just been added.
void forceRecompNonbasicValue()
virtual void doRemoveCol(int j)
Internal helper method.
Status
Status of a variable.
virtual void changeObj(const Vector &newObj, bool scale=false)
scale determines whether the new data needs to be scaled according to the existing LP (persistent sca...
LP has been proven to be primal unbounded.
const VectorBase< R > & lower() const
Returns (internal and possibly scaled) lower bound vector.
LP column.Class LPColBase provides a datatype for storing the column of an LP a the form similar to ...
const Desc & desc() const
Representation rep() const
return the current basis representation.
columnwise representation.
Basis is primal feasible.
void setBasisStatus(SPxBasis::SPxStatus stat)
set the lp solver's basis status.
void addedCols(int n)
inform SPxBasis that n new columns had been added.
LP has been proven to be primal infeasible.
No Problem has been loaded to the basis.