Dynamical System Case Study 2 (Piecewise linear LLL-system)

We consider the following dynamical system: $\begin{cases} \dot{x}_1 = L(a_1, k_1, x_3) - k_1 x_1,\\ \dot{x}_2 = L(a_2, k_2, x_1) - k_2 x_2,\\ \dot{x}_3 = L(a_3, k_3, x_2) - k_3 x_3, \end{cases}$ where $$L$$ is a piecewise linear function: $L(a, k, x) = \begin{cases} ak & \quad \textrm{for}\; 0 \leq x \leq 1,\\ 0 & \quad \textrm{for}\; 1 < x. \end{cases}$ In this case study, we build a Shiny application that draws 3D phase portraits of this system for various sets of input parameters. ...