This has certainly been discussed before.
Unlike roads, railroads should not have a normal movement rate. The railroad doesn't move three times faster just because there's cavalry on its wagons.
Instead, railroad movement should be a fixed number (say 12), which would then be the maximum number of squares a unit could move on rails than turn if only moving on railroad. In effect, moving one square on railroad woul consume not 1/12 of one movement point, but 1/12 of the unit's total movement points, i.e. 1/12 MP if having 1MP, 1/6 MP if having 2MP and 1/4MP if having 3MP.
By doing this you would both get the effect that all units could move the same distance by train if only moving by train that turn, while still letting a faster unit move more by non-train if only moving partly by train (or similarily, more by train if moving as much by non-train).
This makes quite a lot sense. Assume that a cavalry and a rifleman both moved half of their turn on railorads (6 squares). Since having used half their movement porential on railroads, they would have half their MP unused, thus the rifleman would have 1/2 MP left and the cavalry 1+1/2 MP left.
EX:
A rifleman, a knight and a cavalry each start two squares from the railroads, and will move those two squares by road before entering the train.
* The rifleman has 1/3 (=4/12) MP left when entering the train, and will therefore be able to move 4 squares by train, or 1-3 squares by train + off the railroad.
* The knight has 1+1/3 (=16/12)MP left when entering the train, and can move 8 squares by train (each square costs 2/12).
- If moving only 1 square by train, it has 1+1/6 MP left, which is enough for 4 squares by road.
- If moving 2-3 squares by train, it has at least 5/6 MP left, which is enough for 3 squares by road.
- If moving 4-5 squares by train, it has at least 3/6 MP left, which is enough for 2 squares by road.
- If moving 6-7 squares by train, it has at least 1/6 MP left, and can move off the railroad.
* The cavalry has 2+1/3 (=28/12) MP left when entering the train and can move 10 squares by train (each square costs 3/12), or 9 + off the train etc.