Task 4.4 - Custom AGV Settings

Task Overview

In this tutorial task, you'll learn how to create custom loading and unloading times for different types of flow items. You'll begin the tutorial task by changing the arrival schedule so that the upper floors regularly produce dirty laundry and waste that needs to be transported to the loading dock area. In the last step, you'll learn how to use a global table to create custom loading and unloading times for each type of flow item.

When you are finished, your simulation model will look similar to the following image:

Step 1 Create Additional Delivery Schedules

In this step, you'll add additional activities to the DeliverySchedule process flow you created in an earlier tutorial task. Eventually, these new activities will create the logic that will regularly create dirty laundry and waste in the queues on each of the upper floors.

When you're finished, your process flow should look similar to the following image:

For now, you'll merely add and connect these activities to the process flow. You'll edit the properties to add the functionality in a later step.

To add and connect these activities:

  1. On the main toolbar, click the Process Flow button to open a menu. Select DeliverySchedule to open this process flow.
  2. From the Library under the Display group, add a Container shape.
  3. Rename the new process shape Dirty Laundry.
  4. Inside the Dirty Laundry shape, add a Schedule Source (under Token Creation).
  5. Create a stacked block with the following activities:
    • A Create Object activity (under Objects)
    • A Delay activity (under Basic)
  6. For clarity, rename the new activities as follows:
  7. Activity New Name
    Source Source: Simulation Starts
    Create Object Create Object: Item on Upper Floors
    Delay Delay: Collection Time
  8. Create a connection from the Source: Simulation Starts activity to the Create Object: Item on Upper Floors activity.
  9. Create a connection from the Delay: Collection Time activity looping back to the Create Object: Item on Upper Floors activity.

Check that your process flow looks similar to the image shown in the beginning of this step.

Step 2 Edit the Delivery Schedule Logic

In this step, you'll create the logic for the new activities you added in the previous step. The following is an overview of how each activity and shared asset will function:

Activity Explanation
Source: Simulation Starts This activity will create 3 tokens that will loop continuously throughout the rest of the activities in the Dirty Laundry shape. You'll assign a unique value for a label named Destination on each token. One token will create tokens for the Floor2DirtyLaundry queue, another for the Floor3DirtyLaundry queue, etc. You'll also offset the timing of some of these tokens so that they don't all move to the next activity at the same time.
Create Object: Item on Upper Floors You'll edit this activity so that it will create the new DirtyLaundry flow item and place it inside the one of the queues on the upper floor. The token will use its Destination label to know which queue it should use. You'll also add a label named LoadType to the new flow items that will indicate which type of flow item it is. You'll use a value of 3 for DirtyLaundry flow items.
Delay: Collection Time The token will be delayed a varying amount of time, representing the amount of time it takes a staff member to collect the dirty laundry. You'll use an exponential distribution with a scale of 1800 seconds (equivalent to 15 minutes). After the token finishes the delay, it will loop back to the Create Object activity.

After you've made these edits, you'll create a copy of these activities that will simulate Waste collection. You'll make a few edits to the activities:

Activity Explanation
Source: Simulation Starts (Waste) This schedule source will be identical to the Dirty Laundry schedule source. The only difference is you will add a small offset time of 900 seconds to this activity. You'll also assign Destination labels that will create tokens for the Floor4Waste queue, the Floor3Waste queue, etc.
Create Object: Item on Upper Floors You'll edit this activity so that it will create the new Waste flow item and place it inside the UnloadingDock queue. You'll also edit the LoadType label to use a value of 4 for Waste flow items.

To create this logic:

  1. Click the Source: Simulation Starts activity to select it. In Properties, click the Add button to add a new row.
  2. Repeat the previous step until there are 3 rows.
  3. Increase the Labels box to 1.
  4. In the table, rename the new label column Destination.
  5. Highlight the 3 cells. Right-click the cells and select "Assign String Data".
  6. Click the first cell under the Destination column to select it. Type Floor2DirtyLaundry in this cell.
  7. Under the Destination column for the second row, type Floor3DirtyLaundry.
  8. Under the Destination column for the third row, type Floor4DirtyLaundry.
  9. Under the Time column for the second row, type 300.
  10. Under the Time column for the second row, type 600.
  11. Click the Create Object: Item on Upper Floors activity to select it. In Properties click the arrow next to the Object box to open a menu. Point to FlowItems and select DirtyLaundry.
  12. Make sure the Create In option is selected. In the box underneath that, type in Model.find(token.Destination). This will use the destination label to find a reference to the associated queue.
  13. Under the Assign Labels to Created Objects, click the Add button to add a label.
  14. In the Name box, delete the current text and type LoadType.
  15. In the Value box, delete the current text and type 3.00.
  16. Click the Delay: Collection Time activity to select it. In Properties next to the Delay Time box, click the Edit Properties button to open the statistical distribution properties.
  17. Change the Scale to 1800.
  18. Click the Dirty Laundry shape to select it. Press Ctrl+C to copy the shape. Click a blank area in the process flow and press Ctrl+V to paste a copy of the shape into the process flow.
  19. Rename the copied shape Waste.
  20. In the Waste shape, click the Source: Simulation Starts activity to select it. In the Offset Time box, type 900.00.
  21. In the Arrivals table, under the Destination column for the second row, type Floor4Waste.
  22. Under the Destination column for the second row, type Floor3Waste.
  23. Under the Destination column for the third row, type Floor2Waste.
  24. Click the Create Object: Item on Upper Floors activity to select it. In Properties, click the arrow next to the Object box to open a menu. Point to FlowItems and select Waste.
  25. Under the Assign Labels to Created Objects for the LoadType label, change the Value box, delete the current text and type 4.00.

Consider saving your simulation model at this point.

Step 3 Change the Drop Off Logic

In this step, you'll add a second queue to the loading dock area. One queue will collect dirty laundry for shipment to a cleaning facility and one queue will collect waste for removal. You'll change the drop off logic so that the two queues in the loading dock area pull the dirty laundry and waste flow items from the ItemsReadyForDelivery global list. Because items in the upper floors will now need transport to the loading dock, you'll also add Next Work Point connections from the main AGV network to each of the upper floors.

To change the drop off logic:

  1. From the library, add a Queue to the 3D model near the drop off area.
  2. Rename the new queue WasteRemoval.
  3. Press and hold the A key to enter connection mode. Click the MainDropOffPoint control point. Then, click the WasteRemoval queue to open a menu. Select Location. A blue line will appear connecting the control point and the queue.
  4. Click the WasteRemoval queue to bring up its properties on the right. Under the Input section, check the Pull check box.
  5. Click the arrow next to the Pull Strategy box to open a menu. Point to Use List and select Pull from Item List to open a picklist window.
  6. Click the arrow next to the List box to open a menu and select ItemsReadyForDelivery.
  7. Next to the Query box, click the Add button to open a menu. Point to WHERE (Filter) and select LoadType.
  8. In the Query box, change the last part of the list query to == 4.
  9. Click the LoadingDock queue to bring up its properties.
  10. In the Input section next to the Pull Strategy box, click the Edit Properties button to open a picklist window.
  11. Next to the Query box, click the Add button to open a menu. Point to WHERE (Filter) and select LoadType.
  12. In the Query box, change the last part of the list query to == 3.

Reset and run the simulation model:

As the model runs, dirty laundry and waste will gradually appear in the queues on the upper floors and the AGVs will transport those items to the first available queue in the loading dock area.

Step 4 Customize Loading and Unloading Times

In this step you'll create a global table that will control the loading and unloading times for the AGVs depending on what type of load they are transporting. When you're finished, your global table will look similar to the following image:

After setting up the global table, you'll then update the AGVs in the 3D model to use this global table to determine the loading and unloading times of the four different flow items. This step will demonstrate two different methods for referencing a global table. For the Load Time property, you'll learn how to reference a global table using a picklist. For the Unload Time property, you'll use a different method in which you'll reference a global table using FlexScript. Explore both methods to determine which one you prefer.

To customize the load times:

  1. In the Toolbox, click the Add button to open a menu. Select Global Table to create a new table.
  2. In Properties, change the name of the table to ItemLoadTypes.
  3. In the Rows box, increase the number to 4.
  4. In the Columns box, increase the number to 3.
  5. Change the name of the row headers as follows:
  6. Row Number Row Name
    Row 1 MedSupplies
    Row 2 CleanLaundry
    Row 3 DirtyLaundry
    Row 4 Waste
  7. Change the name of the column headers as follows:
  8. Column Number Column Name
    Col 1 LoadType
    Col 2 LoadTime
    Col3 UnloadTime
  9. Fill in the cell values as follows:
  10. LoadType LoadTime UnloadTime
    MedSupplies 1 30 45
    CleanLaundry 2 15 20
    DirtyLaundry 3 15 20
    Waste 4 10 10
  11. Click the Model tab to return to the 3D model view.
  12. If needed, drag all of the AGVs away from the AGVEntryPoint control point to different areas in the model so that you can access each one.
  13. Click AGV1 to bring up its properties on the right.
  14. In the TaskExecuter section, click the arrow next to the Load Time box to open a menu. Select By Global Table Lookup to open a picklist window.
  15. Click the arrow next to the Table box to open a menu. Select ItemLoadTypes.
  16. In the Row box, type item.LoadType.
  17. In the Column box, type "LoadTime".
  18. In the Unload Time box, type the following expression: Table("ItemLoadTypes")[item.LoadType]["UnloadTime"]
  19. Repeat the previous steps to change the Load Time and Unload Time properties for the rest of the AGVs. Use whichever global table lookup method you prefer.

Reset and run the simulation model:

As the simulation model runs, you'll notice that the AGVs will spend different amounts of time loading and unloading flow items based on which type of flow items it is.

Conclusion

Now that you've completed the AGV tutorial, you hopefully have a good sense of all the different features and settings that are available when building an AGV model. As you can see, you've been able to build a fairly complex AGV simulation model using almost no code at all. The AGV features and process flow templates make it easy to build AGV systems and scale well to large simulation projects as needed.

For even more information about modeling AGV systems in FlexSim, consider reading the chapter about Working With Task Executers, which contains a section about AGVs. This concludes the AGV tutorial.