SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
Unable to assign to variable in SS 0.98.5981 when using FindRoot Function
Rank: Advanced Member Groups: Registered
Joined: 05/06/2014(UTC) Posts: 348 Location: Colombo Was thanked: 127 time(s) in 82 post(s)
|
Originally Posted by: ndtma Hi The "Open Channel Design" file attached earlier had erros inside the program section in calculating the critical slopes for each bed width. The corrected program is attached now. Regret any inconvenience. Now I observe that the result of FindRoot function unable to assign to a variable in attached SS file. Test_FindRoot-1.sm (41kb) downloaded 32 time(s).Above file was extracted from the original file Channel Design-using FindRoot-R1.sm (207kb) downloaded 20 time(s). for testing, but both had the same problem under SS 0.98.5981. However, it was perfectly OK when I uploaded on 18th Oct. 2015 (cannot remember the SS version). As Andrey has suggested, I did a clean installtion of SS, but the problem still exists. Another isuue is also shown in the image. Edited by moderator 20 May 2016 20:08:01(UTC)
| Reason: marked as issue |
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 03/03/2014(UTC) Posts: 418 Was thanked: 125 time(s) in 96 post(s)
|
Originally Posted by: ndtma Originally Posted by: ndtma Hi The "Open Channel Design" file attached earlier had erros inside the program section in calculating the critical slopes for each bed width. The corrected program is attached now. Regret any inconvenience. Now I observe that the result of FindRoot function unable to assign to a variable in attached SS file. Test_FindRoot-1.sm (41kb) downloaded 32 time(s).Above file was extracted from the original file Channel Design-using FindRoot-R1.sm (207kb) downloaded 20 time(s). for testing, but both had the same problem under SS 0.98.5981. However, it was perfectly OK when I uploaded on 18th Oct. 2015 (cannot remember the SS version). As Andrey has suggested, I did a clean installtion of SS, but the problem still exists. Another isuue is also shown in the image. Your worksheet will work in latest stable release 5935. The error you are facing is likely due http://smath.info/bts/Is...IssueDetail.aspx?id=2318; I have a worksheet that is broken due to this and Andrey said he will fix it in the next nightly. Regarding 3m - 2m = m, well I do hope Andrey will fix this - it is clearly an undesired behaviour. Edited by moderator 18 May 2016 21:09:51(UTC)
| Reason: fixed link to BTS
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
It works, version 5346 UNofficial distribution
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 05/06/2014(UTC) Posts: 348 Location: Colombo Was thanked: 127 time(s) in 82 post(s)
|
Thanks Alex and Jean for the clarifications. I tried in SS 5935 but not successful. I hope these issues will be resolved by Andrey at his earliest. Many thanks to Andrey for your great efforts and contributions in this regard. Edited by user 18 May 2016 17:42:56(UTC)
| Reason: Not specified |
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
|
1 user thanked Andrey Ivashov for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 03/03/2014(UTC) Posts: 418 Was thanked: 125 time(s) in 96 post(s)
|
Originally Posted by: ndtma Originally Posted by: ndtma Hi The "Open Channel Design" file attached earlier had erros inside the program section in calculating the critical slopes for each bed width. The corrected program is attached now. Regret any inconvenience. Now I observe that the result of FindRoot function unable to assign to a variable in attached SS file. Test_FindRoot-1.sm (41kb) downloaded 32 time(s).Above file was extracted from the original file Channel Design-using FindRoot-R1.sm (207kb) downloaded 20 time(s). for testing, but both had the same problem under SS 0.98.5981. However, it was perfectly OK when I uploaded on 18th Oct. 2015 (cannot remember the SS version). As Andrey has suggested, I did a clean installtion of SS, but the problem still exists. Another isuue is also shown in the image. A working fix is to use line() in the function definition. Hope this helps Andrey to find a permanent fix. Test_FindRoot-1.sm (41kb) downloaded 19 time(s).
|
1 user thanked Alex M. for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 03/03/2014(UTC) Posts: 418 Was thanked: 125 time(s) in 96 post(s)
|
Originally Posted by: Alex.M A working fix is to use line() in the function definition. Hope this helps Andrey to find a permanent fix. Test_FindRoot-1.sm (41kb) downloaded 19 time(s). Well I tried... It is still not possible to assign a value to a variable using FindRoot(). This nightly is officially broken for me - I NEED A WORKING SOLVER. Back to stable release... BugFR.sm (7kb) downloaded 41 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
Currently the solution indicated by Andrey applied without other changes makes the function not working even when used in the left side (makes the example file provided by ndtma not working at all); however seems the right way, I'm working on a solution based on this approach. Edited by user 21 May 2016 22:14:47(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
|
1 user thanked Andrey Ivashov for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
Thank you Andrey I'm reworking the core of this plugin, will be back ASAP. |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 03/03/2014(UTC) Posts: 418 Was thanked: 125 time(s) in 96 post(s)
|
This still does not work: Originally Posted by: Alex.M I am a little needy here, because without a working FindRoot() function I am left without a solver that I can use to assign values to variables. I do this all the time in tasks similar to... How many stirrups do I need in this RC beam? Hope you guys can get me the FIndRoot() back :-) ... A peculiar occurrence. If you place the cursor inside the first red box and hit Ctrl + >, the 2nd red box will evaluate correctly. Magic!!??? Edited by user 27 May 2016 05:24:04(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
Finally fixed. Please check the latest nightly build (Note: it is required to download of the latest Nonlinear Solvers plug-in).
|
2 users thanked Andrey Ivashov for this useful post.
|
on 02/06/2016(UTC), on 02/06/2016(UTC)
|
|
Rank: Advanced Member Groups: Registered
Joined: 03/03/2014(UTC) Posts: 418 Was thanked: 125 time(s) in 96 post(s)
|
Can someone please check this file? BugFR.sm (7kb) downloaded 41 time(s).It still does not work with 0.98.5997 and updated non-linear solvers on my machine Thanks!
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
Thank you Andrey Originally Posted by: Alex.M Can someone please check this file? BugFR.sm (7kb) downloaded 41 time(s).It still does not work with 0.98.5997 and updated non-linear solvers on my machine Thanks! It works as it should. You assign A.v in the first solution, thus in the second (C:...) there's nothing to solve. Use Clear(A.v) after the first to make it working the 2nd. Edited by user 02 June 2016 21:43:24(UTC)
| Reason: marked as Fixed |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 03/03/2014(UTC) Posts: 418 Was thanked: 125 time(s) in 96 post(s)
|
Originally Posted by: Davide Carpi Thank you Andrey Originally Posted by: Alex.M Can someone please check this file? BugFR.sm (7kb) downloaded 41 time(s).It still does not work with 0.98.5997 and updated non-linear solvers on my machine Thanks! It works as it should. You assign A.v in the first solution, thus in the second (C:...) there's nothing to solve. Use Clear(A.v) after the first to make it working the 2nd. Thank you, I was not aware that FindRoot() automatically asssigns the result to a variable. I guess I was just stirring mud here.. Actually if this is correct this feature might be undesirable. What if you wooul like to solve a list of equations that have same variable? You will have to use "clear" every time... Thank you Andrey!!! Edited by user 02 June 2016 22:22:57(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
I know, and there are several other drawbacks related to this feature; as mentioned in the BTS some days ago about one of these drawbacks, in the next plugin version this feature will be removed. Boolean equal in initial guess will means "use these values as initial guess for that unknown". Edited by user 02 June 2016 22:53:25(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
with Smath 5346 UNofficial release. No idea if it makes sense ?
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
Originally Posted by: Jean Giraud with Smath 5346 UNofficial release. No idea if it makes sense ? I cannot reproduce neither with version 1.0999.5 of the plugin nor with later versions (strange). I suppose it may have sense, in some way, since undefined variables are store as names. However the second result is wrong, so something definitely goes wrong in that case :/ |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
Unable to assign to variable in SS 0.98.5981 when using FindRoot Function
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.