Skip to content

uw-midsun/strategy_msxvi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# MSXVI - FSGP & ASC '25 - Strategy
## About
FSGP serves as a qualifying event for ASC. The objectives of FSGP are the following:

"Scoring is based on the highest overall official distance driven or laps completed over the duration of the event with ties being broken by the lowest overall official elapsed time or fastest lap" in other words maximising distance for a fixed time. 

The objectives of ASC are the following:

1. To complete the American Solar Challenge base route without trailering.
2. To complete as many official miles as possible. (1st Tiebreaker)
3. To complete the distance in the shortest elapsed time. (2nd Tiebreaker)

Successfully achieving these objectives hinges on two critical factors: designing an efficient solar car and following a good race strategy. Race strategy boils down to a single question:

### **What speed should one drive at?**

To address this question, our code leverages comprehensive data inputs including route models, elevation profiles, weather conditions, and solar irradiance data. This integrated approach allows for predicting the performance of the solar car across various velocities.

At the core of the analysis is a solver that computes the instantaneous power draw and supply from multiple sources, including:

- **Drag Resistance**: Calculated based on vehicle aerodynamics, wind and velocity.
- **Rolling Resistance**: Determined by the surface conditions of the road, weight of the car and the car's tires.
- **Gradient Resistance**: Accounts for uphill and downhill sections of the route.
- **Solar Irradiance**: Utilizes Global Tilted Irradiance (GTI) data, which considers the angle of the sun relative to the car's solar panels. This data helps estimate the available solar energy for electricity generation. *(Courtesy of [Solcast](https://solcast.com/irradiance-data-methodology))*

These factors are computed dynamically over time and distance to simulate and optimize the car's performance during the race.

## Database

The database is comprised of two tables: the route model and a solar irradiance table. The database is intended to be stored locally and synced with a cloud version based on availability of internet. The cloud database is regularly updated with the latest route model and solar irradiance data. This design enables the local solver to run offline with high performance and reliability. 

![Architecture Diagram](docs/architecture.png)

**The cell below syncs the local database with the cloud database.**

*Pre-requisite: Wi-fi*

Additionally, for increased performance, the local database is then stored in memory as a [pandas DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html).

**This cell is a pre-requisite for all the following cells.**

## Route Overview

The following cells provide distances of each stage, elevation profiles, and irradiance data for a given stage.

| Route Name                       | Symbol |
|----------------------------------|--------|
| Nashville to Paducah             | 1A     |
| Paducah to Edwardsville          | 1B     |
| Edwardsville to Jefferson City   | 2C     |
| Jefferson City to Independence   | 2D     |
| Independence to Saint Joseph     | 2E     |
| Saint Joseph to Beatrice         | 3F     |
| Beatrice to Kearney              | 3G     |
| Kearney to Gering                | 3H     |
| Gering to Casper                 | 4J     |

## Solver

Run *solver.py* to simulate the car at varying velocities. The solver can simulate up to 8 hours ahead. It does not include an error minimization function. This is intentional due to limited real-world feedback from telemetry and diagnostics. Therefore, it is more important for the solver's behavior to be predictable rather than accurate.

**Re-run the simulation as frequently as possible using real-time distance values to keep errors in check.**

About

ASC & FSGP '24 & '25 Strategy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages