Dynamics of Solitons in Inhomogeneous Josephson Junctions