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

[SS-2300] If Statement Problem: booleans equal vs (imperial) units - If Statement Problem - Сообщения

#1 Опубликовано: 12.07.2016 19:19:43
uncblue

uncblue

2 сообщений из 18 понравились пользователям.

Группа: 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 КиБ) скачан 41 раз(а).
#2 Опубликовано: 12.07.2016 20:40:05
Ernesto

Ernesto

13 сообщений из 74 понравились пользователям.

Группа: 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.
2 пользователям понравился этот пост
uncblue 13.07.2016 10:10:00, Davide Carpi 14.07.2016 14:34:00
#3 Опубликовано: 13.07.2016 03:26:15
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: 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
1 пользователям понравился этот пост
uncblue 13.07.2016 10:20:00
#4 Опубликовано: 13.07.2016 09:21:14
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 КиБ) скачан 28 раз(а).

Forum Logic OK.gif

1 пользователям понравился этот пост
uncblue 13.07.2016 10:19:00
#5 Опубликовано: 13.07.2016 10:19:16
uncblue

uncblue

2 сообщений из 18 понравились пользователям.

Группа: 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 Опубликовано: 13.07.2016 12:21:12
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: 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
1 пользователям понравился этот пост
uncblue 14.07.2016 16:44:00
#7 Опубликовано: 13.07.2016 12:24:54
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 Опубликовано: 13.07.2016 13:09:30
uncblue

uncblue

2 сообщений из 18 понравились пользователям.

Группа: 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 КиБ) скачан 34 раз(а).
#9 Опубликовано: 14.07.2016 13:30:52
CBG

CBG

77 сообщений из 312 понравились пользователям.

Группа: User

It's work OK.


PanelType.png


Best Regards.

Carlos


test_CBG.sm (8 КиБ) скачан 29 раз(а).
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений