|
| ID: | 1.1 |
| Name: | LoadGUI |
| Goal: | The Traffic Simulation software displays the base GUI. |
| Success End Condition: | The simulation loads the GUI, displaying the area where the simulation will take place as well as user controls. |
| Failed End Condition: | None (always succeeds). |
| Primary Actor: | The simulator main method. |
| Secondary Actor(s): | None. |
| Trigger: | The user runs the Traffic Simulator executable. |
| Main Success Scenario: |
1. The Simulator parent window is loaded. 2. The Simulator child windows are loaded, including the simulator controls, options menu, and simulator main window. |
| ID: | 1.2 |
| Name: | StartupDialog |
| Goal: | The user wants to start a new simulation. |
| Success End Condition: | The simulation loads the selected map and sets the variables to the desired values and starts the simulator loop. |
| Failed End Condition: | If the user does not specify a valid map, an error will notify the user, and allow the user to enter a valid map location. |
| Primary Actor: | User |
| Secondary Actor(s): | Simulator |
| Trigger: | The user starts the Traffic Simulation Program or the user clicks the New Simulation Button or Drop Down Menu Item. |
| Main Success Scenario: |
1. If a simulation is currently, running, the program will notify the user that the current simulation will be terminated. 2. The user can select a saved simulation to load, in which case skip to step 6. 3. The user selects the location of a valid map file. 4. The user selects a driver model. 5. The user sets simulation variables, which can be left in their default state. 6. The user presses the 'OK' button, thus loading the map, displaying the map in the GUI, and starting the simulation. |
| ID: | 1.2.1 |
| Name: | LoadPrevSimulation |
| Goal: | The user wants to load a previously saved simulation. |
| Success End Condition: | The user selects a valid simulation file. |
| Failed End Condition: | The user may not select a valid simulation file or any file at all, in which case the Startup Dialog box will be displayed again. |
| Primary Actor: | User |
| Secondary Actor(s): | None. |
| Trigger: | The 'Load Previously Saved Simulation' button is clicked in the Startup Dialog box. |
| Main Success Scenario: |
1. The user browses through the filesystem. 2. The user selects a valid simulation file. 3. Further progress follows the path of Use Case 1.2. |
| ID: | 1.2.2 |
| Name: | MapSelection |
| Goal: | The user wants to select a map to use in a new simulation |
| Success End Condition: | The user selects a valid map file |
| Failed End Condition: | The user may not select a valid map, or any map at all. |
| Primary Actor: | User |
| Secondary Actor(s): | None. |
| Trigger: | The Startup Dialog box is displayed. |
| Main Success Scenario: |
1. The user browses through the filesystem. 2. The user selects a valid map file. 3. Further progress follows the path of Use Case 1.2. |
| ID: | 1.2.3 |
| Name: | DriverModelSelection |
| Goal: | The user wants to select a driver model to use in a new simulation. |
| Success End Condition: | A driver model is selected by the user. |
| Failed End Condition: | None (Always succeeds). |
| Primary Actor: | User |
| Secondary Actor(s): | None. |
| Trigger: | The Startup Dialog box is displayed. |
| Main Success Scenario: |
1. The user selects a Driver Model via a Listbox. 2. Further progress follows the path of Use Case 1.2. |
| ID: | 1.2.4 |
| Name: | SetSimulatorVariables |
| Goal: | The user wants to modify the simulation variables such as simulation speed, maximum speed limit, and vehicle density. |
| Success End Condition: | Simulation variables are changed from their default values. |
| Failed End Condition: | None (Always succeeds). |
| Primary Actor: | User |
| Secondary Actor(s): | None. |
| Trigger: | The Startup Dialog box is displayed. |
| Main Success Scenario: |
1. The user moves the scrollbars corresponding to the variables to set the desired values. The scrollbars will prevent the user from selecting an invalid value that may cause errors in the simulation. 2. Further progress follows the path of Use Case 1.2. |
| ID: | 1.2.5 |
| Name: | LoadSimulation |
| Goal: | The Simulation must load the cars and roads and start the simulation. |
| Success End Condition: | Simulation variables are changed from their default values. |
| Failed End Condition: | A user may select an invalid map file, or no map file will be selected at all, in which case the user will be notified and will be returned to the Startup dialog box. |
| Primary Actor: | Simulator |
| Secondary Actor(s): | GUI. |
| Trigger: | The Start Simulation button is clicked on the Startup Dialog box. |
| Main Success Scenario: |
1. The map file and initial cars are loaded by the simulation 2. The roads and cars are displayed by the GUI. 3. The simulation loop starts. |
| ID: | 1.3 |
| Name: | NewSimulation_SimulationInProgress |
| Goal: | The user wants to start a new simulation after a simulation has already been loaded. |
| Success End Condition: | The simulation loads the Startup Dialog box. |
| Failed End Condition: | If the user does not want to lose the current simulation, the operation will be cancelled and the user will be returned to the currently running (or paused) simulation. |
| Primary Actor: | User |
| Secondary Actor(s): | None. |
| Trigger: | The user clicks the 'New Simulation' button from a GUI pane or from the Options menu. |
| Main Success Scenario: |
1. If a simulation is currently, running, the program will notify the user that the current simulation will be terminated. 2. Further progress follows the path of Use Case 1.2. |
| ID: | 1.4 |
| Name: | ResizingParentWindow |
| Goal: | The user wants to resize the Simulation parent window. |
| Success End Condition: | The simulation window resizes to the user's specification. |
| Failed End Condition: | None (always succeeds). |
| Primary Actor: | User |
| Secondary Actor(s): | GUI. |
| Trigger: | The user clicks and drags the mouse at the corner of the screen. |
| Main Success Scenario: |
1. The GUI will repaint the parent window to the users's specification and resize all the child windows accordingly. |
| ID: | 2.1 |
| Name: | RestartSimulation |
| Goal: | The user wants to restart the traffic simulation from the beginning, using the map and driver model specified in the startup dialog. |
| Success End Condition: | The traffic simulation starts from the beginning. |
| Failed End Condition: | None (always succeeds). |
| Primary Actor: | The User. |
| Secondary Actor(s): | The simulator. |
| Trigger: | The user indicates through the UI that the simulation should restart from the beginning. |
| Main Success Scenario: |
1. The initial settings for the map and the driver model are loaded. 2. Any progress made in the traffic simulation is thrown away. |
| ID: | 2.2 |
| Name: | PauseSimulation |
| Goal: | The user wants to pause the execution of the traffic simulation. |
| Success End Condition: | All simulator functions pause with maintained state (including graphics and modeling). |
| Failed End Condition: | None (always succeeds). |
| Primary Actor: | The User. |
| Secondary Actor(s): | The simulator. |
| Trigger: | The user indicates through the UI that a simulation pause is desired. |
| Main Success Scenario: |
1. State is stored for all vehicles displayed. 2. The simulation is paused, and a method for resumption is displayed. 3. Further progress follows the path of Use Case 2.2.1. or Use Case 2.2.2. |
| ID: | 2.2.1 |
| Name: | SimulationResume |
| Goal: | The user wants to resume the simulation after pausing it. |
| Success End Condition: | The simulation restarts, following the same course of action as it would had it never been paused. |
| Failed End Condition: | The simulation restarts, but random variables cause the model to follow a different course of action than it would had it never been paused. |
| Primary Actor: | User |
| Secondary Actor(s): | The simulator. |
| Trigger: | In a paused state, the user indicates through the UI that the simulation should start again. |
| Main Success Scenario: |
1. User indicates to the UI to resume simulation. 2. Simulation resumes. |
| ID: | 2.2.2 |
| Name: | VehicleStats |
| Goal: | The user wants view the statistics of or information about vehicles when they are in a paused state. |
| Success End Condition: | The GUI displays the statistics of the user-specified vehicle. |
| Failed End Condition: | The user doesn't specify a vehicle, or the simulation isn't paused. |
| Primary Actor: | User |
| Secondary Actor(s): | The simulator. |
| Trigger: | In a paused state, the user right-clicks on a vehicle. |
| Main Success Scenario: |
1. User right-clicks on a vehicle. 2. If the simulation is paused, the GUI displays the statistics of the indicated vehicle. |
| ID: | 2.4 |
| Name: | ModifyView |
| Goal: | The user wants to view the simulation differently. |
| Success End Condition: | The simulation proceeds with the simulation being viewed in a different size or location. |
| Failed End Condition: | The user specifies an invalid view. |
| Primary Actor: | The User. |
| Secondary Actor(s): | The simulator. |
| Trigger: | The user indicates through the UI that a view change is desired. |
| Main Success Scenario: |
1. User indicates that a view change is desired. 3. Further progress follows the path of Use Case 2.4.1. |
| ID: | 2.4.1 |
| Name: | ZoomChange |
| Goal: | The user wants to view the simulation from a closer/further viewpoint. |
| Success End Condition: | The simulation continues to run, but all graphical elements are drawn as if closer(larger) or further away(smaller). |
| Failed End Condition: | The user indicates a zoom value that is not appropriate. |
| Primary Actor: | User |
| Secondary Actor(s): | The simulator. |
| Trigger: | The user clicks on a zoom in or zoom out button or specifies a value in a textbox. |
| Main Success Scenario: |
1. User indicates a new zoom value to assume. 2. The simulation begins drawing objects in the appropriate size. |
| ID: | 2.4.2 |
| Name: | PanChange |
| Goal: | The user wants to view a different part of the simulation that cannot be displayed due to map size or zoom settings. |
| Success End Condition: | The simulation continues to run, but the a different part of the map is displayed. |
| Failed End Condition: | The user attempts to pan off the map, or the map can fit entirely within the GUI. |
| Primary Actor: | User |
| Secondary Actor(s): | The simulator. |
| Trigger: | The user clicks on a 'pan [direction]' button or indicates with the mouse. |
| Main Success Scenario: |
1. User indicates in which direction to pan. 2. The simulation begins drawing objects only if they appear in the newly-viewable area of the simulation. |
| ID: | 2.8 |
| Name: | Accelerate |
| Goal: | The car will go from one speed to another, faster speed without breaking any of the IDM requirements, colliding with another car, or running off the road |
| Success End Condition: | The vehicle is moving at a faster speed than it previously was safely |
| Failed End Condition: | The car doesn't accelerate and does what it was previously doing |
| Primary Actor: | Simulation |
| Secondary Actor(s): | Graphics |
| Trigger: | IDM detects that accelerating is safe and desireable |
| Main Success Scenario: |
|
| ID: | 2.9 |
| Name: | Decelerate |
| Goal: | The car will go from one speed to another, slower speed without breaking any of the IDM requirements, colliding with another car, or running off the road |
| Success End Condition: | The vehicle is moving at a slower speed than it previously was safely, or it has stopped altogether (deceleration to 0 km/h) |
| Failed End Condition: | The car doesn't decelerate and does what it was previously doing |
| Primary Actor: | Simulation |
| Secondary Actor(s): | Graphics |
| Trigger: | IDM detects that decelerating is desireable |
| Main Success Scenario: |
|
| ID: | 2.10 |
| Name: | ChangeLanes |
| Goal: | A vehicle on the roadway wants to change lanes |
| Success End Condition: | The vehicle is in the lane that it wished to turn into |
| Failed End Condition: | The vehicle does not change lanes |
| Primary Actor: | Vehicle |
| Secondary Actor(s): | Simulation, Graphics |
| Trigger: | The MOBIL equation in the simulator determines that it is desirable for a car to change lanes due to one lane being preferable |
| Main Success Scenario: |
|
| ID: | 2.11 |
| Name: | ChangeLanesDueToObstacle |
| Goal: | A vehicle on the roadway wants to change lanes |
| Success End Condition: | The vehicle is in the lane that it wished to turn into |
| Failed End Condition: | The vehicle does not change lanes and slows to a stop in front of the obstacle |
| Primary Actor: | Vehicle |
| Secondary Actor(s): | Simulation, Graphics |
| Trigger: | The MOBIL equation in the simulator determines that it is desirable for a car to change lanes due to one lane being preferable |
| Main Success Scenario: |
|
| ID: | 2.12 |
| Name: | HandlingIntersections |
| Goal: | A vehicle on the roadway should successfully navigate an intersection |
| Success End Condition: | The vehicle has gotten past the intersection has has safely moved to its new road segment |
| Failed End Condition: | None (always succeeds) |
| Primary Actor: | Vehicle |
| Secondary Actor(s): | Simulation, Intersection |
| Trigger: | A vehicle detects that it is approaching an intersection |
| Main Success Scenario: |
|
| ID: | 2.13 |
| Name: | FollowCar |
| Goal: | The user wants to follow a specific vehicle no matter where it goes on the map. |
| Success End Condition: | The program will pan automatically to follow the selected vehicle. |
| Failed End Condition: | None (always succeeds) |
| Primary Actor: | User |
| Secondary Actor(s): | None |
| Trigger: | User indicates desire to follow a specific car in the simulation. |
| Main Success Scenario: |
|
| ID: | 3.1 |
| Name: | Exit Program |
| Goal: | The user wants to exit the Traffic Simulator Program. |
| Success End Condition: | The Traffic Simulator Program exits. |
| Failed End Condition: | If the user does not want the currently running (or paused) simulation to be lost, the program will not terminate execution. |
| Primary Actor: | User |
| Secondary Actor(s): | None. |
| Trigger: | The user clicks the 'X' at the top right corner of the Traffic Simulator parent window, or clicks the 'Exit' button in the Options menu. |
| Main Success Scenario: |
1. If a simulation is currently, running or paused, the program will notify the user that the current simulation will be terminated. 2. The user will also be prompted to save the current simulation. 3. The simulation will terminate. |
| ID: | 3.1.1 |
| Name: | ExitLoadMap |
| Goal: | The user wants to exit the Traffic Simulator Program while a map is loading. |
| Success End Condition: | The Traffic Simulator Program exits. |
| Failed End Condition: | If the user does not want the newly created simulation to be lost, the program will not terminate execution. |
| Primary Actor: | User |
| Secondary Actor(s): | None. |
| Trigger: | The user clicks the 'X' at the top right corner of the Traffic Simulator parent window. |
| Main Success Scenario: |
1. Once the map has loaded and the simulation is ready to start, the program will inquire if the program is to be terminated. 2. Further progress follows the path of Use Case 3.1. |
| ID: | 3.1.2 |
| Name: | ExitSaveSim |
| Goal: | The user wants to exit the Traffic Simulator Program while the current simulation state is being saved. |
| Success End Condition: | The Traffic Simulator Program exits. |
| Failed End Condition: | None. (Always succeeds). |
| Primary Actor: | User |
| Secondary Actor(s): | None. |
| Trigger: | The user clicks the 'X' at the top right corner of the Traffic Simulator parent window while the simulation is saving. |
| Main Success Scenario: |
1. Once the simulation has been saved, the program will inquire if the program is to be terminated. 2. Further progress follows the path of Use Case 3.1. |
In creating the Use Cases document, we found that several changes could have been made to our requirements document. First, the high level design specified that maps should be loaded on start. It also specified that the driver model should be modified while setting up and running the simulation. We also did not address the issue of fast forwarding. All of these issues were addressed in the Use Cases document, since the user will directly interact with these issues, but were not in the Requirements Document. Furthermore, we would have been a little more detailed in the requirements document about how the GUI was to function, such as describing the dialog box which starts a new simulation and the layout of the GUI. Another important issue in the requirements document would have been to address error handling in greater detail. Use cases seem to play a great role in determining how the user could generate errors. Once most possible user errors have been determined, then the requirements could be modified to address them.