Optimization Energy Usage Implementation
This document describes the implementation and requirements of the Dynamics Model.
Requirements
Inputs
Take an input velocity profileTake an input elevation profileTake car parameters (i.e. CdA, Car, mass, windspeed)
Outputs
Calculate energy usage
Nice to haves
Have the parameters be easily controllable (i.e. not in the script itself but be passable to the script)- Have control over the distances between the velocities and elevations
- Be able to take in time separated velocities instead of distance separated ones
- Clearly named variables (i.e. split up Ff, Fdrag and Fg)
- Accounting for acceleration
- In Line comments explaining what you're doing
Be able to use both absolute and relative elevation
Interface
Be able to instantiate the model, and have it be able to take in velocity and elevation arguments to calculate energy usage
Testing
- Given a series of velocity profiles, calculate their energy usage (3 of those, verified by hand)
- Reject negative velocity
- Allow for negative elevation