net_state_t Derived Type

type, public, extends(net_state_base_t) :: net_state_t


Inherits

type~~net_state_t~~InheritsGraph type~net_state_t net_state_t sampler_base_t sampler_base_t type~net_state_t->sampler_base_t infection_attempts_sampler type~net_state_base_t net_state_base_t type~net_state_t->type~net_state_base_t type~state_compartment_t state_compartment_t type~net_state_t->type~state_compartment_t infected type~dyn_parameters_t dyn_parameters_t type~net_state_base_t->type~dyn_parameters_t params type~state_compartment_base_t state_compartment_base_t type~state_compartment_t->type~state_compartment_base_t dynamical_list_t dynamical_list_t type~state_compartment_base_t->dynamical_list_t nodes

Components

Type Visibility Attributes Name Initial
integer(kind=i2), public, allocatable, dimension(:) :: node_state
type(dyn_parameters_t), public :: params
real(kind=dp), public :: time
real(kind=dp), public :: total_rate
real(kind=dp), public :: dt
type(state_compartment_t), public :: infected
real(kind=dp), public :: total_infection_attempt_rate
real(kind=dp), public :: total_healing_rate
class(sampler_base_t), public, allocatable :: infection_attempts_sampler

Type-Bound Procedures

procedure, public :: just_update_dt => dynamics_just_update_dt

  • private subroutine dynamics_just_update_dt(this, net, gen)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_base_t) :: this
    class(network_t), intent(in) :: net
    type(rndgen) :: gen

generic, public :: init_config => net_state_init_config_node, net_state_init_config_list_of_nodes, net_state_init_random_fraction_of_nodes

  • private subroutine net_state_init_config_node(this, net, params, sampler_choice, node_id)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_base_t) :: this
    type(network_t), intent(in) :: net
    class(dyn_parameters_t), intent(in) :: params
    character(len=*), intent(in) :: sampler_choice
    integer(kind=i4), intent(in) :: node_id
  • private subroutine net_state_init_config_list_of_nodes(this, net, params, sampler_choice, nodes)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_base_t) :: this
    type(network_t), intent(in) :: net
    class(dyn_parameters_t), intent(in) :: params
    character(len=*), intent(in) :: sampler_choice
    integer(kind=i4), intent(in) :: nodes(:)
  • private subroutine net_state_init_random_fraction_of_nodes(this, net, gen, params, sampler_choice, fraction)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_base_t) :: this
    type(network_t), intent(in) :: net
    type(rndgen), intent(in) :: gen
    class(dyn_parameters_t), intent(in) :: params
    character(len=*), intent(in) :: sampler_choice
    real(kind=dp), intent(in) :: fraction

procedure, public :: export_nodes_states => net_state_export_nodes_states

  • private subroutine net_state_export_nodes_states(this, net, filename)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_base_t) :: this
    type(network_t), intent(in) :: net
    character(len=*), intent(in) :: filename

procedure, public :: init => net_state_init

  • private subroutine net_state_init(this, net, params, sampler_choice)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_t) :: this
    type(network_t), intent(in) :: net
    class(dyn_parameters_t), intent(in) :: params
    character(len=*), intent(in) :: sampler_choice

procedure, public :: add_infected => net_state_add_infected

  • private subroutine net_state_add_infected(this, net, node_id)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_t) :: this
    type(network_t), intent(in) :: net
    integer(kind=i4), intent(in) :: node_id

procedure, public :: remove_infected => net_state_remove_infected

  • private subroutine net_state_remove_infected(this, net, node_id, node_pos, new_state)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_t) :: this
    type(network_t), intent(in) :: net
    integer(kind=i4), intent(in) :: node_id
    integer(kind=i4), intent(in) :: node_pos
    integer(kind=i2), intent(in) :: new_state

procedure, public :: dynamics_init => net_state_dynamics_init

  • private subroutine net_state_dynamics_init(this, net)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_t) :: this
    class(network_t), intent(in) :: net

procedure, public :: dynamics_update_dt => net_state_dynamics_update_dt

  • private function net_state_dynamics_update_dt(this, net, gen) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_t) :: this
    class(network_t), intent(in) :: net
    type(rndgen) :: gen

    Return Value logical

procedure, public :: dynamics_step => net_state_dynamics_step

  • private subroutine net_state_dynamics_step(this, net, gen)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_t) :: this
    class(network_t), intent(in) :: net
    type(rndgen) :: gen

procedure, public :: calculate_rates => net_state_calculate_rates

  • private subroutine net_state_calculate_rates(this, net)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_t) :: this
    class(network_t), intent(in) :: net

procedure, public :: print_debug_quantities => net_state_print_debug_quantities

  • private subroutine net_state_print_debug_quantities(this)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_t) :: this

procedure, public :: remove_possibly_active_edge => net_state_remove_possibly_active_edge_from_list

  • private subroutine net_state_remove_possibly_active_edge_from_list(this, edge_id, edge_order)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_t) :: this
    integer(kind=i4), intent(in) :: edge_id
    integer(kind=i4), intent(in) :: edge_order

procedure, public :: activate_edge => net_state_activate_edge

  • private subroutine net_state_activate_edge(this, edge_id, edge_order)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_t) :: this
    integer(kind=i4), intent(in) :: edge_id
    integer(kind=i4), intent(in) :: edge_order

procedure, public :: export_edges_states => net_state_export_edges_states

  • private subroutine net_state_export_edges_states(this, net, filename)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_t) :: this
    type(network_t), intent(in) :: net
    character(len=*), intent(in) :: filename

procedure, public :: get_num_infected => net_state_get_num_infected

  • private function net_state_get_num_infected(this) result(n)

    Arguments

    Type IntentOptional Attributes Name
    class(net_state_t), intent(in) :: this

    Return Value integer(kind=i4)