question

Steven Hamoen avatar image
0 Likes"
Steven Hamoen asked anthony.johnson edited

New Rack not emptying

@jordan.johnson Here is another problem I encountered with the new rack used in old fashion style. If the rack is empty again no new products are send to the rack. I played around with the slot entry and exit triggers (by the way the slot exit trigger has no options on the dropdown menu!) but the hasSpace method returns 1 on the onexit. So I also tried to use a queue instead of a conveyor but that didn't solve the problem.

Until this is fixed is there a way to force the rack to receive new products? Maybe in code?

FlexSim 19.2.2
rackslots
racknotempty.fsm (57.1 KiB)
5 |100000

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

anthony.johnson avatar image
0 Likes"
anthony.johnson answered anthony.johnson edited

If you add an OnExit trigger to the Rack that opens its inputs, this will fix it.

All of these problems you are having have to do with the hasSpace() method. In this case, the hasSpace() method return value changes after an item has been denied entry, but there is nothing to re-trigger the pull criterion check when this change of return value happens. This is much the same as any other pull-based mechanism where the state of whether you can pull something changes after the item has first been denied entry. In those cases, you have to "kick" the object by opening its inputs, which will re-trigger the pull logic.

So, why is this different from past versions? Because we changed the default Rack's properties to pull by default, and the way that it pulls is by trying to assign the item to a slot. This calls the rack's slot assignment strategy, and if the slot assignment strategy finds a slot, then it goes ahead and pulls the item. Well, the default slot assignment strategy is to find the first slot with space (i.e. the slot where the hasSpace() method returns true). So, when the rack is full, it opens its input ports, looks at the item attempting to enter, tries to assign it a slot, and fails, so its pull criterion fails, and it doesn't pull the item. Then, when an item exits, now there is a slot that has space, but there is nothing to re-trigger the pull logic, unless you call openinputs().

So, things you can do to get around this.

  • Add the OnExit trigger that opens inputs as mentioned above.
  • Go back to the way the rack used to work. Turn off the rack's pull, and change its slot assignment strategy so it doesn't use hasSpace() and will always find a slot to put the item in, (e.g. random bay/level/slot assignment with no hasSpace() requirement).
  • Change the rack's max content to 96 (the number of boxes in the rack when it is full). This will make it so the rack closes its inputs when it gets up to 96, and then automatically reopens them when an item exits.

As for what we should do about this, I'm not quite sure yet. It technically is working as it was designed, but in this specific case, the default settings of the Rack make it not work as a beginning user (or an advanced user like you :-)) would expect it to. So, we'll think about what could be done for this. And suggestions are welcome.

5 |100000

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

Phil BoBo avatar image
0 Likes"
Phil BoBo answered

Call openinput() in your OnExit code to force it to re-evaluate the pull requirement.

We've added a case to the dev list to look into this.

5 |100000

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