Skip to content

Catalogues

CatalogueDP dataclass

Bases: Generic[FT, RT], PrimitiveDP[FT, RT]

Implements a catalogue.

The available implementations are strings and each of them has a (max) functionality and a (min) resource.

Relation:

$$
   \bigvee_{\imp \in \impspace}   ( \fun \leq \fun^{\max}_{\imp}) \wedge (\res^{\min}_{\imp} \leq
   \res)
$$

where $\impspace$ is the set of implementations and $\fun^{\max}_{\imp}, \res^{\min}_{\imp}$ are
the functionality and resources of the implementation $\imp$.

Attributes:

F (Poset): The functionality poset $\F$
R (Poset): The resources poset $\R$
entries: A dictionary of entries.
Source code in src/act4e_mcdp/primitivedps.py
@dataclass(frozen=True)
class CatalogueDP(Generic[FT, RT], PrimitiveDP[FT, RT]):
    r"""
    Implements a catalogue.

    The available implementations are strings and each of them has a (max) functionality and a (min) resource.

    Relation:

        $$
           \bigvee_{\imp \in \impspace}   ( \fun \leq \fun^{\max}_{\imp}) \wedge (\res^{\min}_{\imp} \leq
           \res)
        $$

        where $\impspace$ is the set of implementations and $\fun^{\max}_{\imp}, \res^{\min}_{\imp}$ are
        the functionality and resources of the implementation $\imp$.

    Attributes:

        F (Poset): The functionality poset $\F$
        R (Poset): The resources poset $\R$
        entries: A dictionary of entries.

    """

    entries: dict[str, EntryInfo[FT, RT]]

EntryInfo dataclass

Bases: Generic[FT, RT]

Describes \(\fun^{\max}_{\imp}\) and \(\res^{\min}_{\imp}\) for an implementation.

Attributes:

Name Type Description
f_max FT

The maximum functionality \(\fun^{\max}_{\imp}\)

r_min RT

The minimum resources \(\res^{\min}_{\imp}\)

Source code in src/act4e_mcdp/primitivedps.py
@dataclass(frozen=True)
class EntryInfo(Generic[FT, RT]):
    r"""
    Describes $\fun^{\max}_{\imp}$ and $\res^{\min}_{\imp}$ for an implementation.


    Attributes:
        f_max: The maximum functionality $\fun^{\max}_{\imp}$
        r_min: The minimum resources $\res^{\min}_{\imp}$

    """
    f_max: FT
    r_min: RT