loop for routine

loop for routine - Messages

#1 Posted: 5/23/2014 7:24:24 PM
ingciv

ingciv

0 likes in 4 posts.

Group: User

Hello:

I need help with this routine. I created a loop with while function, but it takes too long in finding a solution.

I think code its OK, but I dont know the software limitations... (I programmed the same in scilab and worked well)

Thanks in advance.
Ultimate Strength Analysis_v0.0.sm (32 KiB) downloaded 57 time(s).
#2 Posted: 5/24/2014 2:23:18 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello,

It seems (not sure) that your code does not change the exit loop condition and you are in infinite loop - see the picture please.

Regards,
Radovan

auxtrace.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Posted: 5/24/2014 2:24:07 PM
ingciv

ingciv

0 likes in 4 posts.

Group: User

Wrote

Hello,

It seems (not sure) that your code does not change the exit loop condition and you are in infinite loop - see the picture please.

Regards,
Radovan



But why?? I tried to use a for loop, but it's the same result. First I thougth it was because of the units, so I take them away from the matrixes, but now I'm running out of ideas...

I tried doing a second loop, without for or while, but again the same...
Ultimate Strength Analysis_4.1.sm (44 KiB) downloaded 47 time(s).
#4 Posted: 5/24/2014 4:55:39 PM
overlord

overlord

551 likes in 1332 posts.

Group: Moderator

at the end of iteration, nothing changes. iteration means values you start with have to change for the next iteration. same values are being used in every iteration. same aux is being calculated every time. the loop can not end this way. at the end, i am saying the same thing that omorr have said i hope i could help.
#5 Posted: 5/24/2014 5:06:19 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote



I tried doing a second loop, without for or while, but again the same...



If you set all regions to optimization> numeric (in the context menu, after marking them all with Ctrl-A), then I see no problems in the attachment 4.1.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#6 Posted: 5/24/2014 5:38:16 PM
ingciv

ingciv

0 likes in 4 posts.

Group: User

Wrote

at the end of iteration, nothing changes. iteration means values you start with have to change for the next iteration. same values are being used in every iteration. same aux is being calculated every time. the loop can not end this way. at the end, i am saying the same thing that omorr have said i hope i could help.



you were rigth, i forgot to redefine xIC_ini in the last else... thanks

#7 Posted: 5/24/2014 5:43:21 PM
ingciv

ingciv

0 likes in 4 posts.

Group: User

Wrote

Wrote



I tried doing a second loop, without for or while, but again the same...



If you set all regions to optimization> numeric (in the context menu, after marking them all with Ctrl-A), then I see no problems in the attachment 4.1.




THANKS, it was the optimization method, everithing works fine with numeric
#8 Posted: 5/25/2014 2:10:20 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

One more example related to Numerical-Symbolical optimization. There were already many of them here on the Forum. Just to remember that Martin proposed the Numerical optimization should be the default one - not the Symbolical. On the other hand, regarding the way Smath is working I have the impression that this will not be possible and this situation of Symbolic optimization used by default will remain. Am I right about it, or not ???

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
  • New Posts New Posts
  • No New Posts No New Posts