Skip to content

Commit

Permalink
Merge branch 'bugfix-70' into 'master'
Browse files Browse the repository at this point in the history
Merge bugfix in master

See merge request integer/soplex!483
  • Loading branch information
svigerske committed Jun 17, 2024
2 parents 28a2e59 + c879bfa commit c1e6764
Show file tree
Hide file tree
Showing 19 changed files with 51 additions and 48 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,11 @@ endif()
# look for presolvelib PaPILO
if(PAPILO)
message(STATUS "Finding PAPILO")
set(PAPILO_MIN_VERSION 2.0.0.0)
find_package(PAPILO CONFIG ${PAPILO_MIN_VERSION} HINTS ${PAPILO_DIR})
find_package(PAPILO CONFIG HINTS ${PAPILO_DIR})
set(PAPILO_MIN_VERSION 2.0.0)
if(PAPILO_VERSION LESS ${PAPILO_MIN_VERSION})
message( FATAL_ERROR "At least PaPILO Version ${PAPILO_MIN_VERSION} required - found ${PAPILO_VERSION}!")
endif ()
endif()
if(PAPILO_FOUND)
message(STATUS "Finding PAPILO - found")
Expand Down
6 changes: 3 additions & 3 deletions doc/soplex.dxy
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE =
EXCLUDE = ../src/soplex/external/

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand Down Expand Up @@ -1643,7 +1643,7 @@ COMPACT_LATEX = YES
# The default value is: a4.
# This tag requires that the tag GENERATE_LATEX is set to YES.

PAPER_TYPE = a4wide
PAPER_TYPE =

# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
# that should be included in the LaTeX output. The package can be specified just
Expand Down Expand Up @@ -2423,4 +2423,4 @@ GENERATE_LEGEND = YES
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_CLEANUP = YES
DOT_CLEANUP = YES
2 changes: 1 addition & 1 deletion doc/xternal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
* <TR><TD>coVector</TD><TD>colVector</TD><TD>rowVector</TD></TR>
* </TABLE>
*
* Whether the \ref soplex::SPxBasis::Desc::Status "SPxBasis::Desc::Status" of a
* Whether the \ref soplex::SPxBasisBase::Desc::Status "SPxBasisBase::Desc::Status" of a
* variable indicates that the corresponding vector is in the basis matrix or
* not also depends on the chosen representation. Hence, methods \c isBasic()
* are provided to get the correct answer for both representations.
Expand Down
2 changes: 2 additions & 0 deletions src/soplex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6565,10 +6565,12 @@ bool SoPlexBase<R>::setRealParam(const RealParam param, const Real value, const

// lower limit on objective value is set in solveReal()
case SoPlexBase<R>::OBJLIMIT_LOWER:
this->_solver.toggleTerminationValue(true);
break;

// upper limit on objective value is set in solveReal()
case SoPlexBase<R>::OBJLIMIT_UPPER:
this->_solver.toggleTerminationValue(true);
break;

// working tolerance for feasibility in floating-point solver
Expand Down
2 changes: 0 additions & 2 deletions src/soplex/classset.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ class ClassSet
*newelem = item;
}
/// adds element \p item.
/**@return 0 on success and non-zero, if an error occured.
*/
void add(const T& item)
{
T* newelem = create();
Expand Down
3 changes: 2 additions & 1 deletion src/soplex/clufactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,8 @@ class CLUFactor
///
void factor(const SVectorBase<R>** vec, ///< Array of column VectorBase<R> pointers
R threshold, ///< pivoting threshold
R eps); ///< epsilon for zero detection
R eps ///< epsilon for zero detection
);
///@}

//----------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion src/soplex/clufactor_rational.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,8 @@ class CLUFactorRational

///
void factor(const SVectorRational** vec, ///< Array of column vector pointers
const Rational& threshold); ///< pivoting threshold
const Rational& threshold ///< pivoting threshold
);
///@}

//----------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions src/soplex/dataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ class DataSet
*data = item;
}
/// adds element \p item.
/**@return 0 on success and non-zero, if an error occured.
*/
void add(const DATA& item)
{
DATA* data = create();
Expand Down
2 changes: 1 addition & 1 deletion src/soplex/lprowbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace soplex
*
* Class LPRowBase provides constraints for linear programs in the form \f[ l \le a^Tx \le r, \f] where \em a is a
* DSVector. \em l is referred to as %left hand side, \em r as %right hand side and \em a as \em row \em vector or the
* constraint vector. \em l and \em r may also take values \f$\pm\f$ #R(infinity). This static member is predefined, but
* constraint vector. \em l and \em r may also take values \f$\pm\f$ R(infinity). This static member is predefined, but
* may be overridden to meet the needs of the LP solver to be used.
*
* LPRowBases allow to specify regular inequalities of the form \f[ a^Tx \sim \alpha, \f] where \f$\sim\f$ can take any
Expand Down
1 change: 1 addition & 0 deletions src/soplex/lprowsetbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ class LPRowSetBase : protected SVSetBase<R>

// ------------------------------------------------------------------------------------------------------------------
/**@name Consistency check */
///@{

/// Checks consistency.
bool isConsistent() const
Expand Down
4 changes: 2 additions & 2 deletions src/soplex/slinsolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ namespace soplex
Class SLinSolver provides a class for solving sparse linear systems with
a matrix \f$A\f$ and arbitrary right-hand side vectors. For doing so, the
matrix must be first #load%ed to an #SLinSolver object as an array of
pointers to the \em column \ref SVectorBase<R> "SVectors" of this matrix.
matrix must be first #load%ed to an SLinSolver object as an array of
pointers to the \em column \ref soplex::SVectorBase<R> "SVectors" of this matrix.
*/
template <class R>
class SLinSolver
Expand Down
24 changes: 12 additions & 12 deletions src/soplex/spxharrisrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,26 @@ class SPxHarrisRT : public SPxRatioTester<R>

///
int maxDelta(
R* /*max*/, ///< max abs value in \p upd
R* /*max*/, ///< max abs value in upd
R* val, ///< initial and chosen value
int num, ///< number of indices in \p idx
const int* idx, ///< nonzero indices in \p upd
const R* upd, ///< update VectorBase<R> for \p vec
int num, ///< number of indices in idx
const int* idx, ///< nonzero indices in upd
const R* upd, ///< update VectorBase<R> for vec
const R* vec, ///< current vector
const R* low, ///< lower bounds for \p vec
const R* up ///< upper bounds for \p vec
const R* low, ///< lower bounds for vec
const R* up ///< upper bounds for vec
) const;

///
int minDelta(
R* /*max*/, ///< max abs value in \p upd
R* /*max*/, ///< max abs value in upd
R* val, ///< initial and chosen value
int num, ///< of indices in \p idx
const int* idx, ///< nonzero indices in \p upd
const R* upd, ///< update VectorBase<R> for \p vec
int num, ///< of indices in idx
const int* idx, ///< nonzero indices in upd
const R* upd, ///< update VectorBase<R> for vec
const R* vec, ///< current vector
const R* low, ///< lower bounds for \p vec
const R* up ///< upper bounds for \p vec
const R* low, ///< lower bounds for vec
const R* up ///< upper bounds for vec
) const;
///@}

Expand Down
10 changes: 5 additions & 5 deletions src/soplex/spxout.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ class SPxOut
/**@name Verbosity manipulator
Manipulators are implemented in a similar way as done for @c setw(),
@c setprecision(), etc. in the standard library file iomanip. For
instance, the non-member function \ref verb() "verb(v)" returns a
struct struct_Severity which contains only the verbosity level.
instance, the non-member function \ref soplex::verb() "verb(v)"
returns a struct struct_Verbosity which contains only the verbosity level.
Calling
@code
SPxOut spxout;
Expand All @@ -246,7 +246,7 @@ class SPxOut
extracts the verbosity level from the struct and passes it to the
member function SPxOut::setVerbosity().
*/
//@{
///@{
/// manipulator to be used in an output statement
inline SPxOut::struct_Verbosity
verb(const SPxOut::Verbosity& v)
Expand Down Expand Up @@ -274,7 +274,7 @@ operator<< (SPxOut& stream,
* other. When using only a template type, it is not clear what the
* compiler makes out of it (according to lint).
*/
//@{
///@{
///
/// Passes instances of type \p Type to the current stream.
inline SPxOut& operator<< (SPxOut& _spxout, long t)
Expand Down Expand Up @@ -364,7 +364,7 @@ inline SPxOut& operator<< (SPxOut& _spxout, T t)
return _spxout;
}

//@}
///@}

} // namespace soplex

Expand Down
6 changes: 1 addition & 5 deletions src/soplex/spxpapilo.h
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,7 @@ void Presol<R>::unsimplify(const VectorBase<R>& x, const VectorBase<R>& y,
papilo::Postsolve<R> postsolve {msg, num};
auto status = postsolve.undo(reducedSolution, originalSolution, postsolveStorage, isOptimal);

if(status ==
#if defined(PAPILO_API_VERSION) && PAPILO_API_VERSION >= 1
papilo::
#endif
PostsolveStatus::kFailed && isOptimal)
if(status == PostsolveStatus::kFailed && isOptimal)
{
SPX_MSG_ERROR(std::cerr << "PaPILO did not pass validation" << std::endl;)
assert(false);
Expand Down
4 changes: 2 additions & 2 deletions src/soplex/spxpricer.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class SPxPricer
/// returns selected index to leave basis.
/** Selects the index of a vector to leave the basis. The selected index
i, say, must be in the range 0 <= i < solver()->dim() and its
tested value must fullfill solver()->test()[i] < -#tolerance().
tested value must fullfill solver()->test()[i] < -#pricingTolerance().
*/
virtual int selectLeave() = 0;

Expand All @@ -209,7 +209,7 @@ class SPxPricer
/** Selects the SPxId of a vector to enter the basis. The selected
id, must not represent a basic index (i.e. solver()->isBasic(id) must
be false). However, the corresponding test value needs not to be less
than -#tolerance(). If not, SoPlex will discard the pivot.
than -#pricingTolerance(). If not, SoPlex will discard the pivot.
Note:
When method #selectEnter() is called by the loaded SoPlex
Expand Down
4 changes: 2 additions & 2 deletions src/soplex/spxsolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ class SPxSolverBase : public SPxLPBase<R>, protected SPxBasisBase<R>
Real maxTime; ///< maximum allowed time.
int nClckSkipsLeft; ///< remaining number of times the clock can be safely skipped
long nCallsToTimelim; /// < the number of calls to the method isTimeLimitReached()
R objLimit; ///< objective value limit.
R objLimit; ///< objective value limit.
bool useTerminationValue; ///< true, if objective limit should be used in the next solve.
Status m_status; ///< status of algorithm.

R m_nonbasicValue; ///< nonbasic part of current objective value
Expand All @@ -276,7 +277,6 @@ class SPxSolverBase : public SPxLPBase<R>, protected SPxBasisBase<R>
int m_maxCycle; ///< maximum steps before cycling is detected.
int m_numCycle; ///< actual number of degenerate steps so far.
bool initialized; ///< true, if all vectors are setup.
bool useTerminationValue; /// true, if objective limit should be used in the next solve.

SSVectorBase<R>*
solveVector2; ///< when 2 systems are to be solved at a time; typically for speepest edge weights
Expand Down
3 changes: 3 additions & 0 deletions src/soplex/spxsolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,7 @@ void SPxSolverBase<R>::setType(Type tp)
, nClckSkipsLeft(0)
, nCallsToTimelim(0)
, objLimit(R(infinity))
, useTerminationValue(true)
, m_status(UNKNOWN)
, m_nonbasicValue(0.0)
, m_nonbasicValueUpToDate(false)
Expand Down Expand Up @@ -1185,6 +1186,7 @@ void SPxSolverBase<R>::setType(Type tp)
maxIters = base.maxIters;
maxTime = base.maxTime;
objLimit = base.objLimit;
useTerminationValue = base.useTerminationValue;
m_status = base.m_status;
m_nonbasicValue = base.m_nonbasicValue;
m_nonbasicValueUpToDate = base.m_nonbasicValueUpToDate;
Expand Down Expand Up @@ -1385,6 +1387,7 @@ void SPxSolverBase<R>::setType(Type tp)
, nClckSkipsLeft(base.nClckSkipsLeft)
, nCallsToTimelim(base.nCallsToTimelim)
, objLimit(base.objLimit)
, useTerminationValue(base.useTerminationValue)
, m_status(base.m_status)
, m_nonbasicValue(base.m_nonbasicValue)
, m_nonbasicValueUpToDate(base.m_nonbasicValueUpToDate)
Expand Down
4 changes: 2 additions & 2 deletions src/soplex/ssvectorbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ template < class R > class SVSetBase;
* @ingroup Algebra
*
* This class implements semi-sparse vectors. Such are #VectorBase%s where the indices of its nonzero elements can be
* stored in an extra IdxSet. Only elements with absolute value > #epsilon are considered to be nonzero. Since really
* stored in an extra IdxSet. Only elements with absolute value > #getEpsilon() are considered to be nonzero. Since really
* storing the nonzeros is not always convenient, an SSVectorBase provides two different stati: setup and not setup.
* An SSVectorBase being setup means that the nonzero indices are available, otherwise an SSVectorBase is just an
* ordinary VectorBase with an empty IdxSet. Note that due to arithmetic operation, zeros can slip in, i.e., it is
Expand Down Expand Up @@ -141,7 +141,7 @@ class SSVectorBase : public VectorBase<R>, protected IdxSet
setupStatus = false;
}

/// Initializes nonzero indices for elements with absolute values above #epsilon and sets all other elements to 0.
/// Initializes nonzero indices for elements with absolute values above epsilon and sets all other elements to 0.
void setup()
{
if(!isSetup())
Expand Down
10 changes: 5 additions & 5 deletions src/soplex/svsetbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ class SVSetBase : protected ClassArray < Nonzero<R> >
/** Adds SVectorBase \p svec to the %set. This includes copying its nonzeros to the sets nonzero memory and creating
* an additional SVectorBase entry in vector memory. If neccessary, the memory blocks are enlarged appropriately.
*
* @return \p nkey contains the DataKey, that the SVSetBase has assosicated to the new SVectorBase.
* At return, \p nkey contains the DataKey, that the SVSetBase has assosicated to the new SVectorBase.
*/
void add(DataKey& nkey, const SVectorBase<R>& svec)
{
Expand All @@ -379,7 +379,7 @@ class SVSetBase : protected ClassArray < Nonzero<R> >
/** Adds SVectorBase \p svec to the %set. This includes copying its nonzeros to the sets nonzero memory and creating
* an additional SVectorBase entry in vector memory. If neccessary, the memory blocks are enlarged appropriately.
*
* @return \p nkey contains the DataKey, that the SVSetBase has assosicated to the new SVectorBase.
* At return, \p nkey contains the DataKey, that the SVSetBase has assosicated to the new SVectorBase.
*/
template < class S >
void add(DataKey& nkey, const S* rowValues, const int* rowIndices, int rowSize)
Expand Down Expand Up @@ -419,7 +419,7 @@ class SVSetBase : protected ClassArray < Nonzero<R> >
/// Adds n SVectorBase%s to SVSetBase.
/** Adds all \p n SVectorBase%s in the array \p svec to the %set.
*
* @return \p nkey contains the DataKey%s, that the SVSetBase has assosicated to the new SVectorBase%s.
* At return, nkey contains the DataKey%s, that the SVSetBase has assosicated to the new SVectorBase%s.
*
* @pre \p nkey must be large enough to fit \p n DataKey%s.
*/
Expand Down Expand Up @@ -454,7 +454,7 @@ class SVSetBase : protected ClassArray < Nonzero<R> >
/// Adds all SVectorBase%s of \p pset to SVSetBase.
/** Adds all \p n SVectorBase%s in the \p pset to an SVSetBase.
*
* @return \p nkey contains the DataKey%s, that the SVSetBase has assosicated to the new SVectorBase%s.
* At return, \p nkey contains the DataKey%s, that the SVSetBase has assosicated to the new SVectorBase%s.
*
* @pre \p nkey must be large enough to fit \p pset.num() DataKey%s.
*/
Expand Down Expand Up @@ -721,7 +721,7 @@ class SVSetBase : protected ClassArray < Nonzero<R> >
/** Removes \p n SVectorBase%s from %set.
* @pre \p nums must be at least of size \p n
* @pre \p perm must be at least of size num()
* @return \p perm is the permutations resulting from this removal: \p perm[i] < 0 indicates
* At return, \p perm is the permutations resulting from this removal: \p perm[i] < 0 indicates
* that the element to index \p i has been removed. Otherwise, \p perm[i] is the new
* index of the element with index \p i before the removal.
*/
Expand Down

0 comments on commit c1e6764

Please sign in to comment.