Search code examples
anylogic

AnyLogic Car library: Is there a way of checking if a route exists for a given destination?


I am using AnyLogic car library and have multiple roads and parking lots. However, not every parking slip is accessible from every road. I want to detect this beforehand if the car won't be able to make it to the destination and send them to somewhere else.

Currently when the car enters the carMoveTo37 block, it throws an error if there is no way of reaching the destination.

enter image description here

Is there any way of checking this before entering the carMoveTo block?


Solution

  • Yes, you can simply use the bottom out-port as per the help: enter image description here

    So simply reroute those cars via that port or do something else with them :)