Wes, Wes , Wes....
Hydro-electric power generation is not in the realm of perpetual motion. Please don't get confused by what I am trying to convey here. I am not suggesting that. No doubt, some power generation could be realized from loaded railcars rolling on downhill tracks.
On a very small scale, on the order of magnitude of a water-wheel for railcars (if you get my drift), you might get your idea to partially work... but then there are the logistics of dynamic loading and unloading of coal, etc. that would cause you significant grief. Not that they couldn't be overcome...
On a larger scale, you're SOL... the physics just doesn't support it. Just think about the limitations in railroading normally... what is the longest train you can run right now... even on level ground?
Now for your circle train you are talking about trains that are tens... or more like hundreds... of miles long

!
I am not up on the regenerative power dissipated by dynamic braking, but I'm guessing it is small compared to the power required to haul an empty consist up that same hill. Go run some numbers, including losses in couplers and parasitics, and get back to us. You'll need to get with some of the coorporate engineering guys to verify the figures. Then we'll talk some more

.
As a parting thought... there are lots of smart people that have come before us... why do you suppose that your idea has not been implemented already? I mean, it isn't technology limited (in other words your idea isn't dependant on a technological breakthrough/development, such as room temp superconductors, to work), right?