question

Lean van der Walt avatar image
2 Likes"
Lean van der Walt asked Lean van der Walt commented

Retrieving items out of storage

I have deliveries that are sourced and then stored in racks, this part of the model works relatively well.

On entry the items are pushed to a list (Item list). Then an order (another source that generates orders) comes into the warehouse at the items need to be taken from the racks, to a queue en then be sent (sink). Is there a way that this can easily be done?

Please assist

warehouse.fsm

FlexSim 16.1.1
warehouse
warehouse.fsm (63.5 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.

1 Answer

Brandon Peterson avatar image
4 Likes"
Brandon Peterson answered Lean van der Walt commented

Lean,

Here is an example of how I would solve your model using some concepts from process flow. Please note that this could also be done in the standard objects, the process flow is just substituting as an easier way of writing some complex code. I based the example model off of the one that you posted.

Here is how the example model works:

  • Order Flow:
    • The order flow in the main ProcessFlow is responsible for creating orders.
    • The orders are assigned a label with the number of items that should be added to the order and a label to track the number of items that have been added to the order
    • The orders enter a small loop that adds items to the order one at a time.
      • Items are added to the order by attempting to pull them from the "In Storage" list with the itemtype required as the partition ID
    • The order then waits on the list "Waiting Orders" (as a back order) for all of the items to arrive in storage
    • Once all of the items arrive in storage the order pulls the items from the "Assigned 2 Order" list which allows them to have the 3D flowitems pulled from the racks.
    • The order then waits on the list "W84 Items" (as a back order) for all of the items to make it past the final queue.
  • FlowItem Flow:
    • The FlowItem Flow is responsible for getting the flowitem assigned to an order, releasing it from the rack, and synchronizing with it later in the model.
    • On Entry of the racks a token is created that represents the 3D flowitem.
    • The token gets the itemtype of the 3D flowitem assigned to a label and then waits to be assigned to an order by pushing to the "In Storage" list with the itemtype as the partition ID
    • Once assigned to an order the token informs the order that it has been assigned by pushing to the "Inform Order" list with the order token as the partition ID.
    • Next, the token waits for the order to be ready to have all the items pulled from the racks at once by pushing to the "W84 Pull from Rack" list with the order as the partition ID.
    • After being pulled from that list the order executes some custom code that pushes the 3D flowitem onto the global item list "Storage" that was already in your model. I used custom code because I did not know of another way to do this. I copied the code from the Send To Port trigger that you were already using in the racks. (I changed the code later as the portion that I copied was no longer necessary).
    • The tokens then wait for the 3D flowitems to exit the last queue in the model. They do this by pulling from the "Sync with 3D" list with the 3D flowitem as the partition ID. The 3D flowitem pushes to the list in the "3DSync" sub flow that is executed by the On Exit trigger of the last queue.
      • This step was not necessary but I figured that it would be the next question that you would probably ask on the Forum.
      • This approach would be a lot cleaner if you could have the 3D flowitem push directly to the list that the token is pulling from but I have ran in to a lot of problems attempting that. This is the cleanest approach I have been able to find.
    • Next the token informs the order that it has left the last queue by pushing to the "W84 Items" list with the order token as the partition ID

Here are some of the changes that I made to your model:

  • I added two process flows to you model. The main "ProcessFlow" is responsible for the flow of the FlowItems and the Orders. The sub flow "3DSync" is responsible for synchronizing the 3D Flowitem with the main process flow after the 3D Item has left the racks.
  • I diconnected the port connections from the racks to the last queue because they were not necessary.
  • I changed the Send To Port triggers on your racks so that they would wait as if the flowitems had been put on a list but without putting the flowitems on a list. The flowitems are put on the "Storage" list by the process flow.
  • I added pull logic the the last queue that would pull the items from the Global Item List "Storage" that was already in your model.

I hope this helps out,

Brandon


· 19
5 |100000

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

Lean van der Walt avatar image Lean van der Walt commented ·

Thank you very much Brandon, this is so helpful. And I Really appreciate your effort .

I have looked at the process flow and it really does help a lot. In fact it does exactly what I need. I have not worked with process flow much, but this makes it easier.

Is there a way that the orders from the process flow can be represented in the model?

For instance, after an order is placed and waiting for the items, can a forklift go and fetch the order and then transport it to the queue before it is sunk?

2 Likes 2 ·
Brandon Peterson avatar image Brandon Peterson ♦ Lean van der Walt commented ·

Lean,

Here is an updated model that creates a 3D order flowitem in a queue called "Order Queue" that is then picked up by a forklift and taken to the sink.

The "Order Queue" is a standard queue that was created and connected up the same as the last queue in your model.

I added a new activity block "Create 3D Order" just prior to the sink in the Order Flow. That activity creates the 3D item for the order inside of the "Order Queue"

Good Luck,

Brandonwarehouse-order-example-v2016-1-1-mv-2.fsm

2 Likes 2 ·
Lean van der Walt avatar image Lean van der Walt commented ·

Here is the model with the changes.

\2126-warehouse-order-with-replenishment-v3.fsm

1 Like 1 ·
Brandon Peterson avatar image Brandon Peterson ♦ Lean van der Walt commented ·

Lean,

Here is an updated version of your model. This version has a global table that defines all of the different variables for each location (itemtype, Reorder Qty, Max Qty, Initial Qty). I modified the "Create Bay Token" activity in the "Create Bays" flow so that it would set the labels on the location tokens based on the global table.

For the initial quantities, I removed the source that was connected to "Queue10" and replaced it with the activity "Create Initial Items" in the "Bay Process" flow. That activity creates the number of initial flowitems for the bay and places them in "Queue10". The activity also sets the "Bay", "Level", and "Type" labels on the flowitems. The entry trigger of "Queue10" was modified so that it would set the itemtype of the flowitem to the value in the label "Type". The exit trigger of "Queue10" was modified too set the color of the flowitem based on the itemtype.

If you change the values in the global table the next time you reset and run the model the locations in "Rack2" will behave differently. This should allow you to run what if scenarios easier because you can set up the experimenter to modify the table quite easily. To demonstrate the capability I set the table up so that the top level has different reorder and max quantities for the locations.

Regards,

Brandon

0 Likes 0 ·
Lean van der Walt avatar image Lean van der Walt commented ·

Hi Brandon,

Thank for all the trouble.

The same errors appears for the warehouse model but for Queue34 when I click reset. And I can't seem to find the problem?

"Flexscript ErrorMODEL:/Queue34>variables/receivefromport Line 17unknown variable "LIST_RETURN_BACK_ORDER_IF_NOT_FULFILL" Could not finish parsing because of previous errors."

The forklift does not pick up any item from the order queue when I run the model. I do not know if it is because of the error.

The replenish model that a asked a question about, will be a sub process before the orders are collected. The logic will be as follows:

1. The current racks are where items are stored after they are delivered. Then orders come in and the items are fetched and delivered (sink).

2. Small racks will be added to model and this is where the replenish model comes in. The items from the large racks will be replenished to the small racks when the items in the small racks reach a certain level?

3. Then the items from the small racks will be picked from an order and delivered (sink).

Do you think this possible?

Will you be able to assist me?

You already helped me thoroughly.

Thanks,

Lean

0 Likes 0 ·
Lean van der Walt avatar image Lean van der Walt commented ·

Brandon,

I have updated to the latest version. And it works like a dream.

Thank you so much.

Just for my last post, would you think it is possible to simulate a model like that?

Thanks for all your help.

Kind regards,

Lean

0 Likes 0 ·
Brandon Peterson avatar image Brandon Peterson ♦ Lean van der Walt commented ·

Lean,

Here is an example of the two models combined. I also added some activities to change the color of objects to help with the visualization.

Brandon

2 Likes 2 ·
Lean van der Walt avatar image Lean van der Walt commented ·

Hi Brandon,

The concept works really well.

I have set the item and color type on the trigger tab on both sources. This allows the colors and items to line up really well initially. At the start the model works really well by replenishing the correct item type from rack1 to the corresponding item in rack2. But after a while the item types get mixed up and it seems that items are sourced to rack2 from somewhere?

Will you have a look at this?

2126-warehouse-order-with-replenishment-v3.fsm

Thanks,

Lean

0 Likes 0 ·
Brandon Peterson avatar image Brandon Peterson ♦ Lean van der Walt commented ·

Lean,

First, In your model you added a trigger on exit of the "Restart Source" that is changing the itemtype as well as the color. This is causing some of the initial start up items to remain in the "Queue10" next to rack 2. It also means that the model starts off with a different number of items in it than it was expecting.

Second, The items in the rack get a yellow color when they are assigned to an order but not released yet and then change to a color that is based on the order number once they are released from the rack.

When I ran your model I noticed the following:

  • It does appear that the wrong items are being placed in the rack but that is just a result of the activities in the model that change the colors of the flowitems before they are removed from rack 2.
  • The model eventually locks up because there are orders that need itemtype 10 which does not exist in the racks. The reason that it does not exist in the racks is a result of the changes that you made.

If you change partition ID in the "Pull Item From Storage" activity in the Order Flow from "duniform(1,10)" to "duniform(1,9)" this will solve the issues with the model locking up and reduce the number of yellow items that appear in rack2.

You will still see the flowitems change color when they are released from the rack. You can eliminate this by removing the "Change 3D Color" activities in the "FlowItem Flow" section.

I hope this clears things up for you,

Brandon

1 Like 1 ·
Show more comments