Utopia 2
Framework for studying models of complex & adaptive systems.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Utopia::Models::SEIRD::Params Struct Reference

Parameters of the SEIRD. More...

#include <params.hh>

Collaboration diagram for Utopia::Models::SEIRD::Params:
Collaboration graph
[legend]

Public Member Functions

 Params (const DataIO::Config &cfg)
 Construct the parameters from the given configuration node.
 

Public Attributes

const double p_susceptible
 Probability per site and time step to go from state empty to susceptible.
 
double p_immune
 Probability per transition to susceptible via p_susceptible to be immune.
 
const double p_random_immunity
 
double p_exposed
 
double p_infected
 
double p_recovered
 Probability for a cell to recover.
 
double p_deceased
 Probability for a cell to desease.
 
double p_empty
 Probability for a cell to become empty.
 
double p_lose_immunity
 The probability to loose immunity if a cell is recovered.
 
bool move_away_from_infected
 Whether to globally allow moving away from infected neighboring cells.
 
double p_move_randomly
 Probability to move randomly if the neighboring cell is empty.
 
const ExposureContParams exposure_control
 Exposure control parameters.
 
const ImmunityContParams immunity_control
 Immunity control parameters.
 
const TransmitContParams transmission_control
 Transmit control parameters.
 

Detailed Description

Parameters of the SEIRD.

Constructor & Destructor Documentation

◆ Params()

Utopia::Models::SEIRD::Params::Params ( const DataIO::Config cfg)
inline

Construct the parameters from the given configuration node.

311 :
312 p_susceptible(get_as<double>("p_susceptible", cfg)),
313 p_immune(get_as<double>("p_immune", cfg)),
314 p_random_immunity(get_as<double>("p_random_immunity", cfg)),
315 p_exposed(get_as<double>("p_exposed", cfg)),
316 p_infected(get_as<double>("p_infected", cfg)),
317 p_recovered(get_as<double>("p_recovered", cfg)),
318 p_deceased(get_as<double>("p_deceased", cfg)),
319 p_empty(get_as<double>("p_empty", cfg)),
320 p_lose_immunity(get_as<double>("p_lose_immunity", cfg)),
321 move_away_from_infected(get_as<bool>("move_away_from_infected", cfg)),
322 p_move_randomly(get_as<double>("p_move_randomly", cfg)),
323 exposure_control(get_as<DataIO::Config>("exposure_control", cfg)),
324 immunity_control(get_as<DataIO::Config>("immunity_control", cfg)),
325 transmission_control(get_as<DataIO::Config>("transmission_control", cfg))
326 {
327 if ((p_susceptible > 1) or (p_susceptible < 0)) {
328 throw std::invalid_argument(
329 "Invalid p_susceptible! Need be a value "
330 "in range [0, 1] and specify the probability per time step "
331 "and cell with which an empty cell turns into a susceptible "
332 "one. Was: " +
333 std::to_string(p_susceptible));
334 }
335 if ((p_immune > 1) or (p_immune < 0)) {
336 throw std::invalid_argument(
337 "Invalid p_immune! Need be a value "
338 "in range [0, 1] and specify the probability per time step "
339 "and cell with which an empty cell turns into a susceptible "
340 "one. Was: " +
341 std::to_string(p_immune));
342 }
343 if ((p_random_immunity > 1) or (p_random_immunity < 0)) {
344 throw std::invalid_argument(
345 "Invalid p_random_immunity! Need be in range "
346 "[0, 1], was " +
347 std::to_string(p_random_immunity));
348 }
349 if ((p_exposed > 1) or (p_exposed < 0)) {
350 throw std::invalid_argument("Invalid p_exposed! Need be a value "
351 "in range [0, 1], was " +
352 std::to_string(p_exposed));
353 }
354 if ((p_infected > 1) or (p_infected < 0)) {
355 throw std::invalid_argument("Invalid p_infected! Need be a value "
356 "in range [0, 1], was " +
357 std::to_string(p_infected));
358 }
359 if ((p_recovered > 1) or (p_recovered < 0)) {
360 throw std::invalid_argument("Invalid p_recovered! Need be a value "
361 "in range [0, 1], was " +
362 std::to_string(p_recovered));
363 }
364 if ((p_deceased > 1) or (p_deceased < 0)) {
365 throw std::invalid_argument("Invalid p_deceased! Need be a value "
366 "in range [0, 1], was " +
367 std::to_string(p_deceased));
368 }
369 if (((p_deceased + p_recovered) > 1)) {
370 throw std::invalid_argument(
371 "Invalid p_deceased and p_recovered! The sum needs to be a value "
372 "smaller than 1, was " +
373 std::to_string(p_deceased + p_recovered));
374 }
375 if ((p_empty > 1) or (p_empty < 0)) {
376 throw std::invalid_argument("Invalid p_empty! Need be a value "
377 "in range [0, 1], was " +
378 std::to_string(p_empty));
379 }
380 if ((p_lose_immunity > 1) or (p_lose_immunity < 0)) {
381 throw std::invalid_argument(
382 "Invalid p_lose_immunity! Need be a value "
383 "in range [0, 1], was " +
384 std::to_string(p_lose_immunity));
385 }
386 if ((p_move_randomly > 1) or (p_move_randomly < 0)) {
387 throw std::invalid_argument(
388 "Invalid p_move_randomly! Need be a value "
389 "in range [0, 1], was " +
390 std::to_string(p_move_randomly));
391 }
392 }
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213
double p_deceased
Probability for a cell to desease.
Definition params.hh:287
double p_lose_immunity
The probability to loose immunity if a cell is recovered.
Definition params.hh:293
const double p_susceptible
Probability per site and time step to go from state empty to susceptible.
Definition params.hh:263
const ImmunityContParams immunity_control
Immunity control parameters.
Definition params.hh:305
bool move_away_from_infected
Whether to globally allow moving away from infected neighboring cells.
Definition params.hh:296
double p_move_randomly
Probability to move randomly if the neighboring cell is empty.
Definition params.hh:299
const double p_random_immunity
Definition params.hh:270
double p_immune
Probability per transition to susceptible via p_susceptible to be immune.
Definition params.hh:266
double p_exposed
Definition params.hh:274
const TransmitContParams transmission_control
Transmit control parameters.
Definition params.hh:308
double p_empty
Probability for a cell to become empty.
Definition params.hh:290
double p_infected
Definition params.hh:281
double p_recovered
Probability for a cell to recover.
Definition params.hh:284
const ExposureContParams exposure_control
Exposure control parameters.
Definition params.hh:302

Member Data Documentation

◆ exposure_control

const ExposureContParams Utopia::Models::SEIRD::Params::exposure_control

Exposure control parameters.

◆ immunity_control

const ImmunityContParams Utopia::Models::SEIRD::Params::immunity_control

Immunity control parameters.

◆ move_away_from_infected

bool Utopia::Models::SEIRD::Params::move_away_from_infected

Whether to globally allow moving away from infected neighboring cells.

◆ p_deceased

double Utopia::Models::SEIRD::Params::p_deceased

Probability for a cell to desease.

◆ p_empty

double Utopia::Models::SEIRD::Params::p_empty

Probability for a cell to become empty.

◆ p_exposed

double Utopia::Models::SEIRD::Params::p_exposed
mutable

Probability per susceptible cell and time step to transition to exposed state

◆ p_immune

double Utopia::Models::SEIRD::Params::p_immune
mutable

Probability per transition to susceptible via p_susceptible to be immune.

◆ p_infected

double Utopia::Models::SEIRD::Params::p_infected
mutable

Probability per exposed cell and time step to transition to infected state This probability will define the typical incubation period of the desease.

◆ p_lose_immunity

double Utopia::Models::SEIRD::Params::p_lose_immunity

The probability to loose immunity if a cell is recovered.

◆ p_move_randomly

double Utopia::Models::SEIRD::Params::p_move_randomly

Probability to move randomly if the neighboring cell is empty.

◆ p_random_immunity

const double Utopia::Models::SEIRD::Params::p_random_immunity

Probability per site and time step for a susceptible cell to not become exposed if an exposed or infected cell is in the neighborhood.

◆ p_recovered

double Utopia::Models::SEIRD::Params::p_recovered

Probability for a cell to recover.

◆ p_susceptible

const double Utopia::Models::SEIRD::Params::p_susceptible

Probability per site and time step to go from state empty to susceptible.

◆ transmission_control

const TransmitContParams Utopia::Models::SEIRD::Params::transmission_control

Transmit control parameters.


The documentation for this struct was generated from the following file: