I use the fleqn option with the standard mathindent setting. That nicely shifts equations further to the left if they would collide with the right page margin.
With alignat, however, that does not work. As a workaround, I set the mathindent manually with \setlength{\mathindent}{10pt} for the equation, where I needed the space and reset it to what I found to be the default value \setlength{\mathindent}{\dimen102} after that equation. Now for all following equations, that automatic shifting does not work anymore.
\documentclass[12pt,a4paper,fleqn]{scrreprt}
\usepackage{amsmath}
\usepackage{array}
\newdimen{\oldmathindent}
\setlength{\oldmathindent}{\mathindent}
\begin{document}
Some short equation, which has the default \texttt{mathindent} due to \texttt{fleqn}:
\begin{equation}
E=mc^2.
\end{equation}
Some long equation, which automatically has a smaller \texttt{mathindent} due to its length and a collision with the right margin:
\begin{equation}
v = \left[ \begin{array}{c c c c c c c c c c c c c c c c c c c c c c c c c c c c}
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 1 & 1 & 0 & 0
\end{array}\right]^\top.
\end{equation}
Now some long equation with \texttt{alignat}
\begin{alignat}{4}
\nonumber \ddot{x}_c &= -&&\frac{1}{m_c(\Delta m_c)} &&[&& F_s(x_c-x_w,u_1,\Delta m_c) + F_d(x_c-x_w,\dot(x_c)-\dot(x_w)) + F_f(\dot(x_c)-\dot(x_w)) + \\ &&&&&&& +F_{fc}(\dot(x_c)) + F_{Delta m_c}( \Delta m_c ) ] \\
\nonumber \ddot{x}_w &= -&&\frac{1}{m_w} &&[&& F_s(x_c-x_w,u_1) + F_d(x_c-x_w,\dot(x_c)-\dot(x_w)) + F_f(\dot(x_c)-\dot(x_w)) + \\ &&&&&&& +F_{fc}(\dot(x_c))].
\end{alignat}
The same long equation with \emph{alignat} but manual set of \texttt{mathindent} to 0
\setlength{\mathindent}{0pt}
\begin{alignat}{4}
\nonumber \ddot{x}_c &= -&&\frac{1}{m_c(\Delta m_c)} &&[&& F_s(x_c-x_w,u_1,\Delta m_c) + F_d(x_c-x_w,\dot(x_c)-\dot(x_w)) + F_f(\dot(x_c)-\dot(x_w)) + \\ &&&&&&& +F_{fc}(\dot(x_c)) + F_{Delta m_c}( \Delta m_c ) ] \\
\nonumber \ddot{x}_w &= -&&\frac{1}{m_w} &&[&& F_s(x_c-x_w,u_1) + F_d(x_c-x_w,\dot(x_c)- \dot(x_w)) + F_f(\dot(x_c)-\dot(x_w)) + \\ &&&&&&& +F_{fc}(\dot(x_c))].
\end{alignat}\\
\setlength{\mathindent}{\oldmathindent}
And now - after setting back the \texttt{mathindent} to \texttt{oldmathindent}, the same short equation from above looks like this:
\begin{equation}
v = \left[ \begin{array}{c c c c c c c c c c c c c c c c c c c c c c c c c c c c}
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 1 & 1 & 0 & 0
\end{array}\right]^\top.
\end{equation}
\end{document}
Note that the layout of the long alignat equation is how I want it. If anyone has an idea how to achieve that without alignat, that would be fine for me, too.
Thanks!
edit_0528: I applied the changes suggested by barbara beeton (if I got it right). However, all equations after the \setlength{\mathindent}{0pt} start at the very left, disregarding the \setlength{\mathindent}{\oldmathindent}.
\newdimen{\oldmathindent}and\setlength{\oldmathindent}{\mathindent}to my preamble, changed the mathindent for the long equation with\setlength{\mathindent}{0pt}and afterwards modified the\setlength{\mathindent}{\dimen102}to\setlength{\mathindent}{\oldmathindent}. Did I get you wrong? The result is that all following equations have a mathident of 0pt. – Bazi May 25 '14 at 15:40