question

Theresa B avatar image
0 Likes"
Theresa B asked Jason Lightfoot commented

Floor Storage: How to automatically orient items to fit into slot

Hello, brains trust,

I've found that if I have 1 item that is stored in a floor storage at one orientation and then downstream is stored in a floor storage at a different orientation, the FlowItem retains its orientation from when it was stored in the first floor storage. Is there a way to change the visual so that the FlowItem fits in its slot (automatic or otherwise)?

Here's a model showing the problem I'm having: autoOrientItem.fsm

Thanks in advance!

---------

Updated model with Change Visual: autoOrientItemv2.fsm

FlexSim 22.2.1
visualfloorstorageorientation
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image Joerg Vogel commented ·
This is a feature not applied by FlexSim as a predefined picklist option. You have to develop this alone.
1 Like 1 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

Add a Change Visual activity to rotate the item 90 degrees:

1666792685454.png

1666792715445.png


1666792685454.png (10.8 KiB)
1666792715445.png (9.8 KiB)
· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Theresa B avatar image Theresa B commented ·

Thanks for taking a look, Jason!

I'd tried this immediately after Joerg's comment but got some unexpected behaviours that I was hoping to solve before I updated my question. Initially, I placed the Change Visual after the Unload Slot (because I'm not using slot.hasSpace(), just checking the number of items in each slot), so I wondered if that was the problem but when I tried Change Visual before FindSlot where you had put it, I got similar unexpected behaviours.

Noting that Floor Storage 2 has 5 bays:

1666822507323.png

but there are 4 columns of item and 2 vacant bays:

1666822464473.png

Also, the grey item floating in the back is one that I dragged from sitting exactly where the top left pink item can be seen. Most of the items on the right of that one are similarly overlaid despite the floor storage having enough height to fit two items stacked. Can you replicate this behaviour? Is it because by setting the rotation, all the other auto-fitting setting are overridden? Is the only solution a chunky piece of Custom Code that checks for slot content and then sets location and rotation dependent on that information?

0 Likes 0 ·
1666822464473.png (201.2 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Theresa B commented ·

Post your latest model then since the one you posted does use hasSpace:

WHERE slot.storageObject.name = 'FloorStorage2'  AND slot.slotItems.length < 2  AND slot.hasSpace($1.item) ORDER BY slot.bayID DESC

Also - give your process flows meaningful names rather than ProcessFlow1,2,3, etc.

1 Like 1 ·
Theresa B avatar image Theresa B Jason Lightfoot ♦♦ commented ·
Apologies, I hadn't realised I'd posted an older version of the model!
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Theresa B commented ·

Change the stacking order to use Z+ first and you should see the correct locaitons being used:

autoorientitemv2jl.fsm

1 Like 1 ·
Theresa B avatar image Theresa B Jason Lightfoot ♦♦ commented ·
Thanks for the fix, Jason! What's the logic behind the behaviour? I'd have thought that since the items are off the mark on the x-plane, the fix should have involved the x plane and not the z plane?
0 Likes 0 ·
Show more comments