Author: kaitlynl

Kaitlyn’s Status Report for 4/27/24

Kaitlyn’s Status Report for 4/27/24

Work Done This week I spent a lot of time preparing the Final Presentation slides. I modified the slides to be more traffic light themed and also reorganized the structure of our slides to be more cohesive and based on subsystems to reduce redundancy. The 

Kaitlyn’s Status Report for 4/20/24

Kaitlyn’s Status Report for 4/20/24

Work Done Since my last status report I have made a lot of progress on the project and am pretty much wrapping up all the tasks I have to do. I realized that the way I was calculating the actions were incorrect and that Q-learning 

Kaitlyn’s Status Report for 4/6/24

Kaitlyn’s Status Report for 4/6/24

Work Done

This week I spent most of the time working on the q-learning model that optimizes the traffic light intervals. I finished the basic model and it is working, however it seems like the model keeps converging to really small intervals for the traffic lights, which I am working on debugging. However, the model technically runs and trains at the moment. I think the problem right now is I might be using the Q-values incorrectly and representing them inaccurately. I plan on taking a deeper look the next couple of days and also trying to represent the action differently.

The code below shows the Agent class that is used to implement Q-learning.

The code below shows the neural network used to implement deep Q-learning. The Q-values are represented by the neural network.

Additionally, I refactored a lot of the existing code to make the utility functions I previously designed more accessible to the Q-learning code. I also made some changes to how the code uses the API data to adjust the simulation, however I realized this led to some bugs when running the simulation for over 5 minutes, so I plan on reverting to the previous API code integration instead. If time allows, I will optimize this further after the other tasks are done.

Schedule

I am mostly on track, however I might need to push the ML code task a day or two longer since I still haven’t had a chance to optimize for hyperparameters. I plan on spending additional time on the project the weeks leading up to the deadline, so I think we will still finish on time.

Tasks this Week

  • Finish ML debugging
  • Finish ML hyperparameter optimization
  • Implement pedestrians in SUMO simulation

Testing and Verification

Reduced wait times: We have a week dedicated to testing where I will first simulate a simulation without any traffic light optimization. I will use the functions that are used by our Q-learning model to calculate average light waiting times at the intersection to then calculate the average light waiting time of 10 different averages over 5 minutes in the simulation and average the 10. I will then repeat the same for 10 averages over 5 minutes using our optimization model and average the 10 to compare the improvements to see if they match our target reduction in wait time.

Safety: I also plan on running the model for a simulation time of an hour to ensure that the system remains working for long periods of time as well as no safety violations occur. SUMO simulates car crashes, so in the event that safety violations do occur due to light intervals being too short, etc, we would be able to adjust our model to fix these concerns.

Team Status Report for 3/30/24

Team Status Report for 3/30/24

Potential Risks and Mitigation Strategies The new YOLO car detection model is working a lot better and way more accurate than our previous model with the Haar cascades, however it is very slow and takes about 11 seconds to detect the cars, so we are 

Kaitlyn’s Status Report for 3/30/24

Kaitlyn’s Status Report for 3/30/24

Work Done This week I completed the SUMO/TraCI simulation. I modified the simulation to include calibrators, a SUMO feature that allows the simulation to spawn cars to sync with the speed and vehicles per hour you desire. I initially attempted to manually spawn cars but 

Kaitlyn’s Status Report for 3/23/24

Kaitlyn’s Status Report for 3/23/24

Work Done

This week I finalized the lane detection in SUMO+TraCI.

I spent a whole day trying to debug why the function to collect the waiting time for a car did not work and realized it was ultimately due to a type error. There was no documentation on the error and the error did not indicate what was wrong, so I looked on forums and StackOverflow for guidance. Since SUMO is not a very widely used software, I did not find anything helpful to my error and had to just randomly try debugging and looking at the source code.

This is the error I was receiving for reference:

traci.exceptions.FatalTraCIError: Received answer 189,18,0 for command 173,18,0.

Also the software kept bugging out when I was placing the lane areas, so it required a lot of manual adjusting. It didn’t tell me what was wrong, but I guessed that it was due to a weird overlap error, so I had to move the lanes a bunch even though sometimes it worked and sometimes it didn’t.

This is a picture of the simulation running with lane area detectors that simulate what the cameras we have would detect. Since Ankita predicts about 50m detection on each side of the intersection, I set the lane area to be about 50 meters. The output shown on the left in the terminal is the average wait time of all the lane areas.

I am also finishing up the code to spawn in the cars based on the Traffic API data. The code is written, however I need to calibrate and map real life coordinates to the simulation coordinates and define the regions that represent the areas we plan on gathering API data from. I also plan on discussing with Ankita more about how I should implement the code to spawn in cars based on the camera data this week.

Schedule

I should be on track to finish the simulation spawning and an unoptimized machine learning model by the time we demo for the Interim Demo. I am posting this on Friday due to being busy all of Saturday, but I plan to finish the simulation spawning on Sunday/Monday to remain on track to have the basic ML model implemented next week.

I updated the schedule with the shifted tasks.

Tasks This Week

  • Finish API to simulation calibrations
  • Make a basic ML model implementing simulation – will optimize hyperparameters in upcoming weeks
Team Status Report for 3/16/24

Team Status Report for 3/16/24

Potential Risks and Mitigation Strategies The biggest thing we are uncertain about right now is whether or not the videos we are taking at the actual intersection we want to model (Fifth and Craig) will be sufficient to train the model. It could be challenging 

Kaitlyn’s Status Report for 3/16/24

Kaitlyn’s Status Report for 3/16/24

Work Done This week I spent a lot of time working on the Ethics Assignment and also finishing up the simulation code to use in our ML model. At the moment, I am able to remotely run a SUMO simulation in Python using TraCI. I 

Kaitlyn’s Status Report for 3/9/24

Kaitlyn’s Status Report for 3/9/24

Work Done

I spent most of the week working on the Design Report and focused on the introduction, project management, and content relating to the optimization algorithm. There were actually a lot of details that we had to flesh out relating to the optimization algorithm so I focused on that instead of my task of finishing the map simulation for the week. I have been continuing to look at tutorials for SUMO to set up for our simulations. I also fleshed out the optimization algorithm’s pseudocode so implementing it should not be too difficult once I finish the SUMO simulation along with the TraCI integration with our Python code.

Schedule

I am a bit behind due to the Design Report taking a lot longer than I anticipated, however I think that working on the details for the optimization algorithm really helped me figure out what to do for that task that I have coming up, so hopefully that will take less time, allowing me to push back the SUMO simulation a bit. Since Ankita will be simplifying the pedestrian classfier, the optimization with pedestrians task will also be simpler, so I think less time will be needed there as well.

Tasks This Week

  • Finish SUMO simulation
  • Integrate with Python code using TraCI library
  • Start actual implementation of pseudocode for optimization algorithm
Kaitlyn’s Status Report for 2/24/24

Kaitlyn’s Status Report for 2/24/24

Work Done I finished working on functions to call the APIs and set everything up for both TomTom and HERE. I also set up the SUMO simulation software on my laptop. This took really long because I was originally using my Macbook to install it,