62 class SPxMainSM :
public SPxSimplifier<R>
87 PostStep(
const char* p_name,
int nR = 0,
int nC = 0)
195 , m_old_i(lp.
nRows() - 1)
196 , m_row(lp.rowVector(_i))
197 , m_row_obj(lp.rowObj(_i))
203 , m_old_i(old.m_old_i)
205 , m_row_obj(old.m_row_obj)
246 , m_old_i(lp.
nRows() - 1)
247 , m_row_obj(lp.rowObj(_i))
253 , m_old_i(old.m_old_i)
254 , m_row_obj(old.m_row_obj)
304 R newLo, R newUp, R oldLo, R oldUp)
307 , m_old_i(lp.
nRows() - 1)
311 , m_strictLo(strictLo)
312 , m_strictUp(strictUp)
313 , m_maxSense(lp.spxSense() ==
SPxLPBase<R>::MAXIMIZE)
314 , m_obj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_j) : -lp.obj(_j))
315 , m_col(lp.colVector(_j))
320 , m_row_obj(lp.rowObj(_i))
326 , m_old_i(old.m_old_i)
330 , m_strictLo(old.m_strictLo)
331 , m_strictUp(old.m_strictUp)
332 , m_maxSense(old.m_maxSense)
335 , m_newLo(old.m_newLo)
336 , m_newUp(old.m_newUp)
337 , m_oldLo(old.m_oldLo)
338 , m_oldUp(old.m_oldUp)
339 , m_row_obj(old.m_row_obj)
390 , m_old_i(lp.
nRows() - 1)
391 , m_lRhs(lhsFixed ? lp.lhs(_i) : lp.rhs(_i))
392 , m_row(lp.rowVector(_i))
393 , m_objs(lp.rowVector(_i).size())
395 , m_cols(lp.rowVector(_i).size())
396 , m_lhsFixed(lhsFixed)
397 , m_maxSense(lp.spxSense() ==
SPxLPBase<R>::MAXIMIZE)
402 , m_rowobj(lp.rowObj(_i))
404 for(
int k = 0; k < m_row.
size(); ++k)
415 , m_old_i(old.m_old_i)
419 , m_fixed(old.m_fixed)
421 , m_lhsFixed(old.m_lhsFixed)
422 , m_maxSense(old.m_maxSense)
423 , m_oldLowers(old.m_oldLowers)
424 , m_oldUppers(old.m_oldUppers)
427 , m_rowobj(old.m_rowobj)
474 bool correctIdx =
true)
477 , m_old_j(lp.
nCols() - 1)
479 , m_obj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_j) : -lp.obj(_j))
480 , m_lower(lp.lower(_j))
481 , m_upper(lp.upper(_j))
482 , m_correctIdx(correctIdx)
483 , m_col(lp.colVector(_j))
485 simplifier.addObjoffset(m_val * lp.
obj(m_j));
491 , m_old_j(old.m_old_j)
494 , m_lower(old.m_lower)
495 , m_upper(old.m_upper)
496 , m_correctIdx(old.m_correctIdx)
538 else if(EQrel(val, lp.
lower(j), this->
eps()))
540 else if(EQrel(val, lp.
upper(j), this->
eps()))
553 , m_status(old.m_status)
601 , m_old_j(lp.
nCols() - 1)
602 , m_old_i(lp.
nRows() - 1)
603 , m_bnd(loFree ? lp.upper(_j) : lp.lower(_j))
604 , m_col(col_idx_sorted)
605 , m_lRhs(lp.colVector(_j).size())
606 , m_rowObj(lp.colVector(_j).size())
607 , m_rows(lp.colVector(_j).size())
610 for(
int k = 0; k < m_col.
size(); ++k)
612 int r = m_col.
index(k);
614 if((m_loFree && m_col.
value(k) > 0) ||
615 (!m_loFree && m_col.
value(k) < 0))
628 , m_old_j(old.m_old_j)
629 , m_old_i(old.m_old_i)
633 , m_rowObj(old.m_rowObj)
635 , m_loFree(old.m_loFree)
685 , m_old_j(lp.
nCols() - 1)
688 , m_lower(lp.lower(_j))
689 , m_upper(lp.upper(_j))
690 , m_row(lp.rowVector(_i))
697 , m_old_j(old.m_old_j)
700 , m_lower(old.m_lower)
701 , m_upper(old.m_upper)
750 , m_old_j(lp.
nCols() - 1)
751 , m_old_i(lp.
nRows() - 1)
752 , m_obj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_j) : -lp.obj(_j))
754 , m_onLhs(
EQ(slackVal, lp.lhs(_i)))
755 , m_eqCons(
EQ(lp.lhs(_i), lp.rhs(_i)))
756 , m_row(lp.rowVector(_i))
758 assert(m_row[m_j] != 0.0);
759 simplifier.addObjoffset(m_lRhs * (lp.
obj(m_j) / m_row[m_j]));
766 , m_old_j(old.m_old_j)
767 , m_old_i(old.m_old_i)
770 , m_onLhs(old.m_onLhs)
771 , m_eqCons(old.m_eqCons)
831 , m_maxSense(lp.spxSense() ==
SPxLPBase<R>::MAXIMIZE)
832 , m_jFixed(
EQ(lp.lower(_j), lp.upper(_j)))
833 , m_jObj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_j) : -lp.obj(_j))
834 , m_kObj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_k) : -lp.obj(_k))
835 , m_aij(lp.colVector(_j).value(0))
836 , m_strictLo(lp.lower(_k) > oldLo)
837 , m_strictUp(lp.upper(_k) < oldUp)
838 , m_newLo(lp.lower(_k))
839 , m_newUp(lp.upper(_k))
842 , m_Lo_j(lp.lower(_j))
843 , m_Up_j(lp.upper(_j))
846 , m_col(lp.colVector(_k))
854 , m_maxSense(old.m_maxSense)
855 , m_jFixed(old.m_jFixed)
859 , m_strictLo(old.m_strictLo)
860 , m_strictUp(old.m_strictUp)
861 , m_newLo(old.m_newLo)
862 , m_newUp(old.m_newUp)
863 , m_oldLo(old.m_oldLo)
864 , m_oldUp(old.m_oldUp)
920 bool isTheLast,
bool isFixedRow,
bool isFirst =
false)
923 , m_i_rowObj(lp.rowObj(_i))
924 , m_maxLhsIdx((maxLhsIdx == -1) ? -1 : maxLhsIdx)
925 , m_minRhsIdx((minRhsIdx == -1) ? -1 : minRhsIdx)
926 , m_maxSense(lp.spxSense() ==
SPxLPBase<R>::MAXIMIZE)
928 , m_isLast(isTheLast)
929 , m_fixed(isFixedRow)
930 , m_nCols(lp.
nCols())
931 , m_scale(dupRows.size())
932 , m_rowObj(dupRows.size())
933 , m_rIdxLocalOld(dupRows.size())
935 , m_isLhsEqualRhs(isLhsEqualRhs)
937 R rowScale = scale[_i];
939 for(
int k = 0; k < dupRows.
size(); ++k)
941 m_scale.
add(dupRows.
index(k), rowScale / scale[dupRows.
index(k)]);
943 m_rIdxLocalOld[k] = dupRows.
index(k);
950 , m_i_rowObj(old.m_i_rowObj)
951 , m_maxLhsIdx(old.m_maxLhsIdx)
952 , m_minRhsIdx(old.m_minRhsIdx)
953 , m_maxSense(old.m_maxSense)
954 , m_isFirst(old.m_isFirst)
955 , m_isLast(old.m_isLast)
956 , m_fixed(old.m_fixed)
957 , m_nCols(old.m_nCols)
958 , m_scale(old.m_scale)
959 , m_rowObj(old.m_rowObj)
960 , m_rIdxLocalOld(old.m_rIdxLocalOld)
962 , m_isLhsEqualRhs(old.m_isLhsEqualRhs)
1010 bool isFirst =
false,
bool isTheLast =
false)
1014 , m_loJ(lp.lower(_j))
1015 , m_upJ(lp.upper(_j))
1016 , m_loK(lp.lower(_k))
1017 , m_upK(lp.upper(_k))
1019 , m_isFirst(isFirst)
1020 , m_isLast(isTheLast)
1032 , m_scale(old.m_scale)
1033 , m_isFirst(old.m_isFirst)
1034 , m_isLast(old.m_isLast)
1035 , m_perm(old.m_perm)
1084 , m_old_j(lp.
nCols() - 1)
1085 , m_old_i(lp.
nRows() - 1)
1086 , m_upper(lp.upper(_j))
1087 , m_lower(lp.lower(_j))
1088 , m_obj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_j) : -lp.obj(_j))
1089 , m_oldupper(oldupper)
1090 , m_oldlower(oldlower)
1092 , m_row(lp.rowVector(_i))
1093 , m_col(lp.colVector(_j))
1095 assert(m_row[m_j] != 0.0);
1102 , m_old_j(old.m_old_j)
1103 , m_old_i(old.m_old_i)
1104 , m_upper(old.m_upper)
1105 , m_lower(old.m_lower)
1107 , m_oldupper(old.m_oldupper)
1108 , m_oldlower(old.m_oldlower)
1163 , m_old_j(lp.
nCols() - 1)
1164 , m_old_i(lp.
nRows() - 1)
1165 , m_upper(lp.upper(_j))
1166 , m_lower(lp.lower(_j))
1167 , m_obj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_j) : -lp.obj(_j))
1169 , m_onLhs(
EQ(constant, lp.lhs(_i)))
1170 , m_eqCons(
EQ(lp.lhs(_i), lp.rhs(_i)))
1171 , m_row(lp.rowVector(_i))
1172 , m_col(lp.colVector(_j))
1174 assert(m_row[m_j] != 0.0);
1175 simplifier.addObjoffset(m_obj * m_const / m_row[m_j]);
1182 , m_old_j(old.m_old_j)
1183 , m_old_i(old.m_old_i)
1184 , m_upper(old.m_upper)
1185 , m_lower(old.m_lower)
1187 , m_const(old.m_const)
1188 , m_onLhs(old.m_onLhs)
1189 , m_eqCons(old.m_eqCons)
1233 , m_origupper(origupper)
1234 , m_origlower(origlower)
1241 , m_origupper(old.m_origupper)
1242 , m_origlower(old.m_origlower)
1399 m_rIdx[i] = m_rIdx[lp.
nRows() - 1];
1405 m_cIdx[j] = m_cIdx[lp.
nCols() - 1];
1452 , m_keepbounds(false)
1454 , m_result(this->
OKAY)
1461 , m_prim(old.m_prim)
1462 , m_slack(old.m_slack)
1463 , m_dual(old.m_dual)
1464 , m_redCost(old.m_redCost)
1465 , m_cBasisStat(old.m_cBasisStat)
1466 , m_rBasisStat(old.m_rBasisStat)
1467 , m_cIdx(old.m_cIdx)
1468 , m_rIdx(old.m_rIdx)
1469 , m_hist(old.m_hist)
1470 , m_postsolved(old.m_postsolved)
1471 , m_epsilon(old.m_epsilon)
1472 , m_feastol(old.m_feastol)
1473 , m_opttol(old.m_opttol)
1474 , m_stat(old.m_stat)
1475 , m_thesense(old.m_thesense)
1476 , m_keepbounds(old.m_keepbounds)
1477 , m_addedcols(old.m_addedcols)
1478 , m_result(old.m_result)
1479 , m_cutoffbound(old.m_cutoffbound)
1480 , m_pseudoobj(old.m_pseudoobj)
1490 m_prim = rhs.m_prim;
1491 m_slack = rhs.m_slack;
1492 m_dual = rhs.m_dual;
1493 m_redCost = rhs.m_redCost;
1494 m_cBasisStat = rhs.m_cBasisStat;
1495 m_rBasisStat = rhs.m_rBasisStat;
1496 m_cIdx = rhs.m_cIdx;
1497 m_rIdx = rhs.m_rIdx;
1498 m_postsolved = rhs.m_postsolved;
1499 m_epsilon = rhs.m_epsilon;
1500 m_feastol = rhs.m_feastol;
1501 m_opttol = rhs.m_opttol;
1502 m_stat = rhs.m_stat;
1503 m_thesense = rhs.m_thesense;
1504 m_keepbounds = rhs.m_keepbounds;
1505 m_addedcols = rhs.m_addedcols;
1506 m_result = rhs.m_result;
1507 m_cutoffbound = rhs.m_cutoffbound;
1508 m_pseudoobj = rhs.m_pseudoobj;
1509 m_hist = rhs.m_hist;
1534 return simplify(lp, eps, delta, delta, remainingTime);
1539 bool keepbounds =
false, uint32_t seed = 0);
1561 assert(m_postsolved);
1567 assert(m_postsolved);
1573 assert(m_postsolved);
1579 assert(m_postsolved);
1585 assert(m_postsolved);
1586 return m_rBasisStat[i];
1591 assert(m_postsolved);
1592 return m_cBasisStat[j];
1598 assert(m_postsolved);
1599 assert(rowsSize < 0 || rowsSize >= m_rBasisStat.
size());
1600 assert(colsSize < 0 || colsSize >= m_cBasisStat.
size());
1602 for(
int i = 0; i < m_rBasisStat.
size(); ++i)
1603 rows[i] = m_rBasisStat[i];
1605 for(
int j = 0; j < m_cBasisStat.
size(); ++j)
1606 cols[j] = m_cBasisStat[j];
1656 #include "spxmainsm.hpp" 1658 #endif // _SPXMAINSM_H_ const VectorBase< R > & rhs() const
Returns right hand side vector.
virtual bool isUnsimplified() const
specifies whether an optimal solution has already been unsimplified.
Postsolves multi aggregation.
Exception class for things that should NEVER happen.This class is derived from the SoPlex exception b...
RowObjPS & operator=(const RowObjPS &rhs)
assignment operator
SPxSimplifier< R >::Result simplifyCols(SPxLPBase< R > &lp, bool &again)
performs simplification steps on the columns of the LP.
virtual void removeRow(int i)
Removes i 'th row.
MultiAggregationPS(const MultiAggregationPS &old)
copy constructor
Safe arrays of data objects.Class DataArray provides safe arrays of Data Objects. For general C++ obj...
friend class FreeConstraintPS
DataArray< int > m_stat
preprocessing history.
virtual SPxSimplifier< R >::Result simplify(SPxLPBase< R > &lp, R eps, R delta, Real remainingTime)
simplify SPxLPBase<R> lp with identical primal and dual feasibility tolerance.
Sparse vector nonzero element.
ZeroObjColSingletonPS & operator=(const ZeroObjColSingletonPS &rhs)
assignment operator
PostStep & operator=(const PostStep &)
assignment operator
SPxMainSM(Timer::TYPE ttype=Timer::USER_TIME)
SPxLPBase< R >::SPxSense m_thesense
optimization sense.
const VectorBase< R > & upper() const
Returns upper bound vector.
void removeCol(SPxLPBase< R > &lp, int j)
removes a column in the LP.
#define DEFAULT_BND_VIOL
default allowed bound violation
virtual SPxSimplifier< R > * clone() const
clone function for polymorphism
THREADLOCAL const Real infinity
Postsolves variable bound fixing.
Result
Result of the simplification.
Dense vector.Class VectorBase provides dense linear algebra vectors. Internally, VectorBase wraps std...
AggregationPS & operator=(const AggregationPS &rhs)
assignment operator
ZeroObjColSingletonPS(const SPxLPBase< R > &lp, const SPxMainSM &, int _j, int _i)
virtual const VectorBase< R > & unsimplifiedPrimal()
returns a reference to the unsimplified primal solution.
virtual SPxSolverBase< R >::VarStatus getBasisColStatus(int j) const
gets basis status for a single column.
Postsolves duplicate rows.
int size() const
Number of used indices.
const char * m_name
name of the simplifier
DataArray< int > m_rIdxLocalOld
FixVariablePS(const FixVariablePS &old)
copy constructor
virtual PostStep * clone() const
clone function for polymorphism
Sequential object-oriented SimPlex.SPxSolverBase is an LP solver class using the revised Simplex algo...
DoubletonEquationPS(const SPxLPBase< R > &lp, int _j, int _k, int _i, R oldLo, R oldUp)
Exception classes for SoPlex.
void fixColumn(SPxLPBase< R > &lp, int i, bool correctIdx=true)
handles the fixing of a variable. correctIdx is true iff the index mapping has to be updated...
SPxMainSM & operator=(const SPxMainSM &rhs)
assignment operator
virtual PostStep * clone() const
clone function for polymorphism
int operator()(const typename SVectorBase< R >::Element &e1, const typename SVectorBase< R >::Element &e2) const
Dynamic sparse vectors.Class DSVectorBase implements dynamic sparse vectors, i.e. SVectorBases with a...
SPxSimplifier< R >::Result multiaggregation(SPxLPBase< R > &lp, bool &again)
performs multi-aggregations of variable based upon constraint activitu.
SPxSolverBase< R >::VarStatus m_status
virtual bool checkBasisDim(DataArray< typename SPxSolverBase< R >::VarStatus > rows, DataArray< typename SPxSolverBase< R >::VarStatus > cols) const
virtual SPxSolverBase< R >::VarStatus getBasisRowStatus(int i) const
gets basis status for a single row.
friend class DuplicateRowsPS
PostStep(const PostStep &old)
copy constructor.
SPxSimplifier< R >::Result duplicateRows(SPxLPBase< R > &lp, bool &again)
removes duplicate rows.
R m_feastol
primal feasibility tolerance.
int cIdx(int j) const
returns for a given column index of the (reduced) LP the corresponding column index in the unsimplifi...
FixBoundsPS & operator=(const FixBoundsPS &rhs)
assignment operator
void handleExtremes(SPxLPBase< R > &lp)
handles extreme values by setting them to zero or R(infinity).
RowSingletonPS & operator=(const RowSingletonPS &rhs)
assignment operator
Base class for postsolving operations.Class PostStep is an abstract base class providing the interfac...
R m_opttol
dual feasibility tolerance.
FreeConstraintPS(const FreeConstraintPS &old)
copy constructor
virtual void removeCol(int i)
Removes i 'th column.
R & value(int n)
Reference to value of n 'th nonzero.
DuplicateRowsPS & operator=(const DuplicateRowsPS &rhs)
assignment operator
Postsolves empty constraints.
void trivialHeuristic(SPxLPBase< R > &lp)
tries to find good lower bound solutions by applying some trivial heuristics
void propagatePseudoobj(SPxLPBase< R > &lp)
tightens variable bounds by propagating the pseudo objective function value.
PostStep(const char *p_name, int nR=0, int nC=0)
constructor.
FreeConstraintPS(const SPxLPBase< R > &lp, int _i)
FreeColSingletonPS(const FreeColSingletonPS &old)
copy constructor
bool m_postsolved
status of postsolving.
int rIdx(int i) const
returns for a given row index of the (reduced) LP the corresponding row index in the unsimplified LP...
virtual PostStep * clone() const
clone function for polymorphism
virtual void unsimplify(const VectorBase< R > &x, const VectorBase< R > &y, const VectorBase< R > &s, const VectorBase< R > &r, const typename SPxSolverBase< R >::VarStatus rows[], const typename SPxSolverBase< R >::VarStatus cols[], bool isOptimal=true)
reconstructs an optimal solution for the unsimplified LP.
int idx
Index of nonzero element.
LP simplification base class.
AggregationPS(const SPxLPBase< R > &lp, int _i, int _j, R rhs, R oldupper, R oldlower)
FreeZeroObjVariablePS & operator=(const FreeZeroObjVariablePS &rhs)
assignment operator
virtual PostStep * clone() const
clone function for polymorphism
int nRows() const
Returns number of rows in LP.
void add(const SVectorBase< S > &vec)
Append nonzeros of sv.
VectorBase< R > m_redCost
unsimplified reduced cost VectorBase<R>.
FixVariablePS(const SPxLPBase< R > &lp, SPxMainSM &simplifier, int _j, const R val, bool correctIdx=true)
DSVectorBase< R > m_scale
void spx_alloc(T &p, int n=1)
Allocate memory.
simplification could be done
DataArray< bool > m_fixed
virtual PostStep * clone() const
clone function for polymorphism
Postsolves the case when constraints are removed due to a variable with zero objective that is free i...
virtual const char * getName() const
get name of simplifying step.
virtual PostStep * clone() const
clone function for polymorphism
friend class RowSingletonPS
EmptyConstraintPS(const EmptyConstraintPS &old)
copy constructor
EmptyConstraintPS(const SPxLPBase< R > &lp, int _i)
SPxSimplifier & operator=(const SPxSimplifier &rhs)
assignment operator
SPxSense
Optimization sense.
TightenBoundsPS & operator=(const TightenBoundsPS &rhs)
assignment operator
virtual ~PostStep()
destructor.
virtual PostStep * clone() const
clone function for polymorphism
virtual PostStep * clone() const
clone function for polymorphism
Array< std::shared_ptr< PostStep > > m_hist
VectorBase<R> of presolve history.
RowSingletonPS(const RowSingletonPS &old)
copy constructor
SPxSense spxSense() const
Returns the optimization sense.
int & index(int n)
Reference to index of n 'th nonzero.
Postsolves row singletons.
MultiAggregationPS & operator=(const MultiAggregationPS &rhs)
assignment operator
virtual PostStep * clone() const
clone function for polymorphism
DSVectorBase< R > m_rowObj
ForceConstraintPS(const SPxLPBase< R > &lp, int _i, bool lhsFixed, DataArray< bool > &fixCols, Array< R > &lo, Array< R > &up)
virtual const VectorBase< R > & unsimplifiedRedCost()
returns a reference to the unsimplified reduced costs.
void handleRowObjectives(SPxLPBase< R > &lp)
LP simplification abstract base class.Instances of classes derived from SPxSimplifier may be loaded t...
DuplicateColsPS & operator=(const DuplicateColsPS &rhs)
assignment operator
virtual PostStep * clone() const
clone function for polymorphism
friend class DoubletonEquationPS
Array< DSVectorBase< R > > m_classSetCols
stores parallel classes with non-zero row entry
SPxMainSM(const SPxMainSM &old)
copy constructor.
FixVariablePS & operator=(const FixVariablePS &rhs)
assignment operator
Postsolves doubleton equations combined with a column singleton.
Postsolves free column singletons.
RowSingletonPS(const SPxLPBase< R > &lp, int _i, int _j, bool strictLo, bool strictUp, R newLo, R newUp, R oldLo, R oldUp)
ForceConstraintPS & operator=(const ForceConstraintPS &rhs)
assignment operator
Array< DSVectorBase< R > > m_classSetRows
stores parallel classes with non-zero colum entry
SPxSimplifier< R >::Result m_result
result of the simplification.
#define DEFAULT_EPS_ZERO
default allowed additive zero: 1.0 + EPS_ZERO == 1.0
int operator()(const typename SVectorBase< R >::Element &e1, const typename SVectorBase< R >::Element &e2) const
comparator for class SVectorBase<R>::Element: compare nonzeros according to value ...
R obj(int i) const
Returns objective value of column i.
virtual PostStep * clone() const
clone function for polymorphism
const VectorBase< R > & lhs() const
Returns left hand side vector.
DataArray< int > m_cIdx
column index VectorBase<R> in original LP.
FixBoundsPS(const FixBoundsPS &old)
copy constructor
SPxSimplifier< R >::Result simplifyDual(SPxLPBase< R > &lp, bool &again)
performs simplification steps on the LP based on dual concepts.
FreeZeroObjVariablePS(const SPxLPBase< R > &lp, int _j, bool loFree, DSVectorBase< R > col_idx_sorted)
DuplicateColsPS(const DuplicateColsPS &old)
copy constructor
R m_pseudoobj
the pseudo objective function value
SPxSimplifier< R >::Result duplicateCols(SPxLPBase< R > &lp, bool &again)
removes duplicate columns
virtual PostStep * clone() const
clone function for polymorphism
DuplicateRowsPS(const DuplicateRowsPS &old)
copy constructor
DoubletonEquationPS(const DoubletonEquationPS &old)
copy constructor
DuplicateRowsPS(const SPxLPBase< R > &lp, int _i, int maxLhsIdx, int minRhsIdx, const DSVectorBase< R > &dupRows, const Array< R > scale, const DataArray< int > perm, const DataArray< bool > isLhsEqualRhs, bool isTheLast, bool isFixedRow, bool isFirst=false)
MultiAggregationPS(const SPxLPBase< R > &lp, SPxMainSM &simplifier, int _i, int _j, R constant)
virtual PostStep * clone() const =0
clone function for polymorphism
Debugging, floating point type and parameter definitions.
bool checkSolution(SPxLPBase< R > &lp, VectorBase< R > sol)
checks a solution for feasibility
Postsolves row objectives.
DataArray< int > m_rIdx
row index VectorBase<R> in original LP.
Postsolves column singletons with zero objective.
TightenBoundsPS(const TightenBoundsPS &old)
copy constructor
virtual void execute(VectorBase< R > &x, VectorBase< R > &y, VectorBase< R > &s, VectorBase< R > &r, DataArray< typename SPxSolverBase< R >::VarStatus > &cBasis, DataArray< typename SPxSolverBase< R >::VarStatus > &rBasis, bool isOptimal) const =0
executes the postsolving.
void computeMinMaxValues(SPxLPBase< R > &lp, R side, R val, R minRes, R maxRes, R &minVal, R &maxVal)
calculate min/max value for the multi aggregated variables
SPxSimplifier< R >::Result removeRowSingleton(SPxLPBase< R > &lp, const SVectorBase< R > &row, int &i)
remove row singletons.
bool m_keepbounds
keep some bounds (for boundflipping)
Array< DSVectorBase< R > > m_dupRows
arrange duplicate rows using bucket sort w.r.t. their pClass values
Everything should be within this namespace.
AggregationPS(const AggregationPS &old)
copy constructor
RowObjPS(const SPxLPBase< R > &lp, int _i, int _j)
friend class ForceConstraintPS
VectorBase< R > m_slack
unsimplified slack VectorBase<R>.
Saving LPs in a form suitable for SoPlex.Class SPxLPBase provides the data structures required for sa...
virtual ~SPxMainSM()
destructor.
friend class AggregationPS
virtual const VectorBase< R > & unsimplifiedDual()
returns a reference to the unsimplified dual solution.
VectorBase< R > m_dual
unsimplified dual solution VectorBase<R>.
Save arrays of arbitrary types.
SPxSimplifier< R >::Result removeEmpty(SPxLPBase< R > &lp)
removed empty rows and empty columns.
friend class DuplicateColsPS
FreeZeroObjVariablePS(const FreeZeroObjVariablePS &old)
copy constructor
Array< DSVectorBase< R > > m_cols
const SVectorBase< R > & rowVector(int i) const
Gets row vector of row i.
comparator for class SVectorBase<R>::Element: compare nonzeros according to index ...
TightenBoundsPS(const SPxLPBase< R > &lp, int j, R origupper, R origlower)
FreeColSingletonPS & operator=(const FreeColSingletonPS &rhs)
assignment operator
DSVectorBase< R > m_col
does the index mapping have to be updated in postsolving?
void computeMinMaxResidualActivity(SPxLPBase< R > &lp, int rowNumber, int colNumber, R &minAct, R &maxAct)
computes the minimum and maximum residual activity for a given row and column. If colNumber is set to...
int m_j
slack column index
virtual PostStep * clone() const
clone function for polymorphism
Postsolves duplicate columns.
DataArray< bool > m_isLhsEqualRhs
int size() const
return nr. of elements.
Postsolves forcing constraints.
virtual PostStep * clone() const
clone function for polymorphism
Postsolves unconstraint constraints.
R val
Value of nonzero element.
Postsolves variable bound tightening from pseudo objective propagation.
const SVectorBase< R > & colVector(int i) const
Returns column vector of column i.
void removeRow(SPxLPBase< R > &lp, int i)
removes a row in the LP.
Postsolves variable fixing.
int nCols() const
Returns number of columns in LP.
virtual const VectorBase< R > & unsimplifiedSlacks()
returns a reference to the unsimplified slack values.
friend class FreeColSingletonPS
FixBoundsPS(const SPxLPBase< R > &lp, int j, R val)
R m_cutoffbound
the cutoff bound that is found by heuristics
SPxSimplifier< R >::Result simplifyRows(SPxLPBase< R > &lp, bool &again)
performs simplification steps on the rows of the LP.
Sparse vectors.Class SVectorBase provides packed sparse vectors. Such are a sparse vectors...
friend class FreeZeroObjVariablePS
virtual PostStep * clone() const
clone function for polymorphism
int m_addedcols
columns added by handleRowObjectives()
friend class ZeroObjColSingletonPS
friend class EmptyConstraintPS
FreeConstraintPS & operator=(const FreeConstraintPS &rhs)
assignment operator
DataArray< typename SPxSolverBase< R >::VarStatus > m_rBasisStat
basis status of rows.
RowObjPS(const RowObjPS &old)
copy constructor
Array< DSVectorBase< R > > m_rows
DSVectorBase< R > m_rowObj
Array< DSVectorBase< R > > m_dupCols
arrange duplicate columns w.r.t. their pClass values
EmptyConstraintPS & operator=(const EmptyConstraintPS &rhs)
assignment operator
FreeColSingletonPS(const SPxLPBase< R > &lp, SPxMainSM &simplifier, int _j, int _i, R slackVal)
ZeroObjColSingletonPS(const ZeroObjColSingletonPS &old)
copy constructor
VectorBase< R > m_prim
unsimplified primal solution VectorBase<R>.
const VectorBase< R > & lower() const
Returns (internal and possibly scaled) lower bound vector.
DuplicateColsPS(const SPxLPBase< R > &lp, int _j, int _k, R scale, DataArray< int > perm, bool isFirst=false, bool isTheLast=false)
virtual void getBasis(typename SPxSolverBase< R >::VarStatus rows[], typename SPxSolverBase< R >::VarStatus cols[], const int rowsSize=-1, const int colsSize=-1) const
get optimal basis.
DoubletonEquationPS & operator=(const DoubletonEquationPS &rhs)
assignment operator
virtual SPxSimplifier< R >::Result result() const
returns result status of the simplification
SPxSimplifier< R >::Result aggregateVars(SPxLPBase< R > &lp, const SVectorBase< R > &row, int &i)
aggregate two variables that appear in an equation.
LP simplifier for removing uneccessary row/columns.This SPxSimplifier is mainly based on the paper "P...
friend class FixVariablePS
ForceConstraintPS(const ForceConstraintPS &old)
copy constructor
DataArray< typename SPxSolverBase< R >::VarStatus > m_cBasisStat
basis status of columns.
virtual PostStep * clone() const
clone function for polymorphism