Hello, i am trying to implement a SIR model(for covirus simulation) as a learning example of Wolfram Mathematica. But my model dont work, and gives me erros i can't understand(NDSolve::dvnoarg: The function i appears with no arguments. and other in the plot). Can anyone help. This is what i am workin on, the model program:
s0 = 0.09; i0 = 0.01; r0 = 0
trans = 3.2; recov = 0.02
tmax = 20
Clear[s, i, r]
eqn = {s'[t] == -trans*s[t]*i[t],
i'[t] == trans*s[t]*i[t] - recov*i[t], r'[t] == recov*i[t],
s[0] == s0, i[0] == i0, r[0] == r0}
sol = NDSolve[eqn, {s, i, r}, {t, 0, tmax}]
Plot[{i[t]} /. sol, {t, 0, 100}]