  This paper presents a bi-level optimization framework to compute the
maximum-distance stint and charging strategies for a fully electric endurance
race car. Thereby, the lower level computes the minimum-stint-time Powertrain
Operation (PO) for a given battery energy budget and stint length, whilst the
upper level leverages that information to jointly optimize the stint length,
charge time and number of pit stops, in order to maximize the driven distance
in the course of a fixed-time endurance race. Specifically, we first extend a
convex lap time optimization framework to capture multiple laps and force-based
electric motor models, and use it to create a map linking the charge time and
stint length to the achievable stint time. Second, we leverage the map to frame
the maximum-race-distance problem as a mixed-integer second order conic program
that can be efficiently solved to the global optimum with off-the-shelf
optimization algorithms. Finally, we showcase our framework on a 6 h race
around the Zandvoort circuit. Our results show that a flat-out strategy can be
extremely detrimental, and that, compared to when the stints are optimized for
a fixed number of pit stops, jointly optimizing the stints and number of pit
stops can increase the driven distance of several laps.
