energia.modeling.variables.recipe#
Recipes to create Aspects
Functions
|
Return the fields of a dataclass instance as a new dictionary mapping field names to field values. |
|
Add dunder methods based on the fields defined in the class. |
Classes
|
A particular facet of the system under consideration. |
|
Recipe to create Aspects |
- class Recipe(name: str, kind: Type[Aspect], primary_type: tuple[Type[_Component]] | Type[_Component], label: str = '', add: str = '', sub: str = '', bound: str = '', ctrl: str = '', ispos: bool = True, nn: bool = True, use_multiplier: bool = False, latex: str = '')[source]#
Bases:
objectRecipe to create Aspects
- Parameters:
name (str) – Name of the aspect
kind (Type[Aspect]) – Kind of aspect, e.g., Aspect, Control, etc.
primary_type (tuple[Type[_Component]] | Type[_Component]) – Primary type(s) of component the aspect can be applied to
label (str) – Label for plotting. Defaults to “”.
add (str) – Add string for constraints. Defaults to “”.
sub (str) – Subtract string for constraints. Defaults to “”.
bound (str) – Bound string for constraints. Defaults to “”.
ctrl (str) – Control string for constraints. Defaults to “”.
ispos (bool) – If the aspect is positive. Defaults to True.
nn (bool) – If the aspect is non-negative. Defaults to True.
use_multiplier (bool) – Use a scaler (such as distance) for calculations
latex (str) – LaTeX representation. Defaults to “”.
- Variables:
args (dict[str, Any]) – Arguments for aspect creation.
- name: str#
- primary_type: tuple[Type[_Component]] | Type[_Component]#
- label: str = ''#
- add: str = ''#
- sub: str = ''#
- bound: str = ''#
- ctrl: str = ''#
- ispos: bool = True#
- nn: bool = True#
- use_multiplier: bool = False#
- latex: str = ''#