question

Juliette C avatar image
0 Likes"
Juliette C asked Joseph Gillespie commented

Problem with the logic of Storage in a rack

I have a problem with the filling of the rack.

I create a routine for the filling of the rack,

Each rack is defined by a capacity, a bay can be fill with the same product (identify by the item type).

when a bay is full, a token is create, this one deletes when all the products of the bay are used, it's a way to stop the storage inside this rack.

But in my simulation, some products are stored inside a wrong bay with others products and they are identify by bay = 0

Normally in my code, if there is no more place in the rack, the product is sent to a queue named "Type2" but it doesn't work.

I would like to sent those products is the queue that I defined in order to have a correct stock inside my rack.

FlexSim 19.0.3
rackstorage
· 5
5 |100000

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

Juliette C avatar image Juliette C commented ·

model-sim.fsm

This is my model

0 Likes 0 ·
model-sim.fsm (125.9 KiB)
Joshua S avatar image Joshua S Juliette C commented ·

I can't tell where the problem is, can you send a screenshot of where this problem is occuring?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Joshua S commented ·

The Problem is the limit of the rack logic. As long as there is a capacity to receive items the rack will receive items. But if you decide to accept only an item type at a bay, the rack object won't reject items not matching with the type condition. For example the capacity to store is 3 but you decide in Place in Bay and Place in Level to accept only items of the type 4 but the rack receives items of the type 2 and 1. Where should the rack store those items. There is always a logical exit where the items are placed, if the logic doesn't find a suitable cell. If the rack object only accept items of a range of types, you can pull items of this range. The range will decrease depending on available cell capacity for each type differently. But such alogic isn't standard. If you don't pull items into the rack and you send the items, the previous object must divert the items to a different a object instead of to the rack, if there isn't a space to store the items of the type.

1 Like 1 ·
Show more comments
Show more comments

1 Answer

·
Joseph Gillespie avatar image
0 Likes"
Joseph Gillespie answered

@Juliette C

The problem with your code here in "Place In Bay":

if (item.Type==1)
	moveobject(item,model.find("Type1"));
else
	moveobject(item,model.find("Type2"));

is that you are using a transporter to move items into your racks. The "Place In Bay" code gets run before the transporter unloads the items. What happens is that an item is moved into either the "Type1" or "Type2" queue, but then moved back to the rack when the transporter unloads the item.

One solution to this problem would be to add an "On Entry" trigger to all of your racks with this code:

if(item.Bay == 0){
	if (item.Type == 1){
		moveobject(item,model.find("Type1"));
	}
	else{
		moveobject(item,model.find("Type2"));
	}
}

This will move the Bay = 0 items out of the racks.

Let me know if you have any questions on 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.

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.