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.

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:

  1. 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:

  1. int content = Model.find("Rack3>variables/contenttable").as(Table)[<insert Bay Num>][<Insert Level Num>];
  1. 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.