GCS: Augment information provided by GCS with groups of dependent parameters

This commit is contained in:
Abdullah Tahiri
2020-12-19 07:58:49 +01:00
committed by abdullahtahiriyo
parent 3605770b68
commit 54373798cd
2 changed files with 8 additions and 3 deletions

View File

@@ -531,6 +531,7 @@ void System::clear()
pdrivenlist.clear();
pIndex.clear();
pdependentparameters.clear();
pdependentelementgroups.clear();
hasUnknowns = false;
hasDiagnosis = false;
@@ -4228,19 +4229,19 @@ void System::identifyDependentParameters( T & qrJ,
if(!silent)
SolverReportingManager::Manager().LogMatrix("Rparams", Rparams);
#endif
//std::vector< std::vector<double *> > dependencyGroups(SqrJ.cols()-rank);
pdependentelementgroups.resize(qrJ.cols()-rank);
for (int j=rank; j < qrJ.cols(); j++) {
for (int row=0; row < rank; row++) {
if (fabs(Rparams(row,j)) > 1e-10) {
int origCol = qrJ.colsPermutation().indices()[row];
//dependencyGroups[j-rank].push_back(pdiagnoselist[origCol]);
pdependentelementgroups[j-rank].push_back(pdiagnoselist[origCol]);
pdependentparameters.push_back(pdiagnoselist[origCol]);
}
}
int origCol = qrJ.colsPermutation().indices()[j];
//dependencyGroups[j-rank].push_back(pdiagnoselist[origCol]);
pdependentelementgroups[j-rank].push_back(pdiagnoselist[origCol]);
pdependentparameters.push_back(pdiagnoselist[origCol]);
}
}

View File

@@ -104,6 +104,10 @@ namespace GCS
VEC_pD pdependentparameters; // list of dependent parameters by the system
// This is a map of primary and secondary identifiers that are found dependent by the solver
// GCS ignores from a type point
std::vector< std::vector<double *> > pdependentelementgroups;
std::vector<Constraint *> clist;
std::map<Constraint *,VEC_pD > c2p; // constraint to parameter adjacency list
std::map<double *,std::vector<Constraint *> > p2c; // parameter to constraint adjacency list