The interaction of phase-slip centers in superconducting filaments