New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FindWhichToRemoveToFixJacobian can be very slow #131
Comments
@whitequark, we can limit number of constraints when FindWhichToRemoveToFixJacobian should be performed, if greater, we just report an error without "fixing" constraints list. |
@Evil-Spirit is there no faster way than just bruteforce? |
@whitequark, Yes, we can be a little bit faster now (~3 times faster with the current example) if we just rewrite SolveBySubstitution for linear complexity instead of square. I actually done this for NotSolveSpace and this is huge speedup when we have a large amount of h,v,pc. The other two hot functions WriteJacobian and CalculateRank. The first can be performed once and used for many times, and the second can be low-level optimized or replaced in future by external linear system solver functions. |
@Evil-Spirit OK, this sounds like something useful to be done. For now it is low priority though. |
@whitequark, |
@whitequark |
Doesn't apply on master anymore. |
@whitequark, OK I am rebasing |
# Conflicts: # src/solvespace.h # src/system.cpp
@whitequark, but this is works bad after we add forceDofCheck. try to comment forceDofCheck inside FindWhichToRemoveToFixJacobian to allow SolveBySubstitution run. It will be fast for constraintfreeze.slvs. But this will not consider some cases with double-hvpc |
@Evil-Spirit how to fix this? |
@whitequark, For now I only can suggest to limit FindWhichToRemoveToFixJacobian by time. For constraintfreeze it's over 600 equations if we don't appy solvebysubstitution, so we can just give up until we involve sparse-matix algorithms. The second way - is to find double constraints like hvpc |
@Evil-Spirit ok. is there any benefit from your updated patch? |
@whitequark, only if we choose "finding the same multiple hvpc". if we bound by time, there is no point. |
@Evil-Spirit ok. let's add a 1000ms time limit, and indicate in the text window if it was reached. |
@whitequark, acc. |
@whitequark, implemented here |
Add a timeout when listing redundant constraints is taking too long.
…g which constraints can be removed to fix jacobian.
See constrainfreeze.zip--try adding a redundant constraint.
From http://solvespace.com/forum.pl?action=viewthread&parent=1705.
The text was updated successfully, but these errors were encountered: