diff --git a/timeloopfe/v4/arch.py b/timeloopfe/v4/arch.py index 96395ec..2ed94a0 100644 --- a/timeloopfe/v4/arch.py +++ b/timeloopfe/v4/arch.py @@ -328,6 +328,7 @@ def declare_attrs(cls, *args, **kwargs): super().add_attr("subclass", str, None) super().add_attr("required_actions", list, []) super().add_attr("area_scale", Number, None) + super().add_attr("energy_scale", Number, None) super().add_attr("enabled", bool, True) def __init__(self, *args, **kwargs): @@ -336,6 +337,7 @@ def __init__(self, *args, **kwargs): self.subclass: str = self["subclass"] self.required_actions: List[str] = self["required_actions"] self.area_scale: float = self["area_scale"] + self.energy_scale: float = self["energy_scale"] self.enabled: bool = self["enabled"] def _check_unrecognized(self, *args, **kwargs): diff --git a/timeloopfe/v4/components.py b/timeloopfe/v4/components.py index c9b9ad9..9e8a6f9 100644 --- a/timeloopfe/v4/components.py +++ b/timeloopfe/v4/components.py @@ -97,12 +97,14 @@ def declare_attrs(cls, *args, **kwargs): super().add_attr("name", str) super().add_attr("attributes", ComponentAttributes, {}) super().add_attr("area_scale", (Number, str), 1) + super().add_attr("energy_scale", (Number, str), 1) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.name: str = self["name"] self.attributes: ComponentAttributes = self["attributes"] self.area_scale: Union[Number, str] = self["area_scale"] + self.energy_scale: Union[Number, str] = self["energy_scale"] class ComponentAttributes(DictNode):