maximum item per cell in rack

maximum item per cell in rack

jun_wei_p
Not applicable
11 Views
6 Replies
Message 1 of 7

maximum item per cell in rack

jun_wei_p
Not applicable

[ FlexSim 19.0.9 ]

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

0 Likes
Accepted solutions (1)
12 Views
6 Replies
Replies (6)
Message 2 of 7

benjamin_w2
Not applicable
Accepted solution

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>}
0 Likes
Message 3 of 7

jun_wei_p
Not applicable

@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
Message 4 of 7

benjamin_w2
Not applicable

1ItemPerSlot.fsm

Please see the attached file.

0 Likes
Message 5 of 7

jun_wei_p
Not applicable

@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!!

0 Likes
Message 6 of 7

tanner_p
Not applicable

@JUN-WEI P,

Process Flow is the best way to do this, which is why Benjamin used it. Is there a reason why you can't use Process Flow?

Would you be able to upload the model you're working on? I didn't see one attached to your comment that represents the current state of your model.

0 Likes
Message 7 of 7

Ben_WilsonADSK
Community Manager
Community Manager

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