convoy - Convoy - The Safe and Speedy Driver Company makes...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 Convoy ------ The Safe and Speedy Driver Company makes robot drivers. They have been asked to provide drivers for convoys of trucks, but are unsure if their basic traveling algor- ithm will work. You have been asked to simulate it, so see under what circumstances it will cause crashes. The simulation is of N trucks traveling from right to left. In the beginning, all trucks are separated by exactly L0 feet and are traveling a velocity V0 ft/s. The simulation lasts for some number of seconds. Each driver decides at the beginning of each second whether to accelerate during the second, decelerate (brake) during the second, or maintain velocity during the second. All acceleration is by A0 ft/s/s. All deceleration is by -A0 ft/s/s unless the current truck velocity V ft/s is less than A0, in which case the de- celeration is by -V ft/s/s so the truck velocity will be 0 at the end of the second. Maintaining velocity, of course, involves an acceleration of 0 ft/s/s during the second. During each second, the acceleration in ft/s/s of each truck is constant, the velocity of the truck is a linear function of time, and the distance traveled by the truck
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

convoy - Convoy - The Safe and Speedy Driver Company makes...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online