API for the protocols module#

The models.animal.protocols module contains a class provides eatability definition used by AnimalCohorts, PlantResources, and Carcasses in the animal module.

Classes:

Consumer(*args, **kwargs)

This is the protocol for defining consumers (currently just AnimalCohort).

DecayPool(*args, **kwargs)

Defines biotic pools containing both accessible and inaccessible nutrients.

Pool(*args, **kwargs)

This is a protocol for defining dummy abiotic pools containing energy.

Resource(*args, **kwargs)

This is the protocol for defining what classes work as trophic resources.

ScavengeableResource(*args, **kwargs)

The protocol for linking the get_eaten mixin with CNP.

class virtual_ecosystem.models.animal.protocols.Consumer(*args, **kwargs)[source]#

This is the protocol for defining consumers (currently just AnimalCohort).

class virtual_ecosystem.models.animal.protocols.DecayPool(*args, **kwargs)[source]#

Defines biotic pools containing both accessible and inaccessible nutrients.

class virtual_ecosystem.models.animal.protocols.Pool(*args, **kwargs)[source]#

This is a protocol for defining dummy abiotic pools containing energy.

class virtual_ecosystem.models.animal.protocols.Resource(*args, **kwargs)[source]#

This is the protocol for defining what classes work as trophic resources.

Methods:

get_eaten(consumed_mass, consumer)

The get_eaten method defines a resource.

Attributes:

mass_current

The mass_current method defines current total mass.

get_eaten(consumed_mass: float, consumer: Consumer) tuple[dict[str, float], dict[str, float]][source]#

The get_eaten method defines a resource.

property mass_current: float#

The mass_current method defines current total mass.

class virtual_ecosystem.models.animal.protocols.ScavengeableResource(*args, **kwargs)[source]#

The protocol for linking the get_eaten mixin with CNP.