CompartmentName

compartment_model.CompartmentName(self, base, subscript, strata)

The name of a compartment, which may have subscript and strata parts.

CompartmentName is a frozen dataclass.

Parameters

base: str

The base name of the compartment.

subscript: str | None

The optional subscript part of the name.

strata: str | None

The optional strata part of the name.

Attributes

base: str

The base name of the compartment.

subscript: str | None

The optional subscript part of the name.

strata: str | None

The optional strata part of the name.

full: str

The full name as a string, with all parts combined with underscores.

Methods

Name Description
parse Parses a string as a CompartmentName. If the name contains no underscores, the entire name is the base name. If the name contains at least one underscore, the part before the first underscore is the base name and everything after is the subscript part. It is not possible to create a stratified name this way.
with_subscript Return a copy of this name with the subscript changed.
with_strata Return a copy of this name with the strata changed.