Solution (source code)

= Solution

Extend the original <Directed acyclic graph> with
$$
\pi_1\longrightarrow Y_{S1},
\qquad
(\pi_1,\lambda)\longrightarrow\pi_2
\longrightarrow Y_{S2}.
$$
The existing arrows $\lambda\to I\to Y_G$ and $\rho_G\to Y_G$ remain. The survey sample sizes and $N$ are fixed design variables, while $\pi_2$ is a deterministic node satisfying $\pi_2=\pi_1+\lambda$.