jnxd wrote: ↑Mon Nov 07, 2022 7:56 pm
I went a little deeper while in the code, and I see a
while (1) in
System::identifyConflictingRedundantConstraints.
I see. That while loop is for the popularity contest to rule on redundant/conflicting constraints.
When doing the QR decomposition of the Jacobian of constraints, the number of rows of constraints does not match the number of DoFs taken (i.e. the number of linearly independent rows, i.e. the rank of the Jacobian). This happens because: a) there are conflicting constraints or b) there are redundant constraints.
So the first finding (upstream), in
System::diagnose(...), is that
identifyConflictingRedundantConstraints(...) is called. Thus there are (most likely unless something is really wrong) redundant solver constraints, which should not be the case in such a simple tangency.
Because of pivoting and row permutations during QR decomposition, these redundant/conflicting constraints appear in the R matrix (the upper triangular matrix of the QR decomposition), non-zeros over the pivot are removed, so as to identify the actual constraints.
The popularity contest works by identifying which of those constraints are the ones that should be removed, to tell the user and to solve a temporary system to see if it converges or not, to decide whether they are conflicting or redundant constraints. This should not hang despite the while(1).
I wrote that above as it is good that more of us are aware of how it works.
So:
- Problem 1: there are redundant constraints, and we need to log that Jacobian and R matrix to a file and to see what is generating that redundancy.
- Problem 2: I changed the popularity contest very recently so that internal alignment constraints are not shown as redundant. Here I need to see if I need to consider an additional exit condition in case internal alignment constraints alone generate a redundancy. Somehow, this should not be necessary when internal alignment constraints are not redundant in the first place, but the cost for a user, if this goes into production, is high.
I will look into it.
EDIT: The solution should not really be to accept redundant constraints of internal alignment. Look at which constraints it is indicating that should be removed...