0

im creating some paths with the process modeling library. The trucks shall stop in series when waiting for the "go" signal to go on. At the moment the trucks are waiting "within" each other.

How to tell the trucks to recognize not the stopnode only but also the hitbox of the truck which arrived before him?

Thanks in advance

Chris

Chris
  • 15
  • 3

2 Answers2

0

Simple solution is to turn your truck agents into Transporters from the Material-handling library. They have build-in collision avoidance.

However, this can slow large models so you may want to convert them only when you need collision avoidance and then convert back to "simple" Truck agents again.

Else, you need to build your own additional stop-nodes and code spatial queuing manually. Possible but not straight forward

Benjamin
  • 10,603
  • 3
  • 16
  • 28
  • 1
    Thanks for the ideas Benjamin - its a little model so i think i will be good to go with your first suggetion. I would have upvoted your post aswell but im to noob at stackoverflow to be allowed to at the moment ;) – Chris Jun 21 '21 at 18:56
  • I don't think this works if the underlying process flow is moving them to a stop node which is a point node --- they can't avoid collisions if they're moving to the same point. It will work to some extent if it's an area node. Plus they won't *queue*. – Stuart Rossiter Jun 22 '21 at 13:09
0

The trucks shall stop in series when waiting for the "go" signal to go on. At the moment the trucks are waiting "within" each other. [...] How to tell the trucks to recognize not the stopnode only but also the hitbox of the truck which arrived before him?

AnyLogic allows for agents to queue along a path (from an animation perspective) whilst in a Queue block. So don't make them move to the stop-node (which I assume you are doing explicitly): make them (from a process point-of-view) go into a Queue which is animated via the path from the stop node 'backwards'. (This is the "Agent location" setting of the Queue block.) How you hold them in the queue and release them when they need to depends on the nature of your model; e.g.,

  • Use a Hold block following the Queue (if it makes sense to release them all at once)

  • Use a 'dangling' Queue block which you pull agents out of programmatically (e.g., via its removeFirst function) and then add them somewhere else in the process via an Enter block.

  • Use a Seize block (which has a built-in Queue you can set the location of) with the resource seized representing the 'token' you need to proceed.

NB: From the process perspective, they are in a Queue which happens to be animated as queueing along a path. This isn't exactly the same as modelling the 'spatial reality' of being in a queue: see this question.

Stuart Rossiter
  • 2,432
  • 1
  • 17
  • 20
  • this is true, but as Stuart says: There is no spatial component to the visual queuing. So it really depends on what you need :) – Benjamin Jun 22 '21 at 15:43
  • Hello Stuart, ok i get the problem in my thougts - i will try your approach. Thanks for your detailed answer! – Chris Jun 23 '21 at 07:25