Unable to assign to variable in SS 0.98.5981 when using FindRoot Function

Unable to assign to variable in SS 0.98.5981 when using FindRoot Function - Poruke

#1 Objavljeno: 18. 5. 2016. 09:20:15
NDTM Amarasekera

NDTM Amarasekera

130 svidjanja u 352 postova.

Grupa: User

Wrote

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 (40,22 KiB) preuzeto 1399 put(ova).

Above file was extracted from the original file Channel Design-using FindRoot-R1.sm (206,01 KiB) preuzeto 1414 put(ova). 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.

Screenshot - Unit problem.png
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#2 Objavljeno: 18. 5. 2016. 10:05:46
Alexander O. Melnik

Alexander O. Melnik

127 svidjanja u 498 postova.

Grupa: Moderator

Wrote

Wrote

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 (40,22 KiB) preuzeto 1399 put(ova).

Above file was extracted from the original file Channel Design-using FindRoot-R1.sm (206,01 KiB) preuzeto 1414 put(ova). 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.

Screenshot - Unit problem.png



Your worksheet will work in latest stable release 5935. The error you are facing is likely due http://smath.info/bts/Issues/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.
#3 Objavljeno: 18. 5. 2016. 10:07:09
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

It works, version 5346 UNofficial distribution

Forum FindRoots.gif
#4 Objavljeno: 18. 5. 2016. 11:38:04
NDTM Amarasekera

NDTM Amarasekera

130 svidjanja u 352 postova.

Grupa: User

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.
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#5 Objavljeno: 19. 5. 2016. 19:06:54
Andrey Ivashov

Andrey Ivashov

2.345 svidjanja u 4.060 postova.

Grupa: Super Administrator

Thank you! I will check this before next stable release.

But for now it can be fixed by plug-ins developer as I've suggested here: http://en.smath.info/forum/yaf_postsm33336_SMath-Studio-0-98-5973--09-May-2016.aspx#post33336

Let me know if any help from my side required.

Regards.
1 korisnika je svidelo ovu objavu
Davide Carpi 19. 5. 2016. 19:52:00
#6 Objavljeno: 20. 5. 2016. 12:09:19
Alexander O. Melnik

Alexander O. Melnik

127 svidjanja u 498 postova.

Grupa: Moderator

Wrote

Wrote

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 (40,22 KiB) preuzeto 1399 put(ova).

Above file was extracted from the original file Channel Design-using FindRoot-R1.sm (206,01 KiB) preuzeto 1414 put(ova). 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.

Screenshot - Unit problem.png



A working fix is to use line() in the function definition. Hope this helps Andrey to find a permanent fix.

Test_FindRoot-1.sm (40,68 KiB) preuzeto 1388 put(ova).
1 korisnika je svidelo ovu objavu
Davide Carpi 20. 5. 2016. 14:05:00
#7 Objavljeno: 20. 5. 2016. 16:46:55
Alexander O. Melnik

Alexander O. Melnik

127 svidjanja u 498 postova.

Grupa: Moderator

Wrote



A working fix is to use line() in the function definition. Hope this helps Andrey to find a permanent fix.

Test_FindRoot-1.sm (40,68 KiB) preuzeto 1388 put(ova).



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 (6,15 KiB) preuzeto 1463 put(ova).
BugFR.png

#8 Objavljeno: 20. 5. 2016. 17:41:17
Davide Carpi

Davide Carpi

1.444 svidjanja u 2.936 postova.

Grupa: Moderator

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.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#9 Objavljeno: 26. 5. 2016. 19:54:14
Andrey Ivashov

Andrey Ivashov

2.345 svidjanja u 4.060 postova.

Grupa: Super Administrator

So, new build is here: http://en.smath.info/forum/yaf_postsm34488_SMath-Studio-0-98-5990--26-May-2016.aspx#post34488

It has corrections related to this topic.

I suggest to update plug-ins according to this comment: http://en.smath.info/forum/yaf_postsm33336_SMath-Studio-0-98-5973--09-May-2016.aspx#post33336

I you have to use not updated plug-in please give a chance to eval() function:
fixed_file_def.png

Why these changes are done:
diff_5990.png

Regards.
1 korisnika je svidelo ovu objavu
Davide Carpi 26. 5. 2016. 20:05:00
#10 Objavljeno: 26. 5. 2016. 20:06:17
Davide Carpi

Davide Carpi

1.444 svidjanja u 2.936 postova.

Grupa: Moderator

Thank you Andrey

I'm reworking the core of this plugin, will be back ASAP.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#11 Objavljeno: 26. 5. 2016. 23:20:58
Alexander O. Melnik

Alexander O. Melnik

127 svidjanja u 498 postova.

Grupa: Moderator

This still does not work:
Wrote


BugFR.sm (6,15 KiB) preuzeto 1463 put(ova).
BugFR.png



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!!???
#12 Objavljeno: 2. 6. 2016. 14:19:47
Andrey Ivashov

Andrey Ivashov

2.345 svidjanja u 4.060 postova.

Grupa: Super Administrator

Finally fixed.
Please check the latest nightly build (Note: it is required to download of the latest Nonlinear Solvers plug-in).
2 korisnika je svidelo ovu objavu
Davide Carpi 2. 6. 2016. 15:32:00, Alexander O. Melnik 2. 6. 2016. 16:20:00
#13 Objavljeno: 2. 6. 2016. 15:27:00
Alexander O. Melnik

Alexander O. Melnik

127 svidjanja u 498 postova.

Grupa: Moderator

Can someone please check this file?
BugFR.sm (6,15 KiB) preuzeto 1463 put(ova).


It still does not work with 0.98.5997 and updated non-linear solvers on my machine

Thanks!
#14 Objavljeno: 2. 6. 2016. 15:35:00
Davide Carpi

Davide Carpi

1.444 svidjanja u 2.936 postova.

Grupa: Moderator

Thank you Andrey

Wrote

Can someone please check this file?
BugFR.sm (6,15 KiB) preuzeto 1463 put(ova).


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.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 korisnika je svidelo ovu objavu
Alexander O. Melnik 2. 6. 2016. 16:21:00
#15 Objavljeno: 2. 6. 2016. 16:19:55
Alexander O. Melnik

Alexander O. Melnik

127 svidjanja u 498 postova.

Grupa: Moderator

Wrote

Thank you Andrey

Wrote

Can someone please check this file?
BugFR.sm (6,15 KiB) preuzeto 1463 put(ova).


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!!!
#16 Objavljeno: 2. 6. 2016. 16:49:28
Davide Carpi

Davide Carpi

1.444 svidjanja u 2.936 postova.

Grupa: Moderator

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".
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 korisnika je svidelo ovu objavu
Alexander O. Melnik 2. 6. 2016. 16:55:00
#17 Objavljeno: 3. 6. 2016. 02:55:30
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

with Smath 5346 UNofficial release. No idea if it makes sense ?

Forum FindRoots 5346.gif
#18 Objavljeno: 5. 6. 2016. 19:19:30
Davide Carpi

Davide Carpi

1.444 svidjanja u 2.936 postova.

Grupa: Moderator

Wrote

with Smath 5346 UNofficial release. No idea if it makes sense ?

Forum FindRoots 5346.gif



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 please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
  • Novi postovi
  • Nema novih postova