## Appendix A. Python Code for Figure 1–3

`"""" Numerical simulations for Japanese Encephalitis disease~"""`

`# import modules for solving`

`import scipy`

`import scipy.integrate`

`import numpy as~np`

`# import module for plotting`

`import pylab as~pl`

`# System with substitutions`

`#E=X[0], I_r = X[1]; A_m=X[2]; N_m=X[3]; I_m=[4]; N=X[5]; I=X[6].`

`def JEmodel(X, t, Q0, theta, theta0, betamr, mu1r, mu2r, dr, delta0, psi, K, muA, nuA,`

`delta, mum, B, betarm, Lambdah, muh, nuh, dh, betamh ):`

`z1= Q0 + theta*X[5] - theta0*X[0]`

`z2=betamr*X[1]*X[4]/X[3] - (mu1r +mu2r*X[1] + dr)*X[1] + delta0*X[1]*X[0]`

`z3= psi*(1- X[2]/K)*X[3] - (muA + nuA)*X[2] + delta*X[0]*X[2]`

`z4= nuA*X[2]-mum*X[3]`

`z5= B*betarm*X[1]*(X[3]-X[4])-mum*X[4]`

`z6= Lambdah - muh*X[5]-dh*X[6]`

`z7= (B*betamh*X[4]/X[3])*(X[5]-X[6])-nuh*X[6] - muh*X[6] - dh*X[6]`

`return (z1, z2, z3, z4, z5, z6, z7)`

`if __name__== "__main__":`

`X0= [40000, 500, 12000, 10000, 9000, 7000, 1000];`

`X1= [45000, 700, 15000, 12000, 11000, 10000, 1200];`

`X2= [35000, 300, 10000, 7000, 6000, 5000, 800];`

`t = np.arange(0, 20, 0.1)`

`Q0= 50`

`theta=0.01`

`theta0=0.0001`

`betamr= 0.0001`

`mu1r=0.1`

`dr=1/15.0`

`delta0=0.000001`

`psi=0.6`

`K=1000`

`muA=0.25`

`nuA=0.5`

`delta=0.0001`

`mum=0.3`

`B=1; mu2r= 0.001`

`betarm=0.00021`

`Lambdah=150`

`muh=1.0/65`

`dh=1.0/45`

`nuh=0.45`

`betamh=0.0003`

`r=scipy.integrate.odeint(JEmodel, X0, t, args=(Q0, theta, theta0, betamr, mu1r, mu2r,`

`dr, delta0, psi, K, muA, nuA, delta, mum, B, betarm, Lambdah, muh, dh, nuh, betamh))`

`r1=scipy.integrate.odeint(JEmodel, X1, t, args=(Q0, theta, theta0, betamr, mu1r, mu2r,`

`dr, delta0, psi, K, muA, nuA, delta, mum, B, betarm, Lambdah, muh, dh, nuh, betamh))`

`r2=scipy.integrate.odeint(JEmodel, X2, t, args=(Q0, theta, theta0, betamr, mu1r, mu2r,`

`dr, delta0, psi, K, muA, nuA, delta, mum, B, betarm, Lambdah, muh, dh, nuh, betamh))`

`pl.plot(t,r[:,1], t,r1[:,1], t,r2[:,1])`

`pl.legend([’$X_1(0)$’, ’$X_2(0)$’, ’$X_3(0)$’],loc=’upper right)`

`pl.xlabel(’Time (weeks))`

`pl.ylabel(’Reservoir population)`

`#pl.title(’Japaneese model)`

`pl.savefig(’reservoir.eps)`

`pl.show();`

`pl.plot(t,r[:,4], t,r1[:,4],t,r2[:,4])`

`pl.xlabel(’Time (weeks))`

`pl.ylabel(’Infected mosquitoes)`

`pl.legend([’$X_1(0)$’, ’$X_2(0)$’, ’$X_3(0)$’],loc=’upper right)`

`pl.savefig(’mosquitoes.eps)`

`pl.show();`

`pl.plot(t,r[:,6], t,r1[:,6],t,r2[:,6])`

`pl.xlabel(’Time (weeks))`

`pl.ylabel(’Infected humans)`

`pl.legend([’$X_1(0)$’, ’$X_2(0)$’, ’$X_3(0)$’],loc=’upper right)`

`pl.savefig(’infected_human.eps)`

`pl.show()`