Hi,
this is not an ns-3 problem, this is a feasibility thing (in ns-3 or in a real system).
I have one good news (and one bad news).
The good news is that if you manage to do what you described without resorting to black magic or selling your soul (and the one of all your ancestors and descendants) to the devil, you'll achieve honor and glory, and your name will be forever remembered in the telecommunications books.
Guess what's the bad news ?
The problem is: you can't reliably predict when you'll be out of radio range. You could do it only in these two cases:
1) perfect knowledge of the Tx/Rx antenna positions, and
2) perfect knowledge of the channel propagation effects.
Both are, of course, ideal conditions that can be met only in open space (let's say: on the moon is not enough).
The best you can do is to monitor the RSSI, and even that is not that good, because you have to consider the UE speed. You may measure one thing and, by the time you decide it's time to say goodbye and the time you can do that... it's too late.
You could, of course, be conservative and say goodbye earlier, but you'll loose a lot of radio coverage. Plus, the RSSi is not linear, and you have to measure it anyway (overhead!)
Summarizing...
Good luck, you'll need it.
T.