VeraGridEngine.IO.ucte.devices packageο
Submodulesο
VeraGridEngine.IO.ucte.devices.ucte_base moduleο
- VeraGridEngine.IO.ucte.devices.ucte_base.coalesce_number(value: float | int | None, fallback: float | int)[source]ο
Return the fallback for undefined numeric values.
- VeraGridEngine.IO.ucte.devices.ucte_base.is_defined_number(value: float | int | None) bool[source]ο
Check if a numeric value is defined.
- VeraGridEngine.IO.ucte.devices.ucte_base.sub_float(line: str, a: int, b: int, device: str, prop_name: str, logger: Logger, fallback_value: float = 0.0) float[source]ο
Try to get a value from a substring.
- VeraGridEngine.IO.ucte.devices.ucte_base.sub_int(line: str, a: int, b: int, device: str, prop_name: str, logger: Logger, fallback_value: int = 0) int[source]ο
Try to get a value from a substring.
- VeraGridEngine.IO.ucte.devices.ucte_base.sub_optional_float(line: str, a: int, b: int, device: str, prop_name: str, logger: Logger, fallback_value: float = nan) float[source]ο
Try to get an optional float from a substring.
- VeraGridEngine.IO.ucte.devices.ucte_base.sub_optional_int(line: str, a: int, b: int, device: str, prop_name: str, logger: Logger, fallback_value: int | None = None) int | None[source]ο
Try to get an optional integer from a substring.
- VeraGridEngine.IO.ucte.devices.ucte_base.sub_optional_str(line: str, a: int, b: int, fallback_value: str = '') str[source]ο
Try to get an optional string from a substring.
- VeraGridEngine.IO.ucte.devices.ucte_base.sub_str(line: str, a: int, b: int, device: str, prop_name: str, logger: Logger, fallback_value: str = '') str[source]ο
Try to get a value from a substring.
- VeraGridEngine.IO.ucte.devices.ucte_base.try_float(val: str, device: str, prop_name: str, logger: Logger, fallback_value: float = 0)[source]ο
Parse a float and log malformed values.
- VeraGridEngine.IO.ucte.devices.ucte_base.try_int(val: str, device: str, prop_name: str, logger: Logger, fallback_value: int = 0)[source]ο
Parse an integer, accepting float-looking strings as a salvage path.
- VeraGridEngine.IO.ucte.devices.ucte_base.try_optional_float(val: str, device: str, prop_name: str, logger: Logger, fallback_value: float = nan) float[source]ο
Parse an optional float without logging on blank values.
- VeraGridEngine.IO.ucte.devices.ucte_base.try_optional_int(val: str, device: str, prop_name: str, logger: Logger, fallback_value: int | None = None) int | None[source]ο
Parse an optional integer without logging on blank values.
- VeraGridEngine.IO.ucte.devices.ucte_base.ucte_split(line: str, prefix_lengths: tuple[int, ...] = (), total_fields: int | None = None, greedy_tail: bool = False, skip_all_separators: bool = False) list[str][source]ο
Split malformed UCTE rows while preserving fixed-width identifiers.
The standard is fixed-width, but many files are right-trimmed or collapse separators. This helper keeps the left-most fixed-width fields intact and only tokenizes the remainder.
VeraGridEngine.IO.ucte.devices.ucte_circuit moduleο
- class VeraGridEngine.IO.ucte.devices.ucte_circuit.UcteCircuit[source]ο
Bases:
objectUCTE circuit class
- static check_file_extension(f_name: str) bool[source]ο
Check that file extension is ok :param f_name: file name :return: is ok?
- get_transformer_regulation(elm: UcteTransformer) UcteTransformerRegulation | None[source]ο
- Parameters:
elm
- Returns:
- get_transformers_tap_table(elm: UcteTransformer) List[UcteTransformerTapTable][source]ο
- Parameters:
elm
- Returns: