parameters.h Source File

CPP API: parameters.h Source File
ode_secirts/parameters.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2020-2026 MEmilio
3 *
4 * Authors: Henrik Zunker, Wadim Koslow, Daniel Abele, Martin J. Kühn
5 *
6 * Contact: Martin J. Kuehn <Martin.Kuehn@DLR.de>
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20 #ifndef MIO_ODE_SECIRTS_PARAMETERS_H
21 #define MIO_ODE_SECIRTS_PARAMETERS_H
22 
23 #include "memilio/math/eigen.h"
25 #include "memilio/math/adapt_rk.h"
32 
33 #include <vector>
34 
35 namespace mio
36 {
37 namespace osecirts
38 {
39 
46 template <typename FP>
47 struct StartDay {
48  using Type = FP;
50  {
51  return Type(0.0);
52  }
53  static std::string name()
54  {
55  return "StartDay";
56  }
57 };
58 
65 template <typename FP>
67  using Type = FP;
69  {
71  }
72  static std::string name()
73  {
74  return "StartDayNewVariant";
75  }
76 };
77 
84 template <typename FP>
85 struct Seasonality {
88  {
89  return Type(0.);
90  }
91  static std::string name()
92  {
93  return "Seasonality";
94  }
95 };
96 
101 template <typename FP>
102 struct ICUCapacity {
105  {
107  }
108  static std::string name()
109  {
110  return "ICUCapacity";
111  }
112 };
113 
118 template <typename FP>
122  {
124  }
125  static std::string name()
126  {
127  return "TestAndTraceCapacity";
128  }
129 };
130 
134 template <typename FP>
138  {
139  return Type(2.0);
140  }
141  static std::string name()
142  {
143  return "TestAndTraceCapacityMaxRiskNoSymptoms";
144  }
145 };
146 
150 template <typename FP>
154  {
155  return Type(15.0);
156  }
157  static std::string name()
158  {
159  return "TestAndTraceCapacityMaxRiskSymptoms";
160  }
161 };
162 
167 template <typename FP>
171  {
172  return Type(1, static_cast<Eigen::Index>((size_t)size));
173  }
174  static std::string name()
175  {
176  return "ContactPatterns";
177  }
178 };
179 
184 template <typename FP>
187  static Type get_default(AgeGroup /*size*/)
188  {
189  return {};
190  }
191  static std::string name()
192  {
193  return "DynamicNPIsInfectedSymptoms";
194  }
195 };
196 
201 template <typename FP>
202 struct TimeExposed {
205  {
206  return Type(size, 1.);
207  }
208  static std::string name()
209  {
210  return "TimeExposed";
211  }
212 };
213 
219 template <typename FP>
223  {
224  return Type(size, 1.);
225  }
226  static std::string name()
227  {
228  return "TimeInfectedNoSymptoms";
229  }
230 };
231 
237 template <typename FP>
241  {
242  return Type(size, 1.);
243  }
244  static std::string name()
245  {
246  return "TimeInfectedSymptoms";
247  }
248 };
249 
255 template <typename FP>
259  {
260  return Type(size, 1.);
261  }
262  static std::string name()
263  {
264  return "TimeInfectedSevere";
265  }
266 };
267 
273 template <typename FP>
277  {
278  return Type(size, 1.);
279  }
280  static std::string name()
281  {
282  return "TimeInfectedCritical";
283  }
284 };
285 
290 template <typename FP>
294  {
295  return Type(size, 90.0);
296  }
297  static std::string name()
298  {
299  return "TimeWaningPartialImmunity";
300  }
301 };
302 
307 template <typename FP>
311  {
312  return Type(size, 90.0);
313  }
314  static std::string name()
315  {
316  return "TimeWaningImprovedImmunity";
317  }
318 };
319 
325 template <typename FP>
329  {
330  return Type(size, 1.);
331  }
332  static std::string name()
333  {
334  return "TimeTemporaryImmunityPI";
335  }
336 };
337 
343 template <typename FP>
347  {
348  return Type(size, 1.);
349  }
350  static std::string name()
351  {
352  return "TimeTemporaryImmunityII";
353  }
354 };
359 template <typename FP>
363  {
364  return Type(size, 1.);
365  }
366  static std::string name()
367  {
368  return "TransmissionProbabilityOnContact";
369  }
370 };
371 
376 template <typename FP>
380  {
381  return Type(size, 1.);
382  }
383  static std::string name()
384  {
385  return "RelativeTransmissionNoSymptoms";
386  }
387 };
388 
393 template <typename FP>
397  {
398  return Type(size, 0.);
399  }
400  static std::string name()
401  {
402  return "RecoveredPerInfectedNoSymptoms";
403  }
404 };
405 
410 template <typename FP>
414  {
415  return Type(size, 1.);
416  }
417  static std::string name()
418  {
419  return "RiskOfInfectionFromSymptomatic";
420  }
421 };
422 
427 template <typename FP>
431  {
432  return Type(size, 1.);
433  }
434  static std::string name()
435  {
436  return "MaxRiskOfInfectionFromSymptomatic";
437  }
438 };
439 
444 template <typename FP>
448  {
449  return Type(size, 0.);
450  }
451  static std::string name()
452  {
453  return "SeverePerInfectedSymptoms";
454  }
455 };
456 
461 template <typename FP>
465  {
466  return Type(size, 0.);
467  }
468  static std::string name()
469  {
470  return "CriticalPerSevere";
471  }
472 };
473 
480 template <typename FP>
484  {
485  return Type(size, 0.);
486  }
487  static std::string name()
488  {
489  return "DeathsPerSevere";
490  }
491 };
492 
497 template <typename FP>
501  {
502  return Type(size, 0.);
503  }
504  static std::string name()
505  {
506  return "DeathsPerCritical";
507  }
508 };
509 
514 template <typename FP>
518  {
519  return Type(size, 14.0);
520  }
521  static std::string name()
522  {
523  return "DaysUntilEffectivePartialVaccination";
524  }
525 };
526 
531 template <typename FP>
535  {
536  return Type(size, 7.0);
537  }
538  static std::string name()
539  {
540  return "DaysUntilEffectiveImprovedVaccination";
541  }
542 };
543 
548 template <typename FP>
552  {
553  return Type(size, 7.0);
554  }
555  static std::string name()
556  {
557  return "DaysUntilEffectiveBoosterImmunity";
558  }
559 };
560 
565 template <typename FP>
569  {
570  return Type({size, SimulationDay(0)});
571  }
572  static std::string name()
573  {
574  return "DailyPartialVaccinations";
575  }
576 };
577 
582 template <typename FP>
586  {
587  return Type({size, SimulationDay(0)});
588  }
589  static std::string name()
590  {
591  return "DailyFullVaccinations";
592  }
593 };
594 
599 template <typename FP>
603  {
604  return Type({size, SimulationDay(0)});
605  }
606  static std::string name()
607  {
608  return "DailyBoosterVaccinations";
609  }
610 };
611 
616 template <typename FP>
620  {
621  return Type(size, 1.);
622  }
623  static std::string name()
624  {
625  return "ReducExposedPartialImmunity";
626  }
627 };
628 
633 template <typename FP>
637  {
638  return Type(size, 1.);
639  }
640  static std::string name()
641  {
642  return "ReducExposedImprovedImmunity";
643  }
644 };
645 
650 template <typename FP>
654  {
655  return Type(size, 1.);
656  }
657  static std::string name()
658  {
659  return "ReducInfectedSymptomsPartialImmunity";
660  }
661 };
662 
667 template <typename FP>
671  {
672  return Type(size, 1.);
673  }
674  static std::string name()
675  {
676  return "ReducInfectedSymptomsImprovedImmunity";
677  }
678 };
679 
685 template <typename FP>
689  {
690  return Type(size, 1.);
691  }
692  static std::string name()
693  {
694  return "ReducInfectedSevereCriticalDeadPartialImmunity";
695  }
696 };
697 
702 template <typename FP>
706  {
707  return Type(size, 1.);
708  }
709  static std::string name()
710  {
711  return "ReducInfectedSevereCriticalDeadImprovedImmunity";
712  }
713 };
714 
719 template <typename FP>
723  {
724  return Type(size, 0.5);
725  }
726  static std::string name()
727  {
728  return "ReducTimeInfectedMild";
729  }
730 };
731 
736 template <typename FP>
740  {
741  return Type(size, 1.0);
742  }
743  static std::string name()
744  {
745  return "InfectiousnessNewVariant";
746  }
747 };
748 
752 template <typename FP>
755  static Type get_default(AgeGroup /*size*/)
756  {
757  return Type(0.0);
758  }
759  static std::string name()
760  {
761  return "DynamicNPIsImplementationDelay";
762  }
763 };
764 
765 template <typename FP>
781 
786 template <typename FP>
787 class Parameters : public ParametersBase<FP>
788 {
789 public:
790  Parameters(AgeGroup num_agegroups)
791  : ParametersBase<FP>(num_agegroups)
792  , m_num_groups{num_agegroups}
793  {
794  }
795 
797  {
798  return m_num_groups;
799  }
800 
805  {
807  }
809  {
811  }
812 
817  {
819  }
820 
822  {
824  }
825 
830  {
832  }
833 
835  {
837  }
838 
843  {
844  return m_end_dynamic_npis;
845  }
847  {
848  return m_end_dynamic_npis;
849  }
850 
865  {
866  int corrected = false;
867  if (this->template get<Seasonality<FP>>() < 0.0 || this->template get<Seasonality<FP>>() > 0.5) {
868  log_warning("Constraint check: Parameter Seasonality changed from {} to {}",
869  this->template get<Seasonality<FP>>(), 0);
870  this->template set<Seasonality<FP>>(0);
871  corrected = true;
872  }
873 
874  if (this->template get<ICUCapacity<FP>>() < 0.0) {
875  log_warning("Constraint check: Parameter ICUCapacity changed from {} to {}",
876  this->template get<ICUCapacity<FP>>(), 0);
877  this->template set<ICUCapacity<FP>>(0);
878  corrected = true;
879  }
880 
881  if (this->template get<TestAndTraceCapacity<FP>>() < 0.0) {
882  log_warning("Constraint check: Parameter TestAndTraceCapacity changed from {} to {}",
883  this->template get<TestAndTraceCapacity<FP>>(), 0);
884  this->template set<TestAndTraceCapacity<FP>>(0);
885  corrected = true;
886  }
887 
888  if (this->template get<TestAndTraceCapacityMaxRiskSymptoms<FP>>() < 0.0) {
889  log_warning("Constraint check: Parameter TestAndTraceCapacityMaxRiskSymptoms changed from {} to {}",
890  this->template get<TestAndTraceCapacityMaxRiskSymptoms<FP>>(), 0);
891  this->template set<TestAndTraceCapacityMaxRiskSymptoms<FP>>(0);
892  corrected = true;
893  }
894 
895  if (this->template get<TestAndTraceCapacityMaxRiskNoSymptoms<FP>>() < 0.0) {
896  log_warning("Constraint check: Parameter TestAndTraceCapacityMaxRiskNoSymptoms changed from {} to {}",
897  this->template get<TestAndTraceCapacityMaxRiskNoSymptoms<FP>>(), 0);
898  this->template set<TestAndTraceCapacityMaxRiskNoSymptoms<FP>>(0);
899  corrected = true;
900  }
901 
902  if (this->template get<DynamicNPIsImplementationDelay<FP>>() < 0.0) {
903  log_warning("Constraint check: Parameter DynamicNPIsImplementationDelay changed from {} to {}",
904  this->template get<DynamicNPIsImplementationDelay<FP>>(), 0);
905  this->template set<DynamicNPIsImplementationDelay<FP>>(0);
906  corrected = true;
907  }
908 
909  const FP tol_times = 1e-1; // accepted tolerance for compartment stays
910 
911  for (auto i = AgeGroup(0); i < AgeGroup(m_num_groups); ++i) {
912 
913  if (this->template get<TimeExposed<FP>>()[i] < tol_times) {
914  log_warning("Constraint check: Parameter TimeExposed changed from {} to {}. Please "
915  "note that unreasonably small compartment stays lead to massively increased run time. "
916  "Consider to cancel and reset parameters.",
917  this->template get<TimeExposed<FP>>()[i], tol_times);
918  this->template get<TimeExposed<FP>>()[i] = tol_times;
919  corrected = true;
920  }
921 
922  if (this->template get<TimeInfectedNoSymptoms<FP>>()[i] < tol_times) {
923  log_warning("Constraint check: Parameter TimeInfectedNoSymptoms changed from {} to {}. Please "
924  "note that unreasonably small compartment stays lead to massively increased run time. "
925  "Consider to cancel and reset parameters.",
926  this->template get<TimeInfectedNoSymptoms<FP>>()[i], tol_times);
927  this->template get<TimeInfectedNoSymptoms<FP>>()[i] = tol_times;
928  corrected = true;
929  }
930 
931  if (this->template get<TimeInfectedSymptoms<FP>>()[i] < tol_times) {
932  log_warning("Constraint check: Parameter TimeInfectedSymptoms changed from {} to {}. Please "
933  "note that unreasonably small compartment stays lead to massively increased run time. "
934  "Consider to cancel and reset parameters.",
935  this->template get<TimeInfectedSymptoms<FP>>()[i], tol_times);
936  this->template get<TimeInfectedSymptoms<FP>>()[i] = tol_times;
937  corrected = true;
938  }
939 
940  if (this->template get<TimeInfectedSevere<FP>>()[i] < tol_times) {
941  log_warning("Constraint check: Parameter TimeInfectedSevere changed from {} to {}. Please "
942  "note that unreasonably small compartment stays lead to massively increased run time. "
943  "Consider to cancel and reset parameters.",
944  this->template get<TimeInfectedSevere<FP>>()[i], tol_times);
945  this->template get<TimeInfectedSevere<FP>>()[i] = tol_times;
946  corrected = true;
947  }
948 
949  if (this->template get<TimeInfectedCritical<FP>>()[i] < tol_times) {
950  log_warning("Constraint check: Parameter TimeInfectedCritical changed from {} to {}. Please "
951  "note that unreasonably small compartment stays lead to massively increased run time. "
952  "Consider to cancel and reset parameters.",
953  this->template get<TimeInfectedCritical<FP>>()[i], tol_times);
954  this->template get<TimeInfectedCritical<FP>>()[i] = tol_times;
955  corrected = true;
956  }
957 
958  if (this->template get<TimeTemporaryImmunityPI<FP>>()[i] < tol_times) {
959  log_warning("Constraint check: Parameter TimeTemporaryImmunityPI changed from {} to {}. Please "
960  "note that unreasonably small compartment stays lead to massively increased run time. "
961  "Consider to cancel and reset parameters.",
962  this->template get<TimeTemporaryImmunityPI<FP>>()[i], tol_times);
963  this->template get<TimeTemporaryImmunityPI<FP>>()[i] = tol_times;
964  corrected = true;
965  }
966 
967  if (this->template get<TimeTemporaryImmunityII<FP>>()[i] < tol_times) {
968  log_warning("Constraint check: Parameter TimeTemporaryImmunityII changed from {} to {}. Please "
969  "note that unreasonably small compartment stays lead to massively increased run time. "
970  "Consider to cancel and reset parameters.",
971  this->template get<TimeTemporaryImmunityII<FP>>()[i], tol_times);
972  this->template get<TimeTemporaryImmunityII<FP>>()[i] = tol_times;
973  corrected = true;
974  }
975 
976  if (this->template get<TimeWaningPartialImmunity<FP>>()[i] < tol_times) {
977  log_warning("Constraint check: Parameter TimeWaningPartialImmunity changed from {} to {}. Please "
978  "note that unreasonably small compartment stays lead to massively increased run time. "
979  "Consider to cancel and reset parameters.",
980  this->template get<TimeWaningPartialImmunity<FP>>()[i], tol_times);
981  this->template get<TimeWaningPartialImmunity<FP>>()[i] = tol_times;
982  corrected = true;
983  }
984 
985  if (this->template get<TimeWaningImprovedImmunity<FP>>()[i] < tol_times) {
986  log_warning("Constraint check: Parameter TimeWaningImprovedImmunity changed from {} to {}. Please "
987  "note that unreasonably small compartment stays lead to massively increased run time. "
988  "Consider to cancel and reset parameters.",
989  this->template get<TimeWaningImprovedImmunity<FP>>()[i], tol_times);
990  this->template get<TimeWaningImprovedImmunity<FP>>()[i] = tol_times;
991  corrected = true;
992  }
993 
994  if (this->template get<TransmissionProbabilityOnContact<FP>>()[i] < 0.0 ||
995  this->template get<TransmissionProbabilityOnContact<FP>>()[i] > 1.0) {
996  log_warning("Constraint check: Parameter TransmissionProbabilityOnContact changed from {} to {} ",
997  this->template get<TransmissionProbabilityOnContact<FP>>()[i], 0.0);
998  this->template get<TransmissionProbabilityOnContact<FP>>()[i] = 0.0;
999  corrected = true;
1000  }
1001 
1002  if (this->template get<RelativeTransmissionNoSymptoms<FP>>()[i] < 0.0) {
1003  log_warning("Constraint check: Parameter RelativeTransmissionNoSymptoms changed from {} to {} ",
1004  this->template get<RelativeTransmissionNoSymptoms<FP>>()[i], 0);
1005  this->template get<RelativeTransmissionNoSymptoms<FP>>()[i] = 0;
1006  corrected = true;
1007  }
1008 
1009  if (this->template get<RecoveredPerInfectedNoSymptoms<FP>>()[i] < 0.0 ||
1010  this->template get<RecoveredPerInfectedNoSymptoms<FP>>()[i] > 1.0) {
1011  log_warning("Constraint check: Parameter RecoveredPerInfectedNoSymptoms changed from {} to {} ",
1012  this->template get<RecoveredPerInfectedNoSymptoms<FP>>()[i], 0);
1013  this->template get<RecoveredPerInfectedNoSymptoms<FP>>()[i] = 0;
1014  corrected = true;
1015  }
1016 
1017  if (this->template get<RiskOfInfectionFromSymptomatic<FP>>()[i] < 0.0 ||
1018  this->template get<RiskOfInfectionFromSymptomatic<FP>>()[i] > 1.0) {
1019  log_warning("Constraint check: Parameter RiskOfInfectionFromSymptomatic changed from {} to {}",
1020  this->template get<RiskOfInfectionFromSymptomatic<FP>>()[i], 0);
1021  this->template get<RiskOfInfectionFromSymptomatic<FP>>()[i] = 0;
1022  corrected = true;
1023  }
1024 
1025  if (this->template get<SeverePerInfectedSymptoms<FP>>()[i] < 0.0 ||
1026  this->template get<SeverePerInfectedSymptoms<FP>>()[i] > 1.0) {
1027  log_warning("Constraint check: Parameter SeverePerInfectedSymptoms changed from {} to {}",
1028  this->template get<SeverePerInfectedSymptoms<FP>>()[i], 0);
1029  this->template get<SeverePerInfectedSymptoms<FP>>()[i] = 0;
1030  corrected = true;
1031  }
1032 
1033  if (this->template get<CriticalPerSevere<FP>>()[i] < 0.0 ||
1034  this->template get<CriticalPerSevere<FP>>()[i] > 1.0) {
1035  log_warning("Constraint check: Parameter CriticalPerSevere changed from {} to {}",
1036  this->template get<CriticalPerSevere<FP>>()[i], 0);
1037  this->template get<CriticalPerSevere<FP>>()[i] = 0;
1038  corrected = true;
1039  }
1040 
1041  if (this->template get<DeathsPerSevere<FP>>()[i] < 0.0 ||
1042  this->template get<DeathsPerSevere<FP>>()[i] > 1.0) {
1043  log_warning("Constraint check: Parameter DeathsPerSevere changed from {} to {}",
1044  this->template get<DeathsPerSevere<FP>>()[i], 0);
1045  this->template get<DeathsPerSevere<FP>>()[i] = 0;
1046  corrected = true;
1047  }
1048 
1049  if (this->template get<CriticalPerSevere<FP>>()[i] + this->template get<DeathsPerSevere<FP>>()[i] > 1.0) {
1050  log_warning("Constraint check: CriticalPerSevere + DeathsPerSevere exceed 1.0 for age group {}. "
1051  "DeathsPerSevere changed from {} to 0.",
1052  static_cast<size_t>(i), this->template get<DeathsPerSevere<FP>>()[i]);
1053  this->template get<DeathsPerSevere<FP>>()[i] = 0;
1054  corrected = true;
1055  }
1056 
1057  if (this->template get<DeathsPerCritical<FP>>()[i] < 0.0 ||
1058  this->template get<DeathsPerCritical<FP>>()[i] > 1.0) {
1059  log_warning("Constraint check: Parameter DeathsPerCritical changed from {} to {}",
1060  this->template get<DeathsPerCritical<FP>>()[i], 0);
1061  this->template get<DeathsPerCritical<FP>>()[i] = 0;
1062  corrected = true;
1063  }
1064 
1065  if (this->template get<DaysUntilEffectivePartialVaccination<FP>>()[i] < 0.0) {
1066  log_warning("Constraint check: Parameter DeathsPerCritical changed from {} to {}",
1067  this->template get<DaysUntilEffectivePartialVaccination<FP>>()[i], 0);
1068  this->template get<DaysUntilEffectivePartialVaccination<FP>>()[i] = 0;
1069  corrected = true;
1070  }
1071 
1072  if (this->template get<DaysUntilEffectiveImprovedVaccination<FP>>()[i] < 0.0) {
1073  log_warning("Constraint check: Parameter DaysUntilEffectiveImprovedVaccination changed from {} to {}",
1074  this->template get<DaysUntilEffectiveImprovedVaccination<FP>>()[i], 0);
1075  this->template get<DaysUntilEffectiveImprovedVaccination<FP>>()[i] = 0;
1076  corrected = true;
1077  }
1078 
1079  if (this->template get<DaysUntilEffectiveBoosterImmunity<FP>>()[i] < 0.0) {
1080  log_warning("Constraint check: Parameter DaysUntilEffectiveBoosterImmunity changed from {} to {}",
1081  this->template get<DaysUntilEffectiveBoosterImmunity<FP>>()[i], 0);
1082  this->template get<DaysUntilEffectiveBoosterImmunity<FP>>()[i] = 0;
1083  corrected = true;
1084  }
1085 
1086  if (this->template get<ReducExposedPartialImmunity<FP>>()[i] <= 0.0 ||
1087  this->template get<ReducExposedPartialImmunity<FP>>()[i] > 1.0) {
1088  log_warning("Constraint check: Parameter ReducExposedPartialImmunity changed from {} to {}",
1089  this->template get<ReducExposedPartialImmunity<FP>>()[i], 1);
1090  this->template get<ReducExposedPartialImmunity<FP>>()[i] = 1;
1091  corrected = true;
1092  }
1093  if (this->template get<ReducExposedImprovedImmunity<FP>>()[i] <= 0.0 ||
1094  this->template get<ReducExposedImprovedImmunity<FP>>()[i] > 1.0) {
1095  log_warning("Constraint check: Parameter ReducExposedImprovedImmunity changed from {} to {}",
1096  this->template get<ReducExposedImprovedImmunity<FP>>()[i], 1);
1097  this->template get<ReducExposedImprovedImmunity<FP>>()[i] = 1;
1098  corrected = true;
1099  }
1100  if (this->template get<ReducInfectedSymptomsPartialImmunity<FP>>()[i] <= 0.0 ||
1101  this->template get<ReducInfectedSymptomsPartialImmunity<FP>>()[i] > 1.0) {
1102  log_warning("Constraint check: Parameter ReducInfectedSymptomsPartialImmunity changed from {} to {}",
1103  this->template get<ReducInfectedSymptomsPartialImmunity<FP>>()[i], 1);
1104  this->template get<ReducInfectedSymptomsPartialImmunity<FP>>()[i] = 1;
1105  corrected = true;
1106  }
1107  if (this->template get<ReducInfectedSymptomsImprovedImmunity<FP>>()[i] <= 0.0 ||
1108  this->template get<ReducInfectedSymptomsImprovedImmunity<FP>>()[i] > 1.0) {
1109  log_warning("Constraint check: Parameter ReducInfectedSymptomsImprovedImmunity changed from {} to {}",
1110  this->template get<ReducInfectedSymptomsImprovedImmunity<FP>>()[i], 1.0);
1111  this->template get<ReducInfectedSymptomsImprovedImmunity<FP>>()[i] = 1.0;
1112  corrected = true;
1113  }
1114  if (this->template get<ReducInfectedSevereCriticalDeadPartialImmunity<FP>>()[i] <= 0.0 ||
1115  this->template get<ReducInfectedSevereCriticalDeadPartialImmunity<FP>>()[i] > 1.0) {
1116  log_warning("Constraint check: Parameter ReducInfectedSevereCriticalDeadPartialImmunity changed from "
1117  "{} to {}",
1118  this->template get<ReducInfectedSevereCriticalDeadPartialImmunity<FP>>()[i], 1.0);
1119  this->template get<ReducInfectedSevereCriticalDeadPartialImmunity<FP>>()[i] = 1.0;
1120  corrected = true;
1121  }
1122  if (this->template get<ReducInfectedSevereCriticalDeadImprovedImmunity<FP>>()[i] <= 0.0 ||
1123  this->template get<ReducInfectedSevereCriticalDeadImprovedImmunity<FP>>()[i] > 1.0) {
1124  log_warning("Constraint check: Parameter ReducInfectedSevereCriticalDeadImprovedImmunity changed from "
1125  "{} to {}",
1126  this->template get<ReducInfectedSevereCriticalDeadImprovedImmunity<FP>>()[i], 1.0);
1127  this->template get<ReducInfectedSevereCriticalDeadImprovedImmunity<FP>>()[i] = 1.0;
1128  corrected = true;
1129  }
1130  if (this->template get<ReducTimeInfectedMild<FP>>()[i] <= 0.0 ||
1131  this->template get<ReducTimeInfectedMild<FP>>()[i] > 1.0) {
1132  log_warning("Constraint check: Parameter ReducTimeInfectedMild changed from {} to {}",
1133  this->template get<ReducTimeInfectedMild<FP>>()[i], 1.0);
1134  this->template get<ReducTimeInfectedMild<FP>>()[i] = 1.0;
1135  corrected = true;
1136  }
1137  if (this->template get<InfectiousnessNewVariant<FP>>()[i] < 0.0) {
1138  log_warning("Constraint check: Parameter InfectiousnessNewVariant changed from {} to {}",
1139  this->template get<InfectiousnessNewVariant<FP>>()[i], 1.0);
1140  this->template get<InfectiousnessNewVariant<FP>>()[i] = 1.0;
1141  corrected = true;
1142  }
1143  }
1144  return corrected;
1145  }
1146 
1152  bool check_constraints() const
1153  {
1154  const FP tol_times = 1e-1; // accepted tolerance for compartment stays
1155  if (this->template get<Seasonality<FP>>() < 0.0 || this->template get<Seasonality<FP>>() > 0.5) {
1156  log_error("Constraint check: Parameter m_seasonality smaller {} or larger {}", 0, 0.5);
1157  return true;
1158  }
1159 
1160  if (this->template get<ICUCapacity<FP>>() < 0.0) {
1161  log_error("Constraint check: Parameter m_icu_capacity smaller {}", 0);
1162  return true;
1163  }
1164 
1165  if (this->template get<TestAndTraceCapacity<FP>>() < 0.0) {
1166  log_error("Constraint check: Parameter TestAndTraceCapacity smaller {}", 0);
1167  return true;
1168  }
1169 
1170  if (this->template get<TestAndTraceCapacityMaxRiskSymptoms<FP>>() < 0.0) {
1171  log_error("Constraint check: Parameter TestAndTraceCapacityMaxRiskSymptoms smaller {}", 0);
1172  return true;
1173  }
1174 
1175  if (this->template get<TestAndTraceCapacityMaxRiskNoSymptoms<FP>>() < 0.0) {
1176  log_error("Constraint check: Parameter TestAndTraceCapacityMaxRiskNoSymptoms smaller {}", 0);
1177  return true;
1178  }
1179 
1180  if (this->template get<DynamicNPIsImplementationDelay<FP>>() < 0.0) {
1181  log_error("Constraint check: Parameter DynamicNPIsImplementationDelay smaller {}", 0);
1182  return true;
1183  }
1184 
1185  for (auto i = AgeGroup(0); i < AgeGroup(m_num_groups); ++i) {
1186 
1187  if (this->template get<TimeExposed<FP>>()[i] < tol_times) {
1188  log_error("Constraint check: Parameter TimeExposed {} smaller {}. Please "
1189  "note that unreasonably small compartment stays lead to massively increased run time. "
1190  "Consider to cancel and reset parameters.",
1191  this->template get<TimeExposed<FP>>()[i], tol_times);
1192  return true;
1193  }
1194 
1195  if (this->template get<TimeInfectedNoSymptoms<FP>>()[i] < tol_times) {
1196  log_error("Constraint check: Parameter TimeInfectedNoSymptoms {} smaller {}. Please "
1197  "note that unreasonably small compartment stays lead to massively increased run time. "
1198  "Consider to cancel and reset parameters.",
1199  this->template get<TimeInfectedNoSymptoms<FP>>()[i], tol_times);
1200  return true;
1201  }
1202 
1203  if (this->template get<TimeInfectedSymptoms<FP>>()[i] < tol_times) {
1204  log_error("Constraint check: Parameter TimeInfectedSymptoms {} smaller {}. Please "
1205  "note that unreasonably small compartment stays lead to massively increased run time. "
1206  "Consider to cancel and reset parameters.",
1207  this->template get<TimeInfectedSymptoms<FP>>()[i], tol_times);
1208  return true;
1209  }
1210 
1211  if (this->template get<TimeInfectedSevere<FP>>()[i] < tol_times) {
1212  log_error("Constraint check: Parameter TimeInfectedSevere {} smaller {}. Please "
1213  "note that unreasonably small compartment stays lead to massively increased run time. "
1214  "Consider to cancel and reset parameters.",
1215  this->template get<TimeInfectedSevere<FP>>()[i], tol_times);
1216  return true;
1217  }
1218 
1219  if (this->template get<TimeInfectedCritical<FP>>()[i] < tol_times) {
1220  log_error("Constraint check: Parameter TimeInfectedCritical {} smaller {}. Please "
1221  "note that unreasonably small compartment stays lead to massively increased run time. "
1222  "Consider to cancel and reset parameters.",
1223  this->template get<TimeInfectedCritical<FP>>()[i], tol_times);
1224  return true;
1225  }
1226 
1227  if (this->template get<TimeTemporaryImmunityPI<FP>>()[i] < tol_times) {
1228  log_error("Constraint check: Parameter TimeTemporaryImmunityPI {} smaller {}. Please "
1229  "note that unreasonably small compartment stays lead to massively increased run time. "
1230  "Consider to cancel and reset parameters.",
1231  this->template get<TimeTemporaryImmunityPI<FP>>()[i], tol_times);
1232  return true;
1233  }
1234 
1235  if (this->template get<TimeTemporaryImmunityII<FP>>()[i] < tol_times) {
1236  log_error("Constraint check: Parameter TimeTemporaryImmunityII {} smaller {}. Please "
1237  "note that unreasonably small compartment stays lead to massively increased run time. "
1238  "Consider to cancel and reset parameters.",
1239  this->template get<TimeTemporaryImmunityII<FP>>()[i], tol_times);
1240  return true;
1241  }
1242 
1243  if (this->template get<TimeWaningPartialImmunity<FP>>()[i] < tol_times) {
1244  log_error("Constraint check: Parameter TimeWaningPartialImmunity {} smaller {}. Please "
1245  "note that unreasonably small compartment stays lead to massively increased run time. "
1246  "Consider to cancel and reset parameters.",
1247  this->template get<TimeWaningPartialImmunity<FP>>()[i], tol_times);
1248  return true;
1249  }
1250 
1251  if (this->template get<TimeWaningImprovedImmunity<FP>>()[i] < tol_times) {
1252  log_error("Constraint check: Parameter TimeWaningImprovedImmunity {} smaller {}. Please "
1253  "note that unreasonably small compartment stays lead to massively increased run time. "
1254  "Consider to cancel and reset parameters.",
1255  this->template get<TimeWaningImprovedImmunity<FP>>()[i], tol_times);
1256  return true;
1257  }
1258 
1259  if (this->template get<TransmissionProbabilityOnContact<FP>>()[i] < 0.0 ||
1260  this->template get<TransmissionProbabilityOnContact<FP>>()[i] > 1.0) {
1261  log_error("Constraint check: Parameter TransmissionProbabilityOnContact smaller {} or larger {}", 0, 1);
1262  return true;
1263  }
1264 
1265  if (this->template get<RelativeTransmissionNoSymptoms<FP>>()[i] < 0.0) {
1266  log_error("Constraint check: Parameter RelativeTransmissionNoSymptoms smaller {}", 0);
1267  return true;
1268  }
1269 
1270  if (this->template get<RecoveredPerInfectedNoSymptoms<FP>>()[i] < 0.0 ||
1271  this->template get<RecoveredPerInfectedNoSymptoms<FP>>()[i] > 1.0) {
1272  log_error("Constraint check: Parameter RecoveredPerInfectedNoSymptoms smaller {} or larger {}", 0, 1);
1273  return true;
1274  }
1275 
1276  if (this->template get<RiskOfInfectionFromSymptomatic<FP>>()[i] < 0.0 ||
1277  this->template get<RiskOfInfectionFromSymptomatic<FP>>()[i] > 1.0) {
1278  log_error("Constraint check: Parameter RiskOfInfectionFromSymptomatic smaller {} or larger {}", 0, 1);
1279  return true;
1280  }
1281 
1282  if (this->template get<SeverePerInfectedSymptoms<FP>>()[i] < 0.0 ||
1283  this->template get<SeverePerInfectedSymptoms<FP>>()[i] > 1.0) {
1284  log_error("Constraint check: Parameter SeverePerInfectedSymptoms smaller {} or larger {}", 0, 1);
1285  return true;
1286  }
1287 
1288  if (this->template get<CriticalPerSevere<FP>>()[i] < 0.0 ||
1289  this->template get<CriticalPerSevere<FP>>()[i] > 1.0) {
1290  log_error("Constraint check: Parameter CriticalPerSevere smaller {} or larger {}", 0, 1);
1291  return true;
1292  }
1293 
1294  if (this->template get<DeathsPerSevere<FP>>()[i] < 0.0 ||
1295  this->template get<DeathsPerSevere<FP>>()[i] > 1.0) {
1296  log_error("Constraint check: Parameter DeathsPerSevere smaller {} or larger {}", 0, 1);
1297  return true;
1298  }
1299 
1300  if (this->template get<CriticalPerSevere<FP>>()[i] + this->template get<DeathsPerSevere<FP>>()[i] > 1.0) {
1301  log_error("Constraint check: CriticalPerSevere + DeathsPerSevere exceed 1.0 for age group {}.",
1302  static_cast<size_t>(i));
1303  return true;
1304  }
1305 
1306  if (this->template get<DeathsPerCritical<FP>>()[i] < 0.0 ||
1307  this->template get<DeathsPerCritical<FP>>()[i] > 1.0) {
1308  log_error("Constraint check: Parameter DeathsPerCritical smaller {} or larger {}", 0, 1);
1309  return true;
1310  }
1311 
1312  if (this->template get<DaysUntilEffectivePartialVaccination<FP>>()[i] < 0.0) {
1313  log_error("Constraint check: Parameter DaysUntilEffectivePartialVaccination smaller {}", 0);
1314  return true;
1315  }
1316 
1317  if (this->template get<DaysUntilEffectiveImprovedVaccination<FP>>()[i] < 0.0) {
1318  log_error("Constraint check: Parameter DaysUntilEffectiveImprovedVaccination smaller {}", 0);
1319  return true;
1320  }
1321 
1322  if (this->template get<DaysUntilEffectiveBoosterImmunity<FP>>()[i] < 0.0) {
1323  log_error("Constraint check: Parameter DaysUntilEffectiveImprovedVaccination smaller {}", 0);
1324  return true;
1325  }
1326 
1327  if (this->template get<ReducExposedPartialImmunity<FP>>()[i] <= 0.0 ||
1328  this->template get<ReducExposedPartialImmunity<FP>>()[i] > 1.0) {
1329  log_error("Constraint check: Parameter ReducExposedPartialImmunity smaller {} or larger {}", 0, 1);
1330  return true;
1331  }
1332  if (this->template get<ReducExposedImprovedImmunity<FP>>()[i] <= 0.0 ||
1333  this->template get<ReducExposedImprovedImmunity<FP>>()[i] > 1.0) {
1334  log_error("Constraint check: Parameter ReducExposedImprovedImmunity smaller {} or larger {}", 0, 1);
1335  return true;
1336  }
1337  if (this->template get<ReducInfectedSymptomsPartialImmunity<FP>>()[i] <= 0.0 ||
1338  this->template get<ReducInfectedSymptomsPartialImmunity<FP>>()[i] > 1.0) {
1339  log_error("Constraint check: Parameter ReducInfectedSymptomsPartialImmunity smaller {} or larger {}", 0,
1340  1);
1341  return true;
1342  }
1343  if (this->template get<ReducInfectedSymptomsImprovedImmunity<FP>>()[i] <= 0.0 ||
1344  this->template get<ReducInfectedSymptomsImprovedImmunity<FP>>()[i] > 1.0) {
1345  log_error("Constraint check: Parameter ReducInfectedSymptomsImprovedImmunity smaller {} or larger {}",
1346  0, 1);
1347  return true;
1348  }
1349  if (this->template get<ReducInfectedSevereCriticalDeadPartialImmunity<FP>>()[i] <= 0.0 ||
1350  this->template get<ReducInfectedSevereCriticalDeadPartialImmunity<FP>>()[i] > 1.0) {
1351  log_error("Constraint check: Parameter ReducInfectedSevereCriticalDeadPartialImmunity smaller {} or "
1352  "larger {}",
1353  0, 1);
1354  return true;
1355  }
1356  if (this->template get<ReducInfectedSevereCriticalDeadImprovedImmunity<FP>>()[i] <= 0.0 ||
1357  this->template get<ReducInfectedSevereCriticalDeadImprovedImmunity<FP>>()[i] > 1.0) {
1358  log_error("Constraint check: Parameter ReducInfectedSevereCriticalDeadImprovedImmunity smaller {} or "
1359  "larger {}",
1360  0, 1);
1361  return true;
1362  }
1363  if (this->template get<ReducTimeInfectedMild<FP>>()[i] <= 0.0 ||
1364  this->template get<ReducTimeInfectedMild<FP>>()[i] > 1.0) {
1365  log_error("Constraint check: Parameter ReducTimeInfectedMild smaller {} or larger {}", 0, 1);
1366  return true;
1367  }
1368  if (this->template get<InfectiousnessNewVariant<FP>>()[i] < 0.0) {
1369  log_error("Constraint check: Parameter InfectiousnessNewVariant smaller {}", 0);
1370  return true;
1371  }
1372  }
1373  return false;
1374  }
1375 
1376 private:
1378  : ParametersBase<FP>(std::move(base))
1379  , m_num_groups(this->template get<ContactPatterns<FP>>().get_cont_freq_mat().get_num_groups())
1380  {
1381  }
1382 
1383 public:
1388  template <class IOContext>
1389  static IOResult<Parameters> deserialize(IOContext& io)
1390  {
1391  BOOST_OUTCOME_TRY(auto&& base, ParametersBase<FP>::deserialize(io));
1392  return success(Parameters(std::move(base)));
1393  }
1394 
1395 private:
1401 };
1402 
1403 } // namespace osecirts
1404 } // namespace mio
1405 
1406 #endif // MIO_ODE_SECIRTS_PARAMETERS_H
A class template for an array with custom indices.
Definition: custom_index_array.h:136
represents non-pharmaceutical interventions (NPI) that are activated during the simulation if some va...
Definition: dynamic_npis.h:35
a set of parameters defined at compile time
Definition: parameter_set.h:205
const ParameterTagTraits< Tag >::Type & get() const
get value of a parameter
Definition: parameter_set.h:262
Represents the simulation time as an integer index.
Definition: simulation_day.h:32
The UncertainContactMatrix class consists of a ContactMatrix with fixed baseline and uncertain Dampin...
Definition: uncertain_matrix.h:43
Parameters of the age-resolved SECIRS-type model with high temporary immunity upon immunization and w...
Definition: ode_secirts/parameters.h:788
static IOResult< Parameters > deserialize(IOContext &io)
deserialize an object of this class.
Definition: ode_secirts/parameters.h:1389
FP & get_end_commuter_detection()
Time in simulation after which no infected commuters are detected.
Definition: ode_secirts/parameters.h:829
FP get_end_dynamic_npis() const
Definition: ode_secirts/parameters.h:846
Parameters(AgeGroup num_agegroups)
Definition: ode_secirts/parameters.h:790
FP & get_end_dynamic_npis()
Time in simulation after which no dynamic NPIs are applied.
Definition: ode_secirts/parameters.h:842
FP m_start_commuter_detection
Definition: ode_secirts/parameters.h:1398
Parameters(ParametersBase< FP > &&base)
Definition: ode_secirts/parameters.h:1377
FP m_end_commuter_detection
Definition: ode_secirts/parameters.h:1399
FP m_commuter_nondetection
Definition: ode_secirts/parameters.h:1397
FP get_end_commuter_detection() const
Definition: ode_secirts/parameters.h:834
AgeGroup get_num_groups() const
Definition: ode_secirts/parameters.h:796
bool apply_constraints()
Checks whether all Parameters satisfy their corresponding constraints and applies them,...
Definition: ode_secirts/parameters.h:864
FP & get_start_commuter_detection()
Time in simulation before which no infected commuters are detected.
Definition: ode_secirts/parameters.h:816
bool check_constraints() const
Checks whether all Parameters satisfy their corresponding constraints and logs an error if constraint...
Definition: ode_secirts/parameters.h:1152
FP get_commuter_nondetection() const
Definition: ode_secirts/parameters.h:808
AgeGroup m_num_groups
Definition: ode_secirts/parameters.h:1396
FP get_start_commuter_detection() const
Definition: ode_secirts/parameters.h:821
FP m_end_dynamic_npis
Definition: ode_secirts/parameters.h:1400
FP & get_commuter_nondetection()
Percentage of infected commuters that are not detected.
Definition: ode_secirts/parameters.h:804
static min_max_return_type< ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 >, ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > >::type max(const ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > &a, const ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > &b)
Definition: ad.hpp:2596
int size(Comm comm)
Return the size of the given communicator.
Definition: miompi.cpp:75
A collection of classes to simplify handling of matrix shapes in meta programming.
Definition: models/abm/analyze_result.h:30
auto i
Definition: io.h:809
void log_warning(spdlog::string_view_t fmt, const Args &... args)
Definition: logging.h:112
auto success()
Create an object that is implicitly convertible to a succesful IOResult<void>.
Definition: io.h:359
void log_error(spdlog::string_view_t fmt, const Args &... args)
Definition: logging.h:100
boost::outcome_v2::unchecked< T, IOStatus > IOResult
Value-or-error type for operations that return a value but can fail.
Definition: io.h:353
Definition: io.h:94
Typesafe index representing an age group.
Definition: age_group.h:40
The contact patterns within the society are modelled using an UncertainContactMatrix.
Definition: ode_secirts/parameters.h:168
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:170
UncertainContactMatrix< FP > Type
Definition: ode_secirts/parameters.h:169
static std::string name()
Definition: ode_secirts/parameters.h:174
The percentage of ICU patients per hospitalized patients in the SECIRTS model.
Definition: ode_secirts/parameters.h:462
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:463
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:464
static std::string name()
Definition: ode_secirts/parameters.h:468
Total number of booster vaccinations up to the given day.
Definition: ode_secirts/parameters.h:600
CustomIndexArray< FP, AgeGroup, SimulationDay > Type
Definition: ode_secirts/parameters.h:601
static std::string name()
Definition: ode_secirts/parameters.h:606
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:602
Total number of full vaccinations up to the given day.
Definition: ode_secirts/parameters.h:583
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:585
static std::string name()
Definition: ode_secirts/parameters.h:589
CustomIndexArray< FP, AgeGroup, SimulationDay > Type
Definition: ode_secirts/parameters.h:584
Total number of first vaccinations up to the given day.
Definition: ode_secirts/parameters.h:566
static std::string name()
Definition: ode_secirts/parameters.h:572
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:568
CustomIndexArray< FP, AgeGroup, SimulationDay > Type
Definition: ode_secirts/parameters.h:567
Time in days until booster vaccine dose takes full effect.
Definition: ode_secirts/parameters.h:549
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:550
static std::string name()
Definition: ode_secirts/parameters.h:555
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:551
Time in days until second vaccine dose takes full effect.
Definition: ode_secirts/parameters.h:532
static std::string name()
Definition: ode_secirts/parameters.h:538
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:534
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:533
Time in days until first vaccine dose takes full effect.
Definition: ode_secirts/parameters.h:515
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:517
static std::string name()
Definition: ode_secirts/parameters.h:521
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:516
The percentage of dead patients per ICU patients in the SECIRTS model.
Definition: ode_secirts/parameters.h:498
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:500
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:499
static std::string name()
Definition: ode_secirts/parameters.h:504
The percentage of dead patients per hospitalized patients.
Definition: ode_secirts/parameters.h:481
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:483
static std::string name()
Definition: ode_secirts/parameters.h:487
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:482
The delay with which DynamicNPIs are implemented and enforced after exceedance of threshold.
Definition: ode_secirts/parameters.h:753
static Type get_default(AgeGroup)
Definition: ode_secirts/parameters.h:755
static std::string name()
Definition: ode_secirts/parameters.h:759
UncertainValue< FP > Type
Definition: ode_secirts/parameters.h:754
The NPIs that are enacted if certain infection thresholds are exceeded.
Definition: ode_secirts/parameters.h:185
static std::string name()
Definition: ode_secirts/parameters.h:191
static Type get_default(AgeGroup)
Definition: ode_secirts/parameters.h:187
Represents the icu capacity in the SECIRTS model.
Definition: ode_secirts/parameters.h:102
UncertainValue< FP > Type
Definition: ode_secirts/parameters.h:103
static Type get_default(AgeGroup)
Definition: ode_secirts/parameters.h:104
static std::string name()
Definition: ode_secirts/parameters.h:108
Represents the relative infectiousness of a new variant.
Definition: ode_secirts/parameters.h:737
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:739
static std::string name()
Definition: ode_secirts/parameters.h:743
CustomIndexArray< FP, AgeGroup > Type
Definition: ode_secirts/parameters.h:738
Risk of infection from symptomatic cases increases if test and trace capacity is exceeded.
Definition: ode_secirts/parameters.h:428
static std::string name()
Definition: ode_secirts/parameters.h:434
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:430
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:429
The percentage of asymptomatic cases in the SECIRTS model.
Definition: ode_secirts/parameters.h:394
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:395
static std::string name()
Definition: ode_secirts/parameters.h:400
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:396
Factor to reduce infection risk for persons with improved immunity.
Definition: ode_secirts/parameters.h:634
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:635
static std::string name()
Definition: ode_secirts/parameters.h:640
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:636
Factor to reduce infection risk for persons with partial immunity.
Definition: ode_secirts/parameters.h:617
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:619
static std::string name()
Definition: ode_secirts/parameters.h:623
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:618
Factor to reduce risk of hospitalization for persons with improved immunity.
Definition: ode_secirts/parameters.h:703
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:705
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:704
static std::string name()
Definition: ode_secirts/parameters.h:709
Factor to reduce risk of hospitalization for persons with partial immunity.
Definition: ode_secirts/parameters.h:686
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:687
static std::string name()
Definition: ode_secirts/parameters.h:692
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:688
Factor to reduce risk of developing symptoms for persons with improved immunity.
Definition: ode_secirts/parameters.h:668
static std::string name()
Definition: ode_secirts/parameters.h:674
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:670
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:669
Factor to reduce risk of developing symptoms for persons with partial immunity.
Definition: ode_secirts/parameters.h:651
static std::string name()
Definition: ode_secirts/parameters.h:657
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:653
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:652
Factor to reduce infectious time of persons with partial or improved immunity.
Definition: ode_secirts/parameters.h:720
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:721
static std::string name()
Definition: ode_secirts/parameters.h:726
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:722
The relative infectability from individuals located in the InfectedNoSymptoms infection state.
Definition: ode_secirts/parameters.h:377
static std::string name()
Definition: ode_secirts/parameters.h:383
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:379
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:378
The risk of infection from symptomatic cases in the SECIRTS model.
Definition: ode_secirts/parameters.h:411
static std::string name()
Definition: ode_secirts/parameters.h:417
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:413
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:412
The seasonality in the SECIRTS-type model.
Definition: ode_secirts/parameters.h:85
static Type get_default(AgeGroup)
Definition: ode_secirts/parameters.h:87
UncertainValue< FP > Type
Definition: ode_secirts/parameters.h:86
static std::string name()
Definition: ode_secirts/parameters.h:91
The percentage of hospitalized patients per infected patients in the SECIRTS model.
Definition: ode_secirts/parameters.h:445
static std::string name()
Definition: ode_secirts/parameters.h:451
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:447
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:446
The start day of a new variant in the SECIRTS-type model.
Definition: ode_secirts/parameters.h:66
static std::string name()
Definition: ode_secirts/parameters.h:72
FP Type
Definition: ode_secirts/parameters.h:67
static Type get_default(AgeGroup)
Definition: ode_secirts/parameters.h:68
The start day in the SECIRTS-type model.
Definition: ode_secirts/parameters.h:47
static Type get_default(AgeGroup)
Definition: ode_secirts/parameters.h:49
static std::string name()
Definition: ode_secirts/parameters.h:53
FP Type
Definition: ode_secirts/parameters.h:48
Multiplier for the test and trace capacity to determine when it is considered overloaded from cases w...
Definition: ode_secirts/parameters.h:135
static Type get_default(AgeGroup)
Definition: ode_secirts/parameters.h:137
static std::string name()
Definition: ode_secirts/parameters.h:141
UncertainValue< FP > Type
Definition: ode_secirts/parameters.h:136
Multiplier for the test and trace capacity to determine when it is considered overloaded by symptomat...
Definition: ode_secirts/parameters.h:151
static Type get_default(AgeGroup)
Definition: ode_secirts/parameters.h:153
UncertainValue< FP > Type
Definition: ode_secirts/parameters.h:152
static std::string name()
Definition: ode_secirts/parameters.h:157
The Capacity to test and trace contacts of infected for quarantine per day.
Definition: ode_secirts/parameters.h:119
UncertainValue< FP > Type
Definition: ode_secirts/parameters.h:120
static std::string name()
Definition: ode_secirts/parameters.h:125
static Type get_default(AgeGroup)
Definition: ode_secirts/parameters.h:121
Represents the mean latent time in days for different age groups.
Definition: ode_secirts/parameters.h:202
static std::string name()
Definition: ode_secirts/parameters.h:208
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:203
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:204
The time people are treated by ICU before returning home in the SECIRTS model in day unit.
Definition: ode_secirts/parameters.h:274
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:275
static std::string name()
Definition: ode_secirts/parameters.h:280
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:276
The (mean) time in day unit for asymptomatic cases that are infected but have not yet developed sympt...
Definition: ode_secirts/parameters.h:220
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:222
static std::string name()
Definition: ode_secirts/parameters.h:226
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:221
The time people are 'simply' hospitalized before returning home in the SECIRTS model in day unit.
Definition: ode_secirts/parameters.h:256
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:257
static std::string name()
Definition: ode_secirts/parameters.h:262
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:258
The infectious time for symptomatic cases that are infected but who do not need to be hospitalized in...
Definition: ode_secirts/parameters.h:238
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:239
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:240
static std::string name()
Definition: ode_secirts/parameters.h:244
The time people stays immune after infection or vaccination located in the partial or improved immuni...
Definition: ode_secirts/parameters.h:344
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:345
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:346
static std::string name()
Definition: ode_secirts/parameters.h:350
The time people stays immune after infection or vaccination located in naive immunity layer in day un...
Definition: ode_secirts/parameters.h:326
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:327
static std::string name()
Definition: ode_secirts/parameters.h:332
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:328
Time in days to describe waning immunity to get susceptible from improved to partial immunity layer.
Definition: ode_secirts/parameters.h:308
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:310
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:309
static std::string name()
Definition: ode_secirts/parameters.h:314
Time in days to describe waning immunity to get susceptible from partial to naive immunity layer.
Definition: ode_secirts/parameters.h:291
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:293
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:292
static std::string name()
Definition: ode_secirts/parameters.h:297
The probability of getting infected from a single contact.
Definition: ode_secirts/parameters.h:360
static Type get_default(AgeGroup size)
Definition: ode_secirts/parameters.h:362
static std::string name()
Definition: ode_secirts/parameters.h:366
CustomIndexArray< UncertainValue< FP >, AgeGroup > Type
Definition: ode_secirts/parameters.h:361