A model for vortex depinning and motion is presented, which takes into account the inhomogeneity of a real type-11 superconducting sample. The model is based upon a mechanism in which the flux-line lattice is depinned by synchronous shear around vortices, which are too strongly pinned to be broken. In contrast to the classical flux-line shear model, variations in the vortex-vortex interactions are allowed. The applicability of the model is demonstrated by evaluating the dissipation for the ceramic superconductor, YBa2Cu3O7, in the mixed state. The simulated data agree very well with experimental observations. An Arrhenius-like temperature dependence of the resistance at the transition to the superconducting state is obtained. The shape of the simulated voltage-current curves, the field and temperature dependence of the volume pinning force and the position of the peak in the volume pinning force resemble experimental data. Furthermore, the presence of a reversible regime close to the transition to the normal state follows automatically from the model.