Skip to content

Gompertz growth with a vascular carrying capacity

Gompertz growth under a carrying capacity that keeps rising.

  • Class: DynamicCarryingCapacitySystem
  • Import: from skcomplex.systems.biology.oncology import DynamicCarryingCapacitySystem
  • Field: biology/oncology
  • Topics: tumour growth, ode, angiogenesis, sigmoid
  • References:
    • Padmanabhan, Meskin, and Al Moustafa 2021
    • Benzekry et al. 2014
    • Hahnfeldt et al. 1999

Use this system

The block imports the class and simulates the system with its default parameters and its tuned run settings.

from skcomplex.systems.biology.oncology import DynamicCarryingCapacitySystem

trajectory = DynamicCarryingCapacitySystem().prepare().simulate()

Parameters

The model parameters take these defaults, and set_params changes them.

Parameter Default
n 1.0
K 12.7
r 2.63
d 0.829
solver 'auto'
backend 'auto'

Tags

The system with its default parameters has these capability tags, which solvers and analyses check.

Tag Values
Time continuous
Space none
Laws rate
Randomness deterministic
Domains real
Structure fixed

Class

The source of the class shows how it builds its components from its model parameters.

class DynamicCarryingCapacitySystem(BaseSystem):
    """Gompertz growth under a carrying capacity that keeps rising.

    The vessels on the tumour surface keep raising the capacity.

    The tumour follows `dn/dt = r n log(K / n)` and the capacity `dK/dt = d n^(2/3)`, so the tumour first fills its
    initial capacity and then grows as fast as its vasculature, roughly as `t^3`. The defaults are the fit to breast
    cancer volumes in mm³ and days. The system has the volume `tumour.x` and the capacity `vessels.K`.

    Args:
        n:
            The initial volume.

        K:
            The initial carrying capacity.

        r:
            The rate at which the growth slows.

        d:
            The rate at which the surface of the tumour raises the capacity.

        label:
            The label of the system, which names it when it is nested in another one.

        solver:
            The solver of the problem, or `'auto'` for the one the system chooses.

        backend:
            The backend that evaluates the compiled functions, or `'auto'` for the one the system chooses.

    Examples:
        >>> from skcomplex.systems.biology.oncology import DynamicCarryingCapacitySystem
        >>> DynamicCarryingCapacitySystem().prepare().system_.elements[1].K
        12.7
    """

    field = 'biology/oncology'
    topics = ('tumour growth', 'ode', 'angiogenesis', 'sigmoid')
    references = (*GROWTH_REFERENCES, 'Hahnfeldt et al. 1999')
    until = 20.0
    dt = 0.05

    def __init__(
        self,
        n: float = 1.0,
        K: float = 12.7,
        *,
        r: float = 2.63,
        d: float = 0.829,
        label: str = 'system',
        solver: BaseSolver | str = 'auto',
        backend: BaseBackend | str = 'auto',
    ) -> None:
        super().__init__(label, solver=solver, backend=backend)
        self.n = n
        self.K = K
        self.r = r
        self.d = d

    def _prepare(self, context: Sequence[Observable] | None = None) -> None:
        """Set the system of Gompertz growth under a carrying capacity.

        Args:
            context:
                The observables to compile with the problem, or `None` for none.
        """
        super()._prepare(context)
        self.system_ = System(
            self.label,
            elements=[PopulationElement('tumour', x=self.n), VasculatureElement('vessels', K=self.K)],
            interactions=[
                VascularSupportInteraction('support', tumour='tumour', vasculature='vessels', r=self.r, d=self.d),
            ],
        )

Components

The system uses these element and interaction classes, each with its nearest class of the core.

Elements:

Interactions:

  • VascularSupportInteraction, from Interaction
class PopulationElement(CompartmentElement):
    """Population of one species, a compartment whose state `x` holds its size.

    Args:
        label:
            The label of the population.

        x:
            The initial size.

    Examples:
        >>> from skcomplex.systems.biology.common.populations import PopulationElement
        >>> PopulationElement('rabbits', x=40).x
        40
    """

    def __init__(
        self,
        label: str,
        *,
        x: Annotated[float, RealSet.closed_open(0, oo)] = 1.0,
    ) -> None:
        super().__init__(label, x=x)

class VasculatureElement(Element):
    """Vasculature of a tumour.

    It sets the carrying capacity of the tumour.

    Args:
        label:
            The label of the vasculature.

        K:
            The initial carrying capacity.

    Examples:
        >>> from skcomplex.systems.biology.oncology import VasculatureElement
        >>> VasculatureElement('vessels', K=12.7).K
        12.7
    """

    def __init__(
        self,
        label: str,
        *,
        K: Annotated[float, RealSet.open(0, oo)] = 1.0,
    ) -> None:
        super().__init__(label)
        self.K = K

class VascularSupportInteraction(Interaction):
    """Gompertz growth under a carrying capacity that grows with the tumour.

    The vessels on the tumour surface raise the capacity.

    The tumour follows `dx/dt = r x log(K / x)` and the capacity `dK/dt = d x^(2/3)`.

    Args:
        label:
            The label of the interaction.

        tumour:
            The path of the tumour.

        vasculature:
            The path of the vasculature.

        r:
            The rate at which the growth slows.

        d:
            The rate at which the surface of the tumour raises the capacity.

    Examples:
        >>> from skcomplex.systems.biology.oncology import VascularSupportInteraction
        >>> VascularSupportInteraction('support', tumour='tumour', vasculature='vessels').d
        0.829
    """

    law_classes = (RateLaw,)

    def __init__(
        self,
        label: str,
        *,
        tumour: Role,
        vasculature: Role,
        r: Annotated[float, RealSet.open(0, oo)] = 2.63,
        d: Annotated[float, RealSet.closed_open(0, oo)] = 0.829,
    ) -> None:
        super().__init__(label)
        self.tumour = tumour
        self.vasculature = vasculature
        self.r = r
        self.d = d

    def _prepare(self, context: SimpleNamespace) -> None:
        """Set the Gompertz growth of the tumour and the growth of the capacity.

        Args:
            context:
                The namespace of the bound elements, the time `t`, and the parameters.
        """
        super()._prepare(context)
        s = context
        n, K = s.tumour.x, s.vasculature.K
        self.laws_ = [RateLaw(n, s.r * n * log(K / n)), RateLaw(K, s.d * n ** (2 / 3))]

Equations

The equations are those that symbolic returns for the system with its default parameters.

tumour.x: diff(x_tumour(t), t) == r_support*log(K_vessels(t)/x_tumour(t))*x_tumour(t)
vessels.K: diff(K_vessels(t), t) == d_support*x_tumour(t)^0.6666666666666666