Research Article

Vehicle Routing Simulation for Prediction of Commuter’s Behaviour

Algorithm 1

Routing with implemented queuing mechanism.
while event_schedule do
  
  randomly select an agent assigned to the event at the time .
  ifthen
   remove agent from its previous edge cars count: .
   add agent to cars count: .
   calculate agent driving time from eq. 3
   update agent beliefs from eq. 6
   update waiting list
   if is agent final edge then
    delete event_schedule agent .
   else
    event_schedule[agent] =  .
   end if
  else
   available_edges []
   insert into available_edges
   for in edges reachable from do
    if then
     insert into available_edges
    end if
   end for
   randomly select edge form available_edges
   if then
    add agent to waiting list
   else
    start driving by edge .
   end if
  end if
end while