zepben.ewb 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zepben/ewb/__init__.py +601 -0
- zepben/ewb/auth/__init__.py +10 -0
- zepben/ewb/auth/client/__init__.py +5 -0
- zepben/ewb/auth/client/zepben_token_fetcher.py +273 -0
- zepben/ewb/auth/common/__init__.py +5 -0
- zepben/ewb/auth/common/auth_exception.py +16 -0
- zepben/ewb/auth/common/auth_method.py +28 -0
- zepben/ewb/auth/common/auth_provider_config.py +96 -0
- zepben/ewb/database/__init__.py +4 -0
- zepben/ewb/database/paths/__init__.py +4 -0
- zepben/ewb/database/paths/database_type.py +34 -0
- zepben/ewb/database/paths/ewb_data_file_paths.py +237 -0
- zepben/ewb/database/sql/__init__.py +4 -0
- zepben/ewb/database/sql/column.py +37 -0
- zepben/ewb/database/sql/sql_table.py +142 -0
- zepben/ewb/database/sqlite/__init__.py +4 -0
- zepben/ewb/database/sqlite/common/__init__.py +4 -0
- zepben/ewb/database/sqlite/common/base_cim_reader.py +212 -0
- zepben/ewb/database/sqlite/common/base_cim_writer.py +159 -0
- zepben/ewb/database/sqlite/common/base_collection_reader.py +96 -0
- zepben/ewb/database/sqlite/common/base_collection_writer.py +73 -0
- zepben/ewb/database/sqlite/common/base_database_reader.py +127 -0
- zepben/ewb/database/sqlite/common/base_database_tables.py +137 -0
- zepben/ewb/database/sqlite/common/base_database_writer.py +195 -0
- zepben/ewb/database/sqlite/common/base_entry_writer.py +34 -0
- zepben/ewb/database/sqlite/common/base_service_reader.py +50 -0
- zepben/ewb/database/sqlite/common/base_service_writer.py +104 -0
- zepben/ewb/database/sqlite/common/metadata_collection_reader.py +39 -0
- zepben/ewb/database/sqlite/common/metadata_collection_writer.py +38 -0
- zepben/ewb/database/sqlite/common/metadata_entry_reader.py +45 -0
- zepben/ewb/database/sqlite/common/metadata_entry_writer.py +41 -0
- zepben/ewb/database/sqlite/common/reader_exceptions.py +30 -0
- zepben/ewb/database/sqlite/customer/__init__.py +4 -0
- zepben/ewb/database/sqlite/customer/customer_cim_reader.py +169 -0
- zepben/ewb/database/sqlite/customer/customer_cim_writer.py +137 -0
- zepben/ewb/database/sqlite/customer/customer_database_reader.py +44 -0
- zepben/ewb/database/sqlite/customer/customer_database_tables.py +37 -0
- zepben/ewb/database/sqlite/customer/customer_database_writer.py +45 -0
- zepben/ewb/database/sqlite/customer/customer_service_reader.py +57 -0
- zepben/ewb/database/sqlite/customer/customer_service_writer.py +47 -0
- zepben/ewb/database/sqlite/diagram/__init__.py +4 -0
- zepben/ewb/database/sqlite/diagram/diagram_cim_reader.py +105 -0
- zepben/ewb/database/sqlite/diagram/diagram_cim_writer.py +81 -0
- zepben/ewb/database/sqlite/diagram/diagram_database_reader.py +45 -0
- zepben/ewb/database/sqlite/diagram/diagram_database_tables.py +29 -0
- zepben/ewb/database/sqlite/diagram/diagram_database_writer.py +44 -0
- zepben/ewb/database/sqlite/diagram/diagram_service_reader.py +49 -0
- zepben/ewb/database/sqlite/diagram/diagram_service_writer.py +41 -0
- zepben/ewb/database/sqlite/extensions/__init__.py +4 -0
- zepben/ewb/database/sqlite/extensions/prepared_statement.py +112 -0
- zepben/ewb/database/sqlite/extensions/result_set.py +153 -0
- zepben/ewb/database/sqlite/network/__init__.py +4 -0
- zepben/ewb/database/sqlite/network/network_cim_reader.py +3167 -0
- zepben/ewb/database/sqlite/network/network_cim_writer.py +2561 -0
- zepben/ewb/database/sqlite/network/network_database_reader.py +175 -0
- zepben/ewb/database/sqlite/network/network_database_tables.py +242 -0
- zepben/ewb/database/sqlite/network/network_database_writer.py +43 -0
- zepben/ewb/database/sqlite/network/network_service_reader.py +265 -0
- zepben/ewb/database/sqlite/network/network_service_writer.py +209 -0
- zepben/ewb/database/sqlite/tables/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/associations/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/associations/loop_substation_relationship.py +17 -0
- zepben/ewb/database/sqlite/tables/associations/table_asset_organisation_roles_assets.py +40 -0
- zepben/ewb/database/sqlite/tables/associations/table_assets_power_system_resources.py +41 -0
- zepben/ewb/database/sqlite/tables/associations/table_battery_units_battery_controls.py +40 -0
- zepben/ewb/database/sqlite/tables/associations/table_circuits_substations.py +40 -0
- zepben/ewb/database/sqlite/tables/associations/table_circuits_terminals.py +40 -0
- zepben/ewb/database/sqlite/tables/associations/table_customer_agreements_pricing_structures.py +40 -0
- zepben/ewb/database/sqlite/tables/associations/table_end_devices_end_device_functions.py +40 -0
- zepben/ewb/database/sqlite/tables/associations/table_equipment_equipment_containers.py +40 -0
- zepben/ewb/database/sqlite/tables/associations/table_equipment_operational_restrictions.py +40 -0
- zepben/ewb/database/sqlite/tables/associations/table_equipment_usage_points.py +40 -0
- zepben/ewb/database/sqlite/tables/associations/table_loops_substations.py +43 -0
- zepben/ewb/database/sqlite/tables/associations/table_pricing_structures_tariffs.py +40 -0
- zepben/ewb/database/sqlite/tables/associations/table_protection_relay_functions_protected_switches.py +40 -0
- zepben/ewb/database/sqlite/tables/associations/table_protection_relay_functions_sensors.py +40 -0
- zepben/ewb/database/sqlite/tables/associations/table_protection_relay_schemes_protection_relay_functions.py +40 -0
- zepben/ewb/database/sqlite/tables/associations/table_synchronous_machines_reactive_capability_curves.py +39 -0
- zepben/ewb/database/sqlite/tables/associations/table_usage_points_end_devices.py +40 -0
- zepben/ewb/database/sqlite/tables/exceptions.py +10 -0
- zepben/ewb/database/sqlite/tables/extensions/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61968/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61968/assetinfo/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61968/assetinfo/table_reclose_delays.py +38 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61968/assetinfo/table_relay_info.py +21 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61968/metering/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61968/metering/table_pan_demand_response_functions.py +21 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/core/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/core/table_sites.py +15 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/feeder/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/feeder/table_loops.py +15 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/feeder/table_lv_feeders.py +20 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/generation/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/generation/production/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/generation/production/table_ev_charging_units.py +15 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_distance_relays.py +28 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_protection_relay_function_thresholds.py +36 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_protection_relay_function_time_limits.py +34 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_protection_relay_functions.py +24 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_protection_relay_schemes.py +20 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_protection_relay_systems.py +20 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_voltage_relays.py +15 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/wires/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/wires/table_battery_controls.py +23 -0
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/wires/table_power_transformer_end_ratings.py +34 -0
- zepben/ewb/database/sqlite/tables/iec61968/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_cable_info.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_no_load_tests.py +24 -0
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_open_circuit_tests.py +24 -0
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_overhead_wire_info.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_power_transformer_info.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_short_circuit_tests.py +29 -0
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_shunt_compensator_info.py +23 -0
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_switch_info.py +20 -0
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_transformer_end_info.py +46 -0
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_transformer_tank_info.py +27 -0
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_transformer_test.py +19 -0
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_wire_info.py +19 -0
- zepben/ewb/database/sqlite/tables/iec61968/assets/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61968/assets/table_asset_containers.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61968/assets/table_asset_functions.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61968/assets/table_asset_info.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61968/assets/table_asset_organisation_roles.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61968/assets/table_asset_owners.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61968/assets/table_assets.py +18 -0
- zepben/ewb/database/sqlite/tables/iec61968/assets/table_streetlights.py +22 -0
- zepben/ewb/database/sqlite/tables/iec61968/assets/table_structures.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61968/common/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61968/common/table_agreements.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61968/common/table_documents.py +23 -0
- zepben/ewb/database/sqlite/tables/iec61968/common/table_location_street_address_field.py +18 -0
- zepben/ewb/database/sqlite/tables/iec61968/common/table_location_street_addresses.py +33 -0
- zepben/ewb/database/sqlite/tables/iec61968/common/table_locations.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61968/common/table_organisation_roles.py +18 -0
- zepben/ewb/database/sqlite/tables/iec61968/common/table_organisations.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61968/common/table_position_points.py +30 -0
- zepben/ewb/database/sqlite/tables/iec61968/common/table_street_addresses.py +26 -0
- zepben/ewb/database/sqlite/tables/iec61968/common/table_town_details.py +19 -0
- zepben/ewb/database/sqlite/tables/iec61968/customers/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61968/customers/table_customer_agreements.py +27 -0
- zepben/ewb/database/sqlite/tables/iec61968/customers/table_customers.py +22 -0
- zepben/ewb/database/sqlite/tables/iec61968/customers/table_pricing_structures.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61968/customers/table_tariffs.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61968/infiec61968/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61968/infiec61968/infassetinfo/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61968/infiec61968/infassetinfo/table_current_transformer_info.py +33 -0
- zepben/ewb/database/sqlite/tables/iec61968/infiec61968/infassetinfo/table_potential_transformer_info.py +26 -0
- zepben/ewb/database/sqlite/tables/iec61968/infiec61968/infassets/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61968/infiec61968/infassets/table_poles.py +20 -0
- zepben/ewb/database/sqlite/tables/iec61968/metering/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61968/metering/table_end_device_functions.py +18 -0
- zepben/ewb/database/sqlite/tables/iec61968/metering/table_end_devices.py +19 -0
- zepben/ewb/database/sqlite/tables/iec61968/metering/table_meters.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61968/metering/table_usage_points.py +23 -0
- zepben/ewb/database/sqlite/tables/iec61968/operations/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61968/operations/table_operational_restrictions.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/auxiliaryequipment/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/auxiliaryequipment/table_auxiliary_equipment.py +18 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/auxiliaryequipment/table_current_transformers.py +21 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/auxiliaryequipment/table_fault_indicators.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/auxiliaryequipment/table_potential_transformers.py +21 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/auxiliaryequipment/table_sensors.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_ac_dc_terminals.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_base_voltages.py +20 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_conducting_equipment.py +18 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_connectivity_node_containers.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_connectivity_nodes.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_curve_data.py +46 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_curves.py +17 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_equipment.py +20 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_equipment_containers.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_feeders.py +28 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_geographical_regions.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_identified_objects.py +29 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_name_types.py +28 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_names.py +36 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_power_system_resources.py +19 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_sub_geographical_regions.py +27 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_substations.py +27 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_terminals.py +35 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/diagramlayout/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/diagramlayout/table_diagram_object_points.py +35 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/diagramlayout/table_diagram_objects.py +31 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/diagramlayout/table_diagrams.py +21 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/equivalents/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/equivalents/table_equivalent_branches.py +35 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/equivalents/table_equivalent_equipment.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/generation/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/generation/production/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/generation/production/table_battery_units.py +22 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/generation/production/table_photo_voltaic_units.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/generation/production/table_power_electronics_units.py +26 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/generation/production/table_power_electronics_wind_units.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/meas/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/meas/table_accumulators.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/meas/table_analogs.py +20 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/meas/table_controls.py +20 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/meas/table_discretes.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/meas/table_io_points.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/meas/table_measurements.py +30 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/protection/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/protection/table_current_relays.py +22 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/scada/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/scada/table_remote_controls.py +20 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/scada/table_remote_points.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/scada/table_remote_sources.py +20 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_ac_line_segments.py +20 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_breakers.py +20 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_busbar_sections.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_clamps.py +23 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_conductors.py +21 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_connectors.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_cuts.py +23 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_disconnectors.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_earth_fault_compensators.py +22 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_energy_connections.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_energy_consumer_phases.py +37 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_energy_consumers.py +26 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_energy_source_phases.py +33 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_energy_sources.py +44 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_fuses.py +20 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_ground_disconnectors.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_grounding_impedances.py +24 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_grounds.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_jumpers.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_junctions.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_linear_shunt_compensators.py +23 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_lines.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_load_break_switches.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_per_length_impedances.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_per_length_line_parameters.py +14 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_per_length_phase_impedances.py +18 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_per_length_sequence_impedances.py +27 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_petersen_coils.py +27 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_phase_impedance_data.py +52 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_power_electronics_connection_phases.py +30 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_power_electronics_connections.py +50 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_power_transformer_ends.py +43 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_power_transformers.py +24 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_protected_switches.py +18 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_ratio_tap_changers.py +28 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_reactive_capability_curves.py +18 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_reclosers.py +15 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_regulating_cond_eq.py +19 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_regulating_controls.py +29 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_rotating_machines.py +36 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_series_compensators.py +25 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_shunt_compensators.py +22 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_static_var_compensator.py +24 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_switches.py +21 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_synchronous_machines.py +95 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_tap_changer_controls.py +28 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_tap_changers.py +25 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_transformer_ends.py +30 -0
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_transformer_star_impedances.py +32 -0
- zepben/ewb/database/sqlite/tables/iec61970/infiec61970/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/infiec61970/feeder/__init__.py +4 -0
- zepben/ewb/database/sqlite/tables/iec61970/infiec61970/feeder/table_circuits.py +27 -0
- zepben/ewb/database/sqlite/tables/sqlite_table.py +45 -0
- zepben/ewb/database/sqlite/tables/table_metadata_data_sources.py +21 -0
- zepben/ewb/database/sqlite/tables/table_version.py +39 -0
- zepben/ewb/dataclassy/__init__.py +15 -0
- zepben/ewb/dataclassy/dataclass.py +192 -0
- zepben/ewb/dataclassy/decorator.py +35 -0
- zepben/ewb/dataclassy/functions.py +80 -0
- zepben/ewb/examples/__init__.py +6 -0
- zepben/ewb/examples/simple_test_network.py +158 -0
- zepben/ewb/exceptions.py +52 -0
- zepben/ewb/model/__init__.py +4 -0
- zepben/ewb/model/busbranch/__init__.py +4 -0
- zepben/ewb/model/busbranch/bus_branch.py +1051 -0
- zepben/ewb/model/cim/__init__.py +4 -0
- zepben/ewb/model/cim/extensions/__init__.py +4 -0
- zepben/ewb/model/cim/extensions/iec61968/__init__.py +4 -0
- zepben/ewb/model/cim/extensions/iec61968/assetinfo/__init__.py +4 -0
- zepben/ewb/model/cim/extensions/iec61968/assetinfo/relay_info.py +128 -0
- zepben/ewb/model/cim/extensions/iec61968/metering/__init__.py +4 -0
- zepben/ewb/model/cim/extensions/iec61968/metering/pan_demand_reponse_function.py +112 -0
- zepben/ewb/model/cim/extensions/iec61970/__init__.py +4 -0
- zepben/ewb/model/cim/extensions/iec61970/base/__init__.py +4 -0
- zepben/ewb/model/cim/extensions/iec61970/base/core/__init__.py +4 -0
- zepben/ewb/model/cim/extensions/iec61970/base/core/site.py +37 -0
- zepben/ewb/model/cim/extensions/iec61970/base/feeder/__init__.py +4 -0
- zepben/ewb/model/cim/extensions/iec61970/base/feeder/loop.py +207 -0
- zepben/ewb/model/cim/extensions/iec61970/base/feeder/lv_feeder.py +258 -0
- zepben/ewb/model/cim/extensions/iec61970/base/generation/__init__.py +4 -0
- zepben/ewb/model/cim/extensions/iec61970/base/generation/production/__init__.py +4 -0
- zepben/ewb/model/cim/extensions/iec61970/base/generation/production/ev_charging_unit.py +18 -0
- zepben/ewb/model/cim/extensions/iec61970/base/protection/__init__.py +4 -0
- zepben/ewb/model/cim/extensions/iec61970/base/protection/distance_relay.py +69 -0
- zepben/ewb/model/cim/extensions/iec61970/base/protection/power_direction_kind.py +36 -0
- zepben/ewb/model/cim/extensions/iec61970/base/protection/protection_kind.py +112 -0
- zepben/ewb/model/cim/extensions/iec61970/base/protection/protection_relay_function.py +448 -0
- zepben/ewb/model/cim/extensions/iec61970/base/protection/protection_relay_scheme.py +97 -0
- zepben/ewb/model/cim/extensions/iec61970/base/protection/protection_relay_system.py +97 -0
- zepben/ewb/model/cim/extensions/iec61970/base/protection/relay_setting.py +35 -0
- zepben/ewb/model/cim/extensions/iec61970/base/protection/voltage_relay.py +20 -0
- zepben/ewb/model/cim/extensions/iec61970/base/wires/__init__.py +4 -0
- zepben/ewb/model/cim/extensions/iec61970/base/wires/battery_control.py +36 -0
- zepben/ewb/model/cim/extensions/iec61970/base/wires/battery_control_mode.py +83 -0
- zepben/ewb/model/cim/extensions/iec61970/base/wires/transformer_cooling_type.py +57 -0
- zepben/ewb/model/cim/extensions/iec61970/base/wires/transformer_end_rated_s.py +26 -0
- zepben/ewb/model/cim/extensions/iec61970/base/wires/vector_group.py +293 -0
- zepben/ewb/model/cim/extensions/zbex.py +17 -0
- zepben/ewb/model/cim/iec61968/__init__.py +4 -0
- zepben/ewb/model/cim/iec61968/assetinfo/__init__.py +4 -0
- zepben/ewb/model/cim/iec61968/assetinfo/cable_info.py +15 -0
- zepben/ewb/model/cim/iec61968/assetinfo/no_load_test.py +42 -0
- zepben/ewb/model/cim/iec61968/assetinfo/open_circuit_test.py +42 -0
- zepben/ewb/model/cim/iec61968/assetinfo/overhead_wire_info.py +15 -0
- zepben/ewb/model/cim/iec61968/assetinfo/power_transformer_info.py +103 -0
- zepben/ewb/model/cim/iec61968/assetinfo/short_circuit_test.py +67 -0
- zepben/ewb/model/cim/iec61968/assetinfo/shunt_compensator_info.py +26 -0
- zepben/ewb/model/cim/iec61968/assetinfo/switch_info.py +17 -0
- zepben/ewb/model/cim/iec61968/assetinfo/transformer_end_info.py +137 -0
- zepben/ewb/model/cim/iec61968/assetinfo/transformer_tank_info.py +108 -0
- zepben/ewb/model/cim/iec61968/assetinfo/transformer_test.py +26 -0
- zepben/ewb/model/cim/iec61968/assetinfo/wire_info.py +24 -0
- zepben/ewb/model/cim/iec61968/assetinfo/wire_material_kind.py +57 -0
- zepben/ewb/model/cim/iec61968/assets/__init__.py +4 -0
- zepben/ewb/model/cim/iec61968/assets/asset.py +154 -0
- zepben/ewb/model/cim/iec61968/assets/asset_container.py +16 -0
- zepben/ewb/model/cim/iec61968/assets/asset_function.py +15 -0
- zepben/ewb/model/cim/iec61968/assets/asset_info.py +19 -0
- zepben/ewb/model/cim/iec61968/assets/asset_organisation_role.py +13 -0
- zepben/ewb/model/cim/iec61968/assets/asset_owner.py +13 -0
- zepben/ewb/model/cim/iec61968/assets/streetlight.py +29 -0
- zepben/ewb/model/cim/iec61968/assets/structure.py +16 -0
- zepben/ewb/model/cim/iec61968/common/__init__.py +4 -0
- zepben/ewb/model/cim/iec61968/common/agreement.py +16 -0
- zepben/ewb/model/cim/iec61968/common/document.py +36 -0
- zepben/ewb/model/cim/iec61968/common/location.py +129 -0
- zepben/ewb/model/cim/iec61968/common/organisation.py +15 -0
- zepben/ewb/model/cim/iec61968/common/organisation_role.py +22 -0
- zepben/ewb/model/cim/iec61968/common/position_point.py +44 -0
- zepben/ewb/model/cim/iec61968/common/street_address.py +28 -0
- zepben/ewb/model/cim/iec61968/common/street_detail.py +46 -0
- zepben/ewb/model/cim/iec61968/common/town_detail.py +25 -0
- zepben/ewb/model/cim/iec61968/customers/__init__.py +4 -0
- zepben/ewb/model/cim/iec61968/customers/customer.py +93 -0
- zepben/ewb/model/cim/iec61968/customers/customer_agreement.py +107 -0
- zepben/ewb/model/cim/iec61968/customers/customer_kind.py +69 -0
- zepben/ewb/model/cim/iec61968/customers/pricing_structure.py +88 -0
- zepben/ewb/model/cim/iec61968/customers/tariff.py +18 -0
- zepben/ewb/model/cim/iec61968/infiec61968/__init__.py +4 -0
- zepben/ewb/model/cim/iec61968/infiec61968/infassetinfo/__init__.py +4 -0
- zepben/ewb/model/cim/iec61968/infiec61968/infassetinfo/current_transformer_info.py +51 -0
- zepben/ewb/model/cim/iec61968/infiec61968/infassetinfo/potential_transformer_info.py +33 -0
- zepben/ewb/model/cim/iec61968/infiec61968/infassetinfo/transformer_construction_kind.py +69 -0
- zepben/ewb/model/cim/iec61968/infiec61968/infassetinfo/transformer_function_kind.py +45 -0
- zepben/ewb/model/cim/iec61968/infiec61968/infassets/__init__.py +4 -0
- zepben/ewb/model/cim/iec61968/infiec61968/infassets/pole.py +87 -0
- zepben/ewb/model/cim/iec61968/infiec61968/infassets/streetlight_lamp_kind.py +27 -0
- zepben/ewb/model/cim/iec61968/infiec61968/infcommon/__init__.py +4 -0
- zepben/ewb/model/cim/iec61968/infiec61968/infcommon/ratio.py +34 -0
- zepben/ewb/model/cim/iec61968/metering/__init__.py +4 -0
- zepben/ewb/model/cim/iec61968/metering/controlled_appliance.py +152 -0
- zepben/ewb/model/cim/iec61968/metering/end_device.py +165 -0
- zepben/ewb/model/cim/iec61968/metering/end_device_function.py +17 -0
- zepben/ewb/model/cim/iec61968/metering/end_device_function_kind.py +48 -0
- zepben/ewb/model/cim/iec61968/metering/meter.py +28 -0
- zepben/ewb/model/cim/iec61968/metering/usage_point.py +186 -0
- zepben/ewb/model/cim/iec61968/operations/__init__.py +4 -0
- zepben/ewb/model/cim/iec61968/operations/operational_restriction.py +92 -0
- zepben/ewb/model/cim/iec61970/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/auxiliaryequipment/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/auxiliaryequipment/auxiliary_equipment.py +24 -0
- zepben/ewb/model/cim/iec61970/base/auxiliaryequipment/current_transformer.py +37 -0
- zepben/ewb/model/cim/iec61970/base/auxiliaryequipment/fault_indicator.py +18 -0
- zepben/ewb/model/cim/iec61970/base/auxiliaryequipment/potential_transformer.py +38 -0
- zepben/ewb/model/cim/iec61970/base/auxiliaryequipment/potential_transformer_kind.py +30 -0
- zepben/ewb/model/cim/iec61970/base/auxiliaryequipment/sensor.py +92 -0
- zepben/ewb/model/cim/iec61970/base/core/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/core/ac_dc_terminal.py +16 -0
- zepben/ewb/model/cim/iec61970/base/core/base_voltage.py +17 -0
- zepben/ewb/model/cim/iec61970/base/core/conducting_equipment.py +198 -0
- zepben/ewb/model/cim/iec61970/base/core/connectivity_node.py +105 -0
- zepben/ewb/model/cim/iec61970/base/core/connectivity_node_container.py +15 -0
- zepben/ewb/model/cim/iec61970/base/core/curve.py +125 -0
- zepben/ewb/model/cim/iec61970/base/core/curve_data.py +29 -0
- zepben/ewb/model/cim/iec61970/base/core/equipment.py +366 -0
- zepben/ewb/model/cim/iec61970/base/core/equipment_container.py +199 -0
- zepben/ewb/model/cim/iec61970/base/core/feeder.py +260 -0
- zepben/ewb/model/cim/iec61970/base/core/geographical_region.py +82 -0
- zepben/ewb/model/cim/iec61970/base/core/identified_object.py +239 -0
- zepben/ewb/model/cim/iec61970/base/core/name.py +36 -0
- zepben/ewb/model/cim/iec61970/base/core/name_type.py +203 -0
- zepben/ewb/model/cim/iec61970/base/core/phase_code.py +202 -0
- zepben/ewb/model/cim/iec61970/base/core/power_system_resource.py +106 -0
- zepben/ewb/model/cim/iec61970/base/core/sub_geographical_region.py +93 -0
- zepben/ewb/model/cim/iec61970/base/core/substation.py +277 -0
- zepben/ewb/model/cim/iec61970/base/core/terminal.py +171 -0
- zepben/ewb/model/cim/iec61970/base/diagramlayout/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/diagramlayout/diagram.py +109 -0
- zepben/ewb/model/cim/iec61970/base/diagramlayout/diagram_object.py +160 -0
- zepben/ewb/model/cim/iec61970/base/diagramlayout/diagram_object_point.py +25 -0
- zepben/ewb/model/cim/iec61970/base/diagramlayout/diagram_style.py +28 -0
- zepben/ewb/model/cim/iec61970/base/diagramlayout/orientation_kind.py +29 -0
- zepben/ewb/model/cim/iec61970/base/domain/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/domain/unit_symbol.py +494 -0
- zepben/ewb/model/cim/iec61970/base/equivalents/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/equivalents/equivalent_branch.py +113 -0
- zepben/ewb/model/cim/iec61970/base/equivalents/equivalent_equipment.py +15 -0
- zepben/ewb/model/cim/iec61970/base/generation/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/generation/production/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/generation/production/battery_state_kind.py +39 -0
- zepben/ewb/model/cim/iec61970/base/generation/production/battery_unit.py +108 -0
- zepben/ewb/model/cim/iec61970/base/generation/production/photo_voltaic_unit.py +13 -0
- zepben/ewb/model/cim/iec61970/base/generation/production/power_electronics_unit.py +28 -0
- zepben/ewb/model/cim/iec61970/base/generation/production/power_electronics_wind_unit.py +13 -0
- zepben/ewb/model/cim/iec61970/base/meas/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/meas/accumulator.py +13 -0
- zepben/ewb/model/cim/iec61970/base/meas/accumulator_value.py +20 -0
- zepben/ewb/model/cim/iec61970/base/meas/analog.py +18 -0
- zepben/ewb/model/cim/iec61970/base/meas/analog_value.py +20 -0
- zepben/ewb/model/cim/iec61970/base/meas/control.py +26 -0
- zepben/ewb/model/cim/iec61970/base/meas/discrete.py +13 -0
- zepben/ewb/model/cim/iec61970/base/meas/discrete_value.py +20 -0
- zepben/ewb/model/cim/iec61970/base/meas/iopoint.py +16 -0
- zepben/ewb/model/cim/iec61970/base/meas/measurement.py +60 -0
- zepben/ewb/model/cim/iec61970/base/meas/measurement_value.py +21 -0
- zepben/ewb/model/cim/iec61970/base/protection/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/protection/current_relay.py +23 -0
- zepben/ewb/model/cim/iec61970/base/scada/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/scada/remote_control.py +22 -0
- zepben/ewb/model/cim/iec61970/base/scada/remote_point.py +16 -0
- zepben/ewb/model/cim/iec61970/base/scada/remote_source.py +22 -0
- zepben/ewb/model/cim/iec61970/base/wires/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/wires/ac_line_segment.py +214 -0
- zepben/ewb/model/cim/iec61970/base/wires/breaker.py +32 -0
- zepben/ewb/model/cim/iec61970/base/wires/busbar_section.py +19 -0
- zepben/ewb/model/cim/iec61970/base/wires/clamp.py +32 -0
- zepben/ewb/model/cim/iec61970/base/wires/conductor.py +49 -0
- zepben/ewb/model/cim/iec61970/base/wires/connector.py +16 -0
- zepben/ewb/model/cim/iec61970/base/wires/cut.py +36 -0
- zepben/ewb/model/cim/iec61970/base/wires/disconnector.py +17 -0
- zepben/ewb/model/cim/iec61970/base/wires/earth_fault_compensator.py +21 -0
- zepben/ewb/model/cim/iec61970/base/wires/energy_connection.py +15 -0
- zepben/ewb/model/cim/iec61970/base/wires/energy_consumer.py +107 -0
- zepben/ewb/model/cim/iec61970/base/wires/energy_consumer_phase.py +56 -0
- zepben/ewb/model/cim/iec61970/base/wires/energy_source.py +172 -0
- zepben/ewb/model/cim/iec61970/base/wires/energy_source_phase.py +45 -0
- zepben/ewb/model/cim/iec61970/base/wires/fuse.py +23 -0
- zepben/ewb/model/cim/iec61970/base/wires/ground.py +15 -0
- zepben/ewb/model/cim/iec61970/base/wires/ground_disconnector.py +15 -0
- zepben/ewb/model/cim/iec61970/base/wires/grounding_impedance.py +19 -0
- zepben/ewb/model/cim/iec61970/base/wires/jumper.py +16 -0
- zepben/ewb/model/cim/iec61970/base/wires/junction.py +15 -0
- zepben/ewb/model/cim/iec61970/base/wires/line.py +13 -0
- zepben/ewb/model/cim/iec61970/base/wires/linear_shunt_compensator.py +26 -0
- zepben/ewb/model/cim/iec61970/base/wires/load_break_switch.py +14 -0
- zepben/ewb/model/cim/iec61970/base/wires/per_length_impedance.py +13 -0
- zepben/ewb/model/cim/iec61970/base/wires/per_length_line_parameter.py +13 -0
- zepben/ewb/model/cim/iec61970/base/wires/per_length_phase_impedance.py +99 -0
- zepben/ewb/model/cim/iec61970/base/wires/per_length_sequence_impedance.py +43 -0
- zepben/ewb/model/cim/iec61970/base/wires/petersen_coil.py +22 -0
- zepben/ewb/model/cim/iec61970/base/wires/phase_impedance_data.py +37 -0
- zepben/ewb/model/cim/iec61970/base/wires/phase_shunt_connection_kind.py +40 -0
- zepben/ewb/model/cim/iec61970/base/wires/power_electronics_connection.py +524 -0
- zepben/ewb/model/cim/iec61970/base/wires/power_electronics_connection_phase.py +34 -0
- zepben/ewb/model/cim/iec61970/base/wires/power_transformer.py +217 -0
- zepben/ewb/model/cim/iec61970/base/wires/power_transformer_end.py +208 -0
- zepben/ewb/model/cim/iec61970/base/wires/protected_switch.py +96 -0
- zepben/ewb/model/cim/iec61970/base/wires/ratio_tap_changer.py +30 -0
- zepben/ewb/model/cim/iec61970/base/wires/reactive_capability_curve.py +16 -0
- zepben/ewb/model/cim/iec61970/base/wires/recloser.py +15 -0
- zepben/ewb/model/cim/iec61970/base/wires/regulating_cond_eq.py +45 -0
- zepben/ewb/model/cim/iec61970/base/wires/regulating_control.py +173 -0
- zepben/ewb/model/cim/iec61970/base/wires/regulating_control_mode_kind.py +48 -0
- zepben/ewb/model/cim/iec61970/base/wires/rotating_machine.py +36 -0
- zepben/ewb/model/cim/iec61970/base/wires/series_compensator.py +42 -0
- zepben/ewb/model/cim/iec61970/base/wires/shunt_compensator.py +59 -0
- zepben/ewb/model/cim/iec61970/base/wires/single_phase_kind.py +107 -0
- zepben/ewb/model/cim/iec61970/base/wires/static_var_compensator.py +40 -0
- zepben/ewb/model/cim/iec61970/base/wires/svc_control_mode.py +30 -0
- zepben/ewb/model/cim/iec61970/base/wires/switch.py +119 -0
- zepben/ewb/model/cim/iec61970/base/wires/synchronous_machine.py +168 -0
- zepben/ewb/model/cim/iec61970/base/wires/synchronous_machine_kind.py +46 -0
- zepben/ewb/model/cim/iec61970/base/wires/tap_changer.py +150 -0
- zepben/ewb/model/cim/iec61970/base/wires/tap_changer_control.py +49 -0
- zepben/ewb/model/cim/iec61970/base/wires/transformer_end.py +73 -0
- zepben/ewb/model/cim/iec61970/base/wires/transformer_star_impedance.py +48 -0
- zepben/ewb/model/cim/iec61970/base/wires/winding_connection.py +45 -0
- zepben/ewb/model/cim/iec61970/infiec61970/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/infiec61970/feeder/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/infiec61970/feeder/circuit.py +144 -0
- zepben/ewb/model/phases.py +168 -0
- zepben/ewb/model/resistance_reactance.py +40 -0
- zepben/ewb/services/__init__.py +4 -0
- zepben/ewb/services/common/__init__.py +16 -0
- zepben/ewb/services/common/base_service.py +383 -0
- zepben/ewb/services/common/base_service_comparator.py +394 -0
- zepben/ewb/services/common/difference.py +47 -0
- zepben/ewb/services/common/enum_mapper.py +55 -0
- zepben/ewb/services/common/meta/__init__.py +4 -0
- zepben/ewb/services/common/meta/data_source.py +16 -0
- zepben/ewb/services/common/meta/metadata_collection.py +28 -0
- zepben/ewb/services/common/meta/metadata_translations.py +47 -0
- zepben/ewb/services/common/meta/service_info.py +22 -0
- zepben/ewb/services/common/reference_resolvers.py +374 -0
- zepben/ewb/services/common/resolver.py +597 -0
- zepben/ewb/services/common/translator/__init__.py +4 -0
- zepben/ewb/services/common/translator/base_cim2proto.py +115 -0
- zepben/ewb/services/common/translator/base_proto2cim.py +146 -0
- zepben/ewb/services/common/translator/service_differences.py +81 -0
- zepben/ewb/services/common/translator/util.py +75 -0
- zepben/ewb/services/customer/__init__.py +4 -0
- zepben/ewb/services/customer/customer_service_comparator.py +52 -0
- zepben/ewb/services/customer/customers.py +23 -0
- zepben/ewb/services/customer/translator/__init__.py +21 -0
- zepben/ewb/services/customer/translator/customer_cim2proto.py +71 -0
- zepben/ewb/services/customer/translator/customer_enum_mappers.py +18 -0
- zepben/ewb/services/customer/translator/customer_proto2cim.py +87 -0
- zepben/ewb/services/diagram/__init__.py +4 -0
- zepben/ewb/services/diagram/diagram_service_comparator.py +39 -0
- zepben/ewb/services/diagram/diagrams.py +107 -0
- zepben/ewb/services/diagram/translator/__init__.py +11 -0
- zepben/ewb/services/diagram/translator/diagram_cim2proto.py +51 -0
- zepben/ewb/services/diagram/translator/diagram_enum_mappers.py +21 -0
- zepben/ewb/services/diagram/translator/diagram_proto2cim.py +61 -0
- zepben/ewb/services/measurement/__init__.py +4 -0
- zepben/ewb/services/measurement/measurements.py +35 -0
- zepben/ewb/services/measurement/translator/__init__.py +6 -0
- zepben/ewb/services/measurement/translator/measurement_cim2proto.py +42 -0
- zepben/ewb/services/measurement/translator/measurement_proto2cim.py +52 -0
- zepben/ewb/services/network/__init__.py +4 -0
- zepben/ewb/services/network/network_extensions.py +119 -0
- zepben/ewb/services/network/network_service.py +302 -0
- zepben/ewb/services/network/network_service_comparator.py +1322 -0
- zepben/ewb/services/network/network_state.py +36 -0
- zepben/ewb/services/network/tracing/__init__.py +4 -0
- zepben/ewb/services/network/tracing/busbranch_trace.py +36 -0
- zepben/ewb/services/network/tracing/connectivity/__init__.py +4 -0
- zepben/ewb/services/network/tracing/connectivity/connectivity_result.py +105 -0
- zepben/ewb/services/network/tracing/connectivity/nominal_phase_path.py +23 -0
- zepben/ewb/services/network/tracing/connectivity/phase_paths.py +70 -0
- zepben/ewb/services/network/tracing/connectivity/terminal_connectivity_connected.py +226 -0
- zepben/ewb/services/network/tracing/connectivity/terminal_connectivity_internal.py +64 -0
- zepben/ewb/services/network/tracing/connectivity/transformer_phase_paths.py +202 -0
- zepben/ewb/services/network/tracing/connectivity/xy_candidate_phase_paths.py +235 -0
- zepben/ewb/services/network/tracing/connectivity/xy_phase_step.py +24 -0
- zepben/ewb/services/network/tracing/feeder/__init__.py +4 -0
- zepben/ewb/services/network/tracing/feeder/assign_to_feeders.py +202 -0
- zepben/ewb/services/network/tracing/feeder/assign_to_lv_feeders.py +202 -0
- zepben/ewb/services/network/tracing/feeder/clear_direction.py +80 -0
- zepben/ewb/services/network/tracing/feeder/direction_status.py +133 -0
- zepben/ewb/services/network/tracing/feeder/feeder_direction.py +107 -0
- zepben/ewb/services/network/tracing/feeder/set_direction.py +143 -0
- zepben/ewb/services/network/tracing/find_swer_equipment.py +175 -0
- zepben/ewb/services/network/tracing/networktrace/__init__.py +4 -0
- zepben/ewb/services/network/tracing/networktrace/actions/__init__.py +4 -0
- zepben/ewb/services/network/tracing/networktrace/actions/equipment_tree_builder.py +104 -0
- zepben/ewb/services/network/tracing/networktrace/actions/tree_node.py +35 -0
- zepben/ewb/services/network/tracing/networktrace/compute_data.py +60 -0
- zepben/ewb/services/network/tracing/networktrace/conditions/__init__.py +4 -0
- zepben/ewb/services/network/tracing/networktrace/conditions/conditions.py +73 -0
- zepben/ewb/services/network/tracing/networktrace/conditions/direction_condition.py +63 -0
- zepben/ewb/services/network/tracing/networktrace/conditions/equipment_step_limit_condition.py +26 -0
- zepben/ewb/services/network/tracing/networktrace/conditions/equipment_type_step_limit_condition.py +44 -0
- zepben/ewb/services/network/tracing/networktrace/conditions/network_trace_queue_condition.py +67 -0
- zepben/ewb/services/network/tracing/networktrace/conditions/network_trace_stop_condition.py +65 -0
- zepben/ewb/services/network/tracing/networktrace/conditions/open_condition.py +39 -0
- zepben/ewb/services/network/tracing/networktrace/network_trace.py +433 -0
- zepben/ewb/services/network/tracing/networktrace/network_trace_action_type.py +42 -0
- zepben/ewb/services/network/tracing/networktrace/network_trace_queue_next.py +84 -0
- zepben/ewb/services/network/tracing/networktrace/network_trace_step.py +128 -0
- zepben/ewb/services/network/tracing/networktrace/network_trace_step_path_provider.py +351 -0
- zepben/ewb/services/network/tracing/networktrace/network_trace_tracker.py +39 -0
- zepben/ewb/services/network/tracing/networktrace/operators/__init__.py +14 -0
- zepben/ewb/services/network/tracing/networktrace/operators/equipment_container_state_operators.py +264 -0
- zepben/ewb/services/network/tracing/networktrace/operators/feeder_direction_state_operations.py +181 -0
- zepben/ewb/services/network/tracing/networktrace/operators/in_service_state_operators.py +76 -0
- zepben/ewb/services/network/tracing/networktrace/operators/network_state_operators.py +120 -0
- zepben/ewb/services/network/tracing/networktrace/operators/open_state_operators.py +104 -0
- zepben/ewb/services/network/tracing/networktrace/operators/phase_state_operators.py +56 -0
- zepben/ewb/services/network/tracing/networktrace/tracing.py +132 -0
- zepben/ewb/services/network/tracing/phases/__init__.py +4 -0
- zepben/ewb/services/network/tracing/phases/phase_inferrer.py +205 -0
- zepben/ewb/services/network/tracing/phases/phase_status.py +101 -0
- zepben/ewb/services/network/tracing/phases/remove_phases.py +143 -0
- zepben/ewb/services/network/tracing/phases/set_phases.py +490 -0
- zepben/ewb/services/network/tracing/traversal/__init__.py +4 -0
- zepben/ewb/services/network/tracing/traversal/context_value_computer.py +63 -0
- zepben/ewb/services/network/tracing/traversal/debug_logging.py +124 -0
- zepben/ewb/services/network/tracing/traversal/queue.py +112 -0
- zepben/ewb/services/network/tracing/traversal/queue_condition.py +75 -0
- zepben/ewb/services/network/tracing/traversal/step_action.py +83 -0
- zepben/ewb/services/network/tracing/traversal/step_context.py +59 -0
- zepben/ewb/services/network/tracing/traversal/stop_condition.py +57 -0
- zepben/ewb/services/network/tracing/traversal/traversal.py +634 -0
- zepben/ewb/services/network/tracing/traversal/traversal_condition.py +22 -0
- zepben/ewb/services/network/tracing/traversal/weighted_priority_queue.py +85 -0
- zepben/ewb/services/network/tracing/util.py +93 -0
- zepben/ewb/services/network/translator/__init__.py +392 -0
- zepben/ewb/services/network/translator/network_cim2proto.py +1867 -0
- zepben/ewb/services/network/translator/network_enum_mappers.py +78 -0
- zepben/ewb/services/network/translator/network_proto2cim.py +2201 -0
- zepben/ewb/services/services.py +48 -0
- zepben/ewb/streaming/__init__.py +4 -0
- zepben/ewb/streaming/data/__init__.py +4 -0
- zepben/ewb/streaming/data/current_state_event.py +314 -0
- zepben/ewb/streaming/data/current_state_event_batch.py +25 -0
- zepben/ewb/streaming/data/set_current_states_status.py +286 -0
- zepben/ewb/streaming/exceptions.py +14 -0
- zepben/ewb/streaming/get/__init__.py +4 -0
- zepben/ewb/streaming/get/consumer.py +209 -0
- zepben/ewb/streaming/get/customer_consumer.py +111 -0
- zepben/ewb/streaming/get/diagram_consumer.py +107 -0
- zepben/ewb/streaming/get/hierarchy/__init__.py +4 -0
- zepben/ewb/streaming/get/hierarchy/data.py +27 -0
- zepben/ewb/streaming/get/included_energized_containers.py +36 -0
- zepben/ewb/streaming/get/included_energizing_containers.py +36 -0
- zepben/ewb/streaming/get/network_consumer.py +870 -0
- zepben/ewb/streaming/get/query_network_state_client.py +64 -0
- zepben/ewb/streaming/get/query_network_state_service.py +94 -0
- zepben/ewb/streaming/grpc/__init__.py +4 -0
- zepben/ewb/streaming/grpc/auth_token_plugin.py +24 -0
- zepben/ewb/streaming/grpc/connect.py +209 -0
- zepben/ewb/streaming/grpc/grpc.py +107 -0
- zepben/ewb/streaming/grpc/grpc_channel_builder.py +190 -0
- zepben/ewb/streaming/mutations/__init__.py +4 -0
- zepben/ewb/streaming/mutations/update_network_state_client.py +80 -0
- zepben/ewb/streaming/mutations/update_network_state_service.py +61 -0
- zepben/ewb/testing/__init__.py +4 -0
- zepben/ewb/testing/test_network_builder.py +816 -0
- zepben/ewb/types.py +17 -0
- zepben/ewb/util.py +200 -0
- zepben_ewb-1.0.0.dist-info/METADATA +90 -0
- zepben_ewb-1.0.0.dist-info/RECORD +641 -0
- zepben_ewb-1.0.0.dist-info/WHEEL +5 -0
- zepben_ewb-1.0.0.dist-info/licenses/LICENSE +374 -0
- zepben_ewb-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# Copyright 2024 Zeppelin Bend Pty Ltd
|
|
2
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
3
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
4
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
__all__ = ["PowerTransformer"]
|
|
9
|
+
|
|
10
|
+
from typing import List, Optional, Generator, TYPE_CHECKING
|
|
11
|
+
|
|
12
|
+
from zepben.ewb.model.cim.extensions.iec61970.base.wires.vector_group import VectorGroup
|
|
13
|
+
from zepben.ewb.model.cim.iec61968.infiec61968.infassetinfo.transformer_construction_kind import TransformerConstructionKind
|
|
14
|
+
from zepben.ewb.model.cim.iec61968.infiec61968.infassetinfo.transformer_function_kind import TransformerFunctionKind
|
|
15
|
+
from zepben.ewb.model.cim.iec61970.base.core.conducting_equipment import ConductingEquipment
|
|
16
|
+
from zepben.ewb.util import require, nlen, get_by_mrid, ngen, safe_remove
|
|
17
|
+
|
|
18
|
+
if TYPE_CHECKING:
|
|
19
|
+
from zepben.ewb.model.cim.iec61968.assetinfo.power_transformer_info import PowerTransformerInfo
|
|
20
|
+
from zepben.ewb.model.cim.iec61970.base.core.terminal import Terminal
|
|
21
|
+
from zepben.ewb.model.cim.iec61970.base.wires.power_transformer_end import PowerTransformerEnd
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class PowerTransformer(ConductingEquipment):
|
|
25
|
+
"""
|
|
26
|
+
An electrical device consisting of two or more coupled windings, with or without a magnetic core, for introducing
|
|
27
|
+
mutual coupling between electric circuits.
|
|
28
|
+
|
|
29
|
+
Transformers can be used to control voltage and phase shift (active power flow). A power transformer may be composed of separate transformer tanks that
|
|
30
|
+
need not be identical. A power transformer can be modeled with or without tanks and is intended for use in both balanced and unbalanced representations.
|
|
31
|
+
|
|
32
|
+
A power transformer typically has two terminals, but may have one (grounding), three or more terminals.
|
|
33
|
+
|
|
34
|
+
The inherited association ConductingEquipment.BaseVoltage should not be used.
|
|
35
|
+
The association from TransformerEnd to BaseVoltage should be used instead.
|
|
36
|
+
|
|
37
|
+
Attributes -
|
|
38
|
+
vector_group : `zepben.protobuf.cim.iec61970.base.wires.VectorGroup` of the transformer for protective relaying.
|
|
39
|
+
power_transformer_ends :
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
"""
|
|
43
|
+
vector_group: VectorGroup = VectorGroup.UNKNOWN
|
|
44
|
+
"""
|
|
45
|
+
Vector group of the transformer for protective relaying, e.g., Dyn1. For unbalanced transformers, this may not be simply
|
|
46
|
+
determined from the constituent winding connections and phase angle displacements.
|
|
47
|
+
|
|
48
|
+
The vectorGroup string consists of the following components in the order listed: high voltage winding connection, mid
|
|
49
|
+
voltage winding connection(for three winding transformers), phase displacement clock number from 0 to 11, low voltage
|
|
50
|
+
winding connection phase displacement clock number from 0 to 11. The winding connections are D(delta), Y(wye),
|
|
51
|
+
YN(wye with neutral), Z(zigzag), ZN(zigzag with neutral), A(auto transformer). Upper case means the high voltage,
|
|
52
|
+
lower case mid or low.The high voltage winding always has clock position 0 and is not included in the vector group
|
|
53
|
+
string. Some examples: YNy0(two winding wye to wye with no phase displacement), YNd11(two winding wye to delta with
|
|
54
|
+
330 degrees phase displacement), YNyn0d5(three winding transformer wye with neutral high voltage, wye with neutral mid
|
|
55
|
+
voltage and no phase displacement, delta low voltage with 150 degrees displacement).
|
|
56
|
+
|
|
57
|
+
Phase displacement is defined as the angular difference between the phasors representing the voltages between the
|
|
58
|
+
neutral point(real or imaginary) and the corresponding terminals of two windings, a positive sequence voltage system
|
|
59
|
+
being applied to the high-voltage terminals, following each other in alphabetical sequence if they are lettered, or in
|
|
60
|
+
numerical sequence if they are numbered: the phasors are assumed to rotate in a counter-clockwise sense.
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
_power_transformer_ends: Optional[List[PowerTransformerEnd]] = None
|
|
64
|
+
|
|
65
|
+
transformer_utilisation: Optional[float] = None
|
|
66
|
+
"""
|
|
67
|
+
The fraction of the transformer’s normal capacity (nameplate rating) that is in use. It may be expressed as the
|
|
68
|
+
result of the calculation S/Sn, where S = Load on Transformer (in VA), Sn = Transformer Nameplate Rating (in VA).
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
construction_kind: TransformerConstructionKind = TransformerConstructionKind.unknown
|
|
72
|
+
"""
|
|
73
|
+
The construction kind of this transformer.
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
function: TransformerFunctionKind = TransformerFunctionKind.other
|
|
77
|
+
"""
|
|
78
|
+
The function of this transformer.
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
def __init__(self, power_transformer_ends: List[PowerTransformerEnd] = None, **kwargs):
|
|
82
|
+
super(PowerTransformer, self).__init__(**kwargs)
|
|
83
|
+
if power_transformer_ends:
|
|
84
|
+
for end in power_transformer_ends:
|
|
85
|
+
if end.power_transformer is None:
|
|
86
|
+
end.power_transformer = self
|
|
87
|
+
self.add_end(end)
|
|
88
|
+
|
|
89
|
+
def num_ends(self):
|
|
90
|
+
"""
|
|
91
|
+
Get the number of `PowerTransformerEnd`s for this `PowerTransformer`.
|
|
92
|
+
"""
|
|
93
|
+
return nlen(self._power_transformer_ends)
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def ends(self) -> Generator[PowerTransformerEnd, None, None]:
|
|
97
|
+
"""The `PowerTransformerEnd`s for this `PowerTransformer`."""
|
|
98
|
+
return ngen(self._power_transformer_ends)
|
|
99
|
+
|
|
100
|
+
@property
|
|
101
|
+
def power_transformer_info(self) -> Optional[PowerTransformerInfo]:
|
|
102
|
+
"""The `PowerTransformerInfo` for this `PowerTransformer`"""
|
|
103
|
+
return self.asset_info
|
|
104
|
+
|
|
105
|
+
@power_transformer_info.setter
|
|
106
|
+
def power_transformer_info(self, pti: Optional[PowerTransformerInfo]):
|
|
107
|
+
"""
|
|
108
|
+
Set the `PowerTransformerInfo` for this `PowerTransformer`
|
|
109
|
+
`pti` The `PowerTransformerInfo` to associate with this `PowerTransformer`
|
|
110
|
+
"""
|
|
111
|
+
self.asset_info = pti
|
|
112
|
+
|
|
113
|
+
def get_base_voltage(self, terminal: Terminal = None):
|
|
114
|
+
if terminal is None:
|
|
115
|
+
return self.base_voltage
|
|
116
|
+
for end in self.ends:
|
|
117
|
+
if end.terminal is terminal:
|
|
118
|
+
return end.base_voltage
|
|
119
|
+
else:
|
|
120
|
+
return None
|
|
121
|
+
|
|
122
|
+
def get_end_by_mrid(self, mrid: str) -> PowerTransformerEnd:
|
|
123
|
+
"""
|
|
124
|
+
Get the `PowerTransformerEnd` for this `PowerTransformer` identified by `mrid`
|
|
125
|
+
|
|
126
|
+
`mrid` the mRID of the required `PowerTransformerEnd`
|
|
127
|
+
Returns The `PowerTransformerEnd` with the specified `mrid` if it exists
|
|
128
|
+
Raises `KeyError` if `mrid` wasn't present.
|
|
129
|
+
"""
|
|
130
|
+
return get_by_mrid(self._power_transformer_ends, mrid)
|
|
131
|
+
|
|
132
|
+
def get_end_by_num(self, end_number: int) -> PowerTransformerEnd:
|
|
133
|
+
"""
|
|
134
|
+
Get the `PowerTransformerEnd` on this `PowerTransformer` by its `end_number`.
|
|
135
|
+
|
|
136
|
+
`end_number` The `end_number` of the `PowerTransformerEnd` in relation to this `PowerTransformer`s VectorGroup.
|
|
137
|
+
Returns The `PowerTransformerEnd` referred to by `end_number`
|
|
138
|
+
Raises IndexError if no `PowerTransformerEnd` was found with end_number `end_number`.
|
|
139
|
+
"""
|
|
140
|
+
if self._power_transformer_ends:
|
|
141
|
+
for end in self._power_transformer_ends:
|
|
142
|
+
if end.end_number == end_number:
|
|
143
|
+
return end
|
|
144
|
+
raise IndexError(f"No TransformerEnd with end_number {end_number} was found in PowerTransformer {str(self)}")
|
|
145
|
+
|
|
146
|
+
def get_end_by_terminal(self, terminal: Terminal) -> PowerTransformerEnd:
|
|
147
|
+
"""
|
|
148
|
+
Get the `PowerTransformerEnd` on this `PowerTransformer` by its `terminal`.
|
|
149
|
+
|
|
150
|
+
`terminal` The `terminal` to find a `PowerTransformerEnd` for.
|
|
151
|
+
Returns The `PowerTransformerEnd` connected to the specified `terminal`
|
|
152
|
+
Raises IndexError if no `PowerTransformerEnd` connected to `terminal` was found on this `PowerTransformer`.
|
|
153
|
+
"""
|
|
154
|
+
if self._power_transformer_ends:
|
|
155
|
+
for end in self._power_transformer_ends:
|
|
156
|
+
if end.terminal is terminal:
|
|
157
|
+
return end
|
|
158
|
+
raise IndexError(f"No TransformerEnd with terminal {terminal} was found in PowerTransformer {str(self)}")
|
|
159
|
+
|
|
160
|
+
def add_end(self, end: PowerTransformerEnd) -> PowerTransformer:
|
|
161
|
+
"""
|
|
162
|
+
Associate a `PowerTransformerEnd` with this `PowerTransformer`. If `end.end_number` == 0, the end will be assigned an end_number of
|
|
163
|
+
`self.num_ends() + 1`.
|
|
164
|
+
|
|
165
|
+
`end` the `PowerTransformerEnd` to associate with this `PowerTransformer`.
|
|
166
|
+
Returns A reference to this `PowerTransformer` to allow fluent use.
|
|
167
|
+
Raises `ValueError` if another `PowerTransformerEnd` with the same `mrid` already exists for this `PowerTransformer`.
|
|
168
|
+
"""
|
|
169
|
+
if self._validate_end(end):
|
|
170
|
+
return self
|
|
171
|
+
|
|
172
|
+
if end.end_number == 0:
|
|
173
|
+
end.end_number = self.num_ends() + 1
|
|
174
|
+
|
|
175
|
+
self._power_transformer_ends = list() if self._power_transformer_ends is None else self._power_transformer_ends
|
|
176
|
+
self._power_transformer_ends.append(end)
|
|
177
|
+
self._power_transformer_ends.sort(key=lambda t: t.end_number)
|
|
178
|
+
return self
|
|
179
|
+
|
|
180
|
+
def remove_end(self, end: PowerTransformerEnd) -> PowerTransformer:
|
|
181
|
+
"""
|
|
182
|
+
`end` the `PowerTransformerEnd` to disassociate from this `PowerTransformer`.
|
|
183
|
+
Raises `ValueError` if `end` was not associated with this `PowerTransformer`.
|
|
184
|
+
Returns A reference to this `PowerTransformer` to allow fluent use.
|
|
185
|
+
"""
|
|
186
|
+
self._power_transformer_ends = safe_remove(self._power_transformer_ends, end)
|
|
187
|
+
return self
|
|
188
|
+
|
|
189
|
+
def clear_ends(self) -> PowerTransformer:
|
|
190
|
+
"""
|
|
191
|
+
Clear all `PowerTransformerEnd`s.
|
|
192
|
+
Returns A reference to this `PowerTransformer` to allow fluent use.
|
|
193
|
+
"""
|
|
194
|
+
self._power_transformer_ends.clear()
|
|
195
|
+
return self
|
|
196
|
+
|
|
197
|
+
def _validate_end(self, end: PowerTransformerEnd) -> bool:
|
|
198
|
+
"""
|
|
199
|
+
Validate an end against this `PowerTransformer`'s `PowerTransformerEnd`s.
|
|
200
|
+
|
|
201
|
+
`end` The `PowerTransformerEnd` to validate.
|
|
202
|
+
Returns True if `end` is already associated with this `PowerTransformer`, otherwise False.
|
|
203
|
+
Raises `ValueError` if `end.power_transformer` is not this `PowerTransformer`, or if this `PowerTransformer` has a different `PowerTransformerEnd`
|
|
204
|
+
with the same mRID.
|
|
205
|
+
"""
|
|
206
|
+
if self._validate_reference(end, self.get_end_by_mrid, "A PowerTransformerEnd"):
|
|
207
|
+
return True
|
|
208
|
+
|
|
209
|
+
if self._validate_reference_by_field(end, end.end_number, self.get_end_by_num, "end_number"):
|
|
210
|
+
return True
|
|
211
|
+
|
|
212
|
+
if not end.power_transformer:
|
|
213
|
+
end.power_transformer = self
|
|
214
|
+
|
|
215
|
+
require(end.power_transformer is self,
|
|
216
|
+
lambda: f"PowerTransformerEnd {end} references another PowerTransformer {end.power_transformer}, expected {str(self)}.")
|
|
217
|
+
return False
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Copyright 2025 Zeppelin Bend Pty Ltd
|
|
2
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
3
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
4
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
__all__ = ["PowerTransformerEnd"]
|
|
9
|
+
|
|
10
|
+
import warnings
|
|
11
|
+
from typing import Optional, List, Generator, TYPE_CHECKING
|
|
12
|
+
|
|
13
|
+
from zepben.ewb.model.cim.extensions.iec61970.base.wires.transformer_cooling_type import TransformerCoolingType
|
|
14
|
+
from zepben.ewb.model.cim.extensions.iec61970.base.wires.transformer_end_rated_s import TransformerEndRatedS
|
|
15
|
+
from zepben.ewb.model.cim.iec61970.base.wires.transformer_end import TransformerEnd
|
|
16
|
+
from zepben.ewb.model.cim.iec61970.base.wires.winding_connection import WindingConnection
|
|
17
|
+
from zepben.ewb.model.resistance_reactance import ResistanceReactance
|
|
18
|
+
from zepben.ewb.util import ngen, nlen, safe_remove
|
|
19
|
+
|
|
20
|
+
if TYPE_CHECKING:
|
|
21
|
+
from zepben.ewb.model.cim.iec61970.base.wires.power_transformer import PowerTransformer
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class PowerTransformerEnd(TransformerEnd):
|
|
25
|
+
"""
|
|
26
|
+
A PowerTransformerEnd is associated with each Terminal of a PowerTransformer.
|
|
27
|
+
|
|
28
|
+
The impedance values r, r0, x, and x0 of a PowerTransformerEnd represents a star equivalent as follows
|
|
29
|
+
|
|
30
|
+
1) for a two Terminal PowerTransformer the high voltage PowerTransformerEnd has non-zero values on r, r0, x, and x0
|
|
31
|
+
while the low voltage PowerTransformerEnd has zero values for r, r0, x, and x0.
|
|
32
|
+
2) for a three Terminal PowerTransformer the three PowerTransformerEnds represents a star equivalent with each leg
|
|
33
|
+
in the star represented by r, r0, x, and x0 values.
|
|
34
|
+
3) For a three Terminal transformer each PowerTransformerEnd shall have g, g0, b and b0 values corresponding the no load losses
|
|
35
|
+
distributed on the three PowerTransformerEnds. The total no load loss shunt impedances may also be placed at one of the
|
|
36
|
+
PowerTransformerEnds, preferably the end numbered 1, having the shunt values on end 1 is the preferred way.
|
|
37
|
+
4) for a PowerTransformer with more than three Terminals the PowerTransformerEnd impedance values cannot be used.
|
|
38
|
+
Instead use the TransformerMeshImpedance or split the transformer into multiple PowerTransformers.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
_power_transformer: Optional[PowerTransformer] = None
|
|
42
|
+
"""The power transformer of this power transformer end."""
|
|
43
|
+
_rated_s: Optional[int] = None
|
|
44
|
+
|
|
45
|
+
rated_u: Optional[int] = None
|
|
46
|
+
"""Rated voltage: phase-phase for three-phase windings, and either phase-phase or phase-neutral for single-phase windings. A high voltage side, as given by
|
|
47
|
+
TransformerEnd.endNumber, shall have a ratedU that is greater or equal than ratedU for the lower voltage sides."""
|
|
48
|
+
|
|
49
|
+
r: Optional[float] = None
|
|
50
|
+
"""Resistance (star-phases) of the transformer end. The attribute shall be equal or greater than zero for non-equivalent transformers."""
|
|
51
|
+
|
|
52
|
+
x: Optional[float] = None
|
|
53
|
+
"""Positive sequence series reactance (star-phases) of the transformer end."""
|
|
54
|
+
|
|
55
|
+
r0: Optional[float] = None
|
|
56
|
+
"""Zero sequence series resistance (star-phases) of the transformer end."""
|
|
57
|
+
|
|
58
|
+
x0: Optional[float] = None
|
|
59
|
+
"""Zero sequence series reactance of the transformer end."""
|
|
60
|
+
|
|
61
|
+
g: Optional[float] = None
|
|
62
|
+
"""Magnetizing branch conductance."""
|
|
63
|
+
|
|
64
|
+
g0: Optional[float] = None
|
|
65
|
+
"""Zero sequence magnetizing branch conductance (star-phases)."""
|
|
66
|
+
|
|
67
|
+
b: Optional[float] = None
|
|
68
|
+
"""Magnetizing branch susceptance (B mag). The value can be positive or negative."""
|
|
69
|
+
|
|
70
|
+
b0: Optional[float] = None
|
|
71
|
+
"""Zero sequence magnetizing branch susceptance."""
|
|
72
|
+
|
|
73
|
+
connection_kind: WindingConnection = WindingConnection.UNKNOWN
|
|
74
|
+
"""Kind of `zepben.protobuf.cim.iec61970.base.wires.winding_connection.WindingConnection` for this end."""
|
|
75
|
+
|
|
76
|
+
phase_angle_clock: Optional[int] = None
|
|
77
|
+
"""Terminal voltage phase angle displacement where 360 degrees are represented with clock hours. The valid values are 0 to 11. For example, for the
|
|
78
|
+
secondary side end of a transformer with vector group code of 'Dyn11', specify the connection kind as wye with neutral and specify the phase angle of the
|
|
79
|
+
clock as 11. The clock value of the transformer end number specified as 1, is assumed to be zero."""
|
|
80
|
+
|
|
81
|
+
_s_ratings: Optional[List[TransformerEndRatedS]] = None
|
|
82
|
+
"""
|
|
83
|
+
Backing list for storing transformer ratings. Placed here to not mess with __init__ param order. Must always be placed at the end.
|
|
84
|
+
Should not be used directly, instead use add_rating and get_rating functions.
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
def __init__(self, power_transformer: PowerTransformer = None, rated_s: int = None, **kwargs):
|
|
88
|
+
super(PowerTransformerEnd, self).__init__(**kwargs)
|
|
89
|
+
if power_transformer:
|
|
90
|
+
self.power_transformer = power_transformer
|
|
91
|
+
if self._s_ratings:
|
|
92
|
+
raise ValueError("Do not directly set s_ratings through the constructor. You have one more constructor parameter than expected.")
|
|
93
|
+
if rated_s and self._rated_s:
|
|
94
|
+
raise ValueError(f"Cannot specify both rated_s and _rated_s properties when constructing {self}. Check your constructor parameters.")
|
|
95
|
+
if rated_s is not None:
|
|
96
|
+
warnings.warn(
|
|
97
|
+
"`rated_s` has been replaced by `s_ratings`. Please use `add_rating()` to add one of more ratings and their related [TransformerCoolingType].",
|
|
98
|
+
DeprecationWarning,
|
|
99
|
+
stacklevel=3
|
|
100
|
+
)
|
|
101
|
+
self.rated_s = rated_s
|
|
102
|
+
if self._rated_s is not None:
|
|
103
|
+
self.rated_s = self._rated_s
|
|
104
|
+
self._rated_s = None
|
|
105
|
+
|
|
106
|
+
@property
|
|
107
|
+
def power_transformer(self):
|
|
108
|
+
"""The power transformer of this power transformer end."""
|
|
109
|
+
return self._power_transformer
|
|
110
|
+
|
|
111
|
+
@power_transformer.setter
|
|
112
|
+
def power_transformer(self, pt):
|
|
113
|
+
if self._power_transformer is None or self._power_transformer is pt:
|
|
114
|
+
self._power_transformer = pt
|
|
115
|
+
else:
|
|
116
|
+
raise ValueError(f"power_transformer for {str(self)} has already been set to {self._power_transformer}, cannot reset this field to {pt}")
|
|
117
|
+
|
|
118
|
+
@property
|
|
119
|
+
def nominal_voltage(self):
|
|
120
|
+
return self.base_voltage.nominal_voltage if self.base_voltage else self.rated_u
|
|
121
|
+
|
|
122
|
+
@property
|
|
123
|
+
def rated_s(self) -> Optional[int]:
|
|
124
|
+
"""
|
|
125
|
+
Normal apparent power rating. The attribute shall be a positive value. For a two-winding transformer the values for the high and low voltage sides
|
|
126
|
+
shall be identical.
|
|
127
|
+
"""
|
|
128
|
+
if self._s_ratings:
|
|
129
|
+
return self._s_ratings[0].rated_s if len(self._s_ratings) > 0 else None
|
|
130
|
+
return None
|
|
131
|
+
|
|
132
|
+
@rated_s.setter
|
|
133
|
+
def rated_s(self, rated_s: Optional[int]):
|
|
134
|
+
warnings.warn(
|
|
135
|
+
"`rated_s` has been replaced by `s_ratings` and is only for backward compatibility. Setting `rated_s`, will clear any other ratings.",
|
|
136
|
+
DeprecationWarning,
|
|
137
|
+
stacklevel=2
|
|
138
|
+
)
|
|
139
|
+
self.clear_ratings()
|
|
140
|
+
if rated_s is not None:
|
|
141
|
+
self.add_transformer_end_rated_s(TransformerEndRatedS(TransformerCoolingType.UNKNOWN, rated_s))
|
|
142
|
+
|
|
143
|
+
@property
|
|
144
|
+
def s_ratings(self) -> Generator[TransformerEndRatedS, None, None]:
|
|
145
|
+
return ngen(self._s_ratings)
|
|
146
|
+
|
|
147
|
+
def num_ratings(self) -> int:
|
|
148
|
+
return nlen(self._s_ratings)
|
|
149
|
+
|
|
150
|
+
def get_rating(self, cooling_type: TransformerCoolingType) -> TransformerEndRatedS:
|
|
151
|
+
if self._s_ratings:
|
|
152
|
+
for s_rating in self._s_ratings:
|
|
153
|
+
if s_rating.cooling_type == cooling_type:
|
|
154
|
+
return s_rating
|
|
155
|
+
raise KeyError(cooling_type)
|
|
156
|
+
|
|
157
|
+
def add_rating(self, rated_s: int, cooling_type: TransformerCoolingType = TransformerCoolingType.UNKNOWN) -> PowerTransformerEnd:
|
|
158
|
+
self._s_ratings = self._s_ratings if self._s_ratings else list()
|
|
159
|
+
|
|
160
|
+
for s_rating in self._s_ratings:
|
|
161
|
+
if s_rating.cooling_type == cooling_type:
|
|
162
|
+
raise ValueError(f"A rating for coolingType {cooling_type.name} already exists, please remove it first.")
|
|
163
|
+
|
|
164
|
+
self._s_ratings.append(TransformerEndRatedS(cooling_type, rated_s))
|
|
165
|
+
|
|
166
|
+
def sort_by_rated_s(t: TransformerEndRatedS) -> int:
|
|
167
|
+
return t.rated_s
|
|
168
|
+
|
|
169
|
+
self._s_ratings.sort(key=sort_by_rated_s, reverse=True)
|
|
170
|
+
|
|
171
|
+
return self
|
|
172
|
+
|
|
173
|
+
def add_transformer_end_rated_s(self, transformer_end_rated_s: TransformerEndRatedS) -> PowerTransformerEnd:
|
|
174
|
+
return self.add_rating(transformer_end_rated_s.rated_s, transformer_end_rated_s.cooling_type)
|
|
175
|
+
|
|
176
|
+
def remove_rating(self, transformer_end_rated_s: TransformerEndRatedS) -> PowerTransformerEnd:
|
|
177
|
+
self._s_ratings = safe_remove(self._s_ratings, transformer_end_rated_s)
|
|
178
|
+
return self
|
|
179
|
+
|
|
180
|
+
def remove_rating_by_cooling_type(self, cooling_type: TransformerCoolingType) -> TransformerEndRatedS:
|
|
181
|
+
if self._s_ratings:
|
|
182
|
+
for transformer_end_rated_s in self._s_ratings:
|
|
183
|
+
if transformer_end_rated_s.cooling_type == cooling_type:
|
|
184
|
+
self._s_ratings.remove(transformer_end_rated_s)
|
|
185
|
+
self._s_ratings = self._s_ratings if self._s_ratings else None
|
|
186
|
+
return transformer_end_rated_s
|
|
187
|
+
raise IndexError(cooling_type)
|
|
188
|
+
|
|
189
|
+
def clear_ratings(self) -> PowerTransformerEnd:
|
|
190
|
+
self._s_ratings = None
|
|
191
|
+
return self
|
|
192
|
+
|
|
193
|
+
def resistance_reactance(self):
|
|
194
|
+
"""
|
|
195
|
+
Get the `ResistanceReactance` for this `PowerTransformerEnd` from either:
|
|
196
|
+
1. directly assigned values or
|
|
197
|
+
2. the pre-calculated `starImpedance` or
|
|
198
|
+
3. from the datasheet information of the associated `powerTransformer`
|
|
199
|
+
|
|
200
|
+
If the data is not complete in any of the above it will merge in the missing values from the subsequent sources.
|
|
201
|
+
:return:
|
|
202
|
+
"""
|
|
203
|
+
ResistanceReactance(self.r, self.x, self.r0, self.x0).merge_if_incomplete(
|
|
204
|
+
lambda: self.star_impedance.resistance_reactance() if self.star_impedance is not None else None
|
|
205
|
+
).merge_if_incomplete(
|
|
206
|
+
lambda: self.power_transformer.power_transformer_info.resistance_reactance(self.end_number) if self.power_transformer.asset_info is not None
|
|
207
|
+
else None
|
|
208
|
+
)
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Copyright 2024 Zeppelin Bend Pty Ltd
|
|
2
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
3
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
4
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
__all__ = ["ProtectedSwitch"]
|
|
9
|
+
|
|
10
|
+
from typing import Optional, List, Generator, TYPE_CHECKING, Iterable
|
|
11
|
+
|
|
12
|
+
from zepben.ewb.model.cim.iec61970.base.wires.switch import Switch
|
|
13
|
+
from zepben.ewb.util import get_by_mrid, ngen, nlen, safe_remove
|
|
14
|
+
|
|
15
|
+
if TYPE_CHECKING:
|
|
16
|
+
from zepben.ewb.model.cim.extensions.iec61970.base.protection.protection_relay_function import ProtectionRelayFunction
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ProtectedSwitch(Switch):
|
|
20
|
+
"""
|
|
21
|
+
A ProtectedSwitch is a switching device that can be operated by :class:`ProtectionRelayFunction`.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
breaking_capacity: Optional[int] = None
|
|
25
|
+
"""The maximum fault current in amps a breaking device can break safely under prescribed conditions of use."""
|
|
26
|
+
|
|
27
|
+
_relay_functions: Optional[List[ProtectionRelayFunction]] = None
|
|
28
|
+
|
|
29
|
+
def __init__(
|
|
30
|
+
self,
|
|
31
|
+
relay_functions: Iterable[ProtectionRelayFunction] = None,
|
|
32
|
+
**kwargs
|
|
33
|
+
):
|
|
34
|
+
super(ProtectedSwitch, self).__init__(**kwargs)
|
|
35
|
+
|
|
36
|
+
# breaking_capacity is handled via dataclassy.
|
|
37
|
+
if relay_functions is not None:
|
|
38
|
+
for relay_function in relay_functions:
|
|
39
|
+
self.add_relay_function(relay_function)
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def relay_functions(self) -> Generator[ProtectionRelayFunction, None, None]:
|
|
43
|
+
"""
|
|
44
|
+
Yields all :class:`ProtectionRelayFunctions<ProtectionRelayFunction>` operating this :class:`ProtectedSwitch`.
|
|
45
|
+
|
|
46
|
+
:return: A generator that iterates over all :class:`ProtectionRelayFunctions<ProtectionRelayFunction>` operating this :class:`ProtectedSwitch`.
|
|
47
|
+
"""
|
|
48
|
+
return ngen(self._relay_functions)
|
|
49
|
+
|
|
50
|
+
def num_relay_functions(self) -> int:
|
|
51
|
+
"""
|
|
52
|
+
Get the number of :class:`ProtectionRelayFunctions<ProtectionRelayFunction>` operating this :class:`ProtectedSwitch`.
|
|
53
|
+
|
|
54
|
+
:return: The number of :class:`ProtectionRelayFunctions<ProtectionRelayFunction>` operating this :class:`ProtectedSwitch`.
|
|
55
|
+
"""
|
|
56
|
+
return nlen(self._relay_functions)
|
|
57
|
+
|
|
58
|
+
def get_relay_function(self, mrid: str) -> ProtectionRelayFunction:
|
|
59
|
+
"""
|
|
60
|
+
Get a :class:`ProtectionRelayFunction` operating this :class:`ProtectedSwitch` with the specified `mrid`.
|
|
61
|
+
|
|
62
|
+
:param mrid: The mRID of the desired :class:`ProtectionRelayFunction`
|
|
63
|
+
:return: The :class:`ProtectionRelayFunction` with the specified mRID if it exists, otherwise None.
|
|
64
|
+
:raises KeyError: If `mrid` wasn't present.
|
|
65
|
+
"""
|
|
66
|
+
return get_by_mrid(self._relay_functions, mrid)
|
|
67
|
+
|
|
68
|
+
def add_relay_function(self, relay_function: ProtectionRelayFunction) -> ProtectedSwitch:
|
|
69
|
+
"""
|
|
70
|
+
Associate this :class:`ProtectedSwitch` with a :class:`ProtectionRelayFunction` operating it.
|
|
71
|
+
:param relay_function: The :class:`ProtectionRelayFunction` to associate with this :class:`ProtectedSwitch`.
|
|
72
|
+
:return: A reference to this :class:`ProtectedSwitch` for fluent use.
|
|
73
|
+
"""
|
|
74
|
+
if self._validate_reference(relay_function, self.get_relay_function, "A ProtectionRelayFunction"):
|
|
75
|
+
return self
|
|
76
|
+
|
|
77
|
+
self._relay_functions = list() if self._relay_functions is None else self._relay_functions
|
|
78
|
+
self._relay_functions.append(relay_function)
|
|
79
|
+
return self
|
|
80
|
+
|
|
81
|
+
def remove_relay_function(self, relay_function: Optional[ProtectionRelayFunction]) -> ProtectedSwitch:
|
|
82
|
+
"""
|
|
83
|
+
Disassociate this :class:`ProtectedSwitch` from a :class:`ProtectionRelayFunction`.
|
|
84
|
+
:param relay_function: The :class:`ProtectionRelayFunction` to disassociate from this :class:`ProtectedSwitch`.
|
|
85
|
+
:return: A reference to this :class:`ProtectedSwitch` for fluent use.
|
|
86
|
+
"""
|
|
87
|
+
self._relay_functions = safe_remove(self._relay_functions, relay_function)
|
|
88
|
+
return self
|
|
89
|
+
|
|
90
|
+
def clear_relay_functions(self) -> ProtectedSwitch:
|
|
91
|
+
"""
|
|
92
|
+
Disassociate all :class:`ProtectionRelayFunction` from this :class:`ProtectedSwitch`.
|
|
93
|
+
:return: A reference to this :class:`ProtectedSwitch` for fluent use.
|
|
94
|
+
"""
|
|
95
|
+
self._relay_functions = None
|
|
96
|
+
return self
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Copyright 2025 Zeppelin Bend Pty Ltd
|
|
2
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
3
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
4
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
__all__ = ["RatioTapChanger"]
|
|
9
|
+
|
|
10
|
+
from typing import Optional, TYPE_CHECKING
|
|
11
|
+
|
|
12
|
+
from zepben.ewb.model.cim.iec61970.base.wires.tap_changer import TapChanger
|
|
13
|
+
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from zepben.ewb.model.cim.iec61970.base.wires.transformer_end import TransformerEnd
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class RatioTapChanger(TapChanger):
|
|
19
|
+
"""
|
|
20
|
+
A tap changer that changes the voltage ratio impacting the voltage magnitude but not the phase angle across the transformer.
|
|
21
|
+
|
|
22
|
+
Angle sign convention (general): Positive value indicates a positive phase shift from the winding where the tap is located to the other winding
|
|
23
|
+
(for a two-winding transformer).
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
transformer_end: Optional[TransformerEnd] = None
|
|
27
|
+
"""`TransformerEnd` to which this ratio tap changer belongs."""
|
|
28
|
+
|
|
29
|
+
step_voltage_increment: Optional[float] = None
|
|
30
|
+
"""Tap step increment, in per cent of neutral voltage, per step position."""
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Copyright 2024 Zeppelin Bend Pty Ltd
|
|
2
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
3
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
4
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
5
|
+
|
|
6
|
+
__all__ = ["ReactiveCapabilityCurve"]
|
|
7
|
+
|
|
8
|
+
from zepben.ewb.model.cim.iec61970.base.core.curve import Curve
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ReactiveCapabilityCurve(Curve):
|
|
12
|
+
"""
|
|
13
|
+
Reactive power rating envelope versus the synchronous machine's active power, in both the generating and motoring modes. For each active power value there
|
|
14
|
+
is a corresponding high and low reactive power limit value. Typically, there will be a separate curve for each coolant condition, such as hydrogen pressure.
|
|
15
|
+
The Y1 axis values represent reactive minimum and the Y2 axis values represent reactive maximum.
|
|
16
|
+
"""
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Copyright 2024 Zeppelin Bend Pty Ltd
|
|
2
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
3
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
4
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
5
|
+
|
|
6
|
+
__all__ = ["Recloser"]
|
|
7
|
+
|
|
8
|
+
from zepben.ewb.model.cim.iec61970.base.wires.protected_switch import ProtectedSwitch
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Recloser(ProtectedSwitch):
|
|
12
|
+
"""
|
|
13
|
+
Pole-mounted fault interrupter with built-in phase and ground relays, current transformer (CT), and supplemental controls.
|
|
14
|
+
"""
|
|
15
|
+
pass
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Copyright 2025 Zeppelin Bend Pty Ltd
|
|
2
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
3
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
4
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
__all__ = ["RegulatingCondEq"]
|
|
9
|
+
|
|
10
|
+
from typing import Optional, TYPE_CHECKING
|
|
11
|
+
|
|
12
|
+
from zepben.ewb.model.cim.iec61970.base.wires.energy_connection import EnergyConnection
|
|
13
|
+
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from zepben.ewb.model.cim.iec61970.base.wires.regulating_control import RegulatingControl
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class RegulatingCondEq(EnergyConnection):
|
|
19
|
+
"""
|
|
20
|
+
A short section of conductor with negligible impedance which can be manually removed and replaced if the circuit is
|
|
21
|
+
de-energized. Note that zero-impedance branches can potentially be modeled by other equipment types.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
control_enabled: Optional[bool] = None
|
|
25
|
+
"""Specifies the regulation status of the equipment. True is regulating, false is not regulating."""
|
|
26
|
+
|
|
27
|
+
_regulating_control: Optional[RegulatingControl] = None
|
|
28
|
+
|
|
29
|
+
def __init__(self, regulating_control: Optional[RegulatingControl] = None, **kwargs):
|
|
30
|
+
super(RegulatingCondEq, self).__init__(**kwargs)
|
|
31
|
+
self.regulating_control = regulating_control
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def regulating_control(self):
|
|
35
|
+
"""
|
|
36
|
+
The `RegulatingControl` associated with this `RegulatingCondEq`
|
|
37
|
+
"""
|
|
38
|
+
return self._regulating_control
|
|
39
|
+
|
|
40
|
+
@regulating_control.setter
|
|
41
|
+
def regulating_control(self, rc):
|
|
42
|
+
if self._regulating_control is None or rc is self._regulating_control:
|
|
43
|
+
self._regulating_control = rc
|
|
44
|
+
else:
|
|
45
|
+
raise ValueError(f"regulating_control for {str(self)} has already been set to {self._regulating_control}, cannot set this field again")
|