Kristian
Kristian

Reputation: 21

Anylogic forklift collision logging

I need to measure the time forklift spends in collision, however movement_log

enter image description here

for agent type that is a forklift managed by transporter, fleet is not available. I also can not use statecharts because it uses much performance.

Situation: I am simulating a warehouse with one-way aisles and the capacity of these one-way aisles is 2 vehicles. There are situations

enter image description here

where a forklift (the yellow one) needs to wait behind another one in one-way aisle, I currently have that modeled properly I just don't know how to detect this situation and log it.

Thank you

Upvotes: 2

Views: 260

Answers (2)

Stuart Rossiter
Stuart Rossiter

Reputation: 2517

There is no accessible trigger point (typically an action of a block) to trap when transporters have collisions. Yes, that situation obviously has to be captured internally to enable the transporters to avoid collisions, but in this situation that is not exposed as a block action, or action anywhere else. (AnyLogic space markup elements never have actions, except for some of the newer Material Handling library ones like Station, because these effectively represent a process step.)

The Transporter Control block has all the settings for collision detection and avoidance, but no related actions.

So your alternatives are really

  • 'Scan' for this situation occurring: Yashar's answer, inferring that zero speed when non-idle means 'waiting due to collision' (which may or may not be 100% robust) being one way.

  • Explicitly break down the movement (from the process perspective) to define the potential 'conflicts' and decision-making within the process flow (e.g., if you're trying to move to an aisle, move to an entrance node, reserve a space in the aisle using resource pools or similar, and only enter when free). Clearly that doesn't cover every possible case, but may be useful in some situations.

The actions that do exist in the Transporter Control block could help a bit here (for both alternatives) since at least you have action points on entering paths and nodes. (You could also raise an enhancement request with AnyLogic to add collision-related actions here....)

I have a huge model with large number of forklifts, checking any attribute every second would result in huge performance loss

I also can not use statecharts because it uses much performance

Have you actually tried it though? Some things do not result in as much of a performance hit as you might think, and performance should not be an a priori 'that will be too slow' thing; ideally you have requirements for acceptable performance and you work round that. (There are always trade-offs between performance, functionality and maintainability.)

[You also don't say how you think using statecharts could have helped. Did you mean doing the 'scanning' approach via a statechart, say with cyclic entry/exit from a Scan state?]

Upvotes: 1

Yashar Ahmadov
Yashar Ahmadov

Reputation: 1636

I would do it as following:

  • Create a new 2-dimensional variable called collisionLog.

  • Check the speed [getSpeed() function] and state [TransporterState getState() function] every 1 second.

  • Write these into the collisionLog.

Once the simulation is completed, remove the rows with idle status.

Then do the calculations based on the fact that when speed is zero and transporter is busy, then you have the waiting vehicle.

Upvotes: 1

Related Questions