question

Craig DIckson avatar image
0 Likes"
Craig DIckson asked Joseph Gillespie commented

AGV Merge deadlock?

I have an AGV system (using AGV process flow) where 2 paths come together. Occasionally I get a deadlock where the AGV arriving from one branch gets the next control point's allocation, but the AGV from the other branch apparently gets a point on the path, so I get a deadlock error.

I attached a sample model that eventually shows the error.agv-merge-deadlock-example.fsm

In my actual model there are 11 similar merges all in a row, pretty close to each other (returns from a series of workstation dropoffs).

FlexSim 19.1.1
agv
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

·
Joseph Gillespie avatar image
0 Likes"
Joseph Gillespie answered Joseph Gillespie commented
@Craig DIckson

By moving ControlPoint4 back a little bit I was able to fix the problem: agvmergedeadlockanswer.fsm


· 5
5 |100000

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

Craig DIckson avatar image Craig DIckson commented ·

@Joseph Gillespie That didn't work in my actual model, but it pointed me towards the actual issue. I'm not sure if this should be considered a bug or just an unfortunate side effect, but this kind of deadlock can occur whenever you have a control point that is closer to an intersection than the Accumulation-Intersection stop point or Accumulation-Intersection clear point distances (Network properties -> Accumulation types tab). I made all 6 of those distances short (12") and it fixed it.

My model needs a lot of control points in between spurs to better control the accumulation. I'm modeling what is basically a grid-based system where AGVs stop at specific but not necessarily evenly spaced locations.(Similar in some ways to Kiva Robotics).

That brings up one other difficulty: systems like this move strictly orthagonally, and stop and rotate to make 90-degree turns. I was able to lay out the network this way, except then I found that the rotate time is zero. I could not find a way to change the (stopped) rotation time to be non-zero, so to simulate it I put in very short curved paths connecting the orthagonal ones, and set the speed on those paths to be very slow. It's mostly accurate, but doesn't quite look right, and also is what led to discovering the gridlock that was the original topic.

0 Likes 0 ·
Joseph Gillespie avatar image Joseph Gillespie Craig DIckson commented ·

@Craig DIckson

Have you tried looking at these questions and answers about simulating KIVA and grid-based AGV systems?

How to simulate a KIVA agv project that contain over 20 KIVA agvs?

Advice for a grid based agv system (like Kiva Systems)

(Note with this second link the answers are old, so they will say there is no existing module you can use. We now have the A* module which is very useful for simulating grid-based AGV systems.)

0 Likes 0 ·
Joseph Gillespie avatar image Joseph Gillespie Craig DIckson commented ·

@Craig DIckson

As for the first part of your last comment, you are right about the problem. The issue with the model that you posted is that on one entry path to the intersection, the control point comes before the intersection stop point, while on the other the intersection stop point comes before the control point. The result is that one TaskExecuter can acquire the intersection while another acquires the next control point, leading to a deadlock.

The solution is to have both entry paths to the intersection acquire things in the same order: the control point and then the intersection, or the intersection and then the control point.

0 Likes 0 ·
Craig DIckson avatar image Craig DIckson Joseph Gillespie commented ·

Sure, it's just that with a pretty high density system making the allocation sequence universal can be quite a bit more complicated.

I hadn't seen the KIVA posts -- it hadn't occurred to me to search on "KIVA" but I'll look at them now. I will say though that we did try using A* initially but were unable to get the AGVs to go an exact location.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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