\begin{sequencediagram}
  \newthread{ss}{:SimulationServer}
  \newinst{ctr}{:SimControlNode}
  \newinst{ps}{:PhysicsServer}
  \newinst[1]{sense}{:SenseServer}
  
  \begin{call}{ss}{Initialize()}{sense}{}
  \end{call}
  \begin{sdblock}{Run Loop}{The main loop}
    \begin{call}{ss}{StartCycle()}{ctr}{}
      \begin{call}{ctr}{ActAgent()}{sense}{}
      \end{call}
    \end{call}
    \begin{call}{ss}{Update()}{ps}{}
      \begin{messcall}{ps}{PrePhysicsUpdate()}{sense}{state}
      \end{messcall}
      \begin{sdblock}{Physics Loop}{}
        \begin{call}{ps}{PhysicsUpdate()}{ps}{}
        \end{call}
      \end{sdblock}
      \begin{call}{ps}{PostPhysicsUpdate()}{sense}{}
      \end{call}
    \end{call}
    \begin{call}{ss}{EndCycle()}{ctr}{}
      \begin{call}{ctr}{SenseAgent()}{sense}{}
      \end{call}
    \end{call}
  \end{sdblock}
\end{sequencediagram}