clc;
clear;
close all;
warning off;
addpath(genpath(pwd));
a = 1;
b = 215;
R_0 = 2.79;
population = 9969510;
vaccinated = 2387785;
i_0 = 116;
r_0 = 1232727;
gamma = 1/10;
s_0 = population - vaccinated - r_0;
beta = (R_0*gamma)/(s_0);
y = [s_0, i_0, r_0];
f = @(t,y) [-beta*y(1)*y(2);
y(2)*(beta*y(1) - gamma);
gamma*y(2)];
[t,w] = rk4(a,b,360,y,f);
figure(1)
hold on;
plot(t,w,"LineWidth",2);
legend('Susceptible','Infected','Recovered');
title('COVID-19 Los Angeles');
xlabel('Time (days)');
ylabel('Population');
a = 1;
b = 215;
R_0 = 2.79;
population = 9969510;
vaccinated = 0;
i_0 = 116;
r_0 = 1232727;
gamma = 1/10;
s_0 = population - vaccinated - r_0;
beta = (R_0*gamma)/(s_0);
y = [s_0, i_0, r_0];
f = @(t,y) [-beta*y(1)*y(2);
y(2)*(beta*y(1) - gamma);
gamma*y(2)];
[t,w] = rk4(a,b,360,y,f);
figure(2)
hold on;
plot(t,w,"LineWidth",2);
legend('Susceptible','Infected','Recovered');
title('Scenario 1 COVID-19 Model');
xlabel('Time (days)');
ylabel('Population');
a = 1;
b = 215;
R_0 = 2.79;
population = 9969510;
vaccinated = population * .6;
i_0 = 116;
r_0 = 1232727;
gamma = 1/10;
s_0 = population - vaccinated - r_0;
beta = (R_0*gamma)/(s_0);
y = [s_0, i_0, r_0];
f = @(t,y) [-beta*y(1)*y(2);
y(2)*(beta*y(1) - gamma);
gamma*y(2)];
[t,w] = rk4(a,b,360,y,f);
figure(3)
hold on;
plot(t,w,"LineWidth",2);
legend('Susceptible','Infected','Recovered');
title('Scenario 2 COVID-19 Models');
xlabel('Time (days)');
ylabel('Population');
a = 1;
b = 215;
R_0 = 6.68;
population = 9969510;
vaccinated = 2387785;
i_0 = 116;
r_0 = 1232727;
gamma = 1/10;
s_0 = population - vaccinated - r_0;
beta = (R_0*gamma)/((s_0));
y = [(s_0), i_0, r_0];
f = @(t,y) [-beta*y(1)*y(2);
y(2)*(beta*y(1) - gamma);
gamma*y(2)];
[t,w] = rk4(a,b,360,y,f);
figure(4)
hold on;
plot(t,w,"LineWidth",2);
legend('Susceptible','Infected','Recovered', 'FontSize');
title('Scenario 3 COVID-19 Model');
xlabel('Time (days)');
ylabel('Population');