Iteration of values to satisfy an inequality - The first given value "d" must be adjusted until reaching the maximum value that satisfies the inequ - Сообщения

Now I have an initial value "d", this value must be adjusted to satisfy the inequality between two functions that depend on this value "d": V.u≤ϕ*V.c
I want to find the maximum value of "d".
If the initial value of "d" does not satisfy the inequality, that is, V.u> ϕV.c, the value "d" must be increased by 0.05 and if the inequality V.u≤ϕ*V.c is fulfilled, the value must be decreased of "d" by 0.05 until the maximum value of "d" that satisfies the inequality is found. I attach a file of the different ways I tried to get the results but being a neophyte in the use of smath studio I still don't understand what I'm failing.
ITERACION2.sm (22 КиБ) скачан 25 раз(а).
WroteContinuing with the iterations
As it looks, it is a suite ... best not to switch to different thread.
Can you be more descriptive of the objective on the document.
Cheers ... Jean.
WroteWroteContinuing with the iterations
As it looks, it is a suite ... best not to switch to different thread.
Can you be more descriptive of the objective on the document.
Cheers ... Jean.
I already solved the iteration, here the final file
If any improvements can be made to it with the "for" command or something similar, I would appreciate the suggestion.
IterRevFinal.sm (21 КиБ) скачан 41 раз(а).
WroteI already solved the iteration, here the final file
If any improvements can be made to it with the "for" command or something similar,
I would appreciate the suggestion.
1. I don't like min/max as they have undocumented utilities.
2. Complete Bolean suggested.
3. Once done, isolate/store
Good job. Cheers ... Jean.
IterRevFinal.sm (22 КиБ) скачан 23 раз(а).
WroteIf any improvements can be made to it with the "for" command or something similar, I would appreciate the suggestion.
IterRevFinal.sm (21 КиБ) скачан 41 раз(а).
Hola Orlando. This is a for loop version of you algorithm. I prefer this over while loops in root solver and other iterative algorithms, as is explained in the attached.
IterRevFinal_for_loop.sm (34 КиБ) скачан 38 раз(а).
Best regards.
Alvaro.
WroteWroteIf any improvements can be made to it with the "for" command or something similar, I would appreciate the suggestion.
IterRevFinal.sm (21 КиБ) скачан 41 раз(а).
Hola Orlando. This is a for loop version of you algorithm. I prefer this over while loops in root solver and other iterative algorithms, as is explained in the attached.
IterRevFinal_for_loop.sm (34 КиБ) скачан 38 раз(а).
Best regards.
Alvaro.
The way you solve this iteration with the "for" command is more efficient, excellent!
Even so, there is something that needs to be restricted or conditioned and it is the following: when the initial value of "d" is greater than the first value that meets the inequality, the variable "d" continues to be the initial value, that is: if d= 60 cm satisfies the iteration, but if the initial value is d=80cm the iteration results in 80cm because it satisfies the inequality.
But I want the final value to converge to this "first value" that satisfies the inequality, whether it is very small and iterates to 60cm or much larger and reduces to 60cm.
Thank you very much in advance for your interest in this post.
Wrote... Even so, there is something that needs to be restricted or conditioned and it is the following: when the initial value of "d" is greater than the first value that meets the inequality, the variable "d" continues to be the initial value, that is: if d= 60 cm satisfies the iteration, but if the initial value is d=80cm the iteration results in 80cm because it satisfies the inequality.
But I want the final value to converge to this "first value" that satisfies the inequality, whether it is very small and iterates to 60cm or much larger and reduces to 60cm.
Hi. Maybe you can try something like in the attached.
IterRevFinal_for_loop.sm (35 КиБ) скачан 45 раз(а).
Best regards.
Alvaro.
-
Новые сообщения
-
Нет новых сообщений