Visual Traffic Simulation by eon20304

VIEWS: 34 PAGES: 24

									Visual Traffic
 Simulation
 Thomas Fotherby
                Objective


• To visualise traffic flow.
   – Using 2D animated graphics
   – Using simple models of microscopic traffic
     behaviour
   – Using simple models of junction heuristics
• Flexible road-network editor
• Simple simulation results
Traffic simulation applications

• Big business
• Used for
  –   Transportation Planning
  –   Motorway Design
  –   Traffic Control & Operations
  –   Traffic Management
  –   Public Transportation
  –   ITS Evaluation
  –   Research & Development
                What is ITS

• Different combined technologies:
  – CCTV camera’s
  – Image Recognition
  – Vehicle sensors mounted on traffic lights or buried
    in the tarmac
  – Communication network
  – Central control
  – Fallback system.
               Advantages of ITS

•   Substantial savings in journey times
•   Reduction in the number of stops, leading to smoother traffic flow and
    reduced congestion.
•   Greater fuel economy and reduced environmental pollution
•   Fewer accidents due to less driver frustration
•   Greater safety for pedestrians at regular crossing places
•   Easier adjustment of traffic signal timings as traffic patterns change
•   Improved monitoring giving instant reports of traffic signal failures
•   Quicker fault detection and response
•   Reduced journey times for emergency vehicles
        Original motivation


• Noticed traffic junctions could be better.
• Now realised traffic systems are not
  optimised for the individual.
• Road-traffic networks are model-based
  systems ideally suited to an object-
  oriented programming approach.
            The Application


•   Single Software Product
•   Works as an Application or Applet
•   Written in Java version 1.4
•   11,000 lines of original code
•   81 classes
•   3 packages
General Architecture
           Editor Algorithms

• Road Drawing
  – Adding Lanes
  – Parallel Lanes
• Junction Drawing
  – Junction rotation
• Painting the screen
• XML
• Usability considerations
                       Road Drawing

•   Roads are an array of “paths” running parallel to a centre-line
•   Path routines package
             Junction Drawing

•   Handled rectangle
•   Drawn with a textured paint
•   Automatic resizing
•   Junction rotation
       Painting the screen


• Strong use of Back-buffered images
• Keep track of selected objects
• Number of internal states of the system
       Saving and Loading


• XML
• Human readable
• Enables possibility of project being a
  graphical front-end to a more detailed
  traffic model.
Usability
      Simulator Algorithms


• The timing system
• The animation of vehicles
  – The vehicle movement model
  – Gap acceptance
• Junction models
• ITS constructs
           The timing system

• Package written by Jeff Magee
• A thread that generates two events each “tick”
• Objects registered with the timer must implement the
  timer interface and provide pretick() and tick()
  methods.
• Vehicles calculate their new position in the pretick()
  phase
• The whole simulation frame is drawn in the tick()
  phase
           Animation of vehicles

• Movement calculated using car-following model
     – Linear model.
     – Speed is proportional to distance of object ahead.
•   Gap-acceptance model controls vehicles pulling out of junctions
•   Vehicles have a “carContainer”
•   Angle of carContainer specifies rotation of vehicle image
•   Know distance to end of carContainer
•   If < 0 change to new carContainer and rotate vehicle image.
           Junction Models


• Junction paths
• Non-signalled junctions
  – Priority traffic
  – Gap acceptance model
• Signalled junctions
  – Traffic light sets
           ITS constructs


• Vehicle Actuated junctions
• Individual adaptive junctions
• Synchronised junctions
Simulation Results
               Limitations

• Not an accurate simulation
• Many critical features missing
  – Simplistic models
  – Lack of functionality
• Not scaleable
  – No zoom
  – Performance decreases as it scales
               Strengths


•   Microscopic simulation approach
•   Input editor
•   Animated output
•   Graphical user interface
•   Accessibility
•   Extendibility.
           Knowledge gained

• Object-orientated approaches to traffic simulation do
  well to accommodate the necessary modular design
  of different traffic models
• Simple traffic models can lead to good visualisations
  of traffic flow
• Visualisations are resource intensive limiting the
  number of vehicles in the simulation
• Flexibility can be problematic
• Java is platform independent?
                     Conclusion

•   A set of simple traffic models and algorithms
•   A fully independent application
•   Can quickly model simple urban road networks
•   Can animate user-defined traffic data on a road network
•   Produces intuitive visualisations of traffic flow
•   Enable different road networks to be compared for efficiency
•   Documentation and background information also help annotate
    the project application

								
To top