StateOfChargeCurve
Represents the state of charge (SOC) curve of an electric vehicle's battery.
The SOC curve defines the relationship between the energy stored in the battery and the corresponding battery percentage. It is represented as a list of (energy, percentage) pairs, sorted by both energy and percentage.
Parameters
curve
A list of Pair objects, where each pair represents a point
on the SOC curve. The first element of the pair is the energy level (Energy),
and the second element is the corresponding battery percentage (Float).
The list must contain at least two elements and be sorted in ascending order
by both energy and percentage.
Throws
if the curve has less than two elements or if the elements are not sorted.