I am having trouble with generating a parametric plot with the following code:
Manipulate[
DynamicModule[{s0, γ, sol, s, i, t},
s0 = 1 - i0; γ = 1/l;
sol = NDSolve[
{s'[t] == -β/(E^(k (t - τ)))*s[t]*i[t],
i'[t] == β/(E^(k (t - τ)))*s[t]*i[t] - γ*i[t],
s[0] == s0, i[0] == i0}, {s, i}, {t, 0, 150}];
ParametricPlot[{s[t] /. sol, i[t] /. sol},
{t, 0, 30}]],
{{i0, 0.001,
"\!\(\*SubscriptBox[\(I\), \(0\)]\): infected at the beginning"},
0, 0.1, 0.001, ImageSize -> Tiny,
Appearance -> "Labeled"}, {{β, 1.5,
"β: transmission rate"}, 0.5, 5, 0.5,
ImageSize -> Tiny,
Appearance -> "Labeled"}, {{l, 3,
"1/γ: infectious period (in days)"}, 1, 7,
1, ImageSize -> Tiny,
Appearance -> "Labeled"}, {{k, 0.003, "k: control rate (per day)"},
0, 0.01,
0.001, ImageSize -> Tiny,
Appearance -> "Labeled"}, {{τ, 0, "τ: delay (in days)"},
0, 5,
1, ImageSize -> Tiny, Appearance -> "Labeled"}]
After I ran the code, nothing appeared in the graph box, like so:
NDSolve[]
and/or theParametricPlot[]
outside the Manipulate (I mean as a stand-alone code)? $\endgroup$DynamicModule[]
for that $\endgroup$