Skip to content

Laptime simulation and optimization in python. Using streamlit for a browser based user interface.

License

Notifications You must be signed in to change notification settings

Jan-Jaap/laptime-sim

Repository files navigation

Laptime Sim Python

A simple and fast laptime simulator for determining the laptime when racing optimal speed.

It uses an approximate implementation of the algoritm described in this paper. http://jameshakewill.com/Lap_Time_Simulation.pdf

I'm no math wizard. Optimization of laptimes is done by bruteforce trying different lines and using the fastest line found. By trying thousands of different options, we can come close (enough) to the optimum raceline. Some would call this AI...

Installation

Use uv to create python virtual environment and install dependencies:

There is a streamlit app to visualize the results.

streamlit run src/streamlit_apps/Welcome.py

Also a docker compose file to run the streamlit app in docker is provided.

docker compose up --build -d

This will run the app on http://localhost:8501

Usage

The main.py will run an optimization of all cars on all tracks.

Examples of usage

streamlit_trackview

streamlit_car_properties

About

Laptime simulation and optimization in python. Using streamlit for a browser based user interface.

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •