question

j08j avatar image
0 Likes"
j08j asked Joerg Vogel edited

How can I assigned product into slot?

I want to put products into the slot in order, but now all products will be placed in the first slot. How can I fixed my code?


input_and_output.fsm

FlexSim 24.0.2
flexscriptcodeassignedslot
5 |100000

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

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Joerg Vogel edited

If you only want to put items in empty slots add this expression to the 'continue' condition of your racks slot assignment strategy:

slot.slotItems.length>0

to give

if (slot.slotItems.length>0 || !slot.isStorable || (mustHaveSpace && !slot.hasSpace(item)))
       continue;

input-and-output_jl.fsm


· 7
5 |100000

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

j08j avatar image j08j commented ·

I want to put each items in each slot one by one, how can I deal with it?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ j08j commented ·
Sorry - we need you to explain more what you need exactly. What is the supplied model not doing that you want to do? Be specific in timing, slots locations etc. Include a diagram if needed.
0 Likes 0 ·
j08j avatar image j08j Jason Lightfoot ♦ commented ·

Actually, I want to create the model like this by using flexscript.

input and output.fsm

0 Likes 0 ·
model.mp4 (6.2 MiB)
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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