Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline uncblue  
#1 Posted : 13 July 2016 01:19:43(UTC)
uncblue


Rank: Member

Groups: Registered
Joined: 28/08/2013(UTC)
Posts: 18
United States

Was thanked: 2 time(s) in 2 post(s)
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 (9kb) downloaded 20 time(s).

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Ernesto  
#2 Posted : 13 July 2016 02:40:05(UTC)
Ernesto


Rank: Advanced Member

Groups: Registered
Joined: 03/02/2014(UTC)
Posts: 67
Nicaragua

Was thanked: 13 time(s) in 11 post(s)
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.
thanks 2 users thanked Ernesto for this useful post.
on 13/07/2016(UTC),  on 14/07/2016(UTC)
Offline Davide Carpi  
#3 Posted : 13 July 2016 09:26:15(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
I think it is related to SS-2300 (booleans vs imperial units)

Edited by user 13 July 2016 09:36:13(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 13/07/2016(UTC)
Offline Jean Giraud  
#4 Posted : 13 July 2016 15:21:14(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: uncblue Go to Quoted Post
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 (11kb) downloaded 12 time(s).

Forum Logic OK.gif

thanks 1 user thanked Jean Giraud for this useful post.
on 13/07/2016(UTC)
Offline uncblue  
#5 Posted : 13 July 2016 16:19:16(UTC)
uncblue


Rank: Member

Groups: Registered
Joined: 28/08/2013(UTC)
Posts: 18
United States

Was thanked: 2 time(s) in 2 post(s)
@Ernesto, Clap 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.
Offline Davide Carpi  
#6 Posted : 13 July 2016 18:21:12(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
don't worry Good
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 consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 14/07/2016(UTC)
Offline Jean Giraud  
#7 Posted : 13 July 2016 18:24:54(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: uncblue Go to Quoted Post
@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
Offline uncblue  
#8 Posted : 13 July 2016 19:09:30(UTC)
uncblue


Rank: Member

Groups: Registered
Joined: 28/08/2013(UTC)
Posts: 18
United States

Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: uncblue Go to Quoted Post
@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 (10kb) downloaded 14 time(s).
Offline CBG  
#9 Posted : 14 July 2016 19:30:52(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
It's work OK.


PanelType.png


Best Regards.

Carlos


test_CBG.sm (9kb) downloaded 10 time(s).
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.