OpenModelica에서 감염의 수리 모델 "SIR 모델"구현 (백신의 효과보기)

기본 SIR 모델에 백신의 효과를 추가해 본다



기사, 「 OpenModelica에서 감염의 수리 모델 "SIR 모델" 구현 」로 작성한 모델에 백신의 효과를 더한 모델을 작성해 봅니다.

이 백신 모델의 전제 조건
- 'S : 감염가능자'를 안전하게 'R : 면역을 획득한 회복자'로 이행시키는 효과를 가진다
- 한 번 면역을 획득한 사람은 면역을 잃지 않는다
- 백신의 효과는 '백신 자체의 유효성(S→R로 이행할 수 있는 비율)'과 '접종률(전체 중 접종을 받은 비율)'의 곱으로 정해져야 한다.
- 감염이 시작될 때까지 백신접종이 끝난 것으로 한다

파라미터로서 「vaccine_effect = 백신 자체의 유효성(S→R로 이행할 수 있는 비율)」, 「vaccine_rate = 접종률(전체 중 접종을 받은 비율)」을 설정 가능하게 합니다.
parameter Real vaccine_effect = 1.0 "Effect of Vaccine";
parameter Real vaccine_rate = 0.7 "Vaccination rate";

등식 부분은 다음과 같습니다.
SIR 모델의 전단에서 S 를 일정한 비율로 R 로 바꾸는 것만으로 해, I 에는 영향을 주지 않는다고 하는 단순한 것입니다.
항체가 시간에 따라 손실되거나 감염이 일어나는 동안 백신 투여가 되는 경우에는 이 모델에서는 대응할 수 없지만, 백신 접종의 효과를 보는 것만으로 나누고 있습니다.
equation
  Vy = vaccine_effect * vaccine_rate;
  Sy = Si - Si * Vy;
  Iy = Ii;
  Ry = Ri + Si * Vy;

백신의 전체 코드는 이렇게 됩니다.
class cl_Vaccine
  extends Modelica.Blocks.Icons.Block;
  parameter Real vaccine_effect = 1.0 "Effect of Vaccine";
  parameter Real vaccine_rate = 0.7 "Vaccination rate";
  Modelica.Blocks.Interfaces.RealInput Si "Connector of initial S(Susceptible)" annotation(
      Placement(visible = true, transformation(origin = {-100, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
  Modelica.Blocks.Interfaces.RealInput Ii "Connector of initial I (Infectious)" annotation(
      Placement(visible = true, transformation(origin = {-100, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
  Modelica.Blocks.Interfaces.RealInput Ri "Connector of initial R (Removed)" annotation(
      Placement(visible = true, transformation(origin = {-100, -62}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, -62}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
  Modelica.Blocks.Interfaces.RealOutput Sy "Output connector of S(Susceptible)" annotation(
      Placement(visible = true, transformation(origin = {100, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, 62}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Interfaces.RealOutput Iy "Output connector of I (Infectious)" annotation(
      Placement(visible = true, transformation(origin = {100, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Interfaces.RealOutput Ry "Output connector of R (Removed)" annotation(
      Placement(visible = true, transformation(origin = {100, -60}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, -60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Interfaces.RealOutput Vy "Output connector of Vaccination rate" annotation(
      Placement(visible = true, transformation(origin = {0, -100}, extent = {{-10, -10}, {10, 10}}, rotation = -90), iconTransformation(origin = {0, -110}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  equation
    Vy = vaccine_effect * vaccine_rate;
    Sy = Si - Si * Vy;
    Iy = Ii;
    Ry = Ri + Si * Vy;
  annotation(
      Icon(graphics = {Text(origin = {-22, 24}, extent = {{-52, 32}, {94, -72}}, textString = "Vac")}, coordinateSystem(initialScale = 0.1)));
end cl_Vaccine;

예방접종을 가한 시뮬레이션 결과



기본 SIR 모델의 전단에 cl_vaccine을 넣어 백신 접종률을 50%, 백신 자체는 접종자를 100% 항체 보유자로 바꿀 수 있는 것으로 설정하고 있습니다.
이것은 기본 모델의 S, I, R 의 초기값을 (499.5, 1, 499.5)로 하는 것과 동등합니다.


시뮬레이션 결과에서는 50%의 접종률로 감염자의 최대수를 1/20 정도로 하고 있습니다.
70%의 접종률에서는 한 자리 더 가까이 떨어졌습니다.


요약



OpenModelica로 모델링함으로써 단순한 감염의 모델에 조금씩 요소를 더해 시뮬레이션하는 것이 용이하게 할 수 있었다고 생각합니다.
덧붙여 여기에서 나타낸 사고방식은 매우 나누어진 것이 되고 있으므로, 뭔가 큰 문제가 있는 것 같으면 어드바이스를 받을 수 있으면 다행입니다.

좋은 웹페이지 즐겨찾기