Wednesday, 22 February 2017

Project Specification
Title: Freeway Simulation
By Group Radish

GROUP MEMBERS:
Conrad Hildebrand (conradhi@kth.se) and Emmeli Hansson (emmelih@kth.se)

GRADE:
We are aiming for the grade E (pass) because we want to be sure to pass the project, but if we have the time, we would like to implement more of the things we thought of doing at first.

SPECIFICATION DETAILS
BACKGROUND
The idea to this project came from a game called cities skyline. In the game you build a city from the ground up with roads you draw yourself, in residential, commercial and industrial areas. All and all a very complex simulation game. A frustrating moment in the game is to create good roads so that the traffic runs smoothly and optimizing traffic to avoid traffic jams. Traffic simulations are also interesting in the real world, because it traffic jams are just as much a problem and complex here as in the virtual reality of the game. At the beginning, we wanted the project to be about city traffic simulation with cars having random destinations and finding the fastest way to get there. However, we felt that path finding algorithms for car routes wasn’t what we wanted to focus on and, furthermore together with creating intersection behaviour, it seemed to be to hard of a task with the time given and the level we have chosen for our project. Instead we decided to focus on a single straight road or a freeway. Now we can focus on using group behaviour from lab 2 and spring functions from lab 3 to simulate cars’ behaviour on a freeway.

IMPLEMENTATION SPECIFICS
    We would like to simulate a semi-realistic behaviour of cars on a highway, how they avoid each other when changing lanes, how they change lanes and consequently how the traffic is affected and resulting traffic jams. The one big constraint we will have is that we will have a perfect world where cars do not collide because all cars behave exactly as they should.

    We will use Unity for this project.
   


Here is a list of the implementations we want to do, in the order we think we need to do them:
  • Draw a 4 lane freeway
  • Make cars spawn on every lane (the cars being boxes)
  • Get the cars moving from from one end to the other and despawn
  • Give cars random spawn intervals
  • Assert random speeds to cars within a limit
  • Make sure cars don’t collide by deaccelerating when getting to close (by using part 2 in lab 3)
  • Get cars to change lane
  • Get surrounding cars to avoid the car that changes lane (by using separation force as for the fish in lab 2)
  • Get car to accelerate back to their starting speed.
  • Fluent lane swapping, so that the cars change lane little by little and don’t just teleport there
  • Set conditions to when cars change lane. The condition being if the car in front is slower, change to the left.

The following points, without implementation order, will be implemented based on time:
  • Give each lane a recommended speed interval.
  • Second condition, if a car is moving too slow for the lane, change lane to the right.
  • Implement a 24 hour cycle, where fewer cars are spawned during the night, and more during certain hours of the day.
  • Make cars breakdown and stop on the freeway
  • Make our cars look like cars and not just boxes.

SPECIFICS OF WHAT THE FINAL SYSTEM WILL LOOK LIKE AND DO

modsimpic1.png
Simulation of stop&go traffic (https://www.youtube.com/watch?v=W_kYXpAEnd8) - We want our simulation to look something like this video looks at about the 0:25 timestamp and onwards.

ingame_16x9.jpg
Cities: Skyline Review (https://www.youtube.com/watch?v=9xj4ciP0Riw) - This is the game that sparked the idea of this simulation.

modsimpic2.png
Paramics Road / City Traffic Simulation (https://www.youtube.com/watch?v=Bl3C8aS0sgs) - Here is a more advanced version of what we want to do. Not the graphically most appealing but having traffic lights and loads of intersections makes it a lot harder to implement properly.  


POTENTIAL RISKS/CHALLENGES
Potential risks and challenges we might run into are:
  • If we want to model the cars, and start putting in too much effort into that, which takes time, instead of focusing on the behaviour and physics aspect.
Solution: Have this step as an extra implementation that we decide we will only do if we have time.
  • That one of our steps takes more time to do then we thought at first, and consequently we might not be able to do all the implementations.
Solution: Have a few steps that we decide we will only do if we have time.
  • If we run into difficulties with Unity, that we are too inexperienced to solve.
Solution: Ask for help at the project sessions.

DEGREE OF SIMULATION
We will try to base our simulation on labs 2 and 3 as much as we can for the physics of our project, because we believe that some parts of the physics in those labs correspond to the physics we will need to implement.
So, we will not be implementing anything from the ground up. Instead we will use Unity and the labs to help us.

LINK TO BLOG

REFERENCES
Simulation of stop&go traffic (2007) [video]. traffic-simulation.de. https://www.youtube.com/watch?v=W_kYXpAEnd8 [2017-02-17]
Cities: Skyline Review (2015) [video]. IGN. https://www.youtube.com/watch?v=9xj4ciP0Riw [2017-02-17]
Paramics Road / City Traffic Simulation (2012) [video]. https://www.youtube.com/watch?v=Bl3C8aS0sgs [2017-02-17]