AnyLogic: Unreachable Target in Agent-Based-Simulation

Viewed 110

I am building an airport model with passengers spawning, shopping/eating and departing.

Most passengers rush to their GateArea (Polygonal Node) and wait there until they feel it is appropriate to engage in discretionary activities. When they think about leaving the GateArea they generate a "Eat"- or "Shop"- Goal" and are transferred into a PedGoTo-Block that is linked to the according shop. At this point I sometimes get the error:

java.lang.RuntimeException: root.pGT_F_B2.pedGoToTarget:
Unreachable target: (599.37, 398.48) on level 'name: level' for pedestrian 'id: 46' located at: (467.15, 222.68) on level 'name: level'!
    at com.anylogic.engine.Engine.error(Unknown Source)
    at com.anylogic.engine.Agent.error(Unknown Source)
    at com.anylogic.engine.Utilities.error(Unknown Source)
    at com.anylogic.libraries.pedestrian.PedBlock_xjal.error(Unknown Source)
    at com.anylogic.libraries.pedestrian.PedGoTo_xjal.d(Unknown Source)
    at com.anylogic.libraries.pedestrian.PedGoTo_xjal.c(Unknown Source)
    at com.anylogic.libraries.pedestrian.PedGoTo_xjal.g(Unknown Source)
    at com.anylogic.libraries.pedestrian.PedGoTo_xjal.f(Unknown Source)
    at com.anylogic.libraries.pedestrian.PedGoTo_xjal.d(Unknown Source)
    at com.anylogic.libraries.pedestrian.PedGoTo_xjal.a(Unknown Source)
    at com.anylogic.libraries.pedestrian.PedGoTo_xjal.a(Unknown Source)
    at com.anylogic.libraries.pedestrian.PedGoTo_xjal$1.onEnter(Unknown Source)
    at com.anylogic.libraries.processmodeling.Delay.b(Unknown Source)
    at com.anylogic.libraries.processmodeling.Delay.b(Unknown Source)
    at com.anylogic.libraries.processmodeling.Delay$9.onEnter(Unknown Source)
    at com.anylogic.libraries.processmodeling.InputBlock$1.b(Unknown Source)
    at com.anylogic.libraries.processmodeling.InPort.a(Unknown Source)
    at com.anylogic.libraries.processmodeling.InPort.receiveImmediately(Unknown Source)
    at com.anylogic.libraries.processmodeling.InputBlock$1.a(Unknown Source)
    at com.anylogic.libraries.processmodeling.OutPort.a(Unknown Source)
    at com.anylogic.libraries.processmodeling.OutPort.b(Unknown Source)
    at com.anylogic.libraries.processmodeling.PlainTransfer$1.a(Unknown Source)
    at com.anylogic.libraries.processmodeling.OutPort.a(Unknown Source)
    at com.anylogic.libraries.processmodeling.OutPort.b(Unknown Source)
    at com.anylogic.libraries.processmodeling.OutputBlock.forwardReadyEntityNotification(Unknown Source)
    at com.anylogic.libraries.processmodeling.InputBlock$1.a(Unknown Source)
    at com.anylogic.libraries.processmodeling.OutPort.a(Unknown Source)
    at com.anylogic.libraries.processmodeling.OutPort.b(Unknown Source)
    at com.anylogic.libraries.processmodeling.OutPort.a(Unknown Source)
    at com.anylogic.libraries.processmodeling.OutputBlock.a(Unknown Source)
    at com.anylogic.libraries.processmodeling.OutputBlock.a(Unknown Source)
    at com.anylogic.libraries.processmodeling.OutputBlock$2.a(Unknown Source)
    at com.anylogic.libraries.processmodeling.OutputBlock$2.action(Unknown Source)
    at com.anylogic.libraries.processmodeling.AsynchronousExecutor_xjal$a.execute(Unknown Source)
    at com.anylogic.engine.LibraryEventHandler$b.execute(Unknown Source)
    at com.anylogic.engine.Engine.c(Unknown Source)
    at com.anylogic.engine.Engine.fi(Unknown Source)
    at com.anylogic.engine.Engine.n(Unknown Source)
    at com.anylogic.engine.Engine$b.run(Unknown Source)

As you can see in the picture, neither the gate nor the shop are blocked by some static obstacles. The problem seem to be between the passengers, since they seem to block each other. I tried using less passengers per flight, which delayed the problem (or even solved it when I used very small numbers). However, the passenger numbers causing the problem are realistic (around 100) and so is the sizing of the GateArea.

Is there a way to tell passengers to "push" other agents to create a pathway or another way to solve the problem without lowering the numbers (and therefore compromising the simulation quality)?

Crowded Gate with error indication

PS. This is my first question on StackOverflow, so feel free to advise me on how to improve the question. I am hoping to get enough reputation to upvote the answers at other AnyLogic questions, since they helped more than once to overcome some deadlocks.

1 Answers

Assuming that there really aren't any obstacles other than other pedestrians, then the parameter that can help improve your situation is the diameter of the pedestrian. Reducing it means that pedestrians can get closer to each other.

enter image description here

You can also change the diameter dynamically at any point of your simulation using ped.setDiameter( x ). So for example, you can set it to 0 at that specific point in time until the pedestrian leaves that area and change it back to 0.5.


Following the discussion in the comments, it appeared that the issue was not the diameter. Nonetheless, I am keeping it above as it might be the issue for someone facing a similar problem.

The real issue was that the modeler asking the question was making the agent leave the pedestrian flow chart using remove(agent). Once the agent is sent back to the flowchart using an Enter block, AnyLogic no longer recognizes that agent as a pedestrian present in the pedestrian network.

As such, instead of using Enter block, pedEnter should be used. The latter requires as input the location of the pedestrian's appearance. Since in your case the pedestrian is not really moving, just leaving the flowchart for modeling purposes, you can specify the location as the agent's current location as shown below.

enter image description here

Related