% Additional file 2 for: % Quantification of the natural history of visceral leishmaniasis and consequences for control % Lloyd A.C. Chapman, Louise Dyson, Orin Courtenay, Rajib Chowdhury, Caryn Bern, Graham F. Medley and T. Deirdre Hollingsworth % Code to simulate the movement of people through the pathway given in Figure 1 function AdditionalFile2() %% Parameters % The transition rates q12 = 0.21; q15 = 0.005; q23 = 0.36; q24 = 2.11; q25 = 0.02; q34 = 2.48; q35 = 0.13; q41 = 0.31; q43 = 0.01; q45 = 0.006; Q = [0,q12,0,0,q15; 0,0,q23,q24,q25; 0,0,0,q34,q35; q41,0,q43,0,q45 0,0,0,0,0]; % time to simulate for max_T = 10; %% initial values [S0,A0,I0,R0] initial_values = [1000,0,0,0]; % the initial number of susceptibles, asymptomatics, symptomatic infected (KA) and recovered [T,Y] = ode45(@(t,y) equations(t,y,Q),[0 max_T],initial_values); plot(T,Y) legend('symptomatics','asymptomatics','symptomatic infected (KA)','recovered') xlabel('time (yrs)') ylabel('number of people') function dy = equations(t,y,Q) dy = zeros(4,1); % a column vector S = y(1); A = y(2); I = y(3); R = y(4); dy(1) = Q(4,1)*R - (Q(1,2)+Q(1,5))*S; % dS/dt dy(2) = Q(1,2)*S - (Q(2,3)+Q(2,4)+Q(2,5))*A; % dA/dt dy(3) = Q(2,3)*A + Q(4,3)*R - (Q(3,4)+Q(3,5))*I; % dI/dt dy(4) = Q(2,4)*A + Q(3,4)*I - (Q(4,1)+Q(4,3)+Q(4,5))*R; % dR/dt