From 6781ca7467eed78233736eee991437bdb5963e7b Mon Sep 17 00:00:00 2001
From: Paul CACHEUX <paulcacheux@gmail.com>
Date: Wed, 23 May 2018 17:24:54 +0200
Subject: [PATCH] Nouveau modele d'infection

---
 SRI_matlab/main.m    | 12 ++++++------
 SRI_matlab/options.m | 10 ----------
 SRI_matlab/step.m    |  6 ++++--
 3 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/SRI_matlab/main.m b/SRI_matlab/main.m
index 4d7bbf1..698be6b 100644
--- a/SRI_matlab/main.m
+++ b/SRI_matlab/main.m
@@ -1,6 +1,6 @@
 clear figure
 
-N = 180;
+N = 200;
 
 S = 990;
 I = 10;
@@ -10,14 +10,14 @@ R = 0;
 input = build_input(S, I, R, 12);
 
 coeffs = options;
-coeffs.InfectionRate = 0.6;
-coeffs.ImmunisationRate = 0.04;
+coeffs.InfectionRate = 0.02;
+coeffs.ImmunisationRate = 0.029;
 coeffs.ImmunisationLossRate = 2.7e-4;
-coeffs.DeathRate = 1.3e-3;
+coeffs.DeathRate = 1.3e-2;
 coeffs.NaturalDeathRate = 2e-5;
 coeffs.NatalityRate = 5e-5;
-% VaccinationRate = build_vacc_rate(0, 2.4e-4, 50, N);
-VaccinationRate = build_vacc_rate(0, 0, 50, N);
+VaccinationRate = build_vacc_rate(2.4e-4, 2.4e-3, 50, N);
+% VaccinationRate = build_vacc_rate(0, 0, 50, N);
 
 Slist = zeros(1, N);
 Wlist = zeros(1, N);
diff --git a/SRI_matlab/options.m b/SRI_matlab/options.m
index 76d8ad7..8a8555b 100644
--- a/SRI_matlab/options.m
+++ b/SRI_matlab/options.m
@@ -7,15 +7,5 @@ classdef options
         NaturalDeathRate
         NatalityRate
     end
-    
-    properties(Dependent)
-        R0
-    end
-    
-    methods
-        function R0=get.R0(obj)
-            R0 = obj.InfectionRate / (obj.ImmunisationRate + obj.DeathRate + obj.VaccinationRate);
-        end
-    end
 end
 
diff --git a/SRI_matlab/step.m b/SRI_matlab/step.m
index 55f2f96..b3f9b39 100644
--- a/SRI_matlab/step.m
+++ b/SRI_matlab/step.m
@@ -12,8 +12,10 @@ end
 
 if length(X) > 3
     infecter = sum(X(4:length(X)) + I);
-    new_waiting(1) = options.InfectionRate * S * infecter/N;
-    dS = -options.InfectionRate * S * infecter/N;
+    infection = S * (1 - 25 * options.InfectionRate / N) ^ I;
+    % infection = options.InfectionRate * S * infecter/N;
+    new_waiting(1) = infection;
+    dS = -infection;
     dI = X(length(X));
 else
     dS = -options.InfectionRate * S * I/N;
-- 
GitLab