Evenly distribute charge across multiple batteries

While all batteries connected to a switching station are charged at the same rate, different battery boxes may hold different amounts of charge. To mimic real-life behavior, total charge should be equally distributed among multiple batteries.

This is the same pull request as in #107, but actually pulls the changes from the correct branch.