Carpool Tunnel Banner
Project Home Page    Documentation    Download     Developer Information    CS435 Homepage    Forum    Issue Tracker

CS435 Traffic Simulator Requirements

Version 1.0.2

1. Introduction

The goal of this project is to build a software simulation of traffic, which will be based on M. Treiber's MOBIL lane-changing model and IDM driver model. The project will include varying levels of intersections, traffic laws, and lanes (i.e. more than two). In addition, it will feature different maps and a driver model selection for the user to choose from.

The system will present the user(s) with an interface that allows them to choose settings of the simulation such as velocity and traffic flow. The system will adhere to a realistic array of scientific laws to manifest a realistic simulation. The system will also allow the user multiple views of the simulation and to change settings as the current simulation is running. Users of this product are assumed to have a reasonable familiarity with computers, but not necessarily with any particular platform or window manager. They are also assumed to understand basic concepts of driving (as anyone who has viewed traffic would), although they probably will not know the details of the scientific basis on which driving occurs.

1.1 About This Document

This document is intended to be read by the software development team members, managers and the client and/or the client's representative. This is a new project; therefore, there is no summary of previous versions. In this document, we describe the overall product and three milestones which the customer has specified. We then lay out all the requirements for the whole system, indicating the appropriate milestone(s) for each. Use cases are located in a separate document. The goal of this document is to provide the system developers with both the user requirements and a detailed specification of the system requirements for each milestone of the software product.

Each section of the requirements addresses a different aspect of the system. Requirements use a standard schema, which has ID, name, description, importance, and planned delivery milestone. Requirements are numbered by section. Priorities are: 1: very critical, 2: critical, 3: very useful, 4: useful, 5: would love to have, 6: nice to have, 7-10: varying degrees of wishlist (based on assestment of probability). Requirements with priorities 1-4 are necessary for successful completion of the project.

1.2 Changes to this Document

2. Scope and Overall Structure

Functionality will be added to the system in 5 phases, called milestones. The design and documentation thereof will be set up by the first milestone. The second milestone will add the basic GUI and simulation of basic vehicle behavior, such as stopping. The third milestone will add simple intersections, a more advanced GUI, and multiple lanes. The forth milestone will add intersections with stoplights, advanced multiple lanes, improved simulation, and increased robustness of performance. The fifth milestone will add either artificial intelligence, more enhanced simulation, or advanced driver model options. The decision for the functionality implemented in the fifth milestone will be left to the developers.

At each milestone, all functionality from the previous milestones should be preserved. The planned deadlines for completion of each milestore are as follows:

More information regarding the scheduling requirements can be found in the development roadmap: http://www.cs.wm.edu/~coppit/csci435-spring2005/project/roadmap.php.

3. Project Development Requirements

This section outlines describes requirements outlined by the client, including tools and documentation.

3.1 Tools

This section outlines various tools we will be using including the software language, code commenting, graphics package, build system, testing tools, source control, and IDE. It describes which tools will be used in each milestone.

ID: 3.1.1
Name: Software Language
Description: All code will be written in Java
Importance: 1
Planned Delivery: Milestones 1, 2, 3, 4, 5
ID: 3.1.1.1
Name: Language Version
Description: Java 1.4 will be used.
Importance: 2
Planned Delivery: Milestones 1, 2, 3, 4, 5
ID: 3.1.2
Name: Graphics Package
Description: Graphics will be rendered via Java Swing or AWT. Tests thus far have shown that Java Swing performs smoother. However, earlier version of the software (Treiber) have encountered several bugs using Java Swing.
Importance: 5
Planned Delivery: Milestones 2, 3, 4, 5
ID: 3.1.3
Name: Code Comments
Description: All comments will be written using JavaDoc
Importance: 1
Planned Delivery: Milestones 1, 2, 3, 4, 5
ID: 3.1.4
Name: Build System
Description: Apache Ant must be used for the build system
Importance: 1
Planned Delivery: Milestones 1, 2, 3, 4, 5
ID: 3.1.5
Name: Testing Tools
Description: JUnit must be used to automate testing
Importance: 1
Planned Delivery: Milestones 1, 2, 3, 4, 5
ID: 3.1.6
Name: Source Control
Description: All code will be maintained in a source control system. Subversion will be used for this purpose.
Importance: 1
Planned Delivery: Milestones 1, 2, 3, 4, 5
ID: 3.1.7
Name: Integrated Development Environment
Description: Software may be developed using the Eclipse platform.
Importance: 5
Planned Delivery: Milestones 1, 2, 3, 4, 5

3.2 Documentation

This section outlines the various documentation requirements at each milestone.

ID: 3.2.1
Name: Documentation Format
Description: HTML will be used for all documentation. HTML documentation must be written in valid HTML (any version) using a specified CSS style.
Importance: 4
Planned Delivery: Milestones 1, 2, 3, 4, 5
ID: 3.2.2
Name: Detailed Requirements
Description: Required system functionality, as well as development constraints and potential risks
Importance: 1
Planned Delivery: Milestone 1
ID: 3.2.3
Name: High-Level Design
Description: The major modules of the system and how they interact
Importance: 1
Planned Delivery: Milestone 1
ID: 3.2.4
Name: Detailed Design
Description: The definition of the interfaces for all the modules, and descriptions of algorithms/data structures.
Importance: 1
Planned Delivery: Milestone 1
ID: 3.2.5
Name: Test Plans
Description: Test plans and test results must be documented. This is in addition to the actual test cases themselves.
Importance: 3
Planned Delivery: Milestones 1, 2, 3, 4, 5
ID: 3.2.6
Name: User Manual
Description: In-program help system. Documentation aimed at end users of the system.
Importance: 1
Planned Delivery: Milestone 4
ID: 3.2.6.2
Name: Interface Documentation
Description: A description of the user interface.
Importance: 4
Planned Delivery: Milestone 4
ID: 3.2.6.3
Name: Web Site
Description: A website for the traffic simulation and documentation.
Importance: 5
Planned Delivery: Milestone 4

4. Functional Requirements

In this section the functional requirements are outlined for the graphical user interface and simulation.

4.1 User Interface

This section outlines the functional requirements relating to user interface. Included in this are requirements concerning graphical interface for a new simulation and graphical interface during a running simulation.

4.1.1 New Simulation Interface

ID: 4.1.1.1
Name: Map Selection
Description: User can select which map to load.
Importance: 1
Planned Delivery: Milestone 3 (updated for Milestones 4 and 5)
ID: 4.1.1.2
Name: Driver Model Selection
Description: User can select which driver model to use.
Importance: 1
Planned Delivery: Milestone 3
ID: 4.1.1.3
Name: Variable Settings
Description: User can select variable settings including but not limited to: time speedup value, initial zone, traffic flow in and out of simulation.
Importance: 1
Planned Delivery: Milestone 3
ID: 4.1.1.4
Name: Equal use of Mouse and Keyboard
Description: Mouse is used to select controls, but many controls may be typed in from the keyboard.
Importance: 1
Planned Delivery: Milestone 3

4.1.2 Running Simulation Interface

ID: 4.1.2.1
Name: Progress Control
Description: User can start, stop, or pause, or continue "play" of simulation.
Importance: 1
Planned Delivery: Milestone 2
ID: 4.1.2.2
Name: Zoom Control
Description: User can zoom in and out with respect to simulation.
Importance: 1
Planned Delivery: Milestone 3
ID: 4.1.2.3
Name: Pan Control
Description: User can pan in and out with respect to simulation.
Importance: 2
Planned Delivery: Milestone 3
ID: 4.1.2.4
Name: Time Speed Control
Description: User can accelerator or deccelerate simulation speed.
Importance: 2
Planned Delivery: Milestone 3
ID: 4.1.2.5
Name: Quitting Simulation
Description: User can quit program or quit simulation and start new simulation by reseting starting variables.
Importance: 1
Planned Delivery: Milestone 3
ID: 4.1.2.6
Name: Check Current Statistics
Description: User will be able to right click on a particular car and check its current statistics.
Importance: 6
Planned Delivery: Milestone 4
ID: 4.1.2.7
Name: View Current Settings
Description: User will be able to view current properties and statistics at any given point in running simulation.
Importance: 6
Planned Delivery: Milestone 3
ID: 4.1.2.8
Name: Update Properties
Description: User will be able to update properties of sources and sinks, intersections, roads, etc.
Importance: 8
Planned Delivery: Milestone 4
ID: 4.1.2.9
Name: Keyboard and Mouse-Oriented
Description: Once simulation starts, keyboard and mouse can be used.
Importance: 1
Planned Delivery: Milestone 2
ID: 4.1.2.10
Name: User Interface Resizing
Description: Overall user interface is resizable.
Importance: 2
Planned Delivery: Milestone 2
ID: 4.1.2.11
Name: Saving Simulation State
Description: User will be able to save the state of the simulation.
Importance: 7
Planned Delivery: Milestone 4, 5
ID: 4.1.2.12
Name: Fast-forward
Description: User will be able to run the simulation at an accelerated speed.
Importance: 10
Planned Delivery: Milestone 5

4.2 Simulation

This section outlines the functional requirements relating to the actual simulation. It address roads and surroundings and vehicle behavior.

4.2.1 Roads and Surroundings

ID: 4.2.1.1
Name: Units of measurement
Description: Program must express simulator values (vehicle speed, distances, vehicle acceleration, vehicle length) in SI units (e.g., km/h).
Importance: 5
Planned Delivery: Milestones 2, 3, 4
ID: 4.2.1.2
Name: Speed Limit
Description: Roads have a maximum speed at which cars should travel.
Importance: 1
Planned Delivery: Milestone 2
ID: 4.2.1.3
Name: Appearance
Description: Roads appear as realistic roads.
Importance: 1
Planned Delivery: Milestone 2
ID: 4.2.1.4
Name: Single-Lane Roads
Description: Roads having one lane in each direction.
Importance: 1
Planned Delivery: Milestone 2
ID: 4.2.1.5
Name: Two-Lane Roads
Description: Roads having two lanes in each direction.
Importance: 3
Planned Delivery: Milestone 3
ID: 4.2.1.6
Name: Advanced Roads
Description: Roads having three or more lanes in one direction, merging lanes, branching lane, and turn-only lanes.
Importance: 5
Planned Delivery: Milestone 4
ID: 4.2.1.7
Name: Overpasses
Description: Roads having overpasses (where one road may cross another without the driver stopping).
Importance: 10
Planned Delivery: Milestone 5
ID: 4.2.1.8
Name: On Ramps/Off Ramps
Description: Ramps.
Importance: 10
Planned Delivery: Milestone 5
ID: 4.2.1.9
Name: Random T Intersections
Description: Intersections where two roads meet.
Importance: 4
Planned Delivery: Milestone 4
ID: 4.2.1.10
Name: Two-way Stop
Description: Intersections with stop signs on two opposite sides.
Importance: 4
Planned Delivery: Milestone 4
ID: 4.2.1.11
Name: Four-way Stop
Description: Intersections with stop signs in all directions.
Importance: 4
Planned Delivery: Milestone 4
ID: 4.2.1.12
Name: Four-way Intersection
Description: Four-way intersections with various traffic controls.
Importance: 6
Planned Delivery: Milestone 4
ID: 4.2.1.13
Name: Road conditions
Description: User must be able to simulate road conditions (gradients, weather, speed limits, et cetera) that can affect driver behavior.
Importance: 5
Planned Delivery: Milestone 5

4.2.2 Vehicle Behavior

ID: 4.2.2.1
Name: Vehicles Move
Description: Graphically vehicles move.
Importance: 1
Planned Delivery: Milestone 2
ID: 4.2.2.2
Name: Vehicles Adhere to Basic Settings
Description: Vehicles follow settings choosen by user such as velocity, position, and driver behavior.
Importance: 1
Planned Delivery: Milestone 2
ID: 4.2.2.3
Name: Road-following
Description: Vehicles follow the road
Importance: 1
Planned Delivery: Milestone 2
ID: 4.2.2.4
Name: Sources and Sinks of Vehicles
Description: Source is starting point of vehicles. Once vehicles reach sink, they disappear.
Importance: 1
Planned Delivery: Milestone 2
ID: 4.2.2.5
Name: Stopping
Description: Vehicles stop if necessary - stop signs, intersections, other vehicles, etc.
Importance: 1
Planned Delivery: Milestone 2
ID: 4.2.2.6
Name: Acceleration and Decceleration
Description: Vehicles accelerate and deccelerate according to laws of science.
Importance: 1
Planned Delivery: Milestone 2
ID: 4.2.2.7
Name: Basic Lane Changing
Description: Vehicles exhibit basic lane changing abilities. (I.E. If road is blocked, vehicle chooses another lane. Vehicles should never collide with another vehicle when changing lanes. Also, vehicles change lanes based on Triebers's MOBIL approach.
Importance: 2
Planned Delivery: Milestone 3
ID: 4.2.2.7.1
Name: Lane Change Delay
Description: A vehicle will not change lanes for three seconds after executing a lane change.
Importance: 2
Planned Delivery: Milestone 3
ID: 4.2.2.7.2
Name: Lane Change Minimum Velocity
Description: Vehicles cannot change lanes if current velocity < X, where X is a number that is a reasonable speed for a car to be travelling in order to change lanes.
Importance: 2
Planned Delivery: Milestone 4
ID: 4.2.2.8
Name: Look-Ahead Lane Changing
Description: Vehicles change lanes to prepare for upcoming turns.
Importance: 2
Planned Delivery: Milestone 5
ID: 4.2.2.9
Name: Multiple-Lane Changing
Description: Vehicles can change lanes even if more than one lane exists to "change into." Must follow Treiber's MOBIL model.
Importance: 5
Planned Delivery: Milestone 4
ID: 4.2.2.10
Name: Obeying American Traffic Rules
Description: Vehicles obey American traffic rules.
Importance: 2
Planned Delivery: Milestone 2 (updated and made more advanced in Milestones 3, 4, and 5)
ID: 4.2.2.10.1
Name: Obeying Traffic Control Devices
Description: Vehicles obey traffic controls such as stop lights, yeild signs, blinking lights, stop signs, etc.
Importance: 2
Planned Delivery: Milestones 3, 4, 5
ID: 4.2.2.10.2
Name: Obeys Basic Traffic Rules
Description: Vehicles obey basic traffic rules such as not entering oncoming traffic.
Importance: 2
Planned Delivery: Milestones 2, 3, 4, 5
ID: 4.2.2.10.3
Name: Obeys European Traffic Rules
Description: Vehicles obey European traffic regulations.
Importance: 10
Planned Delivery: Milestones 5
ID: 4.2.2.11
Name: Merging
Description: Vehicles may merge from a source onto a road (without running into another vehicle).
Importance: 5
Planned Delivery: Milestone 4
ID: 4.2.2.12
Name: Artificial Intelligence
Description: Vehicles have set destination and determine best path based on road weight which is determined by traffic density.
Importance: 10
Planned Delivery: Milestone 5
ID: 4.2.2.13
Name: Enhanced Driver Model
Description: Vehicles correctly respond to the following advanced features: breakdowns, friendliness factor, visibility, accidents, construction, rubbernecking, and emergency driver behavior.
Importance: 10
Planned Delivery: Milestone 5
ID: 4.2.2.14
Name: Reversal
Description: Vehicles may NOT drive backwards. They may only move forward.
Importance: 10
Planned Delivery: Milestone 1
ID: 4.2.2.15
Name: Non-collision
Description: Vehicles do not collide
Importance: 2
Planned Delivery: Milestone 2

5. Non-Functional Requirements

In this section the non-functional requirements are outlined. Memory leaks, usability, testing, invalid input, and unhandled exceptions are all discussed in this section.

ID: 5.1
Name: Usability
Description: The usability of each version must be adequate, as determined by the customer.
Importance: 1
Planned Delivery: Milestones 1, 2, 3, 4, 5
ID: 5.2
Name: Memory Leaks
Description: There should be no memory leaks in the software for the maps provided with it..
Importance: 1
Planned Delivery: Milestones 2, 3, 4, 5
ID: 5.3
Name: Unhandled Exceptions
Description: There should be no unhandled exceptions in the software.
Importance: 1
Planned Delivery: Milestones 2, 3, 4, 5
ID: 5.4
Name: Stability
Description: The software must be stable enough to run at least 10 different simulations in a row.
Importance: 1
Planned Delivery: Milestones 4, 5
ID: 5.5
Name: Tests
Description: There must be "adequate" tests for every class, as decided by the managers.
Importance: 1
Planned Delivery: Milestones 2, 3, 4, 5
ID: 5.6
Name: Invalid Input
Description: Invalid input (such as negative velocities) should be handled gracefully.
Importance: 1
Planned Delivery: Milestones 2, 3, 4, 5

6. Performance and Environmental Requirements

This section lays out the performance and environmental requirements.

ID: 6.1
Name: Latency
Description: Latency for all operations is less than 1 second.
Importance: 1
Planned Delivery: Milestone 2
ID: 6.2
Name: Applet or Application
Description: The program must be runnable as an applet or an application.
Importance: 1
Planned Delivery: Milestones 2, 3, 4, 5
ID: 6.3
Name: Scalable
Description: With 100 vehicles, the frame rate should be 30 frames per second with no "jerkiness."
Importance: 2
Planned Delivery: Milestones 2, 3, 4, 5
ID: 6.4
Name: Software licensing
Description: Program will be licensed with the GPL and made available on the World Wide Web.
Importance: 2
Planned Delivery: ALL
ID: 6.5
Name: Minimum System Requirements
Description: Minimum system requirements should be the same as the version of Java we are using.
Importance: 4
Planned Delivery: ALL

7. Discussion of Requirements

Each milestone should be completely finished and tested before work starts on the next milestone. This will help to ensure that bugs are all fixed before continuing. Basic work on each section must be completed as there are many dependecies. There must be a basic simulation framework available, for example, basic road and driver classes must be implemented before features such as stoplights, highways and intersections may be added. Verification is done with testing, but in some areas there can be problems determining what is acceptable. For example, flickering of the graphics is extremely hard to measure in terms of "acceptability.".

Applet size is also a concern. With the number of features that could potentially be available, the tradeoffs of speed versus size versus performance must be carefully considered. For example, the detailed collection of data is quite important for this project, but taking the effort to collect data at every timestep may significantly hinder performance. Graphically, zoom ability and fast-forwarding and rewinding may all lead to a major performance hit. Zooming especially seems like it would be difficult to implement. Having to manipulate and magnify the graphics seems like a daunting task. The benefits and drawbacks of using Swing vs. AWT to render the graphics is yet to be determined.

Some options that we can offer to the customer include a variying number of maximum lanes, the quantity of fastforward and rewind features, including timed stoplights (either for the map as a whole or for individual lights), and the ability to put driver accidents into the simulation model. For the data collection, the quantity, types, and ways of acquiring data are variable, and so are the ways of outputting it.

Back Back to CSci 435/535 Homepage.

Valid CSS!
Valid HTML 4.01!