osecirts Namespace Reference

CPP API: mio::osecirts Namespace Reference
mio::osecirts Namespace Reference

Classes

struct  ContactPatterns
 The contact patterns within the society are modelled using an UncertainContactMatrix. More...
 
struct  CriticalPerSevere
 The percentage of ICU patients per hospitalized patients in the SECIRTS model. More...
 
struct  DailyBoosterVaccinations
 Total number of booster vaccinations up to the given day. More...
 
struct  DailyFullVaccinations
 Total number of full vaccinations up to the given day. More...
 
struct  DailyPartialVaccinations
 Total number of first vaccinations up to the given day. More...
 
struct  DaysUntilEffectiveBoosterImmunity
 Time in days until booster vaccine dose takes full effect. More...
 
struct  DaysUntilEffectiveImprovedVaccination
 Time in days until second vaccine dose takes full effect. More...
 
struct  DaysUntilEffectivePartialVaccination
 Time in days until first vaccine dose takes full effect. More...
 
struct  DeathsPerCritical
 The percentage of dead patients per ICU patients in the SECIRTS model. More...
 
struct  DynamicNPIsImplementationDelay
 The delay with which DynamicNPIs are implemented and enforced after exceedance of threshold. More...
 
struct  DynamicNPIsInfectedSymptoms
 The NPIs that are enacted if certain infection thresholds are exceeded. More...
 
struct  ICUCapacity
 Represents the icu capacity in the SECIRTS model. More...
 
struct  InfectiousnessNewVariant
 Represents the relative infectiousness of a new variant. More...
 
struct  MaxRiskOfInfectionFromSymptomatic
 Risk of infection from symptomatic cases increases if test and trace capacity is exceeded. More...
 
class  Model
 
class  Parameters
 Parameters of the age-resolved SECIRS-type model with high temporary immunity upon immunization and waning immunity over time. More...
 
struct  RecoveredPerInfectedNoSymptoms
 The percentage of asymptomatic cases in the SECIRTS model. More...
 
struct  ReducExposedImprovedImmunity
 Factor to reduce infection risk for persons with improved immunity. More...
 
struct  ReducExposedPartialImmunity
 Factor to reduce infection risk for persons with partial immunity. More...
 
struct  ReducInfectedSevereCriticalDeadImprovedImmunity
 Factor to reduce risk of hospitalization for persons with improved immunity. More...
 
struct  ReducInfectedSevereCriticalDeadPartialImmunity
 Factor to reduce risk of hospitalization for persons with partial immunity. More...
 
struct  ReducInfectedSymptomsImprovedImmunity
 Factor to reduce risk of developing symptoms for persons with improved immunity. More...
 
struct  ReducInfectedSymptomsPartialImmunity
 Factor to reduce risk of developing symptoms for persons with partial immunity. More...
 
struct  ReducTimeInfectedMild
 Factor to reduce infectious time of persons with partial or improved immunity. More...
 
struct  RelativeTransmissionNoSymptoms
 The relative infectability from individuals located in the InfectedNoSymptoms infection state. More...
 
struct  RiskOfInfectionFromSymptomatic
 The risk of infection from symptomatic cases in the SECIRTS model. More...
 
struct  Seasonality
 The seasonality in the SECIRTS-type model. More...
 
struct  SeverePerInfectedSymptoms
 The percentage of hospitalized patients per infected patients in the SECIRTS model. More...
 
class  Simulation
 specialization of compartment model simulation for the SECIRTS model. More...
 
struct  StartDay
 The start day in the SECIRTS-type model. More...
 
struct  StartDayNewVariant
 The start day of a new variant in the SECIRTS-type model. More...
 
struct  TestAndTraceCapacity
 The Capacity to test and trace contacts of infected for quarantine per day. More...
 
struct  TestAndTraceCapacityMaxRiskNoSymptoms
 Multiplier for the test and trace capacity to determine when it is considered overloaded from cases without symptoms. More...
 
struct  TestAndTraceCapacityMaxRiskSymptoms
 Multiplier for the test and trace capacity to determine when it is considered overloaded by symptomatic cases. More...
 
struct  TimeExposed
 Represents the mean latent time in days for different age groups. More...
 
struct  TimeInfectedCritical
 The time people are treated by ICU before returning home in the SECIRTS model in day unit. More...
 
struct  TimeInfectedNoSymptoms
 The (mean) time in day unit for asymptomatic cases that are infected but have not yet developed symptoms. More...
 
struct  TimeInfectedSevere
 The time people are 'simply' hospitalized before returning home in the SECIRTS model in day unit. More...
 
struct  TimeInfectedSymptoms
 The infectious time for symptomatic cases that are infected but who do not need to be hospitalized in the SECIRTS model in day unit. More...
 
struct  TimeTemporaryImmunityII
 The time people stays immune after infection or vaccination located in the partial or improved immunity layer in day unit. More...
 
struct  TimeTemporaryImmunityPI
 The time people stays immune after infection or vaccination located in naive immunity layer in day unit. More...
 
struct  TimeWaningImprovedImmunity
 Time in days to describe waning immunity to get susceptible from improved to partial immunity layer. More...
 
struct  TimeWaningPartialImmunity
 Time in days to describe waning immunity to get susceptible from partial to naive immunity layer. More...
 
struct  TransmissionProbabilityOnContact
 The probability of getting infected from a single contact. More...
 

Typedefs

using Flows = TypeList< Flow< InfectionState::SusceptibleNaive, InfectionState::ExposedNaive >, Flow< InfectionState::SusceptibleNaive, InfectionState::TemporaryImmunePartialImmunity >, Flow< InfectionState::ExposedNaive, InfectionState::InfectedNoSymptomsNaive >, Flow< InfectionState::InfectedNoSymptomsNaive, InfectionState::InfectedSymptomsNaive >, Flow< InfectionState::InfectedNoSymptomsNaive, InfectionState::TemporaryImmunePartialImmunity >, Flow< InfectionState::InfectedNoSymptomsNaiveConfirmed, InfectionState::InfectedSymptomsNaiveConfirmed >, Flow< InfectionState::InfectedNoSymptomsNaiveConfirmed, InfectionState::TemporaryImmunePartialImmunity >, Flow< InfectionState::InfectedSymptomsNaive, InfectionState::InfectedSevereNaive >, Flow< InfectionState::InfectedSymptomsNaive, InfectionState::TemporaryImmunePartialImmunity >, Flow< InfectionState::InfectedSymptomsNaiveConfirmed, InfectionState::InfectedSevereNaive >, Flow< InfectionState::InfectedSymptomsNaiveConfirmed, InfectionState::TemporaryImmunePartialImmunity >, Flow< InfectionState::InfectedSevereNaive, InfectionState::InfectedCriticalNaive >, Flow< InfectionState::InfectedSevereNaive, InfectionState::TemporaryImmunePartialImmunity >, Flow< InfectionState::InfectedSevereNaive, InfectionState::DeadNaive >, Flow< InfectionState::InfectedCriticalNaive, InfectionState::DeadNaive >, Flow< InfectionState::InfectedCriticalNaive, InfectionState::TemporaryImmunePartialImmunity >, Flow< InfectionState::SusceptiblePartialImmunity, InfectionState::ExposedPartialImmunity >, Flow< InfectionState::SusceptiblePartialImmunity, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::ExposedPartialImmunity, InfectionState::InfectedNoSymptomsPartialImmunity >, Flow< InfectionState::InfectedNoSymptomsPartialImmunity, InfectionState::InfectedSymptomsPartialImmunity >, Flow< InfectionState::InfectedNoSymptomsPartialImmunity, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::InfectedNoSymptomsPartialImmunityConfirmed, InfectionState::InfectedSymptomsPartialImmunityConfirmed >, Flow< InfectionState::InfectedNoSymptomsPartialImmunityConfirmed, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::InfectedSymptomsPartialImmunity, InfectionState::InfectedSeverePartialImmunity >, Flow< InfectionState::InfectedSymptomsPartialImmunity, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::InfectedSymptomsPartialImmunityConfirmed, InfectionState::InfectedSeverePartialImmunity >, Flow< InfectionState::InfectedSymptomsPartialImmunityConfirmed, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::InfectedSeverePartialImmunity, InfectionState::InfectedCriticalPartialImmunity >, Flow< InfectionState::InfectedSeverePartialImmunity, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::InfectedSeverePartialImmunity, InfectionState::DeadPartialImmunity >, Flow< InfectionState::InfectedCriticalPartialImmunity, InfectionState::DeadPartialImmunity >, Flow< InfectionState::InfectedCriticalPartialImmunity, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::SusceptibleImprovedImmunity, InfectionState::ExposedImprovedImmunity >, Flow< InfectionState::SusceptibleImprovedImmunity, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::ExposedImprovedImmunity, InfectionState::InfectedNoSymptomsImprovedImmunity >, Flow< InfectionState::InfectedNoSymptomsImprovedImmunity, InfectionState::InfectedSymptomsImprovedImmunity >, Flow< InfectionState::InfectedNoSymptomsImprovedImmunity, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::InfectedNoSymptomsImprovedImmunityConfirmed, InfectionState::InfectedSymptomsImprovedImmunityConfirmed >, Flow< InfectionState::InfectedNoSymptomsImprovedImmunityConfirmed, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::InfectedSymptomsImprovedImmunity, InfectionState::InfectedSevereImprovedImmunity >, Flow< InfectionState::InfectedSymptomsImprovedImmunity, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::InfectedSymptomsImprovedImmunityConfirmed, InfectionState::InfectedSevereImprovedImmunity >, Flow< InfectionState::InfectedSymptomsImprovedImmunityConfirmed, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::InfectedSevereImprovedImmunity, InfectionState::InfectedCriticalImprovedImmunity >, Flow< InfectionState::InfectedSevereImprovedImmunity, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::InfectedSevereImprovedImmunity, InfectionState::DeadImprovedImmunity >, Flow< InfectionState::InfectedCriticalImprovedImmunity, InfectionState::DeadImprovedImmunity >, Flow< InfectionState::InfectedCriticalImprovedImmunity, InfectionState::TemporaryImmuneImprovedImmunity >, Flow< InfectionState::TemporaryImmunePartialImmunity, InfectionState::SusceptiblePartialImmunity >, Flow< InfectionState::TemporaryImmuneImprovedImmunity, InfectionState::SusceptibleImprovedImmunity >, Flow< InfectionState::SusceptibleImprovedImmunity, InfectionState::SusceptiblePartialImmunity >, Flow< InfectionState::SusceptiblePartialImmunity, InfectionState::SusceptibleNaive > >
 
template<typename FP >
using ParametersBase = ParameterSet< StartDay< FP >, Seasonality< FP >, ICUCapacity< FP >, TestAndTraceCapacity< FP >, TestAndTraceCapacityMaxRiskNoSymptoms< FP >, TestAndTraceCapacityMaxRiskSymptoms< FP >, ContactPatterns< FP >, DynamicNPIsInfectedSymptoms< FP >, TimeExposed< FP >, TimeInfectedNoSymptoms< FP >, TimeInfectedSymptoms< FP >, TimeInfectedSevere< FP >, TimeInfectedCritical< FP >, TimeWaningPartialImmunity< FP >, TimeWaningImprovedImmunity< FP >, TimeTemporaryImmunityPI< FP >, TimeTemporaryImmunityII< FP >, TransmissionProbabilityOnContact< FP >, RelativeTransmissionNoSymptoms< FP >, RecoveredPerInfectedNoSymptoms< FP >, RiskOfInfectionFromSymptomatic< FP >, MaxRiskOfInfectionFromSymptomatic< FP >, SeverePerInfectedSymptoms< FP >, CriticalPerSevere< FP >, DeathsPerCritical< FP >, DaysUntilEffectivePartialVaccination< FP >, DaysUntilEffectiveImprovedVaccination< FP >, DaysUntilEffectiveBoosterImmunity< FP >, DailyFullVaccinations< FP >, DailyPartialVaccinations< FP >, DailyBoosterVaccinations< FP >, ReducExposedPartialImmunity< FP >, ReducExposedImprovedImmunity< FP >, ReducInfectedSymptomsPartialImmunity< FP >, ReducInfectedSymptomsImprovedImmunity< FP >, ReducInfectedSevereCriticalDeadPartialImmunity< FP >, ReducInfectedSevereCriticalDeadImprovedImmunity< FP >, ReducTimeInfectedMild< FP >, InfectiousnessNewVariant< FP >, DynamicNPIsImplementationDelay< FP >, StartDayNewVariant< FP > >
 

Enumerations

enum class  InfectionState {
  SusceptibleNaive = 0 , SusceptiblePartialImmunity , ExposedNaive , ExposedPartialImmunity ,
  ExposedImprovedImmunity , InfectedNoSymptomsNaive , InfectedNoSymptomsPartialImmunity , InfectedNoSymptomsImprovedImmunity ,
  InfectedNoSymptomsNaiveConfirmed , InfectedNoSymptomsPartialImmunityConfirmed , InfectedNoSymptomsImprovedImmunityConfirmed , InfectedSymptomsNaive ,
  InfectedSymptomsPartialImmunity , InfectedSymptomsImprovedImmunity , InfectedSymptomsNaiveConfirmed , InfectedSymptomsPartialImmunityConfirmed ,
  InfectedSymptomsImprovedImmunityConfirmed , InfectedSevereNaive , InfectedSeverePartialImmunity , InfectedSevereImprovedImmunity ,
  InfectedCriticalNaive , InfectedCriticalPartialImmunity , InfectedCriticalImprovedImmunity , SusceptibleImprovedImmunity ,
  DeadNaive , DeadPartialImmunity , DeadImprovedImmunity , TemporaryImmunePartialImmunity ,
  TemporaryImmuneImprovedImmunity , Count
}
 The InfectionState enum describes the possible categories for the infectious state of persons. More...
 

Functions

template<typename FP >
Graph< Model< FP >, MobilityParameters< FP > > draw_sample (Graph< Model< FP >, MobilityParameters< FP >> &graph)
 Draws samples for each model node in a graph. More...
 
template<typename FP >
void draw_sample (Model< FP > &model)
 Draws a sample from model parameter distributions and stores sample values as parameters values (cf. More...
 
template<typename FP >
void draw_sample_demographics (Model< FP > &model)
 Draws a sample from the specified distributions for all parameters related to the demographics, e.g., population. More...
 
template<typename FP >
void draw_sample_infection (Model< FP > &model)
 Draws a sample from the specified distributions for all parameters related to the infection. More...
 
template<typename FP , class Model >
std::vector< Modelensemble_params_percentile (const std::vector< std::vector< Model >> &ensemble_params, FP p)
 computes the p percentile of the parameters for each node. More...
 
template<typename FP , class Base = mio::Simulation<FP, Model<FP>>>
FP get_infections_relative (const Simulation< FP, Base > &model, FP t, const Eigen::Ref< const Eigen::VectorX< FP >> &y)
 get percentage of infections per total population. More...
 
template<typename FP , class Base = mio::Simulation<FP, Model<FP>>>
auto get_migration_factors (const Simulation< Base > &sim, FP, const Eigen::Ref< const Eigen::VectorX< FP >> &y)
 Get migration factors. More...
 
template<typename FP >
auto simulate (FP t0, FP tmax, FP dt, const Model< FP > &model, std::unique_ptr< OdeIntegratorCore< FP >> &&integrator_core=nullptr)
 Specialization of simulate for SECIRS-type models using Simulation. More...
 
template<typename FP >
auto simulate_flows (FP t0, FP tmax, FP dt, const Model< FP > &model, std::unique_ptr< OdeIntegratorCore< FP >> &&integrator_core=nullptr)
 Specialization of simulate for SECIRS-type models using the FlowSimulation. More...
 
template<typename FP , class Base = mio::Simulation<FP, Model<FP>>>
auto test_commuters (Simulation< FP, Base > &sim, Eigen::Ref< Eigen::VectorX< FP >> migrated, FP time)
 Adjusts the state of commuters in a model, accounting for detection and mobility effects. More...
 

Typedef Documentation

◆ Flows

using mio::osecirts::Flows = typedef TypeList< Flow<InfectionState::SusceptibleNaive, InfectionState::ExposedNaive>, Flow<InfectionState::SusceptibleNaive, InfectionState::TemporaryImmunePartialImmunity>, Flow<InfectionState::ExposedNaive, InfectionState::InfectedNoSymptomsNaive>, Flow<InfectionState::InfectedNoSymptomsNaive, InfectionState::InfectedSymptomsNaive>, Flow<InfectionState::InfectedNoSymptomsNaive, InfectionState::TemporaryImmunePartialImmunity>, Flow<InfectionState::InfectedNoSymptomsNaiveConfirmed, InfectionState::InfectedSymptomsNaiveConfirmed>, Flow<InfectionState::InfectedNoSymptomsNaiveConfirmed, InfectionState::TemporaryImmunePartialImmunity>, Flow<InfectionState::InfectedSymptomsNaive, InfectionState::InfectedSevereNaive>, Flow<InfectionState::InfectedSymptomsNaive, InfectionState::TemporaryImmunePartialImmunity>, Flow<InfectionState::InfectedSymptomsNaiveConfirmed, InfectionState::InfectedSevereNaive>, Flow<InfectionState::InfectedSymptomsNaiveConfirmed, InfectionState::TemporaryImmunePartialImmunity>, Flow<InfectionState::InfectedSevereNaive, InfectionState::InfectedCriticalNaive>, Flow<InfectionState::InfectedSevereNaive, InfectionState::TemporaryImmunePartialImmunity>, Flow<InfectionState::InfectedSevereNaive, InfectionState::DeadNaive>, Flow<InfectionState::InfectedCriticalNaive, InfectionState::DeadNaive>, Flow<InfectionState::InfectedCriticalNaive, InfectionState::TemporaryImmunePartialImmunity>, Flow<InfectionState::SusceptiblePartialImmunity, InfectionState::ExposedPartialImmunity>, Flow<InfectionState::SusceptiblePartialImmunity, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::ExposedPartialImmunity, InfectionState::InfectedNoSymptomsPartialImmunity>, Flow<InfectionState::InfectedNoSymptomsPartialImmunity, InfectionState::InfectedSymptomsPartialImmunity>, Flow<InfectionState::InfectedNoSymptomsPartialImmunity, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::InfectedNoSymptomsPartialImmunityConfirmed, InfectionState::InfectedSymptomsPartialImmunityConfirmed>, Flow<InfectionState::InfectedNoSymptomsPartialImmunityConfirmed, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::InfectedSymptomsPartialImmunity, InfectionState::InfectedSeverePartialImmunity>, Flow<InfectionState::InfectedSymptomsPartialImmunity, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::InfectedSymptomsPartialImmunityConfirmed, InfectionState::InfectedSeverePartialImmunity>, Flow<InfectionState::InfectedSymptomsPartialImmunityConfirmed, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::InfectedSeverePartialImmunity, InfectionState::InfectedCriticalPartialImmunity>, Flow<InfectionState::InfectedSeverePartialImmunity, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::InfectedSeverePartialImmunity, InfectionState::DeadPartialImmunity>, Flow<InfectionState::InfectedCriticalPartialImmunity, InfectionState::DeadPartialImmunity>, Flow<InfectionState::InfectedCriticalPartialImmunity, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::SusceptibleImprovedImmunity, InfectionState::ExposedImprovedImmunity>, Flow<InfectionState::SusceptibleImprovedImmunity, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::ExposedImprovedImmunity, InfectionState::InfectedNoSymptomsImprovedImmunity>, Flow<InfectionState::InfectedNoSymptomsImprovedImmunity, InfectionState::InfectedSymptomsImprovedImmunity>, Flow<InfectionState::InfectedNoSymptomsImprovedImmunity, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::InfectedNoSymptomsImprovedImmunityConfirmed, InfectionState::InfectedSymptomsImprovedImmunityConfirmed>, Flow<InfectionState::InfectedNoSymptomsImprovedImmunityConfirmed, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::InfectedSymptomsImprovedImmunity, InfectionState::InfectedSevereImprovedImmunity>, Flow<InfectionState::InfectedSymptomsImprovedImmunity, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::InfectedSymptomsImprovedImmunityConfirmed, InfectionState::InfectedSevereImprovedImmunity>, Flow<InfectionState::InfectedSymptomsImprovedImmunityConfirmed, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::InfectedSevereImprovedImmunity, InfectionState::InfectedCriticalImprovedImmunity>, Flow<InfectionState::InfectedSevereImprovedImmunity, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::InfectedSevereImprovedImmunity, InfectionState::DeadImprovedImmunity>, Flow<InfectionState::InfectedCriticalImprovedImmunity, InfectionState::DeadImprovedImmunity>, Flow<InfectionState::InfectedCriticalImprovedImmunity, InfectionState::TemporaryImmuneImprovedImmunity>, Flow<InfectionState::TemporaryImmunePartialImmunity, InfectionState::SusceptiblePartialImmunity>, Flow<InfectionState::TemporaryImmuneImprovedImmunity, InfectionState::SusceptibleImprovedImmunity>, Flow<InfectionState::SusceptibleImprovedImmunity, InfectionState::SusceptiblePartialImmunity>, Flow<InfectionState::SusceptiblePartialImmunity, InfectionState::SusceptibleNaive> >

◆ ParametersBase

Enumeration Type Documentation

◆ InfectionState

The InfectionState enum describes the possible categories for the infectious state of persons.

Enum is usable as an index, e.g. in CustomIndexArray. Suffix Naive means no immunity through vaccination or infection. Suffix PartialImmunity means vaccinated once. Suffix ImprovedImmunity means vaccinated twice or recovered from infection. Suffix Confirmed means infection has been confirmed by a test, e.g. during commute.

Enumerator
SusceptibleNaive 
SusceptiblePartialImmunity 
ExposedNaive 
ExposedPartialImmunity 
ExposedImprovedImmunity 
InfectedNoSymptomsNaive 
InfectedNoSymptomsPartialImmunity 
InfectedNoSymptomsImprovedImmunity 
InfectedNoSymptomsNaiveConfirmed 
InfectedNoSymptomsPartialImmunityConfirmed 
InfectedNoSymptomsImprovedImmunityConfirmed 
InfectedSymptomsNaive 
InfectedSymptomsPartialImmunity 
InfectedSymptomsImprovedImmunity 
InfectedSymptomsNaiveConfirmed 
InfectedSymptomsPartialImmunityConfirmed 
InfectedSymptomsImprovedImmunityConfirmed 
InfectedSevereNaive 
InfectedSeverePartialImmunity 
InfectedSevereImprovedImmunity 
InfectedCriticalNaive 
InfectedCriticalPartialImmunity 
InfectedCriticalImprovedImmunity 
SusceptibleImprovedImmunity 
DeadNaive 
DeadPartialImmunity 
DeadImprovedImmunity 
TemporaryImmunePartialImmunity 
TemporaryImmuneImprovedImmunity 
Count 

Function Documentation

◆ draw_sample() [1/2]

template<typename FP >
Graph<Model<FP>, MobilityParameters<FP> > mio::osecirts::draw_sample ( Graph< Model< FP >, MobilityParameters< FP >> &  graph)

Draws samples for each model node in a graph.

Some parameters are shared between nodes and are only sampled once.

Template Parameters
FPFloating point type, e.g., double.
Parameters
graphGraph to be sampled.
Returns
Graph with nodes and edges from the input graph sampled.

◆ draw_sample() [2/2]

template<typename FP >
void mio::osecirts::draw_sample ( Model< FP > &  model)

Draws a sample from model parameter distributions and stores sample values as parameters values (cf.

UncertainValue and Parameters classes).

Template Parameters
FPFloating point type, e.g., double.
Parameters
[in,out]modelModel including contact patterns for all age groups.

◆ draw_sample_demographics()

template<typename FP >
void mio::osecirts::draw_sample_demographics ( Model< FP > &  model)

Draws a sample from the specified distributions for all parameters related to the demographics, e.g., population.

Template Parameters
FPFloating point type, e.g., double.
Parameters
[in,out]modelModel including contact patterns for all age groups

◆ draw_sample_infection()

template<typename FP >
void mio::osecirts::draw_sample_infection ( Model< FP > &  model)

Draws a sample from the specified distributions for all parameters related to the infection.

Template Parameters
FPFloating point type, e.g., double.
Parameters
[in,out]modelModel including contact patterns for all age groups.

◆ ensemble_params_percentile()

template<typename FP , class Model >
std::vector<Model> mio::osecirts::ensemble_params_percentile ( const std::vector< std::vector< Model >> &  ensemble_params,
FP  p 
)

computes the p percentile of the parameters for each node.

Parameters
ensemble_resultgraph of multiple simulation runs
ppercentile value in open interval (0, 1)
Returns
p percentile of the parameters over all runs

◆ get_infections_relative()

template<typename FP , class Base = mio::Simulation<FP, Model<FP>>>
FP mio::osecirts::get_infections_relative ( const Simulation< FP, Base > &  model,
FP  t,
const Eigen::Ref< const Eigen::VectorX< FP >> &  y 
)

get percentage of infections per total population.

Parameters
modelthe compartment model with initial values.
tcurrent simulation time.
ycurrent value of compartments.
Template Parameters
Basesimulation type that uses the SECIRS-type compartment model. see Simulation.

◆ get_migration_factors()

template<typename FP , class Base = mio::Simulation<FP, Model<FP>>>
auto mio::osecirts::get_migration_factors ( const Simulation< Base > &  sim,
FP  ,
const Eigen::Ref< const Eigen::VectorX< FP >> &  y 
)

Get migration factors.

Used by migration graph simulation. Like infection risk, migration of infected individuals is reduced if they are well isolated.

Parameters
modelthe compartment model with initial values.
tcurrent simulation time.
ycurrent value of compartments.
Returns
vector expression, same size as y, with migration factors per compartment.
Template Parameters
Basesimulation type that uses a SECIRS-type compartment model. see Simulation.

◆ simulate()

template<typename FP >
auto mio::osecirts::simulate ( FP  t0,
FP  tmax,
FP  dt,
const Model< FP > &  model,
std::unique_ptr< OdeIntegratorCore< FP >> &&  integrator_core = nullptr 
)
inline

Specialization of simulate for SECIRS-type models using Simulation.

Parameters
[in]t0start time.
[in]tmaxend time.
[in]dttime step.
[in]modelSECIRS-type model to simulate.
[in]integrator_coreoptional IntegratorCore, uses rk45 if nullptr.
Returns
Returns the result of the simulation.

◆ simulate_flows()

template<typename FP >
auto mio::osecirts::simulate_flows ( FP  t0,
FP  tmax,
FP  dt,
const Model< FP > &  model,
std::unique_ptr< OdeIntegratorCore< FP >> &&  integrator_core = nullptr 
)
inline

Specialization of simulate for SECIRS-type models using the FlowSimulation.

Parameters
[in]t0start time.
[in]tmaxend time.
[in]dttime step.
[in]modelSECIRS-type model to simulate.
[in]integrator_coreoptional IntegratorCore, uses rk45 if nullptr.
Returns
Returns the result of the Flowsimulation.

◆ test_commuters()

template<typename FP , class Base = mio::Simulation<FP, Model<FP>>>
auto mio::osecirts::test_commuters ( Simulation< FP, Base > &  sim,
Eigen::Ref< Eigen::VectorX< FP >>  migrated,
FP  time 
)

Adjusts the state of commuters in a model, accounting for detection and mobility effects.

Template Parameters
FPFloating-point type, e.g., double.
BaseSimulation type that uses the SECIRTS-type model. see Simulation.
Parameters
[in,out]simSimulation object containing the model and result data.
[in,out]migratedVector representing the number of commuters in each state.
[in]timeCurrent simulation time, used to determine the commuter detection period.