Microgrid.set_module_attrs#
- Microgrid.set_module_attrs(attr_dict=None, **attrs)[source]#
Set the value of an attribute in all modules containing that attribute.
Does nothing in modules not already containing the attribute.
You may either pass attr_dict, a dict of attributes, or pass attributes as keyword arguments.
Parameters#
- attr_dictdict
Key-value pairs or attributes to set. Keys are attribute names values are the values to set attribute to.
- attrsdict
Key-value pairs or attributes to set. Keys are attribute names values are the values to set attribute to.
Raises#
- AttributeError
If no module has the attribute.