Skip to content

A simulation model for Formula One races using open-source data from the Ergast Motor Racing Developer API.

Notifications You must be signed in to change notification settings

mukundkk/F1StrategySimulator

Repository files navigation

Formula 1 Race & Strategy Simulator

https://mukundkk.semaphoreci.com/badges/F1StrategySimulator/branches/master.svg?key=2f3214d0-9d7a-411b-a73b-771bb2d58d49


Introduction

This project aims to simulate the outcome of Formula One races using open-source data from the Ergast Motor Racing Developer API. As of now, it is focused on the 2016 F1 season, but more seasons may be added at a later date.

Getting Started

Prerequisites

Java 11 or later is required for this project.

Running the Simulator

  1. Download and uncompress the newest release

  2. Enter the directory ~/F1StrategySimulator

  3. Run java -jar /build/libs/F1StrategySimulator.jar to start the program

If you prefer to work on the source code as well, you can:

  1. Clone this repository

  2. Enter the parent directory ~/F1StrategySimulator

  3. Run a Gradle build

    • ./gradlew build

  4. Run the generated JAR file as needed

    • java -jar /build/libs/F1StrategySimulator.jar

Features

The overall simulator consists of multiple 'models' that predict behavior in certain important subcategories, such as tyre wear and overtakes.

Core Models
  • Tyre Wear

  • Fuel Consumption

  • Overtaking

  • Pit Stop/Tyre Strategy

  • DNFs

The results from each of these models are then taken into account and used to predict lap-by-lap results, and eventually the results of the simulated race.

As much of the real-time data collected by Formula One teams is not publically available, these models are limited to and by the open-source data that can be found.

More features will be added in the future - check out What Next?

Project Layout

Table 1. A description of each relevant directory in ~/src.
~/src/ Description

Data

Collection of various data incl. driver coefficients, team statistics, and circuit information.

Evaluation

Contains the main class from which the program is entered.

FileIO

Classes for reading from and writing to race data files.

Models

The core of the project – all models that are used in the simulation.

Util

Miscellaneous utility classes.

What Next?

Planned Features:
  • Add data for more seasons (post-2016)

  • Dedicated logic to account for increased chance of DNFs and overtaking during the 1st lap

  • Add more team-level customization (e.g. stronger/weaker circuits, reliability, etc.)

About

A simulation model for Formula One races using open-source data from the Ergast Motor Racing Developer API.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages