Skip to content

Kinetics

Kinetic realizations shared by the social packages.

They cover the densities of the kinetic theory of active particles over activity classes.

ActivityDensityElement(label, *, x=0.0, size=None, space=None)

Bases: NonnegativeElement

Value x of the density of active particles at one activity class.

In the kinetic theory of active particles of Bellomo et al., a population is this element on a lattice of activity classes, with one value per class, and conservative, proliferative, and destructive encounters change it. The element has no laws of its own.

Parameters:

Name Type Description Default
label str

The label of the element, unique among the components of its system.

required
x Annotated[object, closed_open(0, oo)]

The initial density, a nonnegative number.

0.0
size int | None

The number of members, or None for one.

None
space BaseSpace | None

The space with one member per site, such as a lattice of classes, or None for none.

None

Examples:

>>> from skcomplex.core.components.spaces import LatticeSpace
>>> from skcomplex.systems.social.common.kinetics import ActivityDensityElement
>>> classes = LatticeSpace(5, boundary='fixed')
>>> ActivityDensityElement('opinions', x=[0.2] * 5, space=classes).x
[0.2, 0.2, 0.2, 0.2, 0.2]
Source code in src/skcomplex/systems/social/common/kinetics/_activity_density.py
43
44
45
46
47
48
49
50
51
def __init__(
    self,
    label: str,
    *,
    x: Annotated[object, RealSet.closed_open(0, oo)] = 0.0,
    size: int | None = None,
    space: BaseSpace | None = None,
) -> None:
    super().__init__(label, x=x, size=size, space=space)