Cicle for interaction

Cicle for interaction - Set correctly a for cicle - Mensajes

#1 Publicado: 9/1/2024 8:45:31
Alessandro

Alessandro

1 me gusta en 18 mensajes.

Grupo: User

Hi to everybody.
I've got a problem with an interactive assessment of a parameter.
I'm not able to set in the correct manner a "for Cicle".
The general problem is this one
Procedura.PNG
I need to set an initial lenght L0=6b, than
-if the ratio between y/b<0.1 the cicle end and i obtain the value that i need (y and L);
- if the ratio between y/b>0.1 and <0.6 i need to continue the cicle until convergence
Archivo no encontrado.Archivo no encontrado.Archivo no encontrado.

I'm not able to set the correct fuunction
Archivo no encontrado.Archivo no encontrado.

Someone can help setting for me the formulation?

I attach the file below, need to be open with the related excell

Archivo no encontrado.Archivo no encontrado.

Thancks in advance for any answere!
A 1 usuarios les gustó este mensaje
ioan92 10/1/2024 17:03:00
#2 Publicado: 10/1/2024 17:14:49
ioan92

ioan92

181 me gusta en 125 mensajes.

Grupo: User

Hi Ale_Biaso,
Happy New Year to You and to all SMath users and developers!


1. Congratulations for your interesting and useful work.
2. Thanks for the extensive publication of this work.
3. It is not a simple task to check it all. That’s why I kept my first attention to identify the reasons of “red-marked” errors on your sm file.[/list]
4. Here are some identified reasons of such errors.
Simple pragmatic suggestion: when I have such errors, firstly I display the values of each term to see if they are already defined:

2024-01-10 -Biaso.png

d is not an index; L is not defined, etc !
5. I keep ready to look for a further evolution of your work.
Best Regards,
Ioan

PS: If I may adding some suggestions it will be:
* For the working phase, I use "no limits pages" screen
* Separate "the cosmetics aspects" from the basic robust algorithm. Keep this for a distinct operation...

Buona Fortuna,

Ioan

Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov
#3 Publicado: 10/1/2024 22:56:15
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

Hi to everybody.
I've got a problem with an interactive assessment of a parameter.
I'm not able to set in the correct manner a "for Circle"


Recast as suggested by Ioan ... attach.
Generally, Bolean must be specified completely.
Sometimes, immaterial.
Jean

#4 Publicado: 11/1/2024 6:41:20
Alessandro

Alessandro

1 me gusta en 18 mensajes.

Grupo: User

Wrote

Hi to everybody.
I've got a problem with an interactive assessment of a parameter.
I'm not able to set in the correct manner a "for Cicle".
The general problem is this one
Procedura.PNG
I need to set an initial lenght L0=6b, than
-if the ratio between y/b<0.1 the cicle end and i obtain the value that i need (y and L);
- if the ratio between y/b>0.1 and <0.6 i need to continue the cicle until convergence
Archivo no encontrado.Archivo no encontrado.Archivo no encontrado.

I'm not able to set the correct fuunction
Archivo no encontrado.Archivo no encontrado.

Someone can help setting for me the formulation?

I attach the file below, need to be open with the related excell

Archivo no encontrado.Archivo no encontrado.

Thancks in advance for any answere!



I reply here to your advices.

I tried to semplify the spreadsheet in order to focus aptention on the iteractive process that i'd like to assess.
I explicate even the main process that i tried to set into formulation but that doesn't works because i don't understand the correct syntax of a "for cicle"

All my consideration are into the smath file and summaryzed below.

If someone have time to take a look and fix the mistakes of the cicle only i'll be very gratefull.
Considerazioni.PNG
Ciclo.PNG

I attached the simplify file below (always need to be opend in the same folder of related excel)
Ciclo for semplificato_R1.sm (5,47 MiB) descargado 1635 vez(es).
413-Camino Alabama-Modale_R1.xlsx (300,5 KiB) descargado 1130 vez(es).

Thancks for your time
#5 Publicado: 11/1/2024 18:16:41
sergio

sergio

127 me gusta en 342 mensajes.

Grupo: User

In fact I see at least two incorrect or suspicious situations:
1) what appears to be an assignment is performed with = instead of :=
2) j of the for loop is a counter but here it is referred to as a series of values ​​with units of measurement. I'll show you a simple working example

Mostrar spoiler


Mostrar spoiler



sergio
#6 Publicado: 11/1/2024 19:22:50
Davide Carpi

Davide Carpi

1.443 me gusta en 2.936 mensajes.

Grupo: Moderator

Hi Ale,

That's one way to do it (a backbone)

Archivo no encontrado.Archivo no encontrado.


P.S. I'd suggest to use the multiple if/else instead of the nested if/else to improve the readability (just add more argument separators in the standard if/else)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#7 Publicado: 12/1/2024 16:34:37
Alessandro

Alessandro

1 me gusta en 18 mensajes.

Grupo: User

Thacks a lot for your advices!
  • Nuevos mensajes
  • Sin mensajes nuevos