71 class SPxMainSM :
public SPxSimplifier<R>
98 PostStep(
const char* p_name, std::shared_ptr<Tolerances> tols,
int nR = 0,
int nC = 0)
147 return _tolerances->floatingPointFeastol();
151 return _tolerances->epsilon();
215 , m_old_i(lp.
nRows() - 1)
216 , m_row(lp.rowVector(_i))
217 , m_row_obj(lp.rowObj(_i))
223 , m_old_i(old.m_old_i)
225 , m_row_obj(old.m_row_obj)
266 , m_old_i(lp.
nRows() - 1)
267 , m_row_obj(lp.rowObj(_i))
273 , m_old_i(old.m_old_i)
274 , m_row_obj(old.m_row_obj)
324 R newLo, R newUp, R oldLo, R oldUp, std::shared_ptr<Tolerances> tols)
327 , m_old_i(lp.
nRows() - 1)
331 , m_strictLo(strictLo)
332 , m_strictUp(strictUp)
333 , m_maxSense(lp.spxSense() ==
SPxLPBase<R>::MAXIMIZE)
334 , m_obj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_j) : -lp.obj(_j))
335 , m_col(lp.colVector(_j))
340 , m_row_obj(lp.rowObj(_i))
346 , m_old_i(old.m_old_i)
350 , m_strictLo(old.m_strictLo)
351 , m_strictUp(old.m_strictUp)
352 , m_maxSense(old.m_maxSense)
355 , m_newLo(old.m_newLo)
356 , m_newUp(old.m_newUp)
357 , m_oldLo(old.m_oldLo)
358 , m_oldUp(old.m_oldUp)
359 , m_row_obj(old.m_row_obj)
411 , m_old_i(lp.
nRows() - 1)
412 , m_lRhs(lhsFixed ? lp.lhs(_i) : lp.rhs(_i))
413 , m_row(lp.rowVector(_i))
414 , m_objs(lp.rowVector(_i).size())
416 , m_cols(lp.rowVector(_i).size())
417 , m_lhsFixed(lhsFixed)
418 , m_maxSense(lp.spxSense() ==
SPxLPBase<R>::MAXIMIZE)
423 , m_rowobj(lp.rowObj(_i))
425 for(
int k = 0; k < m_row.
size(); ++k)
436 , m_old_i(old.m_old_i)
440 , m_fixed(old.m_fixed)
442 , m_lhsFixed(old.m_lhsFixed)
443 , m_maxSense(old.m_maxSense)
444 , m_oldLowers(old.m_oldLowers)
445 , m_oldUppers(old.m_oldUppers)
448 , m_rowobj(old.m_rowobj)
495 std::shared_ptr<Tolerances> tols,
bool correctIdx =
true)
498 , m_old_j(lp.
nCols() - 1)
500 , m_obj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_j) : -lp.obj(_j))
501 , m_lower(lp.lower(_j))
502 , m_upper(lp.upper(_j))
503 , m_correctIdx(correctIdx)
504 , m_col(lp.colVector(_j))
506 simplifier.addObjoffset(m_val * lp.
obj(m_j));
512 , m_old_j(old.m_old_j)
515 , m_lower(old.m_lower)
516 , m_upper(old.m_upper)
517 , m_correctIdx(old.m_correctIdx)
574 , m_status(old.m_status)
623 , m_old_j(lp.
nCols() - 1)
624 , m_old_i(lp.
nRows() - 1)
625 , m_bnd(loFree ? lp.upper(_j) : lp.lower(_j))
626 , m_col(col_idx_sorted)
627 , m_lRhs(lp.colVector(_j).size())
628 , m_rowObj(lp.colVector(_j).size())
629 , m_rows(lp.colVector(_j).size())
632 for(
int k = 0; k < m_col.
size(); ++k)
634 int r = m_col.
index(k);
636 if((m_loFree && m_col.
value(k) > 0) ||
637 (!m_loFree && m_col.
value(k) < 0))
650 , m_old_j(old.m_old_j)
651 , m_old_i(old.m_old_i)
655 , m_rowObj(old.m_rowObj)
657 , m_loFree(old.m_loFree)
704 std::shared_ptr<Tolerances> tols)
708 , m_old_j(lp.
nCols() - 1)
711 , m_lower(lp.lower(_j))
712 , m_upper(lp.upper(_j))
713 , m_row(lp.rowVector(_i))
720 , m_old_j(old.m_old_j)
723 , m_lower(old.m_lower)
724 , m_upper(old.m_upper)
770 R slackVal, std::shared_ptr<Tolerances> tols)
774 , m_old_j(lp.
nCols() - 1)
775 , m_old_i(lp.
nRows() - 1)
776 , m_obj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_j) : -lp.obj(_j))
778 , m_onLhs(
EQ(slackVal, lp.lhs(_i), this->
epsilon()))
779 , m_eqCons(
EQ(lp.lhs(_i), lp.rhs(_i), this->
epsilon()))
780 , m_row(lp.rowVector(_i))
782 assert(m_row[m_j] != 0.0);
783 simplifier.addObjoffset(m_lRhs * (lp.
obj(m_j) / m_row[m_j]));
790 , m_old_j(old.m_old_j)
791 , m_old_i(old.m_old_i)
794 , m_onLhs(old.m_onLhs)
795 , m_eqCons(old.m_eqCons)
851 std::shared_ptr<Tolerances> tols)
856 , m_maxSense(lp.spxSense() ==
SPxLPBase<R>::MAXIMIZE)
857 , m_jFixed(
EQ(lp.lower(_j), lp.upper(_j), this->
epsilon()))
858 , m_jObj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_j) : -lp.obj(_j))
859 , m_kObj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_k) : -lp.obj(_k))
860 , m_aij(lp.colVector(_j).value(0))
861 , m_strictLo(lp.lower(_k) > oldLo)
862 , m_strictUp(lp.upper(_k) < oldUp)
863 , m_newLo(lp.lower(_k))
864 , m_newUp(lp.upper(_k))
867 , m_Lo_j(lp.lower(_j))
868 , m_Up_j(lp.upper(_j))
871 , m_col(lp.colVector(_k))
879 , m_maxSense(old.m_maxSense)
880 , m_jFixed(old.m_jFixed)
884 , m_strictLo(old.m_strictLo)
885 , m_strictUp(old.m_strictUp)
886 , m_newLo(old.m_newLo)
887 , m_newUp(old.m_newUp)
888 , m_oldLo(old.m_oldLo)
889 , m_oldUp(old.m_oldUp)
945 bool isTheLast,
bool isFixedRow, std::shared_ptr<Tolerances> tols,
bool isFirst =
false)
948 , m_i_rowObj(lp.rowObj(_i))
949 , m_maxLhsIdx((maxLhsIdx == -1) ? -1 : maxLhsIdx)
950 , m_minRhsIdx((minRhsIdx == -1) ? -1 : minRhsIdx)
951 , m_maxSense(lp.spxSense() ==
SPxLPBase<R>::MAXIMIZE)
953 , m_isLast(isTheLast)
954 , m_fixed(isFixedRow)
955 , m_nCols(lp.
nCols())
956 , m_scale(dupRows.size())
957 , m_rowObj(dupRows.size())
958 , m_rIdxLocalOld(dupRows.size())
960 , m_isLhsEqualRhs(isLhsEqualRhs)
962 R rowScale = scale[_i];
964 for(
int k = 0; k < dupRows.
size(); ++k)
966 m_scale.
add(dupRows.
index(k), rowScale / scale[dupRows.
index(k)]);
968 m_rIdxLocalOld[k] = dupRows.
index(k);
975 , m_i_rowObj(old.m_i_rowObj)
976 , m_maxLhsIdx(old.m_maxLhsIdx)
977 , m_minRhsIdx(old.m_minRhsIdx)
978 , m_maxSense(old.m_maxSense)
979 , m_isFirst(old.m_isFirst)
980 , m_isLast(old.m_isLast)
981 , m_fixed(old.m_fixed)
982 , m_nCols(old.m_nCols)
983 , m_scale(old.m_scale)
984 , m_rowObj(old.m_rowObj)
985 , m_rIdxLocalOld(old.m_rIdxLocalOld)
987 , m_isLhsEqualRhs(old.m_isLhsEqualRhs)
1035 std::shared_ptr<Tolerances> tols,
bool isFirst =
false,
bool isTheLast =
false)
1039 , m_loJ(lp.lower(_j))
1040 , m_upJ(lp.upper(_j))
1041 , m_loK(lp.lower(_k))
1042 , m_upK(lp.upper(_k))
1044 , m_isFirst(isFirst)
1045 , m_isLast(isTheLast)
1057 , m_scale(old.m_scale)
1058 , m_isFirst(old.m_isFirst)
1059 , m_isLast(old.m_isLast)
1060 , m_perm(old.m_perm)
1106 std::shared_ptr<Tolerances> tols)
1110 , m_old_j(lp.
nCols() - 1)
1111 , m_old_i(lp.
nRows() - 1)
1112 , m_upper(lp.upper(_j))
1113 , m_lower(lp.lower(_j))
1114 , m_obj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_j) : -lp.obj(_j))
1115 , m_oldupper(oldupper)
1116 , m_oldlower(oldlower)
1118 , m_row(lp.rowVector(_i))
1119 , m_col(lp.colVector(_j))
1121 assert(m_row[m_j] != 0.0);
1128 , m_old_j(old.m_old_j)
1129 , m_old_i(old.m_old_i)
1130 , m_upper(old.m_upper)
1131 , m_lower(old.m_lower)
1133 , m_oldupper(old.m_oldupper)
1134 , m_oldlower(old.m_oldlower)
1186 R constant, std::shared_ptr<Tolerances> tols)
1190 , m_old_j(lp.
nCols() - 1)
1191 , m_old_i(lp.
nRows() - 1)
1192 , m_upper(lp.upper(_j))
1193 , m_lower(lp.lower(_j))
1194 , m_obj(lp.spxSense() ==
SPxLPBase<R>::MINIMIZE ? lp.obj(_j) : -lp.obj(_j))
1196 , m_onLhs(
EQ(constant, lp.lhs(_i), this->
epsilon()))
1197 , m_eqCons(
EQ(lp.lhs(_i), lp.rhs(_i), this->
epsilon()))
1198 , m_row(lp.rowVector(_i))
1199 , m_col(lp.colVector(_j))
1201 assert(m_row[m_j] != 0.0);
1202 simplifier.addObjoffset(m_obj * m_const / m_row[m_j]);
1209 , m_old_j(old.m_old_j)
1210 , m_old_i(old.m_old_i)
1211 , m_upper(old.m_upper)
1212 , m_lower(old.m_lower)
1214 , m_const(old.m_const)
1215 , m_onLhs(old.m_onLhs)
1216 , m_eqCons(old.m_eqCons)
1258 std::shared_ptr<Tolerances> tols)
1261 , m_origupper(origupper)
1262 , m_origlower(origlower)
1269 , m_origupper(old.m_origupper)
1270 , m_origlower(old.m_origlower)
1424 m_rIdx[i] = m_rIdx[lp.
nRows() - 1];
1430 m_cIdx[j] = m_cIdx[lp.
nCols() - 1];
1455 return this->
tolerances()->floatingPointFeastol();
1460 return this->
tolerances()->floatingPointOpttol();
1474 , m_keepbounds(false)
1476 , m_result(this->
OKAY)
1483 , m_prim(old.m_prim)
1484 , m_slack(old.m_slack)
1485 , m_dual(old.m_dual)
1486 , m_redCost(old.m_redCost)
1487 , m_cBasisStat(old.m_cBasisStat)
1488 , m_rBasisStat(old.m_rBasisStat)
1489 , m_cIdx(old.m_cIdx)
1490 , m_rIdx(old.m_rIdx)
1491 , m_hist(old.m_hist)
1492 , m_postsolved(old.m_postsolved)
1493 , m_stat(old.m_stat)
1494 , m_thesense(old.m_thesense)
1495 , m_keepbounds(old.m_keepbounds)
1496 , m_addedcols(old.m_addedcols)
1497 , m_result(old.m_result)
1498 , m_cutoffbound(old.m_cutoffbound)
1499 , m_pseudoobj(old.m_pseudoobj)
1509 m_prim = rhs.m_prim;
1510 m_slack = rhs.m_slack;
1511 m_dual = rhs.m_dual;
1512 m_redCost = rhs.m_redCost;
1513 m_cBasisStat = rhs.m_cBasisStat;
1514 m_rBasisStat = rhs.m_rBasisStat;
1515 m_cIdx = rhs.m_cIdx;
1516 m_rIdx = rhs.m_rIdx;
1517 m_postsolved = rhs.m_postsolved;
1518 m_stat = rhs.m_stat;
1519 m_thesense = rhs.m_thesense;
1520 m_keepbounds = rhs.m_keepbounds;
1521 m_addedcols = rhs.m_addedcols;
1522 m_result = rhs.m_result;
1523 m_cutoffbound = rhs.m_cutoffbound;
1524 m_pseudoobj = rhs.m_pseudoobj;
1525 m_hist = rhs.m_hist;
1548 bool keepbounds =
false, uint32_t seed = 0);
1570 assert(m_postsolved);
1576 assert(m_postsolved);
1582 assert(m_postsolved);
1588 assert(m_postsolved);
1594 assert(m_postsolved);
1595 return m_rBasisStat[i];
1600 assert(m_postsolved);
1601 return m_cBasisStat[j];
1607 assert(m_postsolved);
1608 assert(rowsSize < 0 || rowsSize >= m_rBasisStat.
size());
1609 assert(colsSize < 0 || colsSize >= m_cBasisStat.
size());
1611 for(
int i = 0; i < m_rBasisStat.
size(); ++i)
1612 rows[i] = m_rBasisStat[i];
1614 for(
int j = 0; j < m_cBasisStat.
size(); ++j)
1615 cols[j] = m_cBasisStat[j];
1631 this->epsiloncompare = eps;
1637 if(
EQ(e1.
val, e2.
val, this->epsiloncompare))
1670 #include "spxmainsm.hpp" 1672 #endif // _SPXMAINSM_H_ const VectorBase< R > & rhs() const
Returns right hand side vector.
DoubletonEquationPS(const SPxLPBase< R > &lp, int _j, int _k, int _i, R oldLo, R oldUp, std::shared_ptr< Tolerances > tols)
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...
FreeZeroObjVariablePS(const SPxLPBase< R > &lp, int _j, bool loFree, DSVectorBase< R > col_idx_sorted, std::shared_ptr< Tolerances > tols)
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.
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.
ZeroObjColSingletonPS(const SPxLPBase< R > &lp, const SPxMainSM &, int _j, int _i, std::shared_ptr< Tolerances > tols)
PostStep(const char *p_name, std::shared_ptr< Tolerances > tols, int nR=0, int nC=0)
constructor.
const VectorBase< R > & upper() const
Returns upper bound vector.
void removeCol(SPxLPBase< R > &lp, int j)
removes a column in the LP.
virtual SPxSimplifier< R > * clone() const
clone function for polymorphism
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
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...
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
RowSingletonPS(const SPxLPBase< R > &lp, int _i, int _j, bool strictLo, bool strictUp, R newLo, R newUp, R oldLo, R oldUp, std::shared_ptr< Tolerances > tols)
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.
MultiAggregationPS(const SPxLPBase< R > &lp, SPxMainSM &simplifier, int _i, int _j, R constant, std::shared_ptr< Tolerances > tols)
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...
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.
virtual R feastol() const
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.
virtual R epsilon() const
int idx
Index of nonzero element.
LP simplification base class.
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, std::shared_ptr< Tolerances > tols, 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
std::shared_ptr< Tolerances > _tolerances
0-epsilon of this poststep
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
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
const std::shared_ptr< Tolerances > tolerances() const
get the _tolerances member variable
SPxSense spxSense() const
Returns the optimization sense.
FixBoundsPS(const SPxLPBase< R > &lp, int j, R val, std::shared_ptr< Tolerances > tols)
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
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.
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.
virtual SPxSimplifier< R >::Result simplify(SPxLPBase< R > &lp, Real remainingTime, bool keepbounds=false, uint32_t seed=0)
simplify SPxLPBase<R> lp.
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.
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
SOPLEX_THREADLOCAL const Real infinity
virtual PostStep * clone() const =0
clone function for polymorphism
Debugging, floating point type and parameter definitions.
FreeConstraintPS(const SPxLPBase< R > &lp, int _i, std::shared_ptr< Tolerances > tols)
bool checkSolution(SPxLPBase< R > &lp, VectorBase< R > sol)
checks a solution for feasibility
Postsolves row objectives.
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, std::shared_ptr< Tolerances > tols, bool isFirst=false)
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
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>.
TightenBoundsPS(const SPxLPBase< R > &lp, int j, R origupper, R origlower, std::shared_ptr< Tolerances > tols)
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
EmptyConstraintPS(const SPxLPBase< R > &lp, int _i, std::shared_ptr< Tolerances > tols)
const SVectorBase< R > & rowVector(int i) const
Gets row vector of row i.
comparator for class SVectorBase<R>::Element: compare nonzeros according to index ...
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
DuplicateColsPS(const SPxLPBase< R > &lp, int _j, int _k, R scale, DataArray< int > perm, std::shared_ptr< Tolerances > tols, bool isFirst=false, bool isTheLast=false)
int size() const
return nr. of elements.
Postsolves forcing constraints.
AggregationPS(const SPxLPBase< R > &lp, int _i, int _j, R rhs, R oldupper, R oldlower, std::shared_ptr< Tolerances > tols)
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.
ForceConstraintPS(const SPxLPBase< R > &lp, int _i, bool lhsFixed, DataArray< bool > &fixCols, Array< R > &lo, Array< R > &up, std::shared_ptr< Tolerances > tols)
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
RowObjPS(const SPxLPBase< R > &lp, int _i, int _j, std::shared_ptr< Tolerances > tols)
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
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.
FreeColSingletonPS(const SPxLPBase< R > &lp, SPxMainSM &simplifier, int _j, int _i, R slackVal, std::shared_ptr< Tolerances > tols)
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