Next: Plans following and vehicle
Up: Plans following in the
Previous: Wait queue
  Contents
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:
- During the initialization of the simulation, we read all
the plans into computer memory. During this reading process, we
also sort them by starting time into the parking queue.
- During the simulation itself, in each time step and for each
link we check if the first vehicle in the parking queue is ``due''
for its entry into the traffic. If the answer is yes, then the
vehicle is moved to the waiting queue. This is repeated until no
more vehicles want to depart on this link in this time step.
- For all vehicles in the park queue, it is attempted to insert
them into the traffic.
The meaning of writeEvent will be explained later.
Next: Plans following and vehicle
Up: Plans following in the
Previous: Wait queue
  Contents
2004-02-02