Skip to content

Conversions

AmbientConversion dataclass

Bases: Generic[T], PrimitiveDP[T, T]

A "conversion" between two posets \(\F, \R\) that are subposets of a common ambient poset \(\common\).

Relation:

$$
  \fun \leq_{\common}  \res
$$

where $\common$ is the common ambient poset.

Attributes:

F (Poset): The functionality poset $\F$
R (Poset): The resources poset $\R$
common: The common ambient poset $\common$
Source code in src/act4e_mcdp/primitivedps.py
@dataclass(frozen=True)
class AmbientConversion(Generic[T], PrimitiveDP[T, T]):
    r"""
    A "conversion" between two posets $\F, \R$ that are subposets of a common ambient poset $\common$.

    Relation:

        $$
          \fun \leq_{\common}  \res
        $$

        where $\common$ is the common ambient poset.

    Attributes:

        F (Poset): The functionality poset $\F$
        R (Poset): The resources poset $\R$
        common: The common ambient poset $\common$

    """
    F: Poset[T]
    R: Poset[T]
    common: Poset[T]

UnitConversion dataclass

Bases: PrimitiveDP[Decimal, Decimal]

A unit conversion between real numbers given by a factor F (a fraction).

Relation:

$$
  \fun \cdot \text{factor} \leq \res
$$

Attributes:

F (Poset): The functionality poset $\F$
R (Poset): The resources poset $\R$
factor: The fraction $\text{factor}$
Source code in src/act4e_mcdp/primitivedps.py
@dataclass(frozen=True)
class UnitConversion(PrimitiveDP[Decimal, Decimal]):
    r"""

    A unit conversion between real numbers
    given by a factor F (a fraction).

    Relation:

        $$
          \fun \cdot \text{factor} \leq \res
        $$


    Attributes:

        F (Poset): The functionality poset $\F$
        R (Poset): The resources poset $\R$
        factor: The fraction $\text{factor}$

    """
    F: Numbers
    R: Numbers
    opspace: Numbers
    factor: Fraction