I am trying to create and solve a coupled delayed SIR model in Mathematica. I am getting negative points in my plot which doesn't make sense. Need help to figure out what am I doing wrong. My code is
SS4 = NDSolve[{x1'[t] == - x1[t] ((0.3/(80*10^6)) y1[t] + (0.5/(80*10^6)) y2[t]), x2'[t] == - x2[t] ((0.5/(80*10^6)) y1[t] + (0.5/(50*10^6)) y2[t]), y1'[t] == x1[t] ((0.3/(80*10^6)) y1[t - 14] + (0.5/(80*10^6)) y2[
t - 14]) - (1/16) y1[t - 14], y2'[t] ==
x2[t] ((0.5/(80*10^6)) y1[t - 14] + (0.5/(50*10^6)) y2[
t - 14]) - (1/16) y2[t - 14], z1'[t] == (0.3/(80*10^6)) x1[t - 14] y1[t - 14],z2'[t] == (0.5/(50*10^6)) x2[t - 14] y2[t - 14], x1[0] == 80*10^6, y1[0] == 150, y1[t /; t <= 0] == E^t, z1[0] == 0,
x2[0] == 50*10^6, y2[t /; t <= 0] == E^t, y2[0] == 100, z2[0] == 0 }, {x1, y1, z1, x2, y2, z2}, {t, 0, 200}]
After plotting the solutions I am getting
pp4 = Plot[{x1[t] /. SS4, y1[t] /. SS4, z1[t] /. SS4, x2[t] /. SS4, y2[t] /. SS4, z2[t] /. SS4}, {t, 0, 200}, PlotRange -> All, PlotStyle -> Dashed, PlotLegends -> {"Susecptible", "Active", "Recovery"}]
Obviously the plot shouldn't go negative as it is going. What am I doing wrong?