Current-carrying rod on rails

A  wooden platform contains a reversible switch, a 'U' magnet mounted with the opening to the left, two thick metal rods fastened in place 12" apart , and a thin metal rod lying across the two thick rods. When the two thick rods are connected through the switch to a power supply a large current can be made to flow in either direction through the thin rod. Engaging the switch one way causes the thin rod to roll into the 'U' magnet. Engaging it the other way causes the thin rod to roll out of the magnet.