1AUG2019 SolveSys  Equation Library and Nonlinear Systems Solver

02092017, 09:35 PM
(This post was last modified: 02092017 09:49 PM by Han.)
Post: #3




RE: SolveSys  Equation Library and Multiple Equations Solver
(02092017 08:42 PM)akmon Wrote: Hello, downloaded beta version. Thank you for your efforts on try to have a solvesys like HP50, one of the most important programs, I think. If I recall correctly, that pair of values results in a nearlysingular Jacobian (likely singular due to floating point issues). But getting there was likely due to a few other issues. The SVD program had a few bugs in it (update again, even if you already did so recently). The other issue is due to CAS corruption, for which the current workaround is to use the restart command in the CAS view and rebuild the SVD program by opening and closing its source file. I can still get both solutions to this system (in the 0.500 version) by setting x to 1e20 and F to 1e10. The F value I think should be selfexplanatory but the x labeling for the other tolerance may be a bit misleading. It is really a measure of the change in the x_i's relative to the norm of the previous solution. So if u want 4 digits of accuracy and your solution is in the order of 1e10, then you should try setting x to 1e16. May I can change this later on to "number of digits" rather than a "tolerance" value to reflect the true behavior of that value. Also, F should be set to be a 1e10 (or smaller) since 1.27e10 would be pretty close to the error itself (similar reasoning). When using (1,1) and (1,2) for initial values, I get the two separate solutions. Lastly, keep in mind that the (now prior) version was just Newton's method and is highly likely to wander off into "lala" land. In your case, you probably landed in a spot where the Jacobian is nearly singular (or in fact singular but not shown to be so due to typical floating point issues). You can check this by using svd2(ssJ)  make sure to do this in the CAS view. The "middle" vector lists the singular values. If any of them are close to zero, then the Jacobian is (likely) rankdeficient. The newer version has backtracking line search. I still need to tweak the exit conclusions (i.e. how to classify supposed solutions). I just updated the program; I appreciate your continued efforts to test the solver. EDIT: I should mention that I am able to get it to run on the real calculator after having tweaked a few spots where iferr blocks were used. It would seem that iferr and return calls are currently misbehaving so that repeated instances would lead to a warmstart. I worked around that issue by modifying the code to not rely on iferr. Graph 3D  QPI  SolveSys 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)