% Spatiotemporal conflict and its resolution by spatial decoupling.
% (a)(c) coupled single-channel paths -> the empty truck must wait;
% (b)(d) decoupled dual-channel paths -> both maneuvers proceed in parallel.
\documentclass[border=1pt]{standalone}
\input{figstyle}
\begin{document}
\begin{tikzpicture}[scale=0.0872]

  % ======================================================================
  % geometry shared by the two spatial panels
  % ======================================================================
  \def\sitebnd{
      (2,6) -- (14,3.5) -- (30,3) -- (40,6) -- (45,13) -- (41,22)
            -- (28,25) -- (14,22) -- (2,17)
  }
  % channel spine from the entrance to the loading bay
  \def\spine{(2,11.5) .. controls (14,10.5) and (24,11.5) .. (34,15.5)}

  % ---------------------------------------------------------------- panel a
  \begin{scope}[shift={(0,0)}]
    \fill[fillc, opacity=0.55] \sitebnd -- cycle;
    \fill[white] \sitebnd -- cycle;
    \draw[siteline] \sitebnd;

    % conflict zone: both paths occupy the same channel
    \fill[confc, opacity=0.16]
        (4,8.6) .. controls (14,7.6) and (24,8.6) .. (33,12.6)
     -- (35,18.4) .. controls (24,14.4) and (14,13.4) .. (4,14.4) -- cycle;

    % the two paths coincide on the spine
    \draw[parkpath] \spine;
    \draw[exitpath, dash pattern=on 2.4pt off 1.6pt]
          (34,15.5) .. controls (24,11.5) and (14,10.5) .. (2,11.5);

    % loading pose
    \fill[sitec] (34,15.5) circle (0.7);
    \node[annt, sitec, above right] at (34.2,15.9) {$\boldsymbol{\eta}_\text{load}$};

    \node[annt, confc] at (18,17.4) {conflict zone};
    \node[panel] at (23.5,-1.8) {(a) coupled};
  \end{scope}

  % ---------------------------------------------------------------- panel b
  \begin{scope}[shift={(52,0)}]
    \fill[fillc, opacity=0.55] \sitebnd -- cycle;
    \fill[white] \sitebnd -- cycle;
    \draw[siteline] \sitebnd;

    % virtual centerline and the two offset guidance lines
    \draw[ctrline] \spine;
    \draw[parkpath] (2,8.6) .. controls (14,7.6) and (24,8.6) .. (33.4,13.0);
    \draw[exitpath] (34.6,18.0) .. controls (24,14.4) and (14,13.4) .. (2,14.4);

    % channel width W between the two guidance lines
    \draw[dimline] (16,8.0) -- (16,13.8);
    \node[annt, fill=white, inner sep=0.3pt] at (16,10.9) {$W$};

    \fill[sitec] (34,15.5) circle (0.7);
    \node[annt, sitec, above right] at (34.2,15.9) {$\boldsymbol{\eta}_\text{load}$};
    \node[annt, centc] at (7.5,19.3) {$\varLambda_\text{center}$};
    \node[panel] at (23.5,-1.8) {(b) decoupled};
  \end{scope}

  % ======================================================================
  % time-line panels
  % ======================================================================
  \def\tlen{40}

  % ---------------------------------------------------------------- panel c
  \begin{scope}[shift={(0,-24)}]
    \draw[->, thin@] (2,0) -- (2+\tlen+3,0) node[annt, right] {$t$};
    \draw[thin@] (2,0) -- (2,10.5);

    % loaded truck leaves
    \fill[exitc, opacity=0.75] (4,6.2) rectangle (18,8.6);
    \node[annt, white] at (11,7.4) {outbound};
    % empty truck waits, then parks
    \fill[sitec, opacity=0.28] (4,2.6) rectangle (18,5.0);
    \node[annt, sitec] at (11,3.8) {waiting};
    \fill[parkc, opacity=0.75] (18,2.6) rectangle (32,5.0);
    \node[annt, white] at (25,3.8) {inbound};

    % excavator idle window
    \draw[decorate, decoration={brace, amplitude=1.6pt, raise=0.6pt},
          line width=0.4pt, confc] (18,1.9) -- (4,1.9);
    \node[annt, confc] at (11,-1.2) {$T_\text{wait}>0$};

    \node[annt, exitc, left] at (3.6,7.4) {L};
    \node[annt, parkc, left] at (3.6,3.8) {E};
    \node[panel] at (23.5,-5.4) {(c) coupled timing};
  \end{scope}

  % ---------------------------------------------------------------- panel d
  \begin{scope}[shift={(52,-24)}]
    \draw[->, thin@] (2,0) -- (2+\tlen+3,0) node[annt, right] {$t$};
    \draw[thin@] (2,0) -- (2,10.5);

    \fill[exitc, opacity=0.75] (4,6.2) rectangle (18,8.6);
    \node[annt, white] at (11,7.4) {outbound};
    \fill[parkc, opacity=0.75] (4,2.6) rectangle (18,5.0);
    \node[annt, white] at (11,3.8) {inbound};

    \draw[decorate, decoration={brace, amplitude=1.6pt, raise=0.6pt},
          line width=0.4pt, corrc] (18,1.9) -- (4,1.9);
    \node[annt, corrc] at (11,-1.2) {in parallel};

    % the cycle ends earlier by the eliminated waiting time
    \draw[thin@, sitec, dash pattern=on 1.4pt off 1.2pt] (32,1.9) -- (32,9.4);
    \draw[dimline, confc] (18,9.8) -- (32,9.8);
    \node[annt, confc, fill=white, inner sep=0.3pt] at (25,9.8) {saved};

    \node[annt, exitc, left] at (3.6,7.4) {L};
    \node[annt, parkc, left] at (3.6,3.8) {E};
    \node[panel] at (23.5,-5.4) {(d) decoupled timing};
  \end{scope}

\end{tikzpicture}
\end{document}
