Simple simulation of vehicles in 2D plane
We would like you to simulate some vehicles on a 2D-plane. Since the real-world has a variety of different vehicles this needs to be reflected. Therefore, we want you to design a simple simulator that allows us to extend it for more vehicle types in the future. The simulation should initially allow for 3 different vehicle types in the system that have a different set of parameters that change throughout the simulation.
- Private Vehicles, number of passengers, velocity between 30 and 50 kph
- Taxis, HIRED or FREE sign and when Hired how many customers, velocity between 40 and 60 kph
- Buses, initial capacity and the current number of passengers, velocity between 20 and 30 kph
The different vehicles types are driving on a 2-dimensional plane that has the dimensions of 3000.0 m by 5000.0 m. The simulation time step length should be configurable but 100 ms is a good default value. At each time step, all vehicles should be updated. The simulation should run until all vehicles have exited the simulation. At the beginning of the simulation, a user-specifiable number of agents should be created. Throughout the simulation time no more new agents should be created. The entire vehicle population should have a distribution of (85% private vehicles, 10% Taxies and 5% Buses).
The project is well described in the uploaded pdf file.Get Help With a similar task to - Simple simulation of vehicles in 2D plane
Additional Instructions:
Little Simulation in C++ Scenario We would like you to simulate some vehicles on a 2D-plane. Since the real-world has a variety of different vehicles this needs to be reflected. Therefore, we want you to design a simple simulator that allows us to extend it for more vehicle types in the future. The simulation should initially allow for 3 different vehicle types in the system that have a different set of parameters that change throughout the simulation. Private Vehicles, number of passengers, velocity between 30 and 50 kph Taxis, HIRED or FREE sign and when Hired how many customers, velocity between 40 and 60 kph Buses, initial capacity and the current number of passengers, velocity between 20 and 30 kph The different vehicles types are driving on a 2-dimensional plane that has the dimensions of 3000.0 m by 5000.0 m. The simulation time step length should be configurable but 100 ms is a good default value. At each time step, all vehicles should be updated. The simulation should run until all vehicles have exited the simulation. At the beginning of the simulation, a user-specifiable number of agents should be created. Throughout the simulation time no more new agents should be created. The entire vehicle population should have a distribution of (85% private vehicles, 10% Taxies and 5% Buses). Architecture Each vehicle type should be its own class and deploy some sort of hierarchy and inheritance. Polymorph paradigms (overloading overriding…) should be used whenever applicable. Please have a main simulation loop that updates the vehicles at each time step and prints required output whenever applicable. Use object-oriented design paradigms for this program and try to utilize templated containers to hold the vehicles. Agent Behaviour Initialization At the beginning of the simulation, each vehicle is initialized with a random position, random speed inside their respective vehicle speed boundaries and a random direction. Additionally, for the vehicle type-specific properties the following rules apply at initialization. Private Vehicles Each vehicle has the number of passengers currently in the vehicle, assuming a standard-size vehicle (e.g., smart car to SVU) Taxi Each vehicle is in the FREE state in the beginning of the simulation. Buses Each vehicle has a random capacity of passengers they can transport. This can be between 15 and 50 and this capacity cannot change throughout the simulation. During Simulation During the simulation, some attributes of the vehicles will change. Foremost, the position will be updated through the current direction and velocity at every time step. General Updates At each time step, there is a 5% chance that the direction of the agent will change by a random value between +/- 5% (5% of 360 degrees). Private Vehicles When a vehicle leaves the simulation area it is removed from the simulation and will no longer be updated. Taxi At each time step, there is a 1% chance that the state will change from FREE to HIRED. Once the vehicle reaches the boundaries of the simulation area, its state will change from HIRED to FREE, if it has been in HIRED otherwise remains FREE, and will turn around. The turning around can be accomplished by using the mirror light approach. Changing from FREE to HIRED can be done only 3 times, once it reaches the boundary after that, the vehicle is removed from the simulation and no longer updated. Bus Every 5 minutes of simulation time a random number of people will board and alight the bus. This is constrained by the capacity of the bus. Once the vehicle reaches the boundaries of the simulation area it should be removed from the simulation and no longer be updated. Data Output and Results Whenever a vehicle leaves the simulation a trip summary should be printed out. This should include the distance travelled from creation to removal from the simulation as well as vehicle-type specific information. Taxi: accumulated times spent in Hired and Free states Bus: current amount of passengers in the bus in relation to the capacity Additionally, at the end of the simulation, we would like some aggregated values for the trip length and travel time for each vehicle type group. This includes mean values and standard deviations. Requirements Please develop the simulation in C++ in a well-structured project. For the build tool chain, we would like yo to use a Linux development workflow using GCC and Cmake. Try to avoid using external libraries; STL (Standard Template Library) should be sufficient. Please use the C++ 11 standard. Visualization is not required. Please debug your code sufficiently to ensure all functionality is implemented correctly. Please document your code as well as your high-level approach. Include a Readme with the build and execute instructions.
Related Questions
Tutlance Experts offer help in a wide range of topics. Here are some of our top services:
- Math homework help
- Nursing homework help
- Statistics homework help
- Nursing coursework help
- Capstone project writing services
- Essay writers for hire
- Case study writing help
- Buy college papers online
- Buy college research papers
- College homework help
- Professional resume writing services
- Programming homework help
- Coursework writing help
- Term paper writing help
- Biology homework help
- Do my physics homework
- Dissertation data analysis help
- PhD Dissertation writing services
- Chemistry homework help
Post your project now for free and watch professional experts outbid each other in just a few minutes.