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

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

#1 Posted: 7/12/2016 7:19:43 PM
uncblue

uncblue

2 likes in 18 posts.

Group: 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 KiB) downloaded 42 time(s).
#2 Posted: 7/12/2016 8:40:05 PM
Ernesto

Ernesto

13 likes in 74 posts.

Group: 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 users liked this post
uncblue 7/13/2016 10:10:00 AM, Davide Carpi 7/14/2016 2:34:00 PM
#3 Posted: 7/13/2016 3:26:15 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: 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 users liked this post
uncblue 7/13/2016 10:20:00 AM
#4 Posted: 7/13/2016 9:21:14 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: 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 KiB) downloaded 29 time(s).

Forum Logic OK.gif

1 users liked this post
uncblue 7/13/2016 10:19:00 AM
#5 Posted: 7/13/2016 10:19:16 AM
uncblue

uncblue

2 likes in 18 posts.

Group: 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 Posted: 7/13/2016 12:21:12 PM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: 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 users liked this post
uncblue 7/14/2016 4:44:00 PM
#7 Posted: 7/13/2016 12:24:54 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: 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 Posted: 7/13/2016 1:09:30 PM
uncblue

uncblue

2 likes in 18 posts.

Group: 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 KiB) downloaded 36 time(s).
#9 Posted: 7/14/2016 1:30:52 PM
CBG

CBG

77 likes in 312 posts.

Group: User

It's work OK.


PanelType.png


Best Regards.

Carlos


test_CBG.sm (8 KiB) downloaded 30 time(s).
  • New Posts New Posts
  • No New Posts No New Posts