From 3fd5b1687f2ff86d4f41c29ada81093cf24d2054 Mon Sep 17 00:00:00 2001
From: Paul CACHEUX <paulcacheux@gmail.com>
Date: Wed, 23 May 2018 14:26:09 +0200
Subject: [PATCH] Ajout d'un *N sur le NatalityRate et remise du programme dans
 un etat utilisable

---
 SRI_matlab/main.m | 10 +++++-----
 SRI_matlab/step.m |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/SRI_matlab/main.m b/SRI_matlab/main.m
index ac9f50d..9064c7e 100644
--- a/SRI_matlab/main.m
+++ b/SRI_matlab/main.m
@@ -1,22 +1,22 @@
 clear figure
 
 S = 990;
-I = 10;
+I = 50;
 R = 0;
 n_pop = S + I + R;
 
 input = [S, I, R];
 
 coeffs = options;
-coeffs.InfectionRate = 0.06;
-coeffs.ImmunisationRate = 0.01;
+coeffs.InfectionRate = 0.09;
+coeffs.ImmunisationRate = 0.005;
 coeffs.ImmunisationLossRate = 0.001;
 coeffs.VaccinationRate = 0.02;
 coeffs.DeathRate = 0.04;
 coeffs.NaturalDeathRate = 0.002;
 coeffs.NatalityRate = 0.003;
 
-N = 30;
+N = 1000;
 
 Slist = zeros(1, N);
 Ilist = zeros(1, N);
@@ -28,7 +28,7 @@ for i=t
     Slist(i) = input(1);
     Ilist(i) = input(2);
     Rlist(i) = input(3);
-    input = step(input, coeffs)
+    input = step(input, coeffs);
 end
 
 % figure
diff --git a/SRI_matlab/step.m b/SRI_matlab/step.m
index 8cb17c9..8e1f987 100644
--- a/SRI_matlab/step.m
+++ b/SRI_matlab/step.m
@@ -5,7 +5,7 @@ R = X(3);
 
 N = S + I + R;
 
-dS = -options.InfectionRate * S * I/N - options.VaccinationRate * S + options.ImmunisationLossRate * R + options.NatalityRate - options.NaturalDeathRate * S;
+dS = -options.InfectionRate * S * I/N - options.VaccinationRate * S + options.ImmunisationLossRate * R + options.NatalityRate * N - options.NaturalDeathRate * S;
 dI = options.InfectionRate * S * I/N - options.ImmunisationRate * I - options.DeathRate * I;
 dR = options.ImmunisationRate * I + options.VaccinationRate * S - options.ImmunisationLossRate * R - options.NaturalDeathRate * R;
 
-- 
GitLab