Simple unary mathematical operations¶
M_Ceil_DP
dataclass
¶
Bases: PrimitiveDP[Decimal, Decimal]
Relation:
$$
\text{ceil}(\fun) ≤_{\opspace} \res
$$
Attributes:
| Name | Type | Description |
|---|---|---|
F |
Poset
|
The functionality poset \(\F\) must be Numbers |
R |
Poset
|
The resources poset \(\R\) must be Numbers |
opspace |
Numbers
|
The poset \(\opspace\) where the comparisons take place. |
Source code in src/act4e_mcdp/primitivedps.py
M_FloorFun_DP
dataclass
¶
Bases: PrimitiveDP[Decimal, Decimal]
Relation:
$$
\fun ≤_{\opspace} \text{floor}(\res)
$$
Attributes:
| Name | Type | Description |
|---|---|---|
F |
Poset
|
The functionality poset \(\F\) |
R |
Poset
|
The resources poset \(\R\) |
opspace |
Numbers
|
The poset \(\opspace\) where the comparisons take place. |
Source code in src/act4e_mcdp/primitivedps.py
M_Power_DP
dataclass
¶
Bases: PrimitiveDP[Decimal, Decimal]
Exponentiation of functionalities.
Relation:
$$
\fun ^ (n / d) \leq_{\opspace} \res
$$
Attributes:
| Name | Type | Description |
|---|---|---|
F |
Poset
|
The functionality poset \(\F\) |
R |
Poset
|
The resources poset \(\R\) |
num |
int
|
numerator of the exponent |
den |
int
|
denominator of the exponent |
Source code in src/act4e_mcdp/primitivedps.py
Adding or multiplying by a constant¶
The next set of DPs implement addition or multiplication by a constant.
The constant is specified by an object of type ValueFromPoset.
Adding a constant¶
M_Fun_AddConstant_DP
dataclass
¶
Bases: PrimitiveDP[Decimal, Decimal]
Addition of a constant on the right side.
Relation:
$$
\fun \leq_{\opspace} \res +_{\opspace} v
$$
Attributes:
| Name | Type | Description |
|---|---|---|
F |
Poset
|
The functionality poset \(\F\) |
R |
Poset
|
The resources poset \(\R\) |
vu |
ValueFromPoset[Decimal]
|
The value \(v\) to be added. |
opspace |
Numbers
|
The poset \(\opspace\) where the multiplication and comparison take place. |
Source code in src/act4e_mcdp/primitivedps.py
M_Res_AddConstant_DP
dataclass
¶
Bases: PrimitiveDP[Decimal, Decimal]
Addition of a constant on the left side.
Relation:
$$
\fun +_{\opspace} v \leq_{\opspace} \res
$$
Attributes:
| Name | Type | Description |
|---|---|---|
F |
Poset
|
The functionality poset \(\F\) |
R |
Poset
|
The resources poset \(\R\) |
vu |
ValueFromPoset[Decimal]
|
The value \(v\) to be added. |
opspace |
Numbers
|
The poset \(\opspace\) where the multiplication and comparison take place. |
Source code in src/act4e_mcdp/primitivedps.py
Multiplying by a constant¶
M_Fun_MultiplyConstant_DP
dataclass
¶
Bases: PrimitiveDP[Decimal, Decimal]
Multiplication by a constant on the right side.
Relation:
$$
\fun \leq_{\opspace} \res \cdot_{\opspace} v
$$
Attributes:
| Name | Type | Description |
|---|---|---|
F |
Poset
|
The functionality poset \(\F\) |
R |
Poset
|
The resources poset \(\R\) |
vu |
ValueFromPoset[Decimal]
|
The value \(v\) to be added. |
opspace |
Numbers
|
The poset \(\opspace\) where the multiplication and comparison take place. |
Source code in src/act4e_mcdp/primitivedps.py
M_Res_MultiplyConstant_DP
dataclass
¶
Bases: PrimitiveDP[Decimal, Decimal]
Multiplication by a constant on the left side.
Relation:
$$
\fun \cdot_{\opspace} v \leq_{\opspace} \res
$$
Attributes:
| Name | Type | Description |
|---|---|---|
F |
Poset
|
The functionality poset \(\F\) |
R |
Poset
|
The resources poset \(\R\) |
vu |
ValueFromPoset[Decimal]
|
The value \(v\) to be added. |
opspace |
Numbers
|
The poset \(\opspace\) where the multiplication and comparison take place. |
Source code in src/act4e_mcdp/primitivedps.py
M_Res_DivideConstant_DP
dataclass
¶
Bases: PrimitiveDP[Decimal, Decimal]
Division by a constant
Relation:
$$
\fun /_{\opspace} v \leq_{\opspace} \res
$$
Attributes:
| Name | Type | Description |
|---|---|---|
F |
Poset
|
The functionality poset \(\F\) |
R |
Poset
|
The resources poset \(\R\) |
vu |
ValueFromPoset[Decimal]
|
The value \(v\) to be added. |
opspace |
Numbers
|
The poset \(\opspace\) where the division and comparison take place. |