question

JUN-WEI P avatar image
0 Likes"
JUN-WEI P asked Ben Wilson commented

maximum item per cell in rack

Hi, dear all

I have a problem about maximum item per cell in rack.

When I run my model I find some cells of rack with two item, but I just want per cell maximum item =1.

I know the placing logic in rack, I can do it if I choose the "Random Bay if Available".

But I have my own logic so I choose the "By Expression".

Please help me to check and help me to solve my problem.

Thanks.

following is my model


20200619_harmony algorithm assignment.fsm

FlexSim 19.0.9
rackflexsim 19.0.9maximum item per cell in rack
· 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.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @jun_wei.p,

We haven't heard back from you. Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond to the previous comment so that we can continue to help you.

If we don't hear back from you in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case. You can always comment back at any time to reopen.

0 Likes 0 ·

1 Answer

·
Benjamin W2 avatar image
0 Likes"
Benjamin W2 answered tannerp commented

Hi @JUN-WEI P,

There isn't an easy way to do this in version 19.0, but version 19.2 has some nice Querying features that would be perfect for what you are trying to do.

If you want to stay with 19.0, they you will need to complete a manual check before you assign your items to slots. You can use the following syntax to check a cell content:

Model.find("Rack3>variables/contenttable").as(Table)[<insert Bay Num>][<Insert Level Num>]

Whenever you assign "item.toBay" and "item.toColumn", you will want to run a check to make sure it is empty:

int content = Model.find("Rack3>variables/contenttable").as(Table)[<insert Bay Num>][<Insert Level Num>];
if (content == 1) {<increment to next level>}
· 4
5 |100000

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

JUN-WEI P avatar image JUN-WEI P commented ·

@Benjamin W2

thank u for your reply.

But I still don't know how to setup and where to add the code.

Can u demonstration for me? thank u!!

0 Likes 0 ·
Benjamin W2 avatar image Benjamin W2 JUN-WEI P commented ·

1ItemPerSlot.fsm

Please see the attached file.

0 Likes 0 ·
1itemperslot.fsm (26.8 KiB)
JUN-WEI P avatar image JUN-WEI P Benjamin W2 commented ·

@Benjamin W2 Sorry, Can you use my model to demonstrate for me and do not use the process flow? In every cell of different rack, I have already assign specific cell depending on item.type from global table "base1" to "base8".And if I do that, what should I write in <increment to next level> ?

P.S. If I write the code in "place in bay", should I still write the conditional decision in "place in level"?

if (content == 1) {<increment to next level>}

Please tell me, thank you!!

-1 Like -1 ·
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.