Jump to content

How to stagger launch times for vehicles?


hurol
 Share

Recommended Posts

In a model of a bus transportation system,how would I place a certain time period between buses before they get into service, so they won't arrive at transfer nodes concurrently? I thought of placing a delay in "RunInitialized" process, but the delay should be greater for subsequent vehicles, and I don't know how to determine if the vehicle is the firsty, second, third bus, etc.

Link to comment
Share on other sites

One way to do this would be to start with a vehicle with the Initial Number In System property set to '0' or '1'. Then, in the OnRunInitialized process at start of simulation, use a Delay step then Create step to Create a new vehicle into the system (causing the number in system to be increased). Make sure to use a Transfer step to transfer the new Vehicle to the appropriate node upon creation. Keep in mind also that Vehicles can be created, but not destroyed. This will allow you then to stagger your vehicle start.

Link to comment
Share on other sites

Thank you for this suggestion. I was trying to add a delay in the RunInitialized process for the vehicle object, but I did not know how to make it proportional to the index number for the vehicle. As you suggested, I put the delay in the OnRunInitialized for the whole model and then repeated the Create-Delay-Transfer sequence until the current number of vehicles matched the number I wanted.

Link to comment
Share on other sites

×
×
  • Create New...