Sketcher: Solver Advanced Control: New Param: QR Pivot Threshold

================================================================

A new parameter added to the form in order to control how low a value should be
to be considered zero (how high a value shall be to be accounted for in rank calculation)

Debug for QR pivot threshold is also added.
This commit is contained in:
Abdullah Tahiri
2015-06-22 06:42:46 +02:00
committed by wmayer
parent a6d86ad85c
commit d5062dbacd
6 changed files with 57 additions and 6 deletions

View File

@@ -386,6 +386,7 @@ public:
inline void setConvergence(double conv){GCSsys.convergence=conv;}
inline void setConvergenceRedundant(double conv){GCSsys.convergenceRedundant=conv;}
inline void setQRAlgorithm(GCS::QRAlgorithm alg){GCSsys.qrAlgorithm=alg;}
inline void setQRPivotThreshold(double val){GCSsys.qrpivotThreshold=val;}
inline void setLM_eps(double val){GCSsys.LM_eps=val;}
inline void setLM_eps1(double val){GCSsys.LM_eps1=val;}
inline void setLM_tau(double val){GCSsys.LM_tau=val;}

View File

@@ -166,7 +166,8 @@ System::System()
LM_eps(1E-10), LM_eps1(1E-80), LM_tau(1E-3),
DL_tolg(1E-80), DL_tolx(1E-80), DL_tolf(1E-10),
LM_epsRedundant(1E-10), LM_eps1Redundant(1E-80), LM_tauRedundant(1E-3),
DL_tolgRedundant(1E-80), DL_tolxRedundant(1E-80), DL_tolfRedundant(1E-10)
DL_tolgRedundant(1E-80), DL_tolxRedundant(1E-80), DL_tolfRedundant(1E-10),
qrpivotThreshold(1E-13)
{
// currently Eigen only supports multithreading for multiplications
// There is no appreciable gain from using more threads
@@ -1818,7 +1819,7 @@ int System::diagnose(Algorithm alg)
paramsNum = qrJT.rows();
constrNum = qrJT.cols();
qrJT.setThreshold(1e-13);
qrJT.setThreshold(qrpivotThreshold);
rank = qrJT.rank();
if (constrNum >= paramsNum)
@@ -1839,7 +1840,7 @@ int System::diagnose(Algorithm alg)
paramsNum = SqrJT.rows();
constrNum = SqrJT.cols();
SqrJT.setPivotThreshold(1e-13);
SqrJT.setPivotThreshold(qrpivotThreshold);
rank = SqrJT.rank();
if (constrNum >= paramsNum)
@@ -1858,7 +1859,8 @@ int System::diagnose(Algorithm alg)
stream << ", Threads: " << Eigen::nbThreads()
#ifdef EIGEN_VECTORIZE
<< ", Vectorization: On"
#endif
#endif
<< ", Pivot Threshold: " << qrpivotThreshold
<< ", Params: " << paramsNum
<< ", Constr: " << constrNum
<< ", Rank: " << rank << "\n";

View File

@@ -103,6 +103,7 @@ namespace GCS
double convergence;
double convergenceRedundant;
QRAlgorithm qrAlgorithm;
double qrpivotThreshold;
DebugMode debugMode;
double LM_eps;
double LM_eps1;