& Construction

Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing

Professional CAD/CAM tools built on Inventor and AutoCAD
Use a list to control an Automated Guided Vehicle, or AGV, network.
Transcript
00:03
In FlexSim, a List is a powerful tool for managing various aspects of your simulation.
00:10
You can use Lists to control and optimize an Automated Guided Vehicle, or AGV, network within your model.
00:17
To begin, with FlexSim open to your model, create your AGV network.
00:24
Here, a series of Paths are added and joined using the AGV options in the Library.
00:31
Then, each Path is selected, and in Properties, Two Way is enabled.
00:39
Control Points are then added to the AGVs.
00:43
In this example, the Control Points represent the different locations that the AGVs travel to.
00:51
In this case, there are three points for processing, three for holding, and three for staging.
00:60
There are also two points to use as references to help pull or find the correct AGV Control Point.
01:08
Once all Control Points are in place, select each point,
01:13
and in Properties, rename it to indicate the location it represents in the model—Holding, Staging, Processing, or Reference.
01:26
Then, in the Library, select Task Executer and AGV, and add the AGVs to your model.
01:35
Add a label to each AGV to reference its starting Control Point.
01:40
In this case, select the AGVs in the model and in Properties, under Labels, click Add > Add Pointer Label, and name the label “CurrentCP”.
01:54
Then, click Copy highlighted labels to all selected objects to add this label to all AGVs.
02:01
Next, connect each AGV to the control network and select Traveler AGV.
02:09
To add the Control Point that an AGV will start at, first, select the AGV.
02:17
Then, in Properties, select the CurrentCP field and click the Sampler.
02:25
In the model, select the corresponding starting Control Point for each AGV.
02:32
Now, you are ready to create the Lists to store the Control Points and AGV locations.
02:38
In the Toolbox, select Global List > Task Executer List.
02:46
In List Properties, rename this first list “ProcessingAGVs”.
02:52
Click Apply and then OK.
02:56
In the Toolbox, select Global List > Fixed Resource List and name it “HoldingAGVs”.
03:07
For this example, repeat these steps to create six Lists in total: three that reference the locations for the AGVs—
03:16
—ProcessingAGVs, HoldingAGVs, and StagingAGVs—
03:24
—and three that reference the control points—
03:28
ProcessingCPs, StagingCPs, and HoldingCPs.
03:34
Once the Lists are created, add the AGVs into the list that represents its starting location.
03:42
Now, you are ready to create the ProcessFlow to control the AGV movement.
03:48
First, add a Source.
03:52
Then, using the Quick Library add six List activities to the ProcessFlow.
03:59
In this case, the Lists are renamed to match the Global Lists previously created
04:05
and they are also grouped together using Containers to distinguish the AGV locations from the CP Lists.
04:12
Then, each List is selected and In Properties, List > Global List is selected to apply the corresponding name of each Global List.
04:28
Next, from the Quick Library, add a Pull from List activity.
04:35
This activity will select the AGV closest to the exit from the holding area.
04:41
Here, the activity is renamed to “Acquire Holding AGV”.
04:46
To make sure that the correct AGV is pulled, the tokens from the Source require labels that point to the Reference Control Points.
04:55
Select the Source, and in Properties, under Assign Labels to Created Tokens, click Add.
05:04
Name the label “Ref1”, and then use the Sampler to select the label Value—in this case, the Ref1 Control Point in the model.
05:16
Repeat these steps to add a label for “Ref2”.
05:20
Now that you have set up the reference labels, you can add a Query to acquire the closest AGV to the reference point.
05:28
Select Acquire Holding AGV, and in Properties, set the Puller to “token.Ref2”, which is the closest Control Point to the holding area.
05:40
In the Query / Object / Array drop-down, select ORDER BY> distance, and then input “ASC”, for ascending.
05:53
Add a Travel activity to the ProcessFlow, and then a second Pull from List activity under Acquire Holding AGV.
06:03
This Pull from List activity will be used to find the location to send the AGV to.
06:10
In this case, point it to the StagingCPs List.
06:15
In the Pull from List Quick Properties, change the Puller to “token.ref1”.
06:22
In the Query drop-down, select ORDER BY > distance, and then type “DESC”, for descending.
06:33
Change the Assign To entry to “token.NextCP”.
06:38
This points the AGV to the farthest Control Point away from the reference point,
06:43
pushing the AGV away from the entrance and allowing more AGVs to be stored in the staging area.
06:50
Next, add a Push to List activity under Pull from List to store the location of the AGV.
06:58
Use the Sampler and, in this case, select HoldingCPs.
07:05
Then, in the Push to List Quick Properties, set the Push Value to “token.AGV.currentCP”.
07:15
Select Use Max Wait Timer with On Wait Timer Fired set to Release token, and select Keep On List On Early Release.
07:25
This ensures that the control point will be pushed to the list, and the token will not be stuck in the process flow.
07:33
Now, you can connect this activity block to the Travel activity.
07:39
In the Travel Quick Properties, change the Destination to “token.nextCP”,
07:45
which is the location that was acquired in the Acquire Staging CP activity.
07:51
Change the Task Executer to “token.AGV”.
07:55
You also need to add a Label to the AGV referencing the location it is traveling to.
08:01
Add an Assign Labels activity and name it “Store new CurrentCP”.
08:09
Set Assign Labels to ”token.AGV.”, and Name the label “CurrentCP”, with a Value of “token.NextCP”.
08:19
Add this activity below Return Holding CP.
08:24
Then, add another Push to List activity that points to the Staging AGVs to store the AGV in its new location.
08:33
In Properties, rename the activity “Store Staging AGV”.
08:39
In the Quick Properties, you can see that the Push Value is “token.AGV”,
08:46
and Use Max Wait Timer and Keep On List On Early Release are enabled, with On Wait Timer Fired set to Release token.
08:55
Next, add a Decide activity and name it “Decide: More AGVs?”.
09:03
Then, add a custom code as shown here, with an If statement that returns a value of Yes or No,
09:10
based on whether there are more AGVs to move from the holding area.
09:16
Now, create connections from the Decide activity,
09:20
with a name of “Yes” if the process needs to loop back, or “No” if it does not and has no more AGVs to move.
09:29
Next, add a Run Sub Flow activity named “Move AGVs from Processing” to move the AGVs down into the holding area.
09:39
Add a Start activity, and then a Pull from List activity named “Acquire Processing AGV”.
09:48
Point this activity to the Processing AGV List.
09:53
In Properties, set the Puller to “token.Ref1”, and add a Query to “ORDER BY distance ASC”.
10:03
Change the Assign To entry to “token.AGV”.
10:09
Add this activity beneath Start.
10:12
Then, add another Pull from List activity named “Acquire HoldingCP”
10:18
and point it to the HoldingCPs List.
10:21
Apply a Query to “ORDER BY distance DESC” and change the Puller to “token.Ref2”.
10:29
Then, add this activity below Acquire Processing AGV.
10:34
Now, add a Push to List activity, point it to the ProcessingCPs List, and set the Push Value to “token.AGV.CurrentCP”.
10:47
Apply the Use Max Wait Timer, with On Timer Fired set to Release token,
10:53
and enable Keep On List On Early Release.
10:57
Add this activity below Acquire HoldingCP and rename it, “Return ProcessingCP”.
11:04
Then, add an Assign Labels activity called “Store new CurrentCP”.
11:10
Set the Assign Labels To value to token.AGV and add a Label named “CurrentCP”, with a Value of “token.NextCP”.
11:22
Move this below Return Processing CP in the activity block.
11:28
Next, add another Travel activity to move the AGV.
11:34
Back in the Acquire HoldingCP activity, change the Assign To entry to “token.NextCP”.
11:42
In the Travel Quick Properties, set the Executer to “token.AGV” and the Destination to “token.NextCP”.
11:53
Add a Decide activity called “Decide: More AGVs?” to function like the one set up previously.
12:01
Apply the same custom code, except this time, change the List the code looks at to ProcessingAGVs.
12:11
Add a Yes connector from the Decide activity to the Start to loop through the process until all AGVs are moved.
12:19
Finally, add a No connector to a Finish Sub Flow activity to send the token back to the main flow.
12:27
Now, you are ready to add the final part of the ProcessFlow to move the AGVs from the staging area to the processing area.
12:36
This is set up like the flow created previously, from holding to staging, but this time you want to move the AGVs from staging to processing.
12:45
Here, you can see the Acquire Staging AGV, Acquire ProcessingCP, Return StagingCP, Store new CurrentCP,
12:56
and Travel activities all set up to move the AGVs in this part of the flow.
13:02
A Decide activity is added again to ensure that all AGVs are pulled from the staging area before continuing with the process flow.
13:11
However, this time, the custom code will reference the StagingAGVs List.
13:20
A Yes connector is added from the Decide activity back to the Start to loop through the process until all AGVs are moved.
13:28
Finally, a No connector is added to a Delay activity to represent the processing time on the AGVs
13:35
before new AGVs can be moved to the processing area.
13:40
Also, a final connection is added from this Delay activity to the Acquire Holding AGVs activity at the start of the process flow
13:48
to allow the process to loop continuously.
13:52
With the model and ProcessFlow set up, the simulation is Reset and Run.
13:59
Here, you can see an example of how Lists can manage an AGV network—
14:05
—in this case, enabling a seamless flow of the AGVs between the Processing, Staging, and Holding areas.
00:03
In FlexSim, a List is a powerful tool for managing various aspects of your simulation.
00:10
You can use Lists to control and optimize an Automated Guided Vehicle, or AGV, network within your model.
00:17
To begin, with FlexSim open to your model, create your AGV network.
00:24
Here, a series of Paths are added and joined using the AGV options in the Library.
00:31
Then, each Path is selected, and in Properties, Two Way is enabled.
00:39
Control Points are then added to the AGVs.
00:43
In this example, the Control Points represent the different locations that the AGVs travel to.
00:51
In this case, there are three points for processing, three for holding, and three for staging.
00:60
There are also two points to use as references to help pull or find the correct AGV Control Point.
01:08
Once all Control Points are in place, select each point,
01:13
and in Properties, rename it to indicate the location it represents in the model—Holding, Staging, Processing, or Reference.
01:26
Then, in the Library, select Task Executer and AGV, and add the AGVs to your model.
01:35
Add a label to each AGV to reference its starting Control Point.
01:40
In this case, select the AGVs in the model and in Properties, under Labels, click Add > Add Pointer Label, and name the label “CurrentCP”.
01:54
Then, click Copy highlighted labels to all selected objects to add this label to all AGVs.
02:01
Next, connect each AGV to the control network and select Traveler AGV.
02:09
To add the Control Point that an AGV will start at, first, select the AGV.
02:17
Then, in Properties, select the CurrentCP field and click the Sampler.
02:25
In the model, select the corresponding starting Control Point for each AGV.
02:32
Now, you are ready to create the Lists to store the Control Points and AGV locations.
02:38
In the Toolbox, select Global List > Task Executer List.
02:46
In List Properties, rename this first list “ProcessingAGVs”.
02:52
Click Apply and then OK.
02:56
In the Toolbox, select Global List > Fixed Resource List and name it “HoldingAGVs”.
03:07
For this example, repeat these steps to create six Lists in total: three that reference the locations for the AGVs—
03:16
—ProcessingAGVs, HoldingAGVs, and StagingAGVs—
03:24
—and three that reference the control points—
03:28
ProcessingCPs, StagingCPs, and HoldingCPs.
03:34
Once the Lists are created, add the AGVs into the list that represents its starting location.
03:42
Now, you are ready to create the ProcessFlow to control the AGV movement.
03:48
First, add a Source.
03:52
Then, using the Quick Library add six List activities to the ProcessFlow.
03:59
In this case, the Lists are renamed to match the Global Lists previously created
04:05
and they are also grouped together using Containers to distinguish the AGV locations from the CP Lists.
04:12
Then, each List is selected and In Properties, List > Global List is selected to apply the corresponding name of each Global List.
04:28
Next, from the Quick Library, add a Pull from List activity.
04:35
This activity will select the AGV closest to the exit from the holding area.
04:41
Here, the activity is renamed to “Acquire Holding AGV”.
04:46
To make sure that the correct AGV is pulled, the tokens from the Source require labels that point to the Reference Control Points.
04:55
Select the Source, and in Properties, under Assign Labels to Created Tokens, click Add.
05:04
Name the label “Ref1”, and then use the Sampler to select the label Value—in this case, the Ref1 Control Point in the model.
05:16
Repeat these steps to add a label for “Ref2”.
05:20
Now that you have set up the reference labels, you can add a Query to acquire the closest AGV to the reference point.
05:28
Select Acquire Holding AGV, and in Properties, set the Puller to “token.Ref2”, which is the closest Control Point to the holding area.
05:40
In the Query / Object / Array drop-down, select ORDER BY> distance, and then input “ASC”, for ascending.
05:53
Add a Travel activity to the ProcessFlow, and then a second Pull from List activity under Acquire Holding AGV.
06:03
This Pull from List activity will be used to find the location to send the AGV to.
06:10
In this case, point it to the StagingCPs List.
06:15
In the Pull from List Quick Properties, change the Puller to “token.ref1”.
06:22
In the Query drop-down, select ORDER BY > distance, and then type “DESC”, for descending.
06:33
Change the Assign To entry to “token.NextCP”.
06:38
This points the AGV to the farthest Control Point away from the reference point,
06:43
pushing the AGV away from the entrance and allowing more AGVs to be stored in the staging area.
06:50
Next, add a Push to List activity under Pull from List to store the location of the AGV.
06:58
Use the Sampler and, in this case, select HoldingCPs.
07:05
Then, in the Push to List Quick Properties, set the Push Value to “token.AGV.currentCP”.
07:15
Select Use Max Wait Timer with On Wait Timer Fired set to Release token, and select Keep On List On Early Release.
07:25
This ensures that the control point will be pushed to the list, and the token will not be stuck in the process flow.
07:33
Now, you can connect this activity block to the Travel activity.
07:39
In the Travel Quick Properties, change the Destination to “token.nextCP”,
07:45
which is the location that was acquired in the Acquire Staging CP activity.
07:51
Change the Task Executer to “token.AGV”.
07:55
You also need to add a Label to the AGV referencing the location it is traveling to.
08:01
Add an Assign Labels activity and name it “Store new CurrentCP”.
08:09
Set Assign Labels to ”token.AGV.”, and Name the label “CurrentCP”, with a Value of “token.NextCP”.
08:19
Add this activity below Return Holding CP.
08:24
Then, add another Push to List activity that points to the Staging AGVs to store the AGV in its new location.
08:33
In Properties, rename the activity “Store Staging AGV”.
08:39
In the Quick Properties, you can see that the Push Value is “token.AGV”,
08:46
and Use Max Wait Timer and Keep On List On Early Release are enabled, with On Wait Timer Fired set to Release token.
08:55
Next, add a Decide activity and name it “Decide: More AGVs?”.
09:03
Then, add a custom code as shown here, with an If statement that returns a value of Yes or No,
09:10
based on whether there are more AGVs to move from the holding area.
09:16
Now, create connections from the Decide activity,
09:20
with a name of “Yes” if the process needs to loop back, or “No” if it does not and has no more AGVs to move.
09:29
Next, add a Run Sub Flow activity named “Move AGVs from Processing” to move the AGVs down into the holding area.
09:39
Add a Start activity, and then a Pull from List activity named “Acquire Processing AGV”.
09:48
Point this activity to the Processing AGV List.
09:53
In Properties, set the Puller to “token.Ref1”, and add a Query to “ORDER BY distance ASC”.
10:03
Change the Assign To entry to “token.AGV”.
10:09
Add this activity beneath Start.
10:12
Then, add another Pull from List activity named “Acquire HoldingCP”
10:18
and point it to the HoldingCPs List.
10:21
Apply a Query to “ORDER BY distance DESC” and change the Puller to “token.Ref2”.
10:29
Then, add this activity below Acquire Processing AGV.
10:34
Now, add a Push to List activity, point it to the ProcessingCPs List, and set the Push Value to “token.AGV.CurrentCP”.
10:47
Apply the Use Max Wait Timer, with On Timer Fired set to Release token,
10:53
and enable Keep On List On Early Release.
10:57
Add this activity below Acquire HoldingCP and rename it, “Return ProcessingCP”.
11:04
Then, add an Assign Labels activity called “Store new CurrentCP”.
11:10
Set the Assign Labels To value to token.AGV and add a Label named “CurrentCP”, with a Value of “token.NextCP”.
11:22
Move this below Return Processing CP in the activity block.
11:28
Next, add another Travel activity to move the AGV.
11:34
Back in the Acquire HoldingCP activity, change the Assign To entry to “token.NextCP”.
11:42
In the Travel Quick Properties, set the Executer to “token.AGV” and the Destination to “token.NextCP”.
11:53
Add a Decide activity called “Decide: More AGVs?” to function like the one set up previously.
12:01
Apply the same custom code, except this time, change the List the code looks at to ProcessingAGVs.
12:11
Add a Yes connector from the Decide activity to the Start to loop through the process until all AGVs are moved.
12:19
Finally, add a No connector to a Finish Sub Flow activity to send the token back to the main flow.
12:27
Now, you are ready to add the final part of the ProcessFlow to move the AGVs from the staging area to the processing area.
12:36
This is set up like the flow created previously, from holding to staging, but this time you want to move the AGVs from staging to processing.
12:45
Here, you can see the Acquire Staging AGV, Acquire ProcessingCP, Return StagingCP, Store new CurrentCP,
12:56
and Travel activities all set up to move the AGVs in this part of the flow.
13:02
A Decide activity is added again to ensure that all AGVs are pulled from the staging area before continuing with the process flow.
13:11
However, this time, the custom code will reference the StagingAGVs List.
13:20
A Yes connector is added from the Decide activity back to the Start to loop through the process until all AGVs are moved.
13:28
Finally, a No connector is added to a Delay activity to represent the processing time on the AGVs
13:35
before new AGVs can be moved to the processing area.
13:40
Also, a final connection is added from this Delay activity to the Acquire Holding AGVs activity at the start of the process flow
13:48
to allow the process to loop continuously.
13:52
With the model and ProcessFlow set up, the simulation is Reset and Run.
13:59
Here, you can see an example of how Lists can manage an AGV network—
14:05
—in this case, enabling a seamless flow of the AGVs between the Processing, Staging, and Holding areas.