Reword error messages that are displayed when a group fails to solve.

The current messages accurately reflect what happens to the system
of equations that represents the sketch, but can be quite confusing
to users that only think in terms of the constraints.

We use "unsolvable" and not "impossible" because while most of
the cases that result in this error message will indeed stem from
mutually exclusive sets of constraints, it is still possible that
there is some solution that our solver is unable to find using
numeric methods.
This commit is contained in:
whitequark 2016-01-21 08:05:21 +00:00
parent 3b31ab9190
commit 981f772d81
3 changed files with 8 additions and 6 deletions

View File

@ -212,7 +212,7 @@ default: dbp("bad constraint type %d", sc->type); return;
ssys->result = SLVS_RESULT_DIDNT_CONVERGE;
break;
case System::SINGULAR_JACOBIAN:
case System::REDUNDANT:
ssys->result = SLVS_RESULT_INCONSISTENT;
break;

View File

@ -322,10 +322,12 @@ public:
bool NewtonSolve(int tag);
static const int SOLVED_OKAY = 0;
static const int DIDNT_CONVERGE = 10;
static const int SINGULAR_JACOBIAN = 11;
static const int TOO_MANY_UNKNOWNS = 20;
enum {
SOLVED_OKAY = 0,
DIDNT_CONVERGE = 10,
REDUNDANT = 11,
TOO_MANY_UNKNOWNS = 20
};
int Solve(Group *g, int *dof, List<hConstraint> *bad,
bool andFindBad, bool andFindFree);
};

View File

@ -459,7 +459,7 @@ int System::Solve(Group *g, int *dof, List<hConstraint> *bad,
if(andFindBad) {
FindWhichToRemoveToFixJacobian(g, bad);
}
return System::SINGULAR_JACOBIAN;
return System::REDUNDANT;
}
// This is not the full Jacobian, but any substitutions or single-eq
// solves removed one equation and one unknown, therefore no effect