CS 6310 Assignment #2: Mass Transit Simulation – Requirements Analysis & Design (v3) solution

$29.99

Original Work ?

Download Details:

  • Name: hw2-ywl7tq.zip
  • Type: zip
  • Size: 1.24 MB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (5 votes)

CS6310 – Software Architecture & Design The application that we will be working with is a Mass Transit Simulation (MTS) system. The prototype application that has been provided simulates the interaction of buses moving along a route of stops, and allowing passengers to board and later depart the bus at different stops. Your requirement for this assignment is to create Unified Modeling Language (UML) Class Diagram and Sequence Diagrams that accurately reflect the concepts of the problem space. The clients have provided you with the prototype to help clarify their requirements and intentions. You must interpret the client’s descriptions of the problem space, and requirements, as given below and in other (later) discussions. Disclaimer This scenario is inspired by the Metropolitan Atlanta Rapid Transit System (MARTA) Expansion Project as part of the Georgia Tech Serve-Learn-Sustain (SLS) Program, and we will leverage some of their data and other resources. Any other similarities or differences between this scenario and any of the programs at Georgia Tech programs are purely coincidental. More information on the MARTA Expansion Project can be found at: https://serve-learn-sustain.gatech.edu/marta-expansion Deliverables UML Diagrams are normally divided into three fundamental categories: Functional, Structural and Behavioral. For this assignment, you must analyze the MTS System that has been provided, and then submit UML Diagrams that accurately reflect the system as described by the clients. You must submit the following items: (1) Class Diagram [50 points] – You must generate a Class Diagram that includes (at a minimum) classes, attributes with basic types, methods, and relationships with proper cardinalities that accurately reflect the problem space. To make your class diagram more readable, you may omit very basic “setters and getters” [e.g. set_() and get_() based operations and methods], especially those of the one-line variety that only access and/or modify an object’s basic attribute. Your UML Class Diagram must match the same level of detail as shown in the Udacity videos. (2) Sequence Diagram [50 points] – You must generate a Sequence Diagram (sometimes referred to as an Event Diagram) that reflects the actions performed in the “Move Next Bus” command. Your sequence diagram must be consistent with the class and object structures that you designed in part (1), where the sequence elements reflect the messages sent between objects in your model, along with conditional and iteration structures as required. If you can fit everything into one diagram, great; if not, then use multiple diagrams as required to ensure that the results are readable. MTS System Description The Mass Transit Simulation (MTS) application must implement a discrete-event simulation that allows buses to travel along different routes while transporting riders to different stops. The description below gives a brief, high-level overview of how these concepts are interpreted by the clients. The task of the course long project will be to design and develop this application, which will include the current description of the problem space and system, along with new requirements. For this assignment, however, your goal is to develop the “to-be” design artifacts based on the client’s current description of the problem space. • Discrete-Event Simulation: A discrete-event simulation of a system is characterized by modeling the actions and activities that change the state of the system as a discrete sequence of events in time. There are no changes to the state of the system between events. We will model activities such as buses moving to a new stop, passengers arriving at a stop, etc. as discrete events. Each step of the simulation has two phases, where the first phase involves determining the next chronological event that should be executed. Each event is composed of a program of actions, where each individual action could involve modifying some aspect of the simulation’s state and/or creating one or more new events. The second phase involves executing the actions required by that event. If there are two or more events that are “tied” chronologically, then the simulation system is allowed to act in a non-deterministic manner, and may execute the tied events in any order. Also, the event that has just been executed is normally removed from the pool of candidate events – or, at least its time for the next execution cycle is updated to a new future time. • Passengers: Passengers will represent the people who ride buses from their arrival stop to their destination stop. We will simulate the arrival of passengers at each stop using a random distribution based on the MARTA data that we’ve collected as part of the SLS program. The data is contained in a database, and is used to generate upper and lower limits for the probability distributions of passenger arrivals and departures for different hours during the day. Quick note: “riders” and “passengers” are both people moving through our simulated transportation system, and there isn’t intended to be any significant distinction between the two terms. • Buses: Buses will carry passengers between stops. Buses will travel along a route; and, at each stop, some of the current passengers will get off of the bus, and then some new passengers will get on. Each bus will travel at an average speed, and will also have a capacity to hold a maximum number of passengers. The bus will follow a designated route to determine its next stop. • Stops: Stops are locations where passengers can get on and off the buses. We will not be concerned with passengers getting on or off buses at other locations – only at a valid stop. When a bus arrives at a stop, then a specific sequence of events occur based on the normal actions of some passengers arriving at the stop, different numbers of passengers getting on and off of the bus, and some of the passengers departing the stop. There might also be conditional events that occur based on other actions that occur, or based on changes initiated by the simulation users. • Routes: Routes are lists of stops that determine how buses travel between stops. A bus travels to the stops listed in a route is simple sequence; and, when the bus is located at the last stop in the route list, the bus then “restarts” by going to the first stop on the route list. For example, if a route list has N stops listed [s(0), s(1), s(2), …, s(n-2), s(n-1)], then the bus currently at stop s(n-1) will proceed to stop s(0) next. A stop can be listed multiple times within a route, and the simulation users will define the routes based on their coverage patterns. Routes will normally be linear (e.g. back and forth along an East-West or North-South orientation) or circular (e.g. perimeter routes around a specific area such as a campus, city or business district), but aren’t restricted to such simple patterns. The client has a very simple prototype system that can be used to get an idea of what is expected. The full application that you will develop will have more functionality. The information below explains that commands for the prototype application, and also lists the commands and functionality that you will need to design and implement as part of this project. Simulation System Commands This is a quick guide the MTS prototype that you’ve been given for demonstration and learning. The simulation has three fundamental aspects: (1) Scenario Definition, which refers to the commands used to setup the simulation scenario; (2) Simulation Management, which refers to executing the scenario, and to making changes to aspects of the scenario to explore the effects; and, (3) Simulation Monitoring, which refers to capturing and analyzing various aspects of the state of the scenario, such as the number of passengers at a certain stop. Scenario Definition The definition category includes commands such as add_stop, add_route, add_bus and add_event. These commands are used to create the objects in the simulation environment that correspond to the entities described above. The extend_route command is used to modify a route object by adding a stop identifier to the end of the route list. These commands are saved to a text file that is used when starting the program. • add_stop,,,,, This command creates a stop object with a given , , and an initial number of , located on the travel map at the location , . Each stop must have a unique ID, along with a “user facing” and more descriptive Name attribute. A stop also contains a Riders attribute, which records the initial number of people waiting at the stop to board an available bus. Each stop also contains a Latitude and Longitude attributes that translate to its geographical location on the travel map, and where the Latitude and Longitude correspond to the Y and X coordinates, respectively. The coordinate attributes are used to calculate the distance between stops, which is then used along with the Speed attribute of a bus to determine when the bus will arrive at its next stop. • add_route,,, This command creates a route object with a given , and . The route initially doesn’t have any stops. • extend_route,, This command appends the stop designated by to the end of the route designated by . Each route must have a unique Route-ID, along with more descriptive “user facing” Number and Name attributes, such as “Route 10 – Midtown Express”. Most importantly, each route contains an attribute that lists the stops (using the Stop-ID values) covered by that route. The order of the list is important: normally, a bus begins at the stop listed in the first position of the list, and then progresses to each stop as ordered in the given route list. If the bus is located at the last stop on the list, it then goes back to the first stop in the list, and continues the cycle as long as required for the duration of the simulation session. Please note that a route might have the same stop listed twice, which is not necessarily an error. In these cases, the bus is likely traveling along a fixed path in alternating directions – for example, first Northbound, then Southbound, etc. • add_bus,,,,,,,, This command creates a bus object with identifier that travels along , starting at index within the list, and carrying an initial number of riders. Also, the bus can hold at most passengers, and travels along the route at the given as measured in statute miles per hour. Also, the bus begins with an amount of fuel needed to travel a distance of statute miles. The bus, when fully refueled, can travel a maximum distance of miles. Each bus must have a unique ID and travel along a certain Route. To facilitate movement along the route, the bus Route Location attribute refers to an item in the route’s list of stops, rather than having the bus refer directly to the stop itself. Also, each bus has a Capacity attribute which limits the total number of passengers that it can carry at any one time, along with a Speed attribute that affects how quickly the bus travels along the route. And for our purposes, the client has stated that they will likely ignore the direct fuel management aspects in the future. • add_event,