Jump to content

Let vehicle dwell only if loading or unloading an entity


Student789
 Share

Recommended Posts

Hi all,

I've got a vehicle on a fixed route that has a capacity greater than one. Each entity has a loading and unloading time of 15 seconds.
Now I want to let the vehicle dwell for 20 seconds at a node, but only if it has at least one pick-up or drop-off. When there is no pick-up or drop-off, there is no dwell time.
So, if the vehicle loads or unloads only one entity it takes 20 seconds. But loading/unloading multiple entities at one node takes the loading/unloading time required.

For a pick-up I can dwell only if the RidePickUpQueue of the current node is > 0. For a drop-off I'm however clueless what to put in the "dwell only if"

How to implement this logic?

Thanks!

Link to comment
Share on other sites

That also makes the vehicle dwell when it has entities in its RideStation but isn't unloading at a node. Different entities have different destination nodes assigned. It is thus possible that entities are in the RideStation but none is unloaded at the current node.
Would like to have it dwell at the current node only if at least one entity is loaded/unloaded there. 

Link to comment
Share on other sites

Then you should check whether there is any entity to be unloaded in the ridestation of the vehicle at a certain node(s). For this purpose, at each required node define an entered add-process and search the ridestation of vehichle to quest for whether there exist an entity that its destination node is set to be current node. Define an iteger type state variable i.e., "DwellorNot" and assign the search result to this variable (If the search result is successfull you can assign 1 if not assign 0. Then, set MinimumDwellTime property as shown in the figure attached. Try this solution... image.thumb.png.1edacfa24152a1c25f6635eab88c29ea.png 

Edited by gocken
Link to comment
Share on other sites

×
×
  • Create New...