Chikungunya SIR Model¶
A deterministic SIR model of chikungunya transmission with optional NPI and vaccination interventions.
ChikungunyaSirModel(config)
¶
Bases: Model
Deterministic SIR model for chikungunya transmission.
Model assumptions: - Closed population with no births, deaths, or imported infections. - Homogeneous mixing within the population. - Deterministic transmission dynamics. - The epidemiological state structure is S -> I -> R. - NPI and vaccination effects are represented through modifications of the effective transmission rate rather than through additional epidemiological compartments.
The model supports two optional interventions:
- Non-pharmaceutical intervention (NPI)
- NPI effects are represented through a gradual reduction in beta.
- The intervention begins on simulation day 17 and reaches its maximum effect on day 28.
- The default maximum reduction in beta is 80%.
- This 80% reduction is treated as the strongest representation of the NPI intensity implemented during the outbreak.
-
Additional NPI scenario or sensitivity analyses should therefore examine weaker intervention intensities, corresponding to reductions in beta smaller than 80%.
-
Vaccination
- Vaccination eligibility is restricted to individuals aged 12 years or older.
- Target coverage: 40%.
- Vaccine efficacy against infection: 40%.
- Protection delay: 14 days.
- Vaccination starts on simulation day 0.
- Age eligibility is represented through the proportion of the population aged under 12 years; the S, I, and R compartments themselves are not age-stratified.
The vaccination effect follows the original R/odin model logic. Vaccination does not introduce an additional epidemiological compartment. Instead, the effective vaccination coverage is used to reduce the effective transmission rate over time.
The implementation is intended for intervention-scenario exploration in the Pandemic Simulator and preserves the mathematical structure of the original R/odin implementation.
Initialise the model and load model-specific intervention parameters.
The base Model initialiser first handles the standard framework setup, including transmission parameters, population state, and configured interventions. Model-specific NPI and vaccination parameters are then read from the Disease block of the configuration.
Source code in compartment/models/chikungunya_sir_model/model.py
prepare_initial_state()
¶
Return the initial population matrix created by the base Model class.
The example configuration specifies the total population and the initial infected proportion. No custom age-stratified initial state is required because age eligibility is used only for vaccination coverage calculations and does not create separate age-specific compartments.
Source code in compartment/models/chikungunya_sir_model/model.py
custom_npi(t, beta)
¶
Apply a gradual NPI-related reduction in the transmission rate beta.
The intervention begins on npi_start_day and increases linearly until npi_end_day, after which the maximum reduction is maintained.
In the default configuration: - npi_start_day = 17 - npi_end_day = 28 - npi_max_reduction = 0.80
The 80% reduction is treated as the strongest representation of the NPI intensity implemented during the outbreak. Therefore, additional NPI scenario or sensitivity analyses should represent weaker interventions by specifying reductions in beta below 80%.
If the NPI intervention is disabled, the baseline beta is returned unchanged.
Source code in compartment/models/chikungunya_sir_model/model.py
custom_vaccination(t, beta)
¶
Apply vaccination following the original R/odin model logic.
Vaccination is represented through a time-varying reduction in beta. No separate vaccinated epidemiological compartment is introduced.
Age eligibility is handled using prop_under12: only the population aged 12 years or older is considered eligible, but S, I, and R are not explicitly age-stratified.
Original R/odin logic:
effective_vacc_days = n_days - vacc_start_day - vacc_delay
can_vaccinate = effective_vacc_days > 0
daily_vacc_prop = if can_vaccinate: vaccine_coverage / effective_vacc_days else: 0
effective_days = max( 0, t - (vacc_start_day + vacc_delay) + 1 )
vaccine_cov_current = min( vaccine_coverage, daily_vacc_prop * effective_days * vaccine_efficacy )
vaccine_cov_total_population = vaccine_cov_current * (1 - prop_under12)
transmission_reduction = 1 - vaccine_cov_total_population
effective_beta = beta * transmission_reduction
The placement of vaccine efficacy inside vaccine_cov_current and the +1 term in effective_days are retained exactly from the original R/odin implementation to preserve the original model dynamics.
Source code in compartment/models/chikungunya_sir_model/model.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 | |
equation(y, t, p)
¶
Compute the compartment derivatives for one integration step.
The derivatives are written explicitly rather than relying entirely on the framework's automatic equation builder. This preserves the custom force of infection in which beta is modified sequentially by the optional NPI and vaccination mechanisms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y
|
Current compartment values in framework-defined order. |
required | |
t
|
Current simulation time in days since the simulation start. |
required | |
p
|
Packed model parameter vector. |
required |
Returns:
| Type | Description |
|---|---|
|
JAX array containing derivatives in self.compartment_list order. |
Source code in compartment/models/chikungunya_sir_model/model.py
756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 | |