Identifying when to shift

This applies to upshifts and downshifts. Upshifts should occur when car reaches its max revs before redline. Downshifts should occur so the car is in the appropriate gear to quickly accelerate out of a corner.