article

Paul Toone avatar image
0 Likes"
Paul Toone posted

AGV Lesson 3 Step-By-Step Model Construction   

Start with the finished model from Lesson 2. You will build this model in small incremental steps, running the model after each step is finished, so that you can understand the effects each of the changes you make has on the model.

add Pick-Up Spurs

Using the same method as in Lesson 2, add two pick-up spur points beside the Source object. However, this time instead of adding DropoffPoints connections, add PickupPoints connections.

Dispatch Items to Spurs for Pick-up

  1. Double click on the Source
  2. In the Flow tab, click the drop-down beside Use Transport
  3. Choose AGV: Move Item via AGV
  4. In the popup window, under Task Queue Location, click the drop-down beside the field and choose centerobject(current, 1)
  5. Close the popup by clicking off of it, and click OK to close the Source properties window.

Run the Model

Reset and run the model.

Now items will be dispatched to the individual spurs and AGV's will pick those items up from the spurs.
AGV Pickup on Spurs

For detailed information on the Move Item via AGV pick option, refer to the AGV-Specific Pick Options topic.

Polling for Work

Unlike the model's current logic, where the AGVs passively wait until work is dispatched to them, most real-life AGV systems will use some form of active polling to dispatch work. Instead of having one central AGV team that handles all new work and dispatches centrally, new work will often be associated with a location in the model, usually the location of the pickup. AGV's will actively loop around the model looking for work to do, and when they arrive at the location with the work, they will then take up the job at that point. We will now implement this logic in our model.

Create a Loop of NextLookForWork Connections

Using the "A" connect, create a loop of NextLookForWork connections. The loop should be:

North >> West
West >> South
South >> East
East >> North

Implement OnResourceAvailable Logic

  1. Open the Dispatcher's properties window and go to the Triggers tab.
  2. Under OnResourceAvailable, add the action AGV: Redirect via Direct Reference.
  3. Rename the action's description to: Send to NextLookForWork.
  4. Under Redirect, choose As Final Destination.

    This logic essentially sends the AGV to another Control Point, namely its current Control Point's first NextLookForWork connection. Then when it arrives at that next control point, the OnResourceAvailable will fire again, which will send it to the the next NextLookWork connection, and so on around in a loop.
  5. Right-click on a Path or Control Point and choose AGV Network Properties
  6. Go to the General Tab
  7. Under AGV Simulation Start Method, click the button and choose Fire AGV OnResourceAvailable.

    This will cause the Dispatcher's OnResourceAvailable to fire when the simulation starts, so the AGV will kick off the NextLookWork loop immediately.

Run the Model

Now if you reset and run the model, the AGVs will loop around. Notice that they will no longer pick up flow items at all, but will just loop around indefinitely. This is because the condition defined in the OnResourceAvailable action happens to always pass as true, and thus the dispatcher will always redirect the AGV to the NextLookForWork, instead of giving the AGV the tasks to pick up the items. It is not the end goal of this tutorial, but if you would like to stop and experiment at this point, and get the AGVs to pick up the items again, you can do this with a simple change. Go back to the Send to NextLookForWork action in the Dispatcher's OnResourceAvailable trigger. Change the first line of the condition field as follows:

From: content(gettasksequencequeue(agv)) == 0
To: content(gettasksequencequeue(current)) == 0

This changes the condition so that the Dispatcher's task sequence queue must be empty in order to dispatch to NextLookForWork. So, if there are task sequences in the Dispatcher's queue, it will not keep looping the AGV around, but will run its normal logic which is to dipatch those task sequences to the AGV.

Our end goal is not to dispatch tasks this way, specifically because it is not location-dependent, but rather it is purely availability dependent. The first AGV who becomes available will be dispatched the first task, no matter where the AGV or the task's pick-up point is. If an AGV becomes available on the East Control Point, this dispatch method would dispatch a task sequence to him to pick up from the South Source, even if there is another AGV closer to the South Control Point. For this model we want to instead dispatch to the AGV's that are at the points of pick-up.

Location-Dependent Task Queue

To do location-dependent dispatching, first we need to relocate the task queue. Right now the queue of work is centrally located on the Dispatcher. We previously set it to do this when we defined the Source's Use Transport action, in the Task Queue Location field.

This told the Source to dispatch the task sequence to the Dispatcher, i.e. the object connected to the Source's first center port. Now, instead of sending it to the Dispatcher, we want to store it on the Source's Control Point. Thus, when the AGV arrives at the Source's Control Point, it can just look for work at that Control Point.

  1. Open the Source's properties window.
  2. Go to the Flow tab, and click the button. In the popup, under Task Queue Location, click the drop-down on the right and choose cpconnection(current, "Destination", 1)
  3. Close the popup by clicking off of it and click OK to close the Source properties window.

add a Look For Work Way Point

Now we will use a Way Point to dispatch work to the AGVs when they arrive that each location.

  1. Right-click on a Path or Control Point and choose AGV Network Properties.
  2. In the Way Points tab, add a new Way Point and name it LookForWork.
  3. Click the drop-down beside Trigger Requirement, and choose Empty at Destination. Close the popup by clicking off it.
  4. For Way Point Logic, click the button and choose Look For Work.
  5. Close the popup by clicking off of it.
  6. Under Way Point Members, click the button and choose add Using Universal Selector.
  7. Select the South Control Point.
    Note that in this simplified model, there is only one possible pick-up point, the South Control Point. In a real model you would have multiple pick-up points on the LookForWork loop. Each of those points should be a member of the Look For Work Way Point.
  8. Click OK to close the AGV Network Properties window.

Run the Model

Now reset and run the model. The AGVs should now be dispatched to pick up the flow items when they pre-arrive at the South Control Point, i.e. just before they would otherwise start decelerating to stop at the South Control Point.

Notice that they will only pick-up and drop-off one flow item, and then they will sit indefinitely at the drop-off point. This is because the Dispatcher's OnResourceAvailable dispatches each AGV to its current Control Point's NextLookForWork connection. The drop-off spurs don't have a NextLookForWork connection. So to get the AGV's back on the loop, we need to make NextLookForWork connections from the drop-off points to the West Control Point.

Make Final NextLookForWork Connections

Connect the two Drop-off spur Control Points to the West Control Point with a NextLookForWork connection.

Run the Model

Run the model again. Now the AGVs will get back onto the LookForWork loop once they are finished dropping off items. Note that you may need to move the Source and Sink Control Points back a little to allow enough room for AGVs exiting the spurs.

AGV Speed

Now we will define custom speeds for Straight vs Curved vs Spur Paths.

  1. Right-click on a Path or Control Point and choose AGV Network Properties.
  2. In the AGV Types tab, on the DefaultAGV type (the only one available), define speeds as follows for both forward and reverse:
    Empty Loaded
    Acceleration 2 1
    Deceleration 2 1
    Straight 6 2
    Curved 3 1
    Spur 1.5 0.5
  3. Click OK to close the AGV Network Properties window.
  4. Shift-select the two pick-up spurs.
  5. Control-select the two drop-off spurs. This will add these spurs to the selection so that all spurs are selected.
  6. Click on one of the selected paths.
  7. In Quick Properties on the right, for Path Class, choose Spur.
  8. Press Apply to All Selected.

Run the Model

Now you should see the AGVs define their speeds based on the type of path they are on as well as whether they have a flow item or not.

Avoiding Collisions

If you didn't already noticed before, now the model will make prominent the fact that the AGVs will occasionally collide with each other, primarily at the pick-up and drop-off points. This is because in this situation, the regular Control Point allocation mechanism isn't sufficient to prevent the collisions. Instead we need Control Areas.

  1. Using the method described in the introduction, add a Control Area that covers all intersections at the pick-up location.
  2. add a Control Area that covers all intersections at the drop-off location.

Run the Model

Run the model again. Now AGVs will properly wait at the intersections so as not to run into each other. Note that you may need to move the Source and Sink Control Points back to allow enough room for the AGVs exiting the spurs.

Finished

You're finished with the lesson.



flexsim users manualusers manual
5 |100000

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

Article

Contributors

paul.t contributed to this article

Navigation

FlexSim 2016.1