My ideal for dealing with range anxiety would be something that worked like this:
You enter the distance you want to go, and the bike figures out the maximum sustained speed that you can go to get there on the current State of Charge (SoC). As you use the available charge, that top speed may change.
Examples:
If you have 10 miles to go and a full battery, then it would say 65 MPH (the max speed of the bike). If you have 30 miles to go and half a battery, it might say 35 MPH, which is slow but would get you there. If the wind is blowing from behind, or it's all down hill, at 15 miles to go you may have more than 1/4 battery, so the recommended speed might change to 37 MPH (slightly faster than 35).
The only problem that I can see with that scheme is that the SoC has been reported to be unreliable when the battery is mostly depleted, so if the algorithm was based only on the reported SoC, the recommended speed would be unreliable too.
Ideally, the software would have to calculate the estimated maximum speed based on your riding habits. So when it sees that you're riding like a hooligan and getting poor range, it adjusts the recommended maximum speed.