[SS-2300] If Statement Problem: booleans equal vs (imperial) units

[SS-2300] If Statement Problem: booleans equal vs (imperial) units - If Statement Problem - Mensajes

#1 Publicado: 12/7/2016 19:19:43
uncblue

uncblue

2 me gusta en 18 mensajes.

Grupo: User

Hi All,

I'm trying to write an if statement that determines capacities based on certain inputs.
I've attached the sheet in question.
I'm not sure if it's something on my end, but for certain fractions/values the if statement will not produce the correct value.

For instance, if my tpan value is set to 3/8 inch, it will work correctly.



But if I set it to 1/4 inch, it will not work correctly.




test.sm (8,15 KiB) descargado 1356 vez(es).
#2 Publicado: 12/7/2016 20:40:05
Ernesto

Ernesto

13 me gusta en 74 mensajes.

Grupo: User

Sometimes using units have issues. In this case, if you right click the "vw" equation, and choose fractions menu and choose fractions, it will work.
A 2 usuarios les gustó este mensaje
uncblue 13/7/2016 10:10:00, Davide Carpi 14/7/2016 14:34:00
#3 Publicado: 13/7/2016 3:26:15
Davide Carpi

Davide Carpi

1.443 me gusta en 2.936 mensajes.

Grupo: Moderator

I think it is related to SS-2300 (booleans vs imperial units)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
A 1 usuarios les gustó este mensaje
uncblue 13/7/2016 10:20:00
#4 Publicado: 13/7/2016 9:21:14
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

But if I set it to 1/4 inch, it will not work correctly.



Yes it does work correctly: it does reply the otherwise specified for any non 3/8.

Forum LOGIC.sm (10,25 KiB) descargado 1314 vez(es).

Forum Logic OK.gif

A 1 usuarios les gustó este mensaje
uncblue 13/7/2016 10:19:00
#5 Publicado: 13/7/2016 10:19:16
uncblue

uncblue

2 me gusta en 18 mensajes.

Grupo: User

@Ernesto, Thanks, this seems to be working.

@Davide Carpi, Yes I tested this and noticed there was no issue with Metric units. Sorry, I didn't find the bug when I searched.

@Jean Giraud, I guess I didn't explain it very well. I meant that if I change the input variable tpan = 1/4 in and also change the boolean to determine if tpan = 1/4 in, the evaluation will not return the correct output of 730 lbf/ft. See the bug report Davide linked for a better explanation.
#6 Publicado: 13/7/2016 12:21:12
Davide Carpi

Davide Carpi

1.443 me gusta en 2.936 mensajes.

Grupo: Moderator

don't worry
thank you for posting a complete bug report (description, screenshot and a file to test the bug). Good to know that there is a workaround, however I hope Andrey will fix it soon (BTW if you register in the BTS you can vote the bug to prioritize the solution)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
A 1 usuarios les gustó este mensaje
uncblue 14/7/2016 16:44:00
#7 Publicado: 13/7/2016 12:24:54
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

@Jean Giraud, I guess I didn't explain it very well. I meant that if I change the input variable tpan = 1/4 in and also change the boolean to determine if tpan = 1/4 in, the evaluation will not return the correct output of 730 lbf/ft.



Your original specification is for returning 730 lbf/ft for 3/8. If you change for 1/4,
how and why should it return 730 lbf/ft ? Smaller size has lower shear capacity.
If it wouldn't be so: hair size would also be 730 lbf/ft. Your system is underdesigned
for end purpose, that's my conclusion. Your unspecified 1/4 returns meaningless 1 lbf/ft.

If you don't have same as me: it's a version problem


Logic Shear.gif
#8 Publicado: 13/7/2016 13:09:30
uncblue

uncblue

2 me gusta en 18 mensajes.

Grupo: User

Wrote

Wrote

@Jean Giraud, I guess I didn't explain it very well. I meant that if I change the input variable tpan = 1/4 in and also change the boolean to determine if tpan = 1/4 in, the evaluation will not return the correct output of 730 lbf/ft.



Your original specification is for returning 730 lbf/ft for 3/8. If you change for 1/4,
how and why should it return 730 lbf/ft ? Smaller size has lower shear capacity.
If it wouldn't be so: hair size would also be 730 lbf/ft. Your system is underdesigned
for end purpose, that's my conclusion. Your unspecified 1/4 returns meaningless 1 lbf/ft.

If you don't have same as me: it's a version problem


Logic Shear.gif



The strength values are irrelevant to the issue at hand which is the bug with input imperial units. I was trying to show the discrepancy for certain thickness input values and used the same shear strength output to explain. The reason why your if statement works is because you have removed the imperial unit issue as already mentioned. See attached screenshot and sheet.

test-2016-07-13.sm (9,43 KiB) descargado 1298 vez(es).
#9 Publicado: 14/7/2016 13:30:52
CBG

CBG

78 me gusta en 312 mensajes.

Grupo: User

It's work OK.


PanelType.png


Best Regards.

Carlos


test_CBG.sm (8,2 KiB) descargado 1318 vez(es).
  • Nuevos mensajes
  • Sin mensajes nuevos