Skip to content

Commit

Permalink
Sketcher: DL Solver Debug Improvement
Browse files Browse the repository at this point in the history
=====================================

- In "Iteration Level" debug mode, DL now shows the stop condition code.
- More debug code
  • Loading branch information
abdullahtahiriyo authored and wwmayer committed Jun 24, 2015
1 parent efb08cd commit 8f68b14
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Mod/Sketcher/App/planegcs/GCS.cpp
Expand Up @@ -1395,6 +1395,7 @@ int System::solve_DL(SubSystem* subsys, bool isRedundantsolving)
<< ", tolf: " << tolf
<< ", convergence: " << (isRedundantsolving?convergenceRedundant:convergence)
<< ", xsize: " << xsize
<< ", csize: " << csize
<< ", maxIter: " << maxIterNumber << "\n";

const std::string tmp = stream.str();
Expand Down Expand Up @@ -1549,6 +1550,15 @@ int System::solve_DL(SubSystem* subsys, bool isRedundantsolving)
}

subsys->revertParams();

if(debugMode==IterationLevel) {
std::stringstream stream;

stream << "DL: stopcode: " << stop << ((stop == 1) ? ", Success" : ", Failed") << "\n";

const std::string tmp = stream.str();
Base::Console().Log(tmp.c_str());
}

return (stop == 1) ? Success : Failed;
}
Expand Down Expand Up @@ -1992,6 +2002,10 @@ int System::diagnose(Algorithm alg)
redundant.insert(*constr);
}
resetToReference();

if(debugMode==Minimal || debugMode==IterationLevel) {
Base::Console().Log("Sketcher Redundant solving: %d redundants\n",redundant.size());
}

std::vector< std::vector<Constraint *> > conflictGroupsOrig=conflictGroups;
conflictGroups.clear();
Expand Down

0 comments on commit 8f68b14

Please sign in to comment.