zepben.ewb 1.0.0b1__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/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 +173 -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/column.py +37 -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 +142 -0
- zepben/ewb/database/sqlite/tables/table_metadata_data_sources.py +21 -0
- zepben/ewb/database/sqlite/tables/table_version.py +38 -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 +35 -0
- zepben/ewb/model/cim/extensions/iec61970/base/protection/protection_kind.py +113 -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 +82 -0
- zepben/ewb/model/cim/extensions/iec61970/base/wires/transformer_cooling_type.py +56 -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 +292 -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 +55 -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 +45 -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 +67 -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 +67 -0
- zepben/ewb/model/cim/iec61968/infiec61968/infassetinfo/transformer_function_kind.py +43 -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 +25 -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 +150 -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 +46 -0
- zepben/ewb/model/cim/iec61968/metering/meter.py +26 -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 +28 -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 +124 -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 +234 -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 +201 -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 +26 -0
- zepben/ewb/model/cim/iec61970/base/diagramlayout/orientation_kind.py +27 -0
- zepben/ewb/model/cim/iec61970/base/domain/__init__.py +4 -0
- zepben/ewb/model/cim/iec61970/base/domain/unit_symbol.py +492 -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 +37 -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 +16 -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 +38 -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 +46 -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 +105 -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 +28 -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 +44 -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 +43 -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 +92 -0
- zepben/ewb/services/common/translator/base_proto2cim.py +112 -0
- zepben/ewb/services/common/translator/service_differences.py +81 -0
- zepben/ewb/services/common/translator/util.py +78 -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 +34 -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 +71 -0
- zepben/ewb/services/network/tracing/networktrace/actions/tree_node.py +37 -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 +450 -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 +125 -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 +1782 -0
- zepben/ewb/services/network/translator/network_enum_mappers.py +78 -0
- zepben/ewb/services/network/translator/network_proto2cim.py +2147 -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 +34 -0
- zepben/ewb/streaming/get/included_energizing_containers.py +34 -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 +185 -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 +189 -0
- zepben_ewb-1.0.0b1.dist-info/METADATA +102 -0
- zepben_ewb-1.0.0b1.dist-info/RECORD +639 -0
- zepben_ewb-1.0.0b1.dist-info/WHEEL +5 -0
- zepben_ewb-1.0.0b1.dist-info/licenses/LICENSE +374 -0
- zepben_ewb-1.0.0b1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,173 @@
|
|
|
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__ = ["RegulatingControl"]
|
|
9
|
+
|
|
10
|
+
from typing import Optional, List, Generator, Iterable, TYPE_CHECKING
|
|
11
|
+
|
|
12
|
+
from zepben.ewb.model.cim.iec61970.base.core.phase_code import PhaseCode
|
|
13
|
+
from zepben.ewb.model.cim.iec61970.base.core.power_system_resource import PowerSystemResource
|
|
14
|
+
from zepben.ewb.model.cim.iec61970.base.wires.regulating_control_mode_kind import RegulatingControlModeKind
|
|
15
|
+
from zepben.ewb.util import nlen, get_by_mrid, safe_remove, ngen
|
|
16
|
+
|
|
17
|
+
if TYPE_CHECKING:
|
|
18
|
+
from zepben.ewb.model.cim.iec61970.base.core.terminal import Terminal
|
|
19
|
+
from zepben.ewb.model.cim.iec61970.base.wires.regulating_cond_eq import RegulatingCondEq
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class RegulatingControl(PowerSystemResource):
|
|
23
|
+
"""
|
|
24
|
+
Specifies a set of equipment that works together to control a power system quantity such as voltage or flow. Remote bus voltage control is possible by
|
|
25
|
+
specifying the controlled terminal located at some place remote from the controlling equipment. The specified terminal shall be associated with the
|
|
26
|
+
connectivity node of the controlled point. The most specific subtype of RegulatingControl shall be used in case such equipment participate in the
|
|
27
|
+
control, e.g. TapChangerControl for tap changers.
|
|
28
|
+
|
|
29
|
+
For flow control, load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment.
|
|
30
|
+
|
|
31
|
+
The attribute minAllowedTargetValue and maxAllowedTargetValue are required in the following cases: For a power generating module operated in power factor
|
|
32
|
+
control mode to specify maximum and minimum power factor values; Whenever it is necessary to have an off center target voltage for the tap changer
|
|
33
|
+
regulator. For instance, due to long cables to off shore wind farms and the need to have a simpler setup at the off shore transformer platform,
|
|
34
|
+
the voltage is controlled from the land at the connection point for the off shore wind farm.
|
|
35
|
+
|
|
36
|
+
Since there usually is a voltage rise along the cable, there is typically an overvoltage of up 3-4 kV compared to the on shore station. Thus in normal
|
|
37
|
+
operation the tap changer on the on shore station is operated with a target set point, which is in the lower parts of the dead band.
|
|
38
|
+
|
|
39
|
+
The attributes minAllowedTargetValue and maxAllowedTargetValue are not related to the attribute targetDeadband and thus they are not treated as an
|
|
40
|
+
alternative of the targetDeadband. They are needed due to limitations in the local substation controller.
|
|
41
|
+
|
|
42
|
+
The attribute targetDeadband is used to prevent the power flow from move the tap position in circles (hunting) that is to be used regardless of the
|
|
43
|
+
attributes minAllowedTargetValue and maxAllowedTargetValue.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
discrete: Optional[bool] = None
|
|
47
|
+
"""The regulation is performed in a discrete mode. This applies to equipment with discrete controls, e.g. tap changers and shunt compensators."""
|
|
48
|
+
|
|
49
|
+
mode: [RegulatingControlModeKind] = RegulatingControlModeKind.UNKNOWN
|
|
50
|
+
"""
|
|
51
|
+
The regulating control mode presently available. This specification allows for determining the kind of regulation without need for obtaining the
|
|
52
|
+
units from a schedule.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
monitored_phase: [PhaseCode] = PhaseCode.NONE
|
|
56
|
+
"""Phase voltage controlling this regulator, measured at regulator location."""
|
|
57
|
+
|
|
58
|
+
target_deadband: Optional[float] = None
|
|
59
|
+
"""
|
|
60
|
+
This is a deadband used with discrete control to avoid excessive update of controls like tap changers and shunt compensator banks while regulating.
|
|
61
|
+
The units are the base units appropriate for the mode. The attribute shall be a positive value or zero. If RegulatingControl.discrete is set to "false",
|
|
62
|
+
the RegulatingControl.target_deadband is to be ignored. Note that for instance, if the targetValue is 100 kV and the targetDeadband is 2 kV the range is
|
|
63
|
+
from 99 to 101 kV.
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
target_value: Optional[float] = None
|
|
67
|
+
"""
|
|
68
|
+
The target value specified for case input. This value can be used for the target value without the use of schedules. The value has the units appropriate
|
|
69
|
+
to the mode attribute.
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
enabled: Optional[bool] = None
|
|
73
|
+
"""The flag tells if regulation is enabled."""
|
|
74
|
+
|
|
75
|
+
max_allowed_target_value: Optional[float] = None
|
|
76
|
+
"""Maximum allowed target value (RegulatingControl.targetValue)."""
|
|
77
|
+
|
|
78
|
+
min_allowed_target_value: Optional[float] = None
|
|
79
|
+
"""Minimum allowed target value (RegulatingControl.targetValue)."""
|
|
80
|
+
|
|
81
|
+
rated_current: Optional[float] = None
|
|
82
|
+
"""The rated current of associated CT in amps for this RegulatingControl. Forms the base used to convert Line Drop Compensation settings from ohms to
|
|
83
|
+
voltage."""
|
|
84
|
+
|
|
85
|
+
terminal: Optional[Terminal] = None
|
|
86
|
+
"""
|
|
87
|
+
The terminal associated with this regulating control. The terminal is associated instead of a node, since the terminal could connect into either a
|
|
88
|
+
topological node or a connectivity node. Sometimes it is useful to model regulation at a terminal of a bus bar object.
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
ct_primary: Optional[float] = None
|
|
92
|
+
"""
|
|
93
|
+
[ZBEX]
|
|
94
|
+
Current rating of the CT, expressed in terms of the current (in Amperes) that flows in the Primary where the 'Primary' is the conductor
|
|
95
|
+
being monitored. It ensures proper operation of the regulating equipment by providing the necessary current references for control actions. An important side
|
|
96
|
+
effect of this current value is that it also defines the current value at which the full LDC R and X voltages are applied by the controller, where enabled.
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
min_target_deadband: Optional[float] = None
|
|
100
|
+
"""
|
|
101
|
+
[ZBEX]
|
|
102
|
+
This is the minimum allowable range for discrete control in regulating devices, used to prevent frequent control actions and
|
|
103
|
+
promote operational stability. This attribute sets a baseline range within which no adjustments are made, applicable across various devices like voltage
|
|
104
|
+
regulators, shunt compensators, or battery units.
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
_regulating_cond_eq: Optional[List[RegulatingCondEq]] = None
|
|
108
|
+
"""The [RegulatingCondEq] that are controlled by this regulating control scheme."""
|
|
109
|
+
|
|
110
|
+
def __init__(self, regulating_conducting_equipment: Optional[Iterable[RegulatingCondEq]] = None, **kwargs):
|
|
111
|
+
super(RegulatingControl, self).__init__(**kwargs)
|
|
112
|
+
if regulating_conducting_equipment is not None:
|
|
113
|
+
for eq in regulating_conducting_equipment:
|
|
114
|
+
self.add_regulating_cond_eq(eq)
|
|
115
|
+
|
|
116
|
+
@property
|
|
117
|
+
def regulating_conducting_equipment(self) -> Generator[RegulatingCondEq, None, None]:
|
|
118
|
+
"""
|
|
119
|
+
Yields all the :class:`RegulatingCondEq` that are controlled by this :class:`RegulatingControl`.
|
|
120
|
+
|
|
121
|
+
:return: A generator that iterates over all RegulatingCondEq controlled by this RegulatingControl.
|
|
122
|
+
"""
|
|
123
|
+
return ngen(self._regulating_cond_eq)
|
|
124
|
+
|
|
125
|
+
def num_regulating_cond_eq(self) -> int:
|
|
126
|
+
"""
|
|
127
|
+
Get the number of :class:`RegulatingCondEq` that are controlled by this :class:`RegulatingControl`.
|
|
128
|
+
|
|
129
|
+
:return: The number of RegulatingCondEq that are controlled by this RegulatingControl.
|
|
130
|
+
"""
|
|
131
|
+
return nlen(self._regulating_cond_eq)
|
|
132
|
+
|
|
133
|
+
def get_regulating_cond_eq(self, mrid: str) -> RegulatingCondEq:
|
|
134
|
+
"""
|
|
135
|
+
Get a :class:`RegulatingCondEq` controlled by this :class:`RegulatingControl`.
|
|
136
|
+
|
|
137
|
+
:param mrid: The mRID of the desired RegulatingCondEq
|
|
138
|
+
:return: The RegulatingCondEq with the specified mRID if it exists, otherwise None.
|
|
139
|
+
:raises KeyError: If `mrid` wasn't present.
|
|
140
|
+
"""
|
|
141
|
+
return get_by_mrid(self._regulating_cond_eq, mrid)
|
|
142
|
+
|
|
143
|
+
def add_regulating_cond_eq(self, regulating_cond_eq: RegulatingCondEq) -> RegulatingControl:
|
|
144
|
+
"""
|
|
145
|
+
Associate this :class:`RegulatingControl` with a :class:`RegulatingCondEq` it is controlling.
|
|
146
|
+
|
|
147
|
+
:param regulating_cond_eq: The RegulatingCondEq to associate with this RegulatingControl.
|
|
148
|
+
:return: A reference to this RegulatingControl for fluent use.
|
|
149
|
+
"""
|
|
150
|
+
if self._validate_reference(regulating_cond_eq, self.get_regulating_cond_eq, "A RegulatingCondEq"):
|
|
151
|
+
return self
|
|
152
|
+
|
|
153
|
+
self._regulating_cond_eq = list() if self._regulating_cond_eq is None else self._regulating_cond_eq
|
|
154
|
+
self._regulating_cond_eq.append(regulating_cond_eq)
|
|
155
|
+
return self
|
|
156
|
+
|
|
157
|
+
def remove_regulating_cond_eq(self, regulating_cond_eq: Optional[RegulatingCondEq]) -> RegulatingControl:
|
|
158
|
+
"""
|
|
159
|
+
Disassociate this :class:`RegulatingControl` from a :class:`RegulatingCondEq`.
|
|
160
|
+
|
|
161
|
+
:param regulating_cond_eq: The RegulatingCondEq to disassociate from this RegulatingControl.
|
|
162
|
+
:return: A reference to this RegulatingControl for fluent use.
|
|
163
|
+
"""
|
|
164
|
+
self._regulating_cond_eq = safe_remove(self._regulating_cond_eq, regulating_cond_eq)
|
|
165
|
+
return self
|
|
166
|
+
|
|
167
|
+
def clear_regulating_cond_eq(self) -> RegulatingControl:
|
|
168
|
+
"""
|
|
169
|
+
Disassociate all :class:`RegulatingCondEq` from this :class:`RegulatingControl`.
|
|
170
|
+
:return: A reference to this RegulatingControl for fluent use.
|
|
171
|
+
"""
|
|
172
|
+
self._regulating_cond_eq = None
|
|
173
|
+
return self
|
|
@@ -0,0 +1,46 @@
|
|
|
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__ = ["RegulatingControlModeKind"]
|
|
7
|
+
|
|
8
|
+
from enum import Enum, unique
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@unique
|
|
12
|
+
class RegulatingControlModeKind(Enum):
|
|
13
|
+
"""
|
|
14
|
+
The kind of regulation model. For example regulating voltage, reactive power, active power, etc.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
UNKNOWN = 0
|
|
18
|
+
"""Default, unknown."""
|
|
19
|
+
|
|
20
|
+
voltage = 1
|
|
21
|
+
"""Voltage is specified."""
|
|
22
|
+
|
|
23
|
+
activePower = 2
|
|
24
|
+
"""Active power is specified."""
|
|
25
|
+
|
|
26
|
+
reactivePower = 3
|
|
27
|
+
"""Reactive power is specified."""
|
|
28
|
+
|
|
29
|
+
currentFlow = 4
|
|
30
|
+
"""Current flow is specified."""
|
|
31
|
+
|
|
32
|
+
admittance = 5
|
|
33
|
+
"""Admittance is specified."""
|
|
34
|
+
|
|
35
|
+
timeScheduled = 6
|
|
36
|
+
"""Control switches on/off by time of day. The times may change on the weekend, or in different seasons."""
|
|
37
|
+
|
|
38
|
+
temperature = 7
|
|
39
|
+
"""Control switches on/off based on the local temperature (i.e., a thermostat)."""
|
|
40
|
+
|
|
41
|
+
powerFactor = 8
|
|
42
|
+
"""Power factor is specified."""
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def short_name(self):
|
|
46
|
+
return str(self)[26:]
|
|
@@ -0,0 +1,36 @@
|
|
|
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__ = ["RotatingMachine"]
|
|
7
|
+
|
|
8
|
+
from typing import Optional
|
|
9
|
+
|
|
10
|
+
from zepben.ewb.model.cim.iec61970.base.wires.regulating_cond_eq import RegulatingCondEq
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class RotatingMachine(RegulatingCondEq):
|
|
14
|
+
"""
|
|
15
|
+
A rotating machine which may be used as a generator or motor.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
rated_power_factor: Optional[float] = None
|
|
19
|
+
"""Power factor (nameplate data). It is primarily used for short circuit data exchange according to IEC 60909. The attribute cannot be a negative value."""
|
|
20
|
+
|
|
21
|
+
rated_s: Optional[float] = None
|
|
22
|
+
"""Nameplate apparent power rating for the unit in volt-amperes (VA). The attribute shall have a positive value."""
|
|
23
|
+
|
|
24
|
+
rated_u: Optional[int] = None
|
|
25
|
+
"""
|
|
26
|
+
Rated voltage in volts (nameplate data, Ur in IEC 60909-0). It is primarily used for short circuit data exchange according to IEC 60909.
|
|
27
|
+
The attribute shall be a positive value.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
p: Optional[float] = None
|
|
31
|
+
"""
|
|
32
|
+
Active power injection in watts. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
q: Optional[float] = None
|
|
36
|
+
"""Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution."""
|
|
@@ -0,0 +1,42 @@
|
|
|
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__ = ["SeriesCompensator"]
|
|
7
|
+
|
|
8
|
+
from typing import Optional
|
|
9
|
+
|
|
10
|
+
from zepben.ewb.model.cim.iec61970.base.core.conducting_equipment import ConductingEquipment
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class SeriesCompensator(ConductingEquipment):
|
|
14
|
+
"""
|
|
15
|
+
A Series Compensator is a series capacitor or reactor or an AC transmission line without charging susceptance. It is a two terminal device.
|
|
16
|
+
"""
|
|
17
|
+
r: Optional[float] = None
|
|
18
|
+
"""Positive sequence resistance in ohms."""
|
|
19
|
+
|
|
20
|
+
r0: Optional[float] = None
|
|
21
|
+
"""Zero sequence resistance in ohms."""
|
|
22
|
+
|
|
23
|
+
x: Optional[float] = None
|
|
24
|
+
"""Positive sequence reactance in ohms."""
|
|
25
|
+
|
|
26
|
+
x0: Optional[float] = None
|
|
27
|
+
"""Zero sequence reactance in ohms."""
|
|
28
|
+
|
|
29
|
+
varistor_rated_current: Optional[int] = None
|
|
30
|
+
"""
|
|
31
|
+
The maximum current in amps the varistor is designed to handle at specified duration. It is used for short circuit calculations. The attribute shall
|
|
32
|
+
be a positive value. If null and varistorVoltageThreshold is null, a varistor is not present.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
varistor_voltage_threshold: Optional[int] = None
|
|
36
|
+
"""
|
|
37
|
+
The dc voltage in volts at which the varistor starts conducting. It is used for short circuit calculations. If null and varistorRatedCurrent is null,
|
|
38
|
+
a varistor is not present.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def varistor_present(self) -> bool:
|
|
42
|
+
return self.varistor_rated_current is not None or self.varistor_voltage_threshold is not None
|
|
@@ -0,0 +1,59 @@
|
|
|
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__ = ["ShuntCompensator"]
|
|
7
|
+
|
|
8
|
+
from typing import Optional, TYPE_CHECKING
|
|
9
|
+
|
|
10
|
+
from zepben.ewb.model.cim.iec61970.base.wires.phase_shunt_connection_kind import PhaseShuntConnectionKind
|
|
11
|
+
from zepben.ewb.model.cim.iec61970.base.wires.regulating_cond_eq import RegulatingCondEq
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from zepben.ewb.model.cim.iec61968.assetinfo.shunt_compensator_info import ShuntCompensatorInfo
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ShuntCompensator(RegulatingCondEq):
|
|
18
|
+
"""
|
|
19
|
+
A shunt capacitor or reactor or switchable bank of shunt capacitors or reactors. A section of a shunt compensator
|
|
20
|
+
is an individual capacitor or reactor. A negative value for reactivePerSection indicates that the compensator is
|
|
21
|
+
a reactor. ShuntCompensator is a single terminal device. Ground is implied.
|
|
22
|
+
"""
|
|
23
|
+
grounded: bool = False
|
|
24
|
+
"""Used for Yn and Zn connections. True if the neutral is solidly grounded. nom_u : The voltage at which the nominal reactive power may be calculated.
|
|
25
|
+
This should normally be within 10% of the voltage at which the capacitor is connected to the network."""
|
|
26
|
+
|
|
27
|
+
nom_u: Optional[int] = None
|
|
28
|
+
"""The voltage at which the nominal reactive power may be calculated. This should normally be within 10% of the voltage at which the capacitor is connected
|
|
29
|
+
to the network."""
|
|
30
|
+
|
|
31
|
+
phase_connection: PhaseShuntConnectionKind = PhaseShuntConnectionKind.UNKNOWN
|
|
32
|
+
"""The type of phase connection, such as wye or delta."""
|
|
33
|
+
|
|
34
|
+
sections: Optional[float] = None
|
|
35
|
+
"""
|
|
36
|
+
Shunt compensator sections in use. Starting value for steady state solution. Non integer values are allowed to support continuous variables. The
|
|
37
|
+
reasons for continuous value are to support study cases where no discrete shunt compensator's has yet been designed, a solutions where a narrow voltage
|
|
38
|
+
band force the sections to oscillate or accommodate for a continuous solution as input.
|
|
39
|
+
|
|
40
|
+
For `LinearShuntCompensator` the value shall be between zero and `ShuntCompensator.maximumSections`. At value zero the shunt compensator conductance and
|
|
41
|
+
admittance is zero. Linear interpolation of conductance and admittance between the previous and next integer section is applied in case of non-integer
|
|
42
|
+
values.
|
|
43
|
+
|
|
44
|
+
For `NonlinearShuntCompensator`s shall only be set to one of the NonlinearShuntCompensatorPoint.sectionNumber. There is no interpolation between
|
|
45
|
+
NonlinearShuntCompensatorPoint-s.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def shunt_compensator_info(self) -> Optional['ShuntCompensatorInfo']:
|
|
50
|
+
"""The `ShuntCompensatorInfo` for this `ShuntCompensator`"""
|
|
51
|
+
return self.asset_info
|
|
52
|
+
|
|
53
|
+
@shunt_compensator_info.setter
|
|
54
|
+
def shunt_compensator_info(self, sci: Optional['ShuntCompensatorInfo']):
|
|
55
|
+
"""
|
|
56
|
+
Set the `ShuntCompensatorInfo` for this `ShuntCompensator`
|
|
57
|
+
`sci` The `ShuntCompensatorInfo` for this `ShuntCompensator`
|
|
58
|
+
"""
|
|
59
|
+
self.asset_info = sci
|
|
@@ -0,0 +1,105 @@
|
|
|
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__ = ["SinglePhaseKind", "single_phase_kind_by_id", "SINGLE_PHASE_KIND_VALUES"]
|
|
7
|
+
|
|
8
|
+
from enum import Enum, unique
|
|
9
|
+
from typing import Union
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
#
|
|
13
|
+
# NOTE: The following import is actually at the bottom of this file to avoid cyclic imports.
|
|
14
|
+
#
|
|
15
|
+
# from zepben.ewb.model.cim.iec61970.base.core.phase_code import phase_code_from_single_phases, PhaseCode
|
|
16
|
+
#
|
|
17
|
+
|
|
18
|
+
def single_phase_kind_by_id(value):
|
|
19
|
+
"""
|
|
20
|
+
Get a SinglePhaseKind by its value
|
|
21
|
+
|
|
22
|
+
`value` ID of the SinglePhaseKind from 0 as per the order of definition
|
|
23
|
+
Returns The SinglePhaseKind
|
|
24
|
+
"""
|
|
25
|
+
return SINGLE_PHASE_KIND_VALUES[value]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@unique
|
|
29
|
+
class SinglePhaseKind(Enum):
|
|
30
|
+
"""
|
|
31
|
+
Enumeration of single phase identifiers. Allows designation of single phases for both transmission and distribution equipment, circuits and loads.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
NONE = (0, -1)
|
|
35
|
+
"""No phase specified"""
|
|
36
|
+
|
|
37
|
+
A = (1, 0)
|
|
38
|
+
"""Phase A"""
|
|
39
|
+
|
|
40
|
+
B = (2, 1)
|
|
41
|
+
"""Phase B"""
|
|
42
|
+
|
|
43
|
+
C = (3, 2)
|
|
44
|
+
"""Phase C"""
|
|
45
|
+
|
|
46
|
+
N = (4, 3)
|
|
47
|
+
"""Neutral"""
|
|
48
|
+
|
|
49
|
+
X = (5, 0)
|
|
50
|
+
"""An unknown primary phase."""
|
|
51
|
+
|
|
52
|
+
Y = (6, 1)
|
|
53
|
+
"""An unknown primary phase."""
|
|
54
|
+
|
|
55
|
+
s1 = (7, 0)
|
|
56
|
+
"""Secondary phase 1."""
|
|
57
|
+
|
|
58
|
+
s2 = (8, 1)
|
|
59
|
+
"""Secondary phase 2."""
|
|
60
|
+
|
|
61
|
+
INVALID = (9, -1)
|
|
62
|
+
"""Invalid phase. Caused by trying to energise with multiple phases simultaneously."""
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def bit_mask(self):
|
|
66
|
+
return 1 << self.mask_index if self.mask_index >= 0 else 0
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def id(self):
|
|
70
|
+
return self.value[0]
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def mask_index(self):
|
|
74
|
+
return self.value[1]
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def short_name(self):
|
|
78
|
+
return str(self)[16:]
|
|
79
|
+
|
|
80
|
+
def __lt__(self, other):
|
|
81
|
+
return self.id < other.id
|
|
82
|
+
|
|
83
|
+
def __add__(self, other: Union['SinglePhaseKind', 'PhaseCode']) -> 'PhaseCode':
|
|
84
|
+
if isinstance(other, SinglePhaseKind):
|
|
85
|
+
return phase_code_from_single_phases({self, other})
|
|
86
|
+
elif isinstance(other, PhaseCode):
|
|
87
|
+
return phase_code_from_single_phases(set(other.single_phases + [self]))
|
|
88
|
+
else:
|
|
89
|
+
return PhaseCode.NONE
|
|
90
|
+
|
|
91
|
+
def __sub__(self, other: Union['SinglePhaseKind', 'PhaseCode']) -> 'PhaseCode':
|
|
92
|
+
if isinstance(other, SinglePhaseKind):
|
|
93
|
+
return phase_code_from_single_phases({} if (self == other) else {self})
|
|
94
|
+
elif isinstance(other, PhaseCode):
|
|
95
|
+
return phase_code_from_single_phases({} if (self in other) else {self})
|
|
96
|
+
else:
|
|
97
|
+
return PhaseCode.NONE
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
SINGLE_PHASE_KIND_VALUES = list(SinglePhaseKind.__members__.values())
|
|
101
|
+
|
|
102
|
+
#
|
|
103
|
+
# NOTE: The following import is deliberately at the bottom of this file to avoid cyclic imports.
|
|
104
|
+
#
|
|
105
|
+
from zepben.ewb.model.cim.iec61970.base.core.phase_code import phase_code_from_single_phases, PhaseCode # noqa: E402
|
|
@@ -0,0 +1,40 @@
|
|
|
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__ = ["StaticVarCompensator"]
|
|
7
|
+
|
|
8
|
+
from typing import Optional
|
|
9
|
+
|
|
10
|
+
from zepben.ewb.model.cim.iec61970.base.wires.regulating_cond_eq import RegulatingCondEq
|
|
11
|
+
from zepben.ewb.model.cim.iec61970.base.wires.svc_control_mode import SVCControlMode
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class StaticVarCompensator(RegulatingCondEq):
|
|
15
|
+
"""
|
|
16
|
+
A facility for providing variable and controllable shunt reactive power.The SVC typically consists of a step-down transformer, filter, thyristor-controlled reactor,
|
|
17
|
+
and thyristor-switched capacitor arms. The SVC may operate in fixed MVar output mode or in voltage control mode. When in voltage control mode, the output of
|
|
18
|
+
the SVC will be proportional to the deviation of voltage at the controlled bus from the voltage set-point. The SVC characteristic slope defines the proportion.
|
|
19
|
+
If the voltage at the controlled bus is equal to the voltage set-point, the SVC MVar output is zero.
|
|
20
|
+
"""
|
|
21
|
+
capacitive_rating: Optional[float] = None
|
|
22
|
+
"""Capacitive reactance in Ohms at maximum capacitive reactive power. Shall always be positive."""
|
|
23
|
+
|
|
24
|
+
inductive_rating: Optional[float] = None
|
|
25
|
+
"""Inductive reactance in Ohms at maximum inductive reactive power. Shall always be negative."""
|
|
26
|
+
|
|
27
|
+
q: Optional[float] = None
|
|
28
|
+
"""
|
|
29
|
+
Reactive power injection in VAr. Load sign convention is used, i.e. positive sign means flow out from a node.
|
|
30
|
+
Starting value for a steady state solution.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
svc_control_mode: SVCControlMode = SVCControlMode.UNKNOWN
|
|
34
|
+
"""SVC control mode."""
|
|
35
|
+
|
|
36
|
+
voltage_set_point: Optional[int] = None
|
|
37
|
+
"""
|
|
38
|
+
The reactive power output of the SVC is proportional to the difference between the voltage at the regulated bus and the voltage set-point.
|
|
39
|
+
When the regulated bus voltage is equal to the voltage set-point, the reactive power output is zero. Must be in volts.
|
|
40
|
+
"""
|
|
@@ -0,0 +1,28 @@
|
|
|
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__ = ["SVCControlMode"]
|
|
7
|
+
|
|
8
|
+
from enum import Enum, unique
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@unique
|
|
12
|
+
class SVCControlMode(Enum):
|
|
13
|
+
"""
|
|
14
|
+
Static VAr Compensator control mode.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
UNKNOWN = 0
|
|
18
|
+
"""[ZBEX] Unknown control."""
|
|
19
|
+
|
|
20
|
+
reactivePower = 1
|
|
21
|
+
"""Reactive power control."""
|
|
22
|
+
|
|
23
|
+
voltage = 2
|
|
24
|
+
"""Voltage control."""
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def short_name(self):
|
|
28
|
+
return str(self)[15:]
|
|
@@ -0,0 +1,119 @@
|
|
|
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__ = ["Switch"]
|
|
9
|
+
|
|
10
|
+
from typing import Optional, TYPE_CHECKING
|
|
11
|
+
|
|
12
|
+
from zepben.ewb.model.cim.iec61970.base.core.conducting_equipment import ConductingEquipment
|
|
13
|
+
from zepben.ewb.model.cim.iec61970.base.wires.single_phase_kind import SinglePhaseKind
|
|
14
|
+
from zepben.ewb.util import require
|
|
15
|
+
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from zepben.ewb.model.cim.iec61968.assetinfo.switch_info import SwitchInfo
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _calculate_open_state(current_state: int, is_open: bool, phase: SinglePhaseKind = None) -> int:
|
|
21
|
+
require(phase != SinglePhaseKind.NONE and phase != SinglePhaseKind.INVALID,
|
|
22
|
+
lambda: f"Invalid phase {phase} specified")
|
|
23
|
+
if phase is None:
|
|
24
|
+
return 0b1111 if is_open else 0
|
|
25
|
+
else:
|
|
26
|
+
return current_state | phase.bit_mask if is_open else current_state & ~phase.bit_mask
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _check_open(current_state: int, phase: SinglePhaseKind = None) -> bool:
|
|
30
|
+
require(phase != SinglePhaseKind.NONE and phase != SinglePhaseKind.INVALID,
|
|
31
|
+
lambda: f"Invalid phase {phase} specified")
|
|
32
|
+
if phase is None:
|
|
33
|
+
return current_state != 0
|
|
34
|
+
else:
|
|
35
|
+
return (current_state & phase.bit_mask) != 0
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class Switch(ConductingEquipment):
|
|
39
|
+
"""
|
|
40
|
+
A generic device designed to close, or open, or both, one or more electric circuits.
|
|
41
|
+
All switches are two terminal devices including grounding switches.
|
|
42
|
+
|
|
43
|
+
NOTE: The normal and currently open properties are implemented as an integer rather than a boolean to allow for the caching of
|
|
44
|
+
measurement values if the switch is operating un-ganged. These values will cache the latest values from the measurement
|
|
45
|
+
value for each phase of the switch.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
rated_current: Optional[float] = None
|
|
49
|
+
"""The maximum continuous current carrying capacity in amps governed by the device material and construction. The attribute shall be a positive value."""
|
|
50
|
+
|
|
51
|
+
_open: int = 0
|
|
52
|
+
"""Tells if the switch is considered open when used as input to topology processing."""
|
|
53
|
+
|
|
54
|
+
_normally_open: int = 0
|
|
55
|
+
"""The attribute is used in cases when no Measurement for the status value is present. If the Switch has a status measurement the Discrete.normalValue
|
|
56
|
+
is expected to match with the Switch.normalOpen."""
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def switch_info(self) -> Optional[SwitchInfo]:
|
|
60
|
+
"""Datasheet information for this Switch."""
|
|
61
|
+
return self.asset_info
|
|
62
|
+
|
|
63
|
+
@switch_info.setter
|
|
64
|
+
def switch_info(self, si: Optional[SwitchInfo]):
|
|
65
|
+
"""
|
|
66
|
+
Set the :class:`SwitchInfo` for this :class:`Switch`
|
|
67
|
+
:param si: The SwitchInfo for this Switch
|
|
68
|
+
"""
|
|
69
|
+
self.asset_info = si
|
|
70
|
+
|
|
71
|
+
def is_normally_open(self, phase: SinglePhaseKind = None) -> bool:
|
|
72
|
+
"""
|
|
73
|
+
Check if the switch is normally open on `phase`.
|
|
74
|
+
|
|
75
|
+
`phase` The `single_phase_kind.SinglePhaseKind` to check the normal status. A `phase` of `None` (default) checks if any phase is open.
|
|
76
|
+
Returns True if `phase` is open in its normal state, False if it is closed
|
|
77
|
+
"""
|
|
78
|
+
return _check_open(self._normally_open, phase)
|
|
79
|
+
|
|
80
|
+
def get_normal_state(self) -> int:
|
|
81
|
+
"""
|
|
82
|
+
Get the underlying normal open states. Stored as 4 bits, 1 per phase.
|
|
83
|
+
"""
|
|
84
|
+
return self._normally_open
|
|
85
|
+
|
|
86
|
+
def is_open(self, phase: SinglePhaseKind = None) -> bool:
|
|
87
|
+
"""
|
|
88
|
+
Check if the switch is currently open on `phase`.
|
|
89
|
+
|
|
90
|
+
`phase` The `SinglePhaseKind` to check the current status. A `phase` of `None` (default) checks
|
|
91
|
+
if any phase is open.
|
|
92
|
+
Returns True if `phase` is open in its current state, False if it is closed
|
|
93
|
+
"""
|
|
94
|
+
return _check_open(self._open, phase)
|
|
95
|
+
|
|
96
|
+
def get_state(self) -> int:
|
|
97
|
+
"""
|
|
98
|
+
The attribute tells if the switch is considered open when used as input to topology processing.
|
|
99
|
+
Get the underlying open states. Stored as 4 bits, 1 per phase.
|
|
100
|
+
"""
|
|
101
|
+
return self._open
|
|
102
|
+
|
|
103
|
+
def set_normally_open(self, is_normally_open: bool, phase: SinglePhaseKind = None) -> Switch:
|
|
104
|
+
"""
|
|
105
|
+
`is_normally_open` indicates if the phase(s) should be opened.
|
|
106
|
+
`phase` the phase to set the normal status. If set to None will default to all phases.
|
|
107
|
+
Returns This `Switch` to be used fluently.
|
|
108
|
+
"""
|
|
109
|
+
self._normally_open = _calculate_open_state(self._normally_open, is_normally_open, phase)
|
|
110
|
+
return self
|
|
111
|
+
|
|
112
|
+
def set_open(self, is_open: bool, phase: SinglePhaseKind = None) -> Switch:
|
|
113
|
+
"""
|
|
114
|
+
`is_open` indicates if the phase(s) should be opened.
|
|
115
|
+
`phase` the phase to set the current status. If set to None will default to all phases.
|
|
116
|
+
Returns This `Switch` to be used fluently.
|
|
117
|
+
"""
|
|
118
|
+
self._open = _calculate_open_state(self._open, is_open, phase)
|
|
119
|
+
return self
|