Dict Module¶
Holds all ERACS dictionary classes. These classes hold the dictionaries of element information, and contain methods for validating existence of values and that the values are within appropriate thresholds.
-
class
TEracsDict
¶ A class providing easy methods for storing information into a dictionary. Used for single element information, such as the appearance settings and loadflow parameters.
- Inherits
dict.
-
Assign
(ADict, AClear=True)¶ Copies elements from given dictionary into internal dictionary. This will clear the internal dictionary before copying, unless 2nd parameter is false.
- Parameters
ADict (dict) – The dictionary to copy data from.
AClear (bool) – (Optional) If set to false the current dictionary data is preserved.
-
update
(ADict)¶ Updates the internal dictionary with the given dictionary, copying over all keys and values, overwriting any duplicates.
- Parameters
ADict (dict) – Dictionary containing key-value pairs to copy over.
- Raises
TEracsDataError – If a required key is missing.
-
class
TEracsDictHeader
¶ A class specifically designed for holding Header information in a dictionary. The class checks for the existence of required values such as System Base Frequency (sysfreq).
- Inherits
-
update
(ADict)¶ Updates the internal dictionary with the given dictionary, copying over all keys and values, overwriting any duplicates.
- Parameters
ADict (dict) – Dictionary containing key-value pairs to copy over.
- Raises
TEracsDataError – If a required key is missing.
-
class
TEracsDictLoadflow
¶ A class specifically designed for holding Loadflow Parameters in a dictionary. The class checks for the existence of required values such as Tap Changer Selector (tapsel).
- Inherits
-
update
(ADict)¶ Updates the internal dictionary with the given dictionary, copying over all keys and values, overwriting any duplicates.
- Parameters
ADict (dict) – Dictionary containing key-value pairs to copy over.
- Raises
TEracsDataError – If a required key is missing.
-
class
TEracsDictAppearance
¶ A class specifically designed for holding Appearance Settings in a dictionary. The class checks for the existence of required values such as Default Busbar Thickness (defbusthickness).
- Inherits
-
update
(ADict)¶ Updates the internal dictionary with the given dictionary, copying over all keys and values, overwriting any duplicates.
- Parameters
ADict (dict) – Dictionary containing key-value pairs to copy over.
- Raises
TEracsDataError – If a required key is missing.
-
class
TEracsDictResultSetting
¶ A class specifically designed for holding Result Settings in a dictionary. The class checks for the existence of required values such as Number of Decimal Places (numdps).
- Inherits
-
update
(ADict)¶ Updates the internal dictionary with the given dictionary, copying over all keys and values, overwriting any duplicates.
- Parameters
ADict (dict) – Dictionary containing key-value pairs to copy over.
- Raises
TEracsDataError – If a required key is missing.
-
class
TEracsDictVoltageLevelTable
¶ A class specifically designed for holding Voltage Level information in a dictionary. The class checks for the existence of required values such as Voltage Level Key Visible (visible).
- Inherits
-
update
(ADict)¶ Updates the internal dictionary with the given dictionary, copying over all keys and values, overwriting any duplicates.
- Parameters
ADict (dict) – Dictionary containing key-value pairs to copy over.
- Raises
TEracsDataError – If a required key is missing.
-
class
TEracsDictCanvas
¶ A class specifically designed for holding Canvas Information in a dictionary. The class checks for the existence of required values such as SVG Canvas Width (width).
- Inherits
-
update
(ADict)¶ Updates the internal dictionary with the given dictionary, copying over all keys and values, overwriting any duplicates.
- Parameters
ADict (dict) – Dictionary containing key-value pairs to copy over.
- Raises
TEracsDataError – If a required key is missing.