next up previous contents
Next: Plans following and vehicle Up: Plans following in the Previous: Wait queue   Contents

Vehicle insertion

Vehicles need to be moved from the waiting queue into the traffic. We do this by

moving the SimLink::move(..) function to SimLink::moveOnLink(..), and then

defining a new SimLink::move(..) function as follows:


{}
class SimLink : public Link {
    ...
    void move ( int& nVehs ) {
        parkToWait() ;
        waitToLink() ;
        moveOnLink( nVehs ) ;
    }
} ;

The corresponding code is


/home/nagel/src/book/sim/book/Link::parkToWait

and


/home/nagel/src/book/sim/book/Link::waitToLink

Overall, what we actually do is the following:

The meaning of writeEvent will be explained later.


next up previous contents
Next: Plans following and vehicle Up: Plans following in the Previous: Wait queue   Contents
2004-02-02