PlaneGCSSolver_Solver::PlaneGCSSolver_Solver()
: myEquationSystem(new GCS::System),
+ myDiagnoseBeforeSolve(false),
myConfCollected(false),
myDOF(0)
{
myParameters.push_back(aResult);
if (myConstraints.empty() && myDOF >= 0)
++myDOF; // calculate DoF by hand if and only if there is no constraints yet
+ else
+ myDiagnoseBeforeSolve = true;
return aResult;
}
return STATUS_INCONSISTENT;
Events_LongOp::start(this);
+ if (myDiagnoseBeforeSolve)
+ diagnose();
// solve equations
GCS::SolveStatus aResult = (GCS::SolveStatus)myEquationSystem->solve(myParameters);
Events_LongOp::end(this);
int PlaneGCSSolver_Solver::dof()
{
if (myDOF < 0 && !myConstraints.empty())
- solve();
+ diagnose();
return myDOF;
}
{
myEquationSystem->declareUnknowns(myParameters);
myDOF = myEquationSystem->diagnose();
+ myDiagnoseBeforeSolve = false;
}
ConstraintMap myConstraints; ///< list of constraints
std::shared_ptr<GCS::System> myEquationSystem; ///< set of equations for solving in FreeGCS
+ bool myDiagnoseBeforeSolve; ///< is the diagnostic necessary
GCS::SET_I myConflictingIDs; ///< list of IDs of conflicting constraints
-
/// specifies the conflicting constraints are already collected
bool myConfCollected;