Coupled-mode equations for pulse switching in parallel waveguides