Problem with the logic of Storage in a rack

Problem with the logic of Storage in a rack

juliette_c
Not applicable
73 Views
6 Replies
Message 1 of 7

Problem with the logic of Storage in a rack

juliette_c
Not applicable

[ FlexSim 19.0.3 ]

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.

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

juliette_c
Not applicable

model-sim.fsm

This is my model

0 Likes
Message 3 of 7

joshua_s
Not applicable

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

0 Likes
Message 4 of 7

juliette_c
Not applicable

19403-racklogic.png

@Joshua S, The first bay has to contain only item type = 84 but some items with bay = 0 are stored inside

0 Likes
Message 5 of 7

joerg_vogel_HsH
Mentor
Mentor

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.

Message 6 of 7

juliette_c
Not applicable

I try to create a condition in order to sent the wrong item in a queue named "Débord" in the place in bay but it doesn't work

I don't know how to do in order to fill the rack in the rack way

if(item.Bay == 0)

{

moveobject(item,model.find("Débord"));

}

and I try also this peace of code in the trigger exit or in the trigger entry but it doesn't work

0 Likes
Message 7 of 7

joseph_g3
Not applicable
Accepted solution

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

0 Likes