Traffic Intersection Simulation using Pygame (Part 3)

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 มี.ค. 2021
  • This video demonstrates the final version of traffic intersection simulation built using Pygame.
    Find a step-by-step guide to build this simulation here: towardsdatascience.com/traffi...
    The updated simulation displays the count of vehicles that have crossed the intersection for each direction, shows the time elapsed since the start of simulation, enables setting simulation duration, prints the signal timers on terminal every second for analysis, and prints some statistics like direction-wise vehicle counts, total vehicles, and simulation time at the end of the simulation. These statistics and timers can then be used in Modelling problems, Data Analysis tasks, or AI applications.
    Source Code: github.com/mihir-m-gandhi/Tra...
    Email: mihir.mg@somaiya.edu
    LinkedIn: / mihir-m-gandhi
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 18

  • @varuns3532
    @varuns3532 ปีที่แล้ว

    Awesome work

  • @SrichakradharReddyNagireddy
    @SrichakradharReddyNagireddy 7 หลายเดือนก่อน +1

    How do we add random lane changes?

  • @ahmed4kp
    @ahmed4kp 11 หลายเดือนก่อน

    Hi sir, im doing my final year project and i want to add an emergency mode. For example, when there is an ambulance, the system will stop all the lines and provide a fast passage to that specific line where the ambulance is located. So, can I use your current simulation and make changes if possible? Thank you in advance for your help 🙏🏻.

  • @mandeepsharma8305
    @mandeepsharma8305 2 ปีที่แล้ว +1

    Great work

  • @marvinbonamtobalagosa3277
    @marvinbonamtobalagosa3277 หลายเดือนก่อน

    Do you have a C++ code version for this? Just getting some ideas for our project :)

  • @riddhiarya8867
    @riddhiarya8867 3 ปีที่แล้ว +2

    hi! I made a similar simulator using turtle in python, but the traffic light and car are not running continuously, means one thing runs at a time. Any solution for that?

    • @mihirgandhi0706
      @mihirgandhi0706  2 ปีที่แล้ว

      Hi! I am not familiar with Turtle. One thing you could try is running the traffic lights and vehicles on separate threads. These threads can run in parallel.

  • @PriyanshubokanBokan-gr9gy
    @PriyanshubokanBokan-gr9gy 3 หลายเดือนก่อน

    Sir agar road per banayea hote to or bather hota

  • @chideraodita4099
    @chideraodita4099 2 ปีที่แล้ว +1

    Hi, Is there a better explanation of the code? Mine's not working and I have no idea where I've gone wrong. Thanks

    • @mihirgandhi0706
      @mihirgandhi0706  2 ปีที่แล้ว

      Hi! Did you try this: towardsdatascience.com/traffic-intersection-simulation-using-pygame-689d6bd7687a?
      If it is still not working, send me an email with screenshot of what is going wrong. I'll try to help.

  • @dulajkaluarachchi4482
    @dulajkaluarachchi4482 ปีที่แล้ว +1

    Hello Mihir,
    Can i know how to get the vehicle count

    • @mihirgandhi0706
      @mihirgandhi0706  ปีที่แล้ว

      Hi Dulaj, you can get the vehicle counts for a particular direction by looking at the 'vehicles[direction][lane]' and the crossed attribute of each vehicle. It would look something like: sum of vehicles in vehicles[direction][lane] which have vehicle.crossed == 0 summer over all lanes.

  • @raunakak2289
    @raunakak2289 3 ปีที่แล้ว +1

    Sir I know python ml and R, java and I have cirtificate data science and get grade A and I finding job

    • @mihirgandhi0706
      @mihirgandhi0706  3 ปีที่แล้ว +1

      Hi Raunak, I can't help you much in this regard. You can check out jobsquest.co/ for job postings. Good luck!

    • @oluyishaqakintola7460
      @oluyishaqakintola7460 2 ปีที่แล้ว +1

      How can I reach you . Kindly leave a WhatsApp

    • @oluyishaqakintola7460
      @oluyishaqakintola7460 2 ปีที่แล้ว +1

      @@mihirgandhi0706 how do I reach you for projects.. kindly leave an email to reach or whatsapp to discuss about his project and how we can implement.together.

    • @mihirgandhi0706
      @mihirgandhi0706  2 ปีที่แล้ว

      ​@@oluyishaqakintola7460 Hi! You can reach me at mihir.mg@somaiya.edu