Skip to content

Class ModelSEIRMixingQuarantine

template <typename TSeq>

ClassList > ModelSEIRMixingQuarantine

SEIR model with mixing, quarantine, and contact tracing. More...

  • #include <seirmixingquarantine.hpp>

Inherits the following classes: Model

Public Attributes inherited from Model

See Model

Type Name
std::array< epiworld_double, 1024u *2u > array_double_tmp
std::array< Virus< TSeq > *, 1024u *2u > array_virus_tmp

Public Static Attributes

Type Name
const int DETECTED_HOSPITALIZED = 4
const int EXPOSED = 1
const int HOSPITALIZED = 8
const int INFECTED = 2
const int ISOLATED = 3
const int ISOLATED_RECOVERED = 7
const int QUARANTINED_EXPOSED = 6
const int QUARANTINED_SUSCEPTIBLE = 5
const size_t QUARANTINE_PROCESS_ACTIVE = 1u
const size_t QUARANTINE_PROCESS_DONE = 2u
const size_t QUARANTINE_PROCESS_INACTIVE = 0u
const int RECOVERED = 9
const int SUSCEPTIBLE = 0

Public Functions

Type Name
ModelSEIRMixingQuarantine ()
ModelSEIRMixingQuarantine (ModelSEIRMixingQuarantine< TSeq > & model, const std::string & vname, epiworld_fast_uint n, epiworld_double prevalence, epiworld_double contact_rate, epiworld_double transmission_rate, epiworld_double avg_incubation_days, epiworld_double recovery_rate, std::vector< double > contact_matrix, epiworld_double hospitalization_rate, epiworld_double hospitalization_period, epiworld_double days_undetected, epiworld_fast_int quarantine_period, epiworld_double quarantine_willingness, epiworld_double isolation_willingness, epiworld_fast_int isolation_period, epiworld_double contact_tracing_success_rate=1.0, epiworld_fast_uint contact_tracing_days_prior=4u)
Constructs a ModelSEIRMixingQuarantine object.
ModelSEIRMixingQuarantine (const std::string & vname, epiworld_fast_uint n, epiworld_double prevalence, epiworld_double contact_rate, epiworld_double transmission_rate, epiworld_double avg_incubation_days, epiworld_double recovery_rate, std::vector< double > contact_matrix, epiworld_double hospitalization_rate, epiworld_double hospitalization_period, epiworld_double days_undetected, epiworld_fast_int quarantine_period, epiworld_double quarantine_willingness, epiworld_double isolation_willingness, epiworld_fast_int isolation_period, epiworld_double contact_tracing_success_rate=1.0, epiworld_fast_uint contact_tracing_days_prior=4u)
Constructs a ModelSEIRMixingQuarantine object.
virtual std::unique_ptr< Model< TSeq > > clone_ptr () override
Create a clone of this model.
std::vector< size_t > get_agent_quarantine_triggered () const
Get the quarantine trigger status for all agents.
std::vector< double > get_contact_matrix () const
Get the current contact matrix.
std::vector< bool > get_isolation_willingness () const
Get the isolation willingness for all agents.
std::vector< bool > get_quarantine_willingness () const
Get the quarantine willingness for all agents.
virtual ModelSEIRMixingQuarantine< TSeq > & initial_states (std::vector< double > proportions_, std::vector< int > queue_={}) override
Set the initial states of the model.
virtual void reset () override
Reset the model to initial state.
void set_contact_matrix (std::vector< double > cmat)
Set the contact matrix for population mixing.

Public Functions inherited from Model

See Model

Type Name
Model ()
Model (const Model< TSeq > & m)
Model (Model< TSeq > && m)
void add_entity (Entity< TSeq > e)
void add_globalevent (std::function< void(Model< TSeq > *)> fun, std::string name="A global action", int date=-99)
Set a global action.
void add_globalevent (GlobalEvent< TSeq > & action)
epiworld_double add_param (epiworld_double initial_val, std::string pname, bool overwrite=false)
epiworld_fast_int add_state (std::string lab, UpdateFun< TSeq > fun=nullptr)
void add_tool (Tool< TSeq > & t)
void add_user_data (epiworld_fast_uint j, epiworld_double x)
void add_user_data (std::vector< epiworld_double > x)
void add_virus (Virus< TSeq > & v)
void agents_empty_graph (epiworld_fast_uint n=1000)
void agents_from_adjlist (std::string fn, int size, int skip=0, bool directed=false)
void agents_from_adjlist (AdjList al)
void agents_from_edgelist (const std::vector< int > & source, const std::vector< int > & target, int size, bool directed)
Model< TSeq > & agents_smallworld (epiworld_fast_uint n=1000, epiworld_fast_uint k=5, bool d=false, epiworld_double p=.01)
void clear_state_set ()
void draw (DiagramType diagram_type=DiagramType::Mermaid, const std::string & fn_output="", bool self=false)
Draws a mermaid diagram of the model.
void events_run ()
Executes the stored action.
Agent< TSeq > & get_agent (size_t i)
std::vector< Agent< TSeq > > & get_agents ()
Returns a reference to the vector of agents.
double * get_agents_data ()
size_t get_agents_data_ncols () const
std::vector< epiworld_fast_uint > get_agents_states () const
Returns a vector with the states of the agents.
std::vector< Viruses_const< TSeq > > get_agents_viruses () const
Returns a const vector with the viruses of the agents.
std::vector< Viruses< TSeq > > get_agents_viruses ()
Returns a vector with the viruses of the agents.
DataBase< TSeq > & get_db ()
const DataBase< TSeq > & get_db () const
void get_elapsed (std::string unit="auto", epiworld_double * last_elapsed=nullptr, epiworld_double * total_elapsed=nullptr, std::string * unit_abbr=nullptr, bool print=true) const
std::vector< Entity< TSeq > > & get_entities ()
Entity< TSeq > & get_entity (size_t entity_id, int * entity_pos=nullptr)
const Entity< TSeq > & get_entity (size_t entity_id, int * entity_pos=nullptr) const
GlobalEvent< TSeq > & get_globalevent (std::string name)
Retrieve a global action by name.
GlobalEvent< TSeq > & get_globalevent (size_t i)
Retrieve a global action by index.
void get_hospitalizations (std::vector< int > & date, std::vector< int > & virus_id, std::vector< int > & tool_id, std::vector< int > & count, std::vector< double > & weight) const
Get the full time series of hospitalization data.
size_t get_n_entities () const
epiworld_fast_uint get_n_replicates () const
size_t get_n_states () const
size_t get_n_tools () const
Number of tools in the model.
size_t get_n_viruses () const
Number of viruses in the model.
std::string get_name () const
epiworld_fast_uint get_ndays () const
epiworld_double get_param (std::string pname)
Queue< TSeq > & get_queue ()
Retrieve the Queue object.
std::shared_ptr< epi_xoshiro256ss > & get_rand_endgine ()
epiworld_double get_rewire_prop () const
size_t get_sim_id () const
const std::vector< UpdateFun< TSeq > > & get_state_fun () const
const std::vector< std::string > & get_states () const
Tool< TSeq > & get_tool (size_t id)
Tool< TSeq > & get_tool (std::string_view name)
const std::vector< ToolPtr< TSeq > > & get_tools () const
UserData< TSeq > & get_user_data ()
bool get_verbose () const
Virus< TSeq > & get_virus (size_t id)
Virus< TSeq > & get_virus (std::string_view name)
const std::vector< VirusPtr< TSeq > > & get_viruses () const
bool has_tool (std::string_view name) const
bool has_virus (std::string_view name) const
virtual Model< TSeq > & initial_states (std::vector< double >, std::vector< int >)
bool is_directed () const
bool is_queuing_on () const
Query if the queuing system is on.
void load_agents_entities_ties (std::string fn, int skip)
Associate agents-entities from a file.
void load_agents_entities_ties (const std::vector< int > & agents_ids, const std::vector< int > & entities_ids)
Associate agents-entities from data.
void load_agents_entities_ties (const int * agents_id, const int * entities_id, size_t n)
void mutate_virus ()
virtual void next ()
bool operator!= (const Model< TSeq > & other) const
epiworld_double operator() (std::string pname)
Model< TSeq > & operator= (const Model< TSeq > & m)
bool operator== (const Model< TSeq > & other) const
epiworld_double par (std::string pname) const
std::map< std::string, epiworld_double > & params ()
const Model< TSeq > & print (bool lite=false) const
void print_state_codes () const
Model< TSeq > & queuing_off ()
Deactivates the queuing system.
void queuing_on ()
Activates the queuing system (default.)
int rbinom ()
int rbinom (int n, epiworld_double p)
Model< TSeq > & read_params (std::string fn, bool overwrite=false)
void record_hospitalization (Agent< TSeq > & agent)
Record a hospitalization event for an agent.
virtual void reset ()
Reset the model.
void rewire ()
epiworld_double rexp ()
epiworld_double rexp (epiworld_double lambda)
epiworld_double rgamma ()
epiworld_double rgamma (epiworld_double alpha, epiworld_double beta)
int rgeom ()
int rgeom (epiworld_double p)
epiworld_double rlognormal ()
epiworld_double rlognormal (epiworld_double mean, epiworld_double shape)
void rm_entity (size_t entity_id)
void rm_globalevent (std::string name)
Remove a global action by name.
void rm_globalevent (size_t i)
Remove a global action by index.
void rm_tool (size_t tool_pos)
void rm_virus (size_t virus_pos)
int rnbinom ()
int rnbinom (int n, epiworld_double p)
epiworld_double rnorm ()
epiworld_double rnorm (epiworld_double mean, epiworld_double sd)
int rpoiss ()
int rpoiss (epiworld_double lambda)
virtual Model< TSeq > & run (epiworld_fast_uint ndays, int seed=-1)
Runs the simulation (after initialization)
void run_globalevents ()
Model< TSeq > & run_multiple (epiworld_fast_uint ndays, epiworld_fast_uint nexperiments, int seed_=-1, std::function< void(size_t, Model< TSeq > *)> fun=make_save_run< TSeq >(), bool reset=true, bool verbose=true, int nthreads=1)
epiworld_double runif ()
epiworld_double runif (epiworld_double a, epiworld_double b)
int runif_int (int a, int b)
size_t sample_from_probs (size_t n)
Sample from a set of probabilities stored in array_double_tmp.
void seed (size_t s)
void set_agents_data (double * data_, size_t ncols_)
Set the agents data object.
void set_backup ()
void set_name (std::string name)
Set the name object.
void set_ndays (epiworld_fast_uint ndays)
void set_param (std::string pname, epiworld_double val)
void set_rand_binom (int n, epiworld_double p)
void set_rand_engine (std::shared_ptr< epi_xoshiro256ss > & eng)
void set_rand_exp (epiworld_double lambda)
void set_rand_gamma (epiworld_double alpha, epiworld_double beta)
void set_rand_geom (epiworld_double p)
void set_rand_lognormal (epiworld_double mean, epiworld_double shape)
void set_rand_nbinom (int n, epiworld_double p)
void set_rand_norm (epiworld_double mean, epiworld_double sd)
void set_rand_poiss (epiworld_double lambda)
void set_rand_unif (epiworld_double a, epiworld_double b)
void set_rewire_fun (std::function< void(std::vector< Agent< TSeq > > *, Model< TSeq > *, epiworld_double)> fun)
void set_rewire_prop (epiworld_double prop)
void set_user_data (std::vector< std::string > names)
[@
size_t size () const
epiworld_fast_int state_of (std::string_view name)
int today () const
The current time of the model.
void update_state ()
Model< TSeq > & verbose_off ()
Model< TSeq > & verbose_on ()
void write_data (std::string fn_virus_info, std::string fn_virus_hist, std::string fn_tool_info, std::string fn_tool_hist, std::string fn_total_hist, std::string fn_transmission, std::string fn_transition, std::string fn_reproductive_number, std::string fn_generation_time, std::string fn_active_cases, std::string fn_outbreak_size, std::string fn_hospitalizations) const
Wrapper of DataBase::write_data __
void write_edgelist (std::string fn) const
void write_edgelist (std::vector< int > & source, std::vector< int > & target) const
virtual ~Model ()

Protected Attributes inherited from Model

See Model

Type Name
double * agents_data = nullptr
size_t agents_data_ncols = 0u
int current_date = 0
DataBase< TSeq > db = [**DataBase**](classDataBase.md)&lt;TSeq&gt;(\*this)
bool directed = false
std::shared_ptr< epi_xoshiro256ss > engine = std::make\_shared&lt; [**epi\_xoshiro256ss**](classepi__xoshiro256ss.md) &gt;()
std::vector< Entity< TSeq > > entities = {}
std::vector< Event< TSeq > > events = {}
Variables used to keep track of the events to be made regarding viruses.
std::vector< GlobalEventPtr< TSeq > > globalevents
std::function< void(Model< TSeq > *)> initial_states_fun = /* multi line expression */
int last_seed = 0
epiworld_fast_uint n_replicates = 0u
epiworld_fast_uint nactions = 0u
std::string name = ""
Name of the model.
epiworld_fast_uint ndays = 0
epiworld_fast_uint nstates = 0u
std::map< std::string, epiworld_double > parameters
Progress pb
std::vector< Agent< TSeq > > population = {}
std::vector< Agent< TSeq > > population_backup = {}
std::vector< size_t > population_left
size_t population_left_n = 0u
Queue< TSeq > queue
std::binomial_distribution rbinomd = /* multi line expression */
std::function< void(std::vector< Agent< TSeq > > *, Model< TSeq > *, epiworld_double)> rewire_fun
epiworld_double rewire_prop = 0.0
std::exponential_distribution rexpd = /* multi line expression */
std::gamma_distribution rgammad = /* multi line expression */
std::geometric_distribution rgeomd = /* multi line expression */
std::lognormal_distribution rlognormald = /* multi line expression */
std::negative_binomial_distribution rnbinomd = /* multi line expression */
std::normal_distribution rnormd = /* multi line expression */
std::poisson_distribution rpoissd = /* multi line expression */
epiworld_double runifd_a = 0.0
epiworld_double runifd_b = 1.0
std::vector< Agent< TSeq > * > sampled_population
size_t sampled_population_n = 0u
size_t sim_id = 0u
std::vector< UpdateFun< TSeq > > state_fun = {}
Functions to update states.
std::vector< std::string > states_labels = {}
Labels of the states.
std::chrono::duration< epiworld_double, std::micro > time_elapsed = /* multi line expression */
std::chrono::time_point< std::chrono::steady_clock > time_end
std::chrono::time_point< std::chrono::steady_clock > time_start
std::vector< ToolPtr< TSeq > > tools = {}
bool use_queuing = true
bool using_backup = true
bool verbose = true
std::vector< VirusPtr< TSeq > > viruses = {}

Protected Functions inherited from Model

See Model

Type Name
void _add_event (Agent< TSeq > * agent_, VirusPtr< TSeq > virus_, ToolPtr< TSeq > tool_, Entity< TSeq > * entity_, epiworld_fast_int new_state_, epiworld_fast_int queue_, EventAction action_)
Construct a new Event object.
void _event_add_entity (Event< TSeq > & a)
void _event_add_tool (Event< TSeq > & a)
void _event_add_virus (Event< TSeq > & a)
void _event_change_state (Event< TSeq > & a)
void _event_rm_entity (Event< TSeq > & a)
void _event_rm_tool (Event< TSeq > & a)
void _event_rm_virus (Event< TSeq > & a)
void chrono_end ()
void chrono_start ()
virtual std::unique_ptr< Model< TSeq > > clone_ptr ()
Advanced usage: Makes a copy of data and returns it as undeleted pointer.
virtual epiworld_double death_reduction_mixer (Agent< TSeq > * agent, VirusPtr< TSeq > & virus)
void dist_entities ()
void dist_tools ()
void dist_virus ()
virtual epiworld_double recovery_enhancer_mixer (Agent< TSeq > * agent, VirusPtr< TSeq > & virus)
void set_sim_id (size_t id)
virtual epiworld_double susceptibility_reduction_mixer (Agent< TSeq > * agent, VirusPtr< TSeq > & virus)
virtual epiworld_double transmission_reduction_mixer (Agent< TSeq > * agent, VirusPtr< TSeq > & virus)

Detailed Description

This class implements a Susceptible-Exposed-Infected-Removed (SEIR) epidemiological model with additional features including: * Population mixing based on contact matrices * Quarantine measures for exposed contacts * Isolation policies for detected infected individuals * Contact tracing with configurable success rates * Hospitalization of severe cases * Individual willingness to comply with public health measures

The model supports 10 distinct states: * Susceptible: Individuals who can become infected * Exposed: Infected but not yet infectious (incubation period) * Infected: Infectious individuals in the community * Isolated: Detected infected individuals in self-isolation * Detected Hospitalized: Hospitalized individuals who were contact-traced * Quarantined Susceptible: Susceptible individuals in quarantine due to contact tracing * Quarantined Exposed: Exposed individuals in quarantine due to contact tracing * Isolated Recovered: Recovered individuals still in isolation * Hospitalized: Individuals requiring hospital care * Recovered: Individuals who have recovered and gained immunity

Image

Template parameters:

  • TSeq Type for genetic sequences (default: EPI_DEFAULT_TSEQ)

Public Static Attributes Documentation

variable DETECTED_HOSPITALIZED

const int ModelSEIRMixingQuarantine< TSeq >::DETECTED_HOSPITALIZED;

variable EXPOSED

const int ModelSEIRMixingQuarantine< TSeq >::EXPOSED;

variable HOSPITALIZED

const int ModelSEIRMixingQuarantine< TSeq >::HOSPITALIZED;

variable INFECTED

const int ModelSEIRMixingQuarantine< TSeq >::INFECTED;

variable ISOLATED

const int ModelSEIRMixingQuarantine< TSeq >::ISOLATED;

variable ISOLATED_RECOVERED

const int ModelSEIRMixingQuarantine< TSeq >::ISOLATED_RECOVERED;

variable QUARANTINED_EXPOSED

const int ModelSEIRMixingQuarantine< TSeq >::QUARANTINED_EXPOSED;

variable QUARANTINED_SUSCEPTIBLE

const int ModelSEIRMixingQuarantine< TSeq >::QUARANTINED_SUSCEPTIBLE;

variable QUARANTINE_PROCESS_ACTIVE

const size_t ModelSEIRMixingQuarantine< TSeq >::QUARANTINE_PROCESS_ACTIVE;

variable QUARANTINE_PROCESS_DONE

const size_t ModelSEIRMixingQuarantine< TSeq >::QUARANTINE_PROCESS_DONE;

variable QUARANTINE_PROCESS_INACTIVE

const size_t ModelSEIRMixingQuarantine< TSeq >::QUARANTINE_PROCESS_INACTIVE;

variable RECOVERED

const int ModelSEIRMixingQuarantine< TSeq >::RECOVERED;

variable SUSCEPTIBLE

const int ModelSEIRMixingQuarantine< TSeq >::SUSCEPTIBLE;

Public Functions Documentation

function ModelSEIRMixingQuarantine [1/3]

inline ModelSEIRMixingQuarantine::ModelSEIRMixingQuarantine () 

function ModelSEIRMixingQuarantine [2/3]

Constructs a ModelSEIRMixingQuarantine object.

inline ModelSEIRMixingQuarantine::ModelSEIRMixingQuarantine (
    ModelSEIRMixingQuarantine < TSeq > & model,
    const std::string & vname,
    epiworld_fast_uint n,
    epiworld_double prevalence,
    epiworld_double contact_rate,
    epiworld_double transmission_rate,
    epiworld_double avg_incubation_days,
    epiworld_double recovery_rate,
    std::vector< double > contact_matrix,
    epiworld_double hospitalization_rate,
    epiworld_double hospitalization_period,
    epiworld_double days_undetected,
    epiworld_fast_int quarantine_period,
    epiworld_double quarantine_willingness,
    epiworld_double isolation_willingness,
    epiworld_fast_int isolation_period,
    epiworld_double contact_tracing_success_rate=1.0,
    epiworld_fast_uint contact_tracing_days_prior=4u
) 

Template for a Susceptible-Exposed-Infected-Removed (SEIR) model with mixing, quarantine, and contact tracing.

Parameters:

  • model A reference to an existing ModelSEIRMixingQuarantine object.
  • vname The name of the ModelSEIRMixingQuarantine object.
  • n The number of entities in the model.
  • prevalence The initial prevalence of the disease in the model.
  • contact_rate The contact rate between entities in the model.
  • transmission_rate The transmission rate of the disease in the model.
  • avg_incubation_days The average incubation period of the disease in the model.
  • recovery_rate The recovery rate of the disease in the model.
  • contact_matrix The contact matrix between entities in the model. Specified in column-major order.
  • hospitalization_rate The rate at which infected individuals are hospitalized.
  • hospitalization_period The average duration of hospitalization in days.
  • days_undetected The average number of days an infected individual remains undetected.
  • quarantine_period The duration of quarantine in days for exposed contacts.
  • quarantine_willingness The proportion of individuals willing to comply with quarantine measures.
  • isolation_willingness The proportion of individuals willing to self-isolate when detected.
  • isolation_period The duration of isolation in days for detected infected individuals.
  • contact_tracing_success_rate The probability of successfully identifying and tracing contacts (default: 1.0).
  • contact_tracing_days_prior The number of days prior to detection for which contacts are traced (default: 4).
  • model A ModelSEIRMixingQuarantine<TSeq> object where to set up the SEIR model.
  • vname Name of the virus
  • n Number of agents in the population
  • prevalence Initial prevalence (proportion of infected individuals)
  • contact_rate Average number of contacts (interactions) per step
  • transmission_rate Probability of transmission per contact
  • avg_incubation_days Average incubation period in days
  • recovery_rate Probability of recovery per day
  • contact_matrix Contact matrix specifying mixing patterns between population groups
  • hospitalization_rate Rate at which infected individuals are hospitalized
  • hospitalization_period Average duration of hospitalization in days
  • days_undetected Average number of days an infected individual remains undetected
  • quarantine_period Duration of quarantine in days for exposed contacts
  • quarantine_willingness Proportion of individuals willing to comply with quarantine
  • isolation_willingness Proportion of individuals willing to self-isolate when detected
  • isolation_period Duration of isolation in days for detected infected individuals
  • contact_tracing_success_rate Probability of successfully identifying contacts during tracing
  • contact_tracing_days_prior Number of days prior to detection for contact tracing

function ModelSEIRMixingQuarantine [3/3]

Constructs a ModelSEIRMixingQuarantine object.

inline ModelSEIRMixingQuarantine::ModelSEIRMixingQuarantine (
    const std::string & vname,
    epiworld_fast_uint n,
    epiworld_double prevalence,
    epiworld_double contact_rate,
    epiworld_double transmission_rate,
    epiworld_double avg_incubation_days,
    epiworld_double recovery_rate,
    std::vector< double > contact_matrix,
    epiworld_double hospitalization_rate,
    epiworld_double hospitalization_period,
    epiworld_double days_undetected,
    epiworld_fast_int quarantine_period,
    epiworld_double quarantine_willingness,
    epiworld_double isolation_willingness,
    epiworld_fast_int isolation_period,
    epiworld_double contact_tracing_success_rate=1.0,
    epiworld_fast_uint contact_tracing_days_prior=4u
) 

Parameters:

  • vname The name of the ModelSEIRMixingQuarantine object.
  • n The number of entities in the model.
  • prevalence The initial prevalence of the disease in the model.
  • contact_rate The contact rate between entities in the model.
  • transmission_rate The transmission rate of the disease in the model.
  • avg_incubation_days The average incubation period of the disease in the model.
  • recovery_rate The recovery rate of the disease in the model.
  • contact_matrix The contact matrix between entities in the model.
  • hospitalization_rate The rate at which infected individuals are hospitalized.
  • hospitalization_period The average duration of hospitalization in days.
  • days_undetected The average number of days an infected individual remains undetected.
  • quarantine_period The duration of quarantine in days for exposed contacts.
  • quarantine_willingness The proportion of individuals willing to comply with quarantine measures.
  • isolation_willingness The proportion of individuals willing to self-isolate when detected.
  • isolation_period The duration of isolation in days for detected infected individuals.
  • contact_tracing_success_rate The probability of successfully identifying and tracing contacts (default: 1.0).
  • contact_tracing_days_prior The number of days prior to detection for which contacts are traced (default: 4).

function clone_ptr

Create a clone of this model.

inline virtual std::unique_ptr< Model < TSeq > > ModelSEIRMixingQuarantine::clone_ptr () override

Returns:

Pointer to a new model instance with the same configuration

Implements Model::clone_ptr


function get_agent_quarantine_triggered

Get the quarantine trigger status for all agents.

inline std::vector< size_t > ModelSEIRMixingQuarantine::get_agent_quarantine_triggered () const

Returns:

Vector indicating quarantine process status for each agent


function get_contact_matrix

Get the current contact matrix.

inline std::vector< double > ModelSEIRMixingQuarantine::get_contact_matrix () const

Returns:

Vector representing the contact matrix


function get_isolation_willingness

Get the isolation willingness for all agents.

inline std::vector< bool > ModelSEIRMixingQuarantine::get_isolation_willingness () const

Returns:

Vector of boolean values indicating each agent's willingness to self-isolate


function get_quarantine_willingness

Get the quarantine willingness for all agents.

inline std::vector< bool > ModelSEIRMixingQuarantine::get_quarantine_willingness () const

Returns:

Vector of boolean values indicating each agent's willingness to quarantine


function initial_states

Set the initial states of the model.

inline virtual ModelSEIRMixingQuarantine < TSeq > & ModelSEIRMixingQuarantine::initial_states (
    std::vector< double > proportions_,
    std::vector< int > queue_={}
) override

Parameters:

  • proportions_ Double vector with two elements:
  • [0]: The proportion of initially infected individuals who start in the exposed state.
  • [1]: The proportion of initially non-infected individuals who have recovered (immune).

  • queue_ Optional vector for queuing specifications (default: empty).

Implements Model::initial_states


function reset

Reset the model to initial state.

inline virtual void ModelSEIRMixingQuarantine::reset () override

Implements Model::reset


function set_contact_matrix

Set the contact matrix for population mixing.

inline void ModelSEIRMixingQuarantine::set_contact_matrix (
    std::vector< double > cmat
) 

Parameters:

  • cmat Contact matrix specifying interaction rates between groups


The documentation for this class was generated from the following file epiworld-src/include/epiworld/models/seirmixingquarantine.hpp